in DS recategorized by
265 views
0 votes
0 votes

in DS recategorized by
265 views

4 Comments

Answer should be (B)

According to Cayley's Formula :-

Total Number of possible trees with 'n' labeled nodes = $n^{n-2}$   , $n\geq2$

It can be proved by Prufer Sequences.

0
0

@ankitgupta.1729

brother, in the question they didn't mention that it is binary tree ===> you took an arbitrary tree

right?

0
0

Sir, In question, it is asked about a tree, not a binary tree. binary tree is rooted and ordered.

It is a well-known Cayley's formula to find total number of possible trees if vertices are labeled. In case of rooted trees , this formula becomes $n^{n-2} * n = n^{n-1}$ because any of the n vertices can be selected as a root.

I am attaching the screenshot from the Graph Theory book by Narsingh Deo.

PFA.

   

https://en.wikipedia.org/wiki/Cayley's_formula

1
1

Please log in or register to answer this question.