how to find the number of possible tree in the given tree.

Answers were Sorted based on User's Feedback



how to find the number of possible tree in the given tree...

Answer / baskerdearer

number of possible tree = (2 power n) - n.
for example:
A tree contain three node.
so n=3.
possible tree = 8 - 3 = 5.

Is This Answer Correct ?    179 Yes 26 No

how to find the number of possible tree in the given tree...

Answer / mandeep

the formula is (2^n)-n.
where n=no.of nodes

Is This Answer Correct ?    67 Yes 15 No

how to find the number of possible tree in the given tree...

Answer / vikram_tp

you all are going wrong...
the formula which u have given is only working when n=2 or 3..
bt when n=4 the ans should be 14 not 12
when n=5 ans is 42 and not what comes by the formula...
so there isnt any formula for this..u have to count then by generating the trees by urself...

Is This Answer Correct ?    18 Yes 0 No

how to find the number of possible tree in the given tree...

Answer / m.vinothkumar

no. of possible trees=(2^n)-n.
where n=no.of nodes

I FOUNDED THIS CORRECT FORMULA FROM GRAPHICS FROM
MATHEMATICS BOOK

Is This Answer Correct ?    26 Yes 9 No

how to find the number of possible tree in the given tree...

Answer / himani

(2^n)-n. where n is no. of nodes

Is This Answer Correct ?    20 Yes 7 No

how to find the number of possible tree in the given tree...

Answer / xyz

2^n-n

Is This Answer Correct ?    8 Yes 8 No

how to find the number of possible tree in the given tree...

Answer / sudip

If there are 3 nodes A,B and C. In which A is root and B and
C are it's left and right child...
Then if we want to count the no. of tree..then..

A A A A-alone, B -alone and
/ \ / \ C-alone and the last
B C B C one is null tree.


I think there will be 7 subtrees if we null is subtree then,..

no. of tree = 2^n - 1.

Is This Answer Correct ?    1 Yes 14 No

how to find the number of possible tree in the given tree...

Answer / rohit

Question is wrong XXXX
it should be how to find no. of distinct binary tree ????

ANSWER IS--- (1/(n+1))*2nCn

Is This Answer Correct ?    6 Yes 22 No

how to find the number of possible tree in the given tree...

Answer / tauqueer

2^n-1
if n=3 then
answer= 2^3-1=7.

example..
1
2 2
3/ \3 3/ \3

Is This Answer Correct ?    4 Yes 20 No

how to find the number of possible tree in the given tree...

Answer / gaurav tripathi

2n-n

Is This Answer Correct ?    3 Yes 22 No

Post New Answer

More Data Structures Interview Questions

What are the tasks performed while traversing a binary tree?

0 Answers  


Differentiate between comparable and comparator.

0 Answers  


How do arrays work?

0 Answers  


What is binary search in data structure?

0 Answers  


Does arraylist allow null values?

0 Answers  






What is heap tree explain with example?

0 Answers  


Define 2-3-4 tree?

0 Answers  


What is definition list?

0 Answers  


Explain the terms base case, recursive case, binding time, run-time stack and tail recursion.

0 Answers  


In depth questions regarding the data structures and the Databases used in the Projects developed.

0 Answers   Motorola,


Can we add heterogeneous elements into treemap?

0 Answers  


In what scenario, binary search can be used?

0 Answers  


Categories