Proving the Number of Nodes in a Full Binary Tree

  • Thread starter Thread starter NuPowerbook
  • Start date Start date
  • Tags Tags
    Binary Tree
Click For Summary
To prove that a full binary tree with N≥1 leaves has 2N-1 nodes, the approach involves mathematical induction. The base case is established with P(1), where a single node equals one leaf, confirming the formula. Assuming P(k) holds true, the proof shows that adding one leaf (to make k+1) requires adding two nodes, leading to P(k+1) = 2k + 1. This confirms the inductive step, completing the proof. The definitions of full and complete binary trees were clarified, but the argument remains valid for both types.
NuPowerbook
Messages
8
Reaction score
0
I need to prove that for any full binary tree with N\geq1 leaves, that it has 2N-1 nodes. I can see this when looking at a tree, but I can't figure out how to prove this.
 
Physics news on Phys.org
I'll take a stab at it.

I would try proving by induction on N by letting P(N) be the statement that for a full binary tree with N\geq1 leaves, it has 2N-1 nodes.


starting with the simplest case (a tree consisting of a single node) we'll prove P(1).
in this case #leaves = #nodes = 1.
hence P(1) = 2(1) - 1 and P(1) is a true statement.

now let's assume that P(k) is true for some integer k, where k is greater than or equal to 1.
If we can show that P(k) implies P(k+1) then were done with the proof.

What we want to prove: P(k+1) = 2(k+1) - 1 = 2k + 1

Proof: ( I'll use the notation FBT for "full binary tree" )

a FBT with k+1 leaves has the same number of nodes of a FBT with k leaves + 2.
( notice that you can't add just one node to a FBT for it to remain full )

therefore
P(k+1) = P(k) + 2
P(k+1) = (2k-1) + 2 <---- ( here we used the assumption that P(k) is true )
P(k+1) = 2k + 1

QED


EDIT: I looked up the definitions of both full and complete binary trees online, and realize that they are a little different, however the same argument applies. I went ahead and edited out the word "complete" and changed it to "full".
 
Last edited:
Thank you for the help.
 
Thread 'Correct statement about size of wire to produce larger extension'
The answer is (B) but I don't really understand why. Based on formula of Young Modulus: $$x=\frac{FL}{AE}$$ The second wire made of the same material so it means they have same Young Modulus. Larger extension means larger value of ##x## so to get larger value of ##x## we can increase ##F## and ##L## and decrease ##A## I am not sure whether there is change in ##F## for first and second wire so I will just assume ##F## does not change. It leaves (B) and (C) as possible options so why is (C)...

Similar threads

  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 9 ·
Replies
9
Views
1K
Replies
1
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K