Notices
Results 1 to 6 of 6

Thread: Binary search tree

  1. #1 Binary search tree 
    New Member
    Join Date
    Nov 2011
    Posts
    2
    Does any one know why binary trees are upside down , meaning that the root is a the top while in an actual tree the root is at the bottom ?

    thanx


    Reply With Quote  
     

  2.  
     

  3. #2  
    Forum Masters Degree
    Join Date
    Jan 2011
    Posts
    500
    Because of convention. In the computer science community, one tends to conceptualize things that belong to an object as below that object. So a root has a left and a right node that belongs to it, so we tend to think of them as below the root.


    Reply With Quote  
     

  4. #3  
    New Member
    Join Date
    Nov 2011
    Posts
    2
    my professor said that this is not the answer , there is a special reason why we call it a tree and that the root is a the top and not the bottom
    Reply With Quote  
     

  5. #4  
    WYSIWYG Moderator marnixR's Avatar
    Join Date
    Apr 2007
    Location
    Cardiff, Wales
    Posts
    5,810
    i doubt whether the name "root node" should be taken as equivalent to the root of a tree, more root as the starting point from which all child nodes are derived
    as for why have the root node should be at the top of the diagram, i'm sure that's pure convention, indicating that the derived nodes are shown lower than their parent nodes + someone has decide that "is derived from" should be shown as below the node from which it is derived

    tbh i think your professor is looking for one specific reason why the convention took hold, but convention it still is
    (as a programmer you tend not to take too much notice of the guys who teach because they can't do)
    "Reality is that which, when you stop believing in it, doesn't go away." (Philip K. Dick)
    Reply With Quote  
     

  6. #5  
    Forum Masters Degree
    Join Date
    Jan 2011
    Posts
    500
    I suspect that your professor is gravely mistaken.
    Reply With Quote  
     

  7. #6  
    Brassica oleracea Strange's Avatar
    Join Date
    Oct 2011
    Location
    喫茶店
    Posts
    17,036
    Quote Originally Posted by thedude_il View Post
    my professor said that this is not the answer , there is a special reason why we call it a tree and that the root is a the top and not the bottom
    Did your professor say what this "special reason" is?
    Reply With Quote  
     

Similar Threads

  1. Binary multiplication
    By naspek in forum Computer Science
    Replies: 1
    Last Post: February 19th, 2011, 08:42 PM
  2. Binary search tree problem
    By tonybasil in forum Computer Science
    Replies: 0
    Last Post: February 16th, 2011, 10:03 PM
  3. How much ATP is required for Binary Fission?
    By bowlbyj in forum Biology
    Replies: 1
    Last Post: October 16th, 2008, 06:45 PM
  4. Replies: 2
    Last Post: November 8th, 2007, 01:39 AM
  5. binary integer logic
    By p_eqlz_np in forum Computer Science
    Replies: 2
    Last Post: August 5th, 2006, 10:19 PM
Bookmarks
Bookmarks
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •