what is the maximum number of binary trees that can be formed using 3 unlabeled nodes ? explain..
I think the answer is 10 trees (not BTs)..by defn of a tree...only a single node can also be a tree..then say if there are 3 nodes A,B,C...then each of them individually can be a tree...i.e. 3..then A-B as a tree, C alone i.e +2 =5 and then B-C, A alone i.e +2 = 7 and similarly, A-C, B alone..that makes it 9...+1 taking all 3...so total 10 trees..
as far as BT is concerned..we can have 6 trees..
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks