A2 - Text Encoding, due Mon, Sept. 24
in CS 101 on Assignments
Read the lecture notes on Text Encoding & Compression.
Then, using the given Huffman Tree, encode the following words.
- King
- Queen
- Bishop
- Knight
- Rook
- Pawn
Finally, encode the letters of your last name. For example, my last name (RAMNAUTH
) encoded using the Huffman algorithm would be:
R
=0000
A
=1100
M
=111101
N
=0101
A
=1100
U
=111111
T
=1110
H
=0001
Therefore, RAMNAUTH
can be represented as 0000 1100 111101 0101 1100 111111 1110 0001
.
Reminder: Notebooks are collected and graded on Mondays.