My blog has moved! Redirecting...

You should be automatically redirected. If not, visit http://ripper234.com and update your bookmarks.

17 March 2008

The On-Line Encyclopedia of Integer Sequences

I was trying to answer this question - how many labeled rooted trees with n nodes are there?

A quick search didn't find the answer (I'm sure a more detailed search would have). Then I had this idea - find the answer for small values of n, and look in the OEIS. I typed 1,2,9,64 in the search and quickly found the answer (which is n^(n-1) for those interested). I thought about it for a couple of minutes but still hadn't come up with an answer as to why this is true.

3 comments:

Anonymous said...

The number of labeled trees on n nodes, which is n^{n-2} by Prüfer's theorem, times n for the selection of which label is the root.

ripper234 said...

Right you are, thanks :)
I'm curious, who is this?

What I immediately found in Wikipedia is the number of unrooted trees is n^{n-2}, but I didn't make the trivial jump to rooted trees.

Anonymous said...

It was me, didn't notice the option to leave a name instead of being anonymous.