Reputation: 812
I have an assignment that reads as follows
Prove that the relationship between nodes (n) and height (h) of Full Binary Tree is 2^h=(n+1)/2.
I have tried the following:
n = 2^(h+1)-1
n+1 = 2^(h+1)
n+1 = 2^h*2
therefore
2^h=(n+1)/2
I know this cant be that simple. That's why I am asking.
Upvotes: 1
Views: 839
Reputation: 421310
From where did you get n = 2^(h+1)-1 ? If you take that formula for granted, there's not much left to prove!
This is type of exercise is typically solved by induction. Here are the steps:
Upvotes: 1