NAMES:

LOGINS:

PRECEPT:

COS 226 Exercises on Data Compression


1. Draw the Huffman tree for the following string; give the codewords for each of the 5 symbols {e, h, r, t, w}; and give the length (in bits) of the encoded message.
weweretherewewerehere



















2. Give the LZW encoding for the following string using the method in the online lecture notes.

weweretherewewerehere