Name: ________________________________

Honor Code Acknowledgment: ___________________


Random Quiz #8

CPS 100, Spring 1997

Due: March 31


Problem 1: Codaaaaaaaa (3 points)

Use the Huffman tree shown to decode the bit-stream indicated:

         10100010111010001000010011

Problem 2: Strawhouses R Us (3 points)

The nodes shown below represent the initial forest of trees based on frequency of character occurrences: a letter is shown with the number of occurrences of that letter in each node. Draw a final Huffman tree constructed from this initial forest of one-node trees.

Problem 3: Big and Bushy (3 points)

In a complete binary tree, every non-leaf node has two children, and all the leaves are at the same level. Two examples of complete trees are shown below.

If there are n levels in a complete tree (the tree on the left above has two levels, the tree on the right has four) what is the total number of nodes in the complete tree (both leaves and internal nodes) and the total number of leaves in the complete tree. Express answers in terms of n.

 



      
Owen L. Astrachan
Last modified: Fri Mar 28 10:14:50 EST