Question

In: Computer Science

Suppose k is any natural number, k >= 0. Prove that the number of nodes in...

Suppose k is any natural number, k >= 0. Prove that the number of nodes in any binomial tree of height k is exactly 2^k.

Solutions

Expert Solution

For the binomial tree Bk,
1. There are 2k nodes.
2. The height of the binomial tree is k.
3. There are exactly ?ki ? nodes at depth i = 0,1,...,k.
4. The root has degree k, which is greater than that of any other node, moreover if the children of the root are numbered from left to right by k−1,k−2,...,0, child i is the root of the subtree Bi.


Proof of Property 1: Mathematical induction on k. The binomial tree B0 is the base binomial tree for k = 0. Clearly, by definition, B0 is a single node. Consider a binomial tree Bk, k ≥ 1. Since Bk is constructed using two copies of Bk−1, by the hypothesis, each Bk−1 has 2k−1 nodes. Thus, Bk has 2k−1 + 2k−1 = 2k nodes. Hence the claim.
Proof of Property 2: Mathematical induction on k. Clearly, B0 has height ’0’. By the hypothesis, Bk−1 has height k − 1. For Bk, one of the Bk−1’s becomes the root and hence the height increases by one when the other Bk−1 is attached. Thus, the height of Bk is k − 1 + 1 = k.
Proof of Property 3: Let D(k,i) be the number of nodes at depth i for a binomial tree of degree k. Since Bk is constructed using two copies of Bk−1, the nodes at depth (i − 1) of Bk−1 becomes the nodes at depth i for Bk. Therefore,
=
D(k, i) = D(k − 1, i) + D(k − 1, i − 1); = k−1Ci + k−1Ci−1;
(k − 1)! + (k − 1)! ; i!(k − 1 − i)! (i − 1)!(k − 1 − i + 1)!
(k−1)! ?1 1 ? = (k−i−1)!(i−1)! i+k−i ;
= k! ; i!(k − i)!
-1 7 9
= kCi
Proof of Property 4: Follows from the recursive definition of Bk.


Related Solutions

Suppose H is a binary min-heap with n nodes, Prove the following facts: Any algorithm that...
Suppose H is a binary min-heap with n nodes, Prove the following facts: Any algorithm that must nd the maximum key of the heap must search all of the leaf nodes.
Prove that every natural number is odd or even.
Prove that every natural number is odd or even.
Let (?,?,?) be a probability space and suppose that ?∈? is an event with ?(?)>0. Prove...
Let (?,?,?) be a probability space and suppose that ?∈? is an event with ?(?)>0. Prove that the function ?:?→[0,1] defined by ?(?)=?(?|?) is a probability on (?,?).
Let x, y be integers, and n be a natural number. Prove that x ^(2n) −...
Let x, y be integers, and n be a natural number. Prove that x ^(2n) − y ^(2n) is divisible by x + y
Let the cardinal number of N, the set of all natural numbers, be א0. Prove that...
Let the cardinal number of N, the set of all natural numbers, be א0. Prove that the product set N × N = {(m,n);m ∈ N,n ∈ N} has the same cardinal number. Further prove that Q+, the set of all positive rational numbers, has the cardinal number N_0. Hint: You may use the formula 2^(m−1)(2n − 1) to define a function from N × N to N, see the third example on page 214 of the textbook.
For independent projects, is it true that if PI>1.0, then NPV>0 and IRR>K? prove
For independent projects, is it true that if PI>1.0, then NPV>0 and IRR>K? prove
How many spherical nodes and planar (angular) nodes does a 2s orbital have? 0, 1 0,...
How many spherical nodes and planar (angular) nodes does a 2s orbital have? 0, 1 0, 0 2, 1 1, 0 2, 0
Let L = {b2k aab2k | k ≥ 0}. Use Myhill-Nerode to prove that L is...
Let L = {b2k aab2k | k ≥ 0}. Use Myhill-Nerode to prove that L is not regular
Use the Well-Ordering Principle of the natural numbers to prove that every positive rational number x...
Use the Well-Ordering Principle of the natural numbers to prove that every positive rational number x can be expressed as a fraction x = a/b where a and b are postive integers with no common factor.
Prove "The Birthday Problem" in this regard, Suppose there are some number of people in a...
Prove "The Birthday Problem" in this regard, Suppose there are some number of people in a room and we need need to consider all possible pairwise combinations of those people to compare their birthdays and look for matches.Prove the probability of the matches.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT