EE 4780 - PowerPoint PPT Presentation

About This Presentation
Title:

EE 4780

Description:

EE 4780 Huffman Coding Example Huffman Coding Example Suppose X is a source producing symbols; the symbols comes from the alphabet A={a1, a2, a3, a4, a5}. – PowerPoint PPT presentation

Number of Views:34
Avg rating:3.0/5.0
Slides: 4
Provided by: eceLsuEd
Learn more at: https://www.ece.lsu.edu
Category:
Tags: huffman

less

Transcript and Presenter's Notes

Title: EE 4780


1
EE 4780
  • Huffman Coding Example

2
Huffman Coding Example
  • Suppose X is a source producing symbols the
    symbols comes from the alphabet Aa1, a2, a3,
    a4, a5.
  • Suppose that the probability of each symbol is as
    follows 0.4, 0.2, 0.2, 0.15, 0.05.
  • Form the Huffman tree

0
a1
Symbol Probability Codeword a1 0.4
0 a2 0.2
10 a3 0.2 110 a4
0.15 1110 a5 0.05
1111
0.4
0
a2
1.0
0.2
1
0
a3
0.6
0.2
1
0
a4
0.4
1
0.15
Average codeword length 0.41
0.22 0.23 0.154 0.054 2.2 per
symbol
1
0.2
a5
0.05
Entropy
2.08
3
Huffman Coding Example
  • Another possible tree with the same source is

0
a1
Symbol Probability Codeword a1 0.4
0 a2 0.2
100 a3 0.2 101 a4
0.15 110 a5 0.05
111
0.4
0
a2
0
0.2
1.0
0.4
1
a3
1
0.2
0.6
0
a4
1
0.15
Average codeword length 0.41
0.23 0.23 0.153 0.053 2.2 per
symbol
1
0.2
a5
0.05
Write a Comment
User Comments (0)
About PowerShow.com