answersLogoWhite

0

As far as i Know, just one.

Do you know any formula to calculate how many binary search trees are possible?

--

answer:

(2n C n) / (n+1) = ( factorial (2n) / factorial (n) * factorial (2n - n) ) / ( n + 1 )

where 'n' is number of element (integer/string)

like:

N Number of BST

1 1

2 2

3 5

4 14

5 42

6 132

and so on

User Avatar

Wiki User

15y ago

Still curious? Ask our experts.

Chat with our AI personalities

JordanJordan
Looking for a career mentor? I've seen my fair share of shake-ups.
Chat with Jordan
ReneRene
Change my mind. I dare you.
Chat with Rene
BeauBeau
You're doing better than you think!
Chat with Beau
More answers

balanced 6:

A(B,C)

A(C,B)

B(A,C)

B(C,A)

C(A,B)

C(B,A)

unbalanced 24:

A(B(C,),)

A(B(,C),)

A(,B(C,))

A(,B(,C))

A(C(B,),)

A(C(,B),)

A(,C(B,))

A(,C(,B))

...

30 total

User Avatar

Wiki User

16y ago
User Avatar

Try it recursively.

for 1 nodes it is 1.

For 2 distinct nodes it is 4.

For 3 nodes, using combinationaries it is 3*(4+4+2)=30

For 4 nodes it is 4 *(30*2+2*(4*1))=272(required answer)

Here answer is for creating any binary tree with no imposed restriction upon it.

Another answer: Not allowing empty trees, it is four or less. (Allowing empty trees it is infinite.)

User Avatar

Wiki User

13y ago
User Avatar

Answer is Catalan number i.e 2n!/(n!*(n+1)!) where n is number of nodes.

User Avatar

Wiki User

11y ago
User Avatar

How many nodes are in a binary tree?

How many binary trees in a node?

Come on think, if this is too hard for you think about changing your courses.

User Avatar

Wiki User

14y ago
User Avatar

It is 2^4 =16.

User Avatar

Wiki User

10y ago
User Avatar

14

User Avatar

Wiki User

10y ago
User Avatar

2n

User Avatar

Wiki User

12y ago
User Avatar

12

User Avatar

Anonymous

4y ago
User Avatar

Add your answer:

Earn +20 pts
Q: How many different binary trees can be made from three nodes?
Write your answer...
Submit
Still have questions?
magnify glass
imp