On Thu, 2009-02-19 at 22:57 +1100, Timothy S. Nelson wrote: > On Thu, 19 Feb 2009, Carl Mäsak wrote: > > A tree is a graph without cycles.
That's insufficient. In fact, there are a number of ways that the general concept of an acyclic graph must be constrained before you get something you can call a 'tree'. > > The concept of a "root" is very common in computer representations, but in > > no way necessary for a general tree. In fact, in phylogenetics, it's > > business as usual to handle unrooted trees. This makes the $root attribute > > meaningless in at least some cases. > > Interesting. I'm happy to assume that $root is allowed to be > Undefined, I think. But let me ask a question; were you to represent an > unrooted tree in a computer, how would you do it so that, if you had to look > around the tree, you could do it? You'd need some node that was an > entry-point into the tree. That's the purpose I'm trying to get at here. A tree with nodes but without a root is not a tree -- it's a collection of trees, more commonly called a grove or forest. -'f