Presentation is loading. Please wait.

Presentation is loading. Please wait.

EE 4780 Huffman Coding Example. Bahadir K. Gunturk2 Huffman Coding Example Suppose X is a source producing symbols; the symbols comes from the alphabet.

Similar presentations


Presentation on theme: "EE 4780 Huffman Coding Example. Bahadir K. Gunturk2 Huffman Coding Example Suppose X is a source producing symbols; the symbols comes from the alphabet."— Presentation transcript:

1 EE 4780 Huffman Coding Example

2 Bahadir K. Gunturk2 Huffman Coding Example Suppose X is a source producing symbols; the symbols comes from the alphabet A={a1, 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: a1 a2 a3 a4 a Symbol | Probability | Codeword a a a a a Average codeword length = 0.4* * * * *4 = 2.2 per symbol Entropy = = 2.08

3 Bahadir K. Gunturk3 Huffman Coding Example Another possible tree with the same source is: a1 a2 a3 a4 a Symbol | Probability | Codeword a a a a a Average codeword length = 0.4* * * * *3 = 2.2 per symbol


Download ppt "EE 4780 Huffman Coding Example. Bahadir K. Gunturk2 Huffman Coding Example Suppose X is a source producing symbols; the symbols comes from the alphabet."

Similar presentations


Ads by Google