Homework 7

Due Thursday, November 17
5 points.

The diagrams that you should draw for the following questions should be conceptual. That is, you should draw lines between nodes to indicate parent-child relationships rather than sibling relationships.

  1. (1 point) Draw a diagram of a binomial tree of rank 2.

  2. (1 point) Draw a diagram of a binomial tree of rank 3.

  3. (1 point) A binomial heap has 14 nodes. What are the ranks of the binomial trees it contains?

  4. (1 point) You are given two binomial trees:

    Show the binomial tree that results from merging these two trees.

  5. (1 point) Suppose you are given a binomial heap containing two binomial trees:

    Show the binomial heap after removing the highest priority node.