Yup thats perfectly true. Its just that he is new to the concept so I added that family trees are usually not binary trees. In fact they may not even be trees ..they may be graph as Dave suggested !
On Tue, Jun 3, 2008 at 3:58 PM, Dave <[EMAIL PROTECTED]> wrote: > > Does that aspect of his question matter as to whether the tree is a > binary tree or a general tree? The point is that the node and the > value associated with the node are entirely different things. > > For that matter, my uncle's family tree is not a tree at all, since he > has two paths up the tree to the same ancestor. This happened because > someone in one subtree of that person married someone in anther > subtree many generations later. > > Dave > > On Jun 3, 10:48 am, "Ajinkya Kale" <[EMAIL PROTECTED]> wrote: > > On Tue, Jun 3, 2008 at 1:35 PM, Dave <[EMAIL PROTECTED]> wrote: > > > > > The definition is recursive. The empty binary tree is the base case > > > for the recursion. If a binary tree couldn't be empty, then all binary > > > trees would have to be infinite. One way to think of this is that the > > > left and right subtrees of the leaf nodes of the tree are empty trees. > > > > > Don't confuse the nodes with any values associated with the nodes. The > > > nodes are divided into three disjoint subsets, but duplicate values do > > > not have to be divided correspondingly. Think of a tree describing > > > family relationships. I have a second cousin whose name is the same as > > > mine. There would be two nodes distinct nodes in the tree with value > > > "David S Dodson." These nodes would have different parents and > > > grandparents, but the same great-grandparents. > > > > Nice example. Nevertheless family tree are suitable examples for general > > trees rather than binary trees , isnt it ? > > > > > > > > > > > > > > > > > Dave > > > > > On Jun 3, 5:55 am, Vinodh <[EMAIL PROTECTED]> wrote: > > > > Started reading about Binary Trees and got the following questions in > > > > mind. Please help. > > > > > > Definition of a Binary Tree from "Data Structures using C and C++ by > > > > Tanenbaum" goes like this, > > > > "A binary tree is a finite set of elements that is either empty or is > > > > partitioned into three disjoint subsets. The first subset contains a > > > > single element called the 'Root' of the tree. The other two subsets > > > > are themselves binary trees, called the 'Left' and 'Right' subtrees > of > > > > the original tree." > > > > > > My Questions: > > > > 1) Why they talk about a binary tree that is totally empty? I mean a > > > > binary tree with Zero elements? > > > > > > 2) A binary tree is partioned into three disjoint subsets. That means > > > > all the elements in a binary tree should be unique? Duplicate > elements > > > > are allowed within a subtree? Any significance of this? > > > > > > Thanks, > > > > Vinodh > > > > -- > > Ciao, > > Ajinkya- Hide quoted text - > > > > - Show quoted text - > > > -- Ciao, Ajinkya --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/algogeeks -~----------~----~----~----~------~----~------~--~---
