What is exactly the definition of a complete binary tree?

Click For Summary

Discussion Overview

The discussion centers around the definition of a complete binary tree, exploring various interpretations and sources that provide differing definitions. Participants express confusion over the terminology and seek clarity on the concept, which is relevant to theoretical and mathematical contexts.

Discussion Character

  • Debate/contested
  • Conceptual clarification
  • Technical explanation

Main Points Raised

  • Some participants cite definitions from different sources, noting variations such as the requirement for internal nodes to have two children and the arrangement of nodes at the deepest level.
  • One participant emphasizes that a complete binary tree is filled on all levels except possibly the last, where nodes must be positioned as far left as possible.
  • Another participant points out that definitions from different sources, like NIST and PlanetMath, can lead to ambiguity, particularly regarding the terms "full" and "complete" binary trees.
  • There is a discussion about the implications of these definitions on the total number of nodes in a complete binary tree, with references to mathematical theorems and induction proofs.
  • One participant expresses skepticism about the clarity of some definitions, suggesting that the terminology can be misleading.

Areas of Agreement / Disagreement

Participants do not reach a consensus on a single definition of a complete binary tree, highlighting multiple competing views and interpretations of the term.

Contextual Notes

There are limitations in the definitions provided, including potential ambiguity in terminology and the dependence on specific interpretations of "complete" and "full" binary trees. Some definitions may not address all scenarios or assumptions clearly.

Eus
Messages
93
Reaction score
0
Hi Ho! ^_^

Actually, what is the definition of a complete binary tree?
I have searched the Internet and come up with several definition. This problem is confusing enough.

According to http://planetmath.org/encyclopedia/CompleteBinaryTree.html ,
"A complete binary tree is a binary tree with the additional property that every node must have exactly two children if an internal node, and zero children if a leaf node."

Moreover, in http://www.nist.gov/dads/HTML/completeBinaryTree.html,
"A binary tree in which every level, except possibly the deepest, is completely filled. At depth n, the height of the tree, all nodes must be as far left as possible."

Furthermore, my lecture note says,
"A Complete Binary Tree is a Binary Tree with leaves on either a single level or on two adjacent levels such that the leaves on the bottommost level are placed as far left as possible"

Well, I don't know where I can find the right definition of a complete binary tree. Could you please help me?

Any help would be appreciated ^^
Thank you very much! ^^v
 
Last edited by a moderator:
Mathematics news on Phys.org
I didn't know what a binary tree was until I saw this post, but I looked through some books on Amazon, and even they give (substantially) different definitions. I also checked several sites, and there is most agreement on:
1) All nodes of the deepest level being as far left as possible.
2) All levels except possibly the deepest being completely filled (having the maximum number of nodes).
What isn't clear is whether every internal node must have exactly two branches (or children).
Theorem. A complete binary tree of height h > 0 contains at least 2h and at most 2h+1 - 1 nodes.
-http://www.brpreiss.com/books/opus4/html/page355.html
I found this theorem elsewhere. Of course, I also found a problem:
Prove the following statement using mathematical induction: A complete binary tree of height h has 2^{h+1} - 1 nodes.
-source
I also found this elsewhere. The point of finding them was that 1) if every internal node must have exactly two branches, then the total number of nodes would always be odd (perhaps with the empty node or node that's just the root as exceptions). So if the total number of nodes can be even, then the internal nodes (on the second deepest level) don't need to have exactly two branches. 2) To show why I think the "right" definition is whichever definition you use. 3) Eh, it was interesting to learn about.
Maybe there's more consensus then there seems to be and someone who knows the subject better can let you know what it is. But if no one else replies, I would go with the definition that best suits your problem or try to find out from your book, problem, or teacher if you're expected to use a certain definition. Good luck.
 
a complete binary tree is complete on all levels except maybe the last in which case the nodes must be to the left...always go to mathworld.com to check for definitions. That is to say that its filled up on everylevel.
NOTE in mathematics that is the worst definition possible but in lamens its the easiest explanation to understand

x
x x
x x x x
x x x x

the last 2 definitions imply this though through strange wording
The Lecture Notes: what its saying is that the leaves can be on the 2nd lowest level
but all the leaves on the bottom must be towards the left as the diagram above.
Really weird wording
the Nist def'n" is basically what I said with math terms.

The Planet def'n i belivee is wrong
 
If you go to the NIST website and look up "full binary tree" you'll get the definition given by PlanteMath for "complete binary tree." As far as I know, there is indeed some ambiguity here. It is possible to see in texts "full" and "complete" using the definition that is given to the other term by NIST. It is also possible to see a source defining "complete" as NIST defines "full" (as in the previous case) but does not define "full" at all (not as in the previous case), as does PlanetMath.
 
Thank you very much for the information, guys! ^_^

Hi Ho! ^_^

Thank you very much for your precious information, guys! ^_^
I really appreciate them! ^^v

See you later, guys! ^_^
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
1
Views
2K
Replies
1
Views
3K
  • · Replies 13 ·
Replies
13
Views
5K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 9 ·
Replies
9
Views
3K
Replies
1
Views
2K