CS3 Coursenotes

Chapter 5 Week 6

| About   «  4.1. Heaps   ::   Contents   ::   5.2. Tries  »

5.1. Huffman Coding

5.1.1. Coding

  • ASCII codes are fixed length (7 + 1 bits)

    • In general, $n$ bits can store $2^n$ codes

  • An alternative is variable-length coding

    • The relative frequencies for eight selected letters.

\[\begin{split}\begin{array}{|c|cccccccc|} \hline \textrm{Letter} & C & D & E & K & L & M & U & Z\\ \textrm{Frequency} & 32 & 42 & 120 & 7 & 42 & 24 & 37 & 2\\ \hline \end{array}\end{split}\]

5.1.2. Huffman Coding Trees

5.1.3. Assigning Codes

5.1.4. Using Codes

5.1.5. Decoding

   «  4.1. Heaps   ::   Contents   ::   5.2. Tries  »

Close Window