M2 Huffman
M2 Huffman
Neena Raj N. R.
January 2024
Syllabus
Module 2
Run length encoding, RLE Text compression, Statistical methods-Prefix Codes,
Binary Huffman coding, Illustration of Binary Huffman coding, Non-binary
Huffman Algorithms, Arithmetic Coding algorithm, Illustration of Arithmetic
Coding algorithm,
Course Outcomes
CO1 Describe the fundamental principles of data Understand
compression.
CO2 Apply
Make use of statistical and dictionary based
compression techniques for various applications
CO3 Illustrate various image compression standards. Apply
CO4 Summarize video compression mechanisms to re- Understand
duce the redundancy in video.
CO5 Use the fundamental properties of digital audio Understand
to compress audio data.
c(a4 ) = α1 ∗ 0
c(a5 ) = α1 ∗ 1
c(a3 ) = α2 ∗ 0
c(a40 ) = α2 ∗ 1
= α1
c(a4 ) = α2 ∗ 10
c(a5 ) = α2 ∗ 11
c(a30 ) = α3 ∗ 0
= α2
c(a1 ) = α3 ∗ 1
c(a3 ) = α3 ∗ 01
c(a4 ) = α3 ∗ 010
c(a5 ) = α3 ∗ 011
c(a3 ”) = 0
c(a2 ) = 1
c(a1 ) = 01
c(a3 ) = 001
c(a4 ) = 0010
c(a5 ) = 0011
Figure (a) shows a Huffman code tree for five symbols with
probabilities 0.15, 0.15, 0.2, 0.25, and 0.25.
The average code size is
2 × .25 + 3 × .15 + 3 × .15 + 2 × .20 + 2 × .25 = 2.3bits/symbol.
Neena Raj N. R. CS1U43D DCT January 2024 30 / 36
Huffman Coding Nonbinary Huffman Coding
Figure (b) shows a ternary Huffman code tree for the same five
symbols. The tree is constructed by selecting, at each step, three
symbols with the smallest probabilities and merging them into one
parent symbol, with the combined probability. The average code size
of this tree is
2 × .15 + 2 × .15 + 2 × .20 + 1 × .25 + 1 × .25 = 1.5trits/symbol.
Module 2
Run length encoding, RLE Text compression, Statistical methods-Prefix Codes,
Binary Huffman coding, Illustration of Binary Huffman coding, Non-binary
Huffman Algorithms, Arithmetic Coding algorithm, Illustration of Arithmetic
Coding algorithm,
Course Outcomes
CO1 Describe the fundamental principles of data compression. Understand
CO2 Apply
Make use of statistical and dictionary based compression tech-
niques for various applications
CO3 Illustrate various image compression standards. Apply
CO4 Summarize video compression mechanisms to reduce the re- Understand
dundancy in video.
CO5 Use the fundamental properties of digital audio to compress Understand
audio data.
References