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 webpage (www.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.).

  5. 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.

    {{/Labs/01/Images/HuffmanScrabble.svg}}

  6. Perform a similar comparison between the code lengths for letters in Morse code (Google for a table of Morse code characters) and those to the above Huffman coding. What did you discover?