## Introduction

The number of distinct binary trees formed from a given number of nodes of a binary tree, is known as the enumeration of a binary tree. The labelling of the binary tree's nodes can make a difference in how distinct these binary trees are. There are two forms of binary trees, depending on how the nodes in a binary tree are labelled:

**Labelled trees**

## Tree Type’s

**Labelled Binary Tree:** In the Labelled Binary Tree, all of the nodes in a binary tree are given correct labels. In a labelled binary tree, this indicates that all of the nodes are organised in a specific order or sequence.

**Unlabelled Binary Tree: **The nodes in an unlabelled binary tree are not given labels. Because there is no unique attribute to distinguish the various nodes of a binary tree, the order or sequence of the nodes in the binary tree is irrelevant.

### For a given number of nodes, create a labelled binary tree.

N = 2 (number of nodes)

```
Similarly, given N nodes, we may find the number of different labelled binary Trees.
N = 1
count = 1
N = 2
count = 4
N = 3
count = 30
N = 4
count = 336
```

We can see all of the types of arrangements made for unlabeled nodes for each of the labelled nodes here. As a result, the count will be n! * unlabeled binary tree count.

**C(N) = n! * ( (2n!) / (n+1)! * n! ) )**

There are two trees that are skewed to the left and two trees that are skewed to the right named as right-skewed trees and left-skewed trees.

1. Node 1 is the root node, and node 2 is the left child node in the first **left-skewed tree**. Node two operates as the root node of the left-skewed binary tree, with node one as the left child node in the second left-skewed tree.

2. Two **right-skewed binary trees** with the same number of nodes have the same number of nodes, but the positions of those nodes in the tree are different. Node one serves as the binary tree's root node, while node two serves as the tree's child node in the first right-skewed binary tree. In the second right-skewed binary tree, node two serves as the binary tree's root node, while node one serves as the tree's child node.