Google Answers Logo
View Question
 
Q: Graph and Tree Problems ( Answered,   0 Comments )
Question  
Subject: Graph and Tree Problems
Category: Computers > Graphics
Asked by: math01-ga
List Price: $2.00
Posted: 17 Nov 2002 09:57 PST
Expires: 17 Dec 2002 09:57 PST
Question ID: 109370
1. How many binary nodes does a binary tree with 100 leaves have?

Request for Question Clarification by answerguru-ga on 17 Nov 2002 15:44 PST
Hi math01,

The only way you can know this for sure is if this is a FULL binary
tree..can I make this assumption?

Thanks,
answerguru-ga
Answer  
Subject: Re: Graph and Tree Problems
Answered By: maniac-ga on 17 Nov 2002 17:24 PST
 
Hello Math01,

The short answer is 99. This is because the number of internal nodes
is always one less than the number of external nodes (leaves).

There is a pretty comprehensive reference on this (including proofs
and lemmas) at:
  http://www.cs.unb.ca/courses/cs3913/BinTrees.pdf
or a HTML version in the Google cache at
http://216.239.53.100/search?q=cache:yigzd4sSk70C:www.cs.unb.ca/courses/cs3913/BinTrees.pdf+number+of+nodes+in+a+binary+tree&hl=en&ie=UTF-8
which shows the inductive proof for this 

Search terms for this kind of information includes
  number of nodes in a binary tree

--Maniac
Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy