Name: ________________________________

Honor Code Acknowledgment: _____________________________


Random Quiz 9

CPS 100, Fall 1996

7 points

Due: December 5


Problem 1: Huffman's Tree (3 pts)

Consider the following letters and the number of occurences of each letter.

   letter:   r   o   w   b   a   t   y   u
   occurs:   1   2   3   4   5   6   7   8

Draw the huffman tree (optimal encoded tree) for these letters.

Problem 2: Maximum number of Children (4 pts)

Consider the following huffman tree.

PART A: For each letter, list its bit representation. (0 is go left, 1 is go right)

PART B: Give the unique encoding of the word: rope