Close
Register
Close Window

CSC 201 Data Structures

Chapter 6 Binary Trees

Show Source |    | About   «  6.12. Array Implementation for Complete Binary Trees   ::   Contents   ::   6.14. Binary Search Trees  »

6.13. Huffman Coding

6.13.1. Huffman Coding

6.13.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}\]

6.13.1.2. Huffman Coding Trees

Settings

Proficient Saving... Error Saving
Server Error
Resubmit

6.13.1.3. Assigning Codes

Settings

Proficient Saving... Error Saving
Server Error
Resubmit

6.13.1.4. Using Codes

Settings

Proficient Saving... Error Saving
Server Error
Resubmit

6.13.1.5. Decoding

Settings

Proficient Saving... Error Saving
Server Error
Resubmit

   «  6.12. Array Implementation for Complete Binary Trees   ::   Contents   ::   6.14. Binary Search Trees  »

nsf
Close Window