Newer
Older
labs / tiddlers / content / labs / lab01 / _Labs_01_Exercises.md
  1. Using the Wikipedia-derived Huffman coding:
    a. encode your full name and count the number of bits required for the encoding (remember to encode the spaces between your names).
    b. encode your student user code and count the number of bits required for the encoding.
    c. Encode your student ID and count the number of bits required for the encoding.
    d. Encode the University of Otago contact number (+64 3 479 7000) and count the number of bits required for the encoding.
    e. Encode the University of Otago contact email (university@otago.ac.nz) and count the number of bits required for the encoding.
  2. The Wikipedia-derived Huffman coding represents 48 characters – if these were encoded using a naïve coding, how many bits would be required per character?
  3. Based on the naïve coding, how many bits would be required to encode:
    a. your full name (including spaces between names)?
    b. your student user code?
    c. your student ID?
    d. the University of Otago contact phone number?
    e. the University of Otago contact email address?
  4. Based on the results in steps 1 and 3, comment on the efficiency of the Wikipedia-derived Hufman coding for encoding the various types of information you worked with (names, IDs, numbers, etc.).

Final Exercises

1 . In the game Scrabble, each letter is given a score. Compare the letter scores in Scrabble to the code lengths for the corresponding letters in our Wikipedia-derived Huffman coding. Briefly comment on this comparison. We have extracted the letters for you in the table below (they are also available on Blackboard).

{{/Labs/01/Images/HuffmanScrabble.png}} 2 . Perform a similar comparison between the code lengths for letters in Morse code and those in our Wikipedia-derived Huffman coding. Briefly comment on this comparison.