Subj : Re: how many trees are possible if i have n nodes ?? To : comp.programming From : Joe Seigh Date : Thu Sep 15 2005 09:10 am maadhuu wrote: > hello, i would want to know as to how many trees are possible if there are > n nodes present. > thanking you, > ranjan. > Well, first suppose you have a graph that is a tree. Can you add any additional edges and still have it be a tree? No. So I think you have a recursive formula here that you can solve by iteration. If you know the soluntion for n nodes, f(n), what's the formula for n+1 nodes, f(n+1)? Hint, start for n=0, n=1, ... -- Joe Seigh When you get lemons, you make lemonade. When you get hardware, you make software. .