HW2, problem 2.
EECS 207A. UCI. Fall 2004
By Nasser Abbasi
First generate the frequency table.
Then use this table to generate the Binary tree. This is the result of these 2 steps:
Next Generate the Huffman coding for the above tree. This is the result:
Next, use the tree to generate the Huffman code and calculate the compression ratio.
This is the final result:
For the given input, Huffman encoding resulted in 49% saving in data bandwidth.