Huffman Codes Example Otvio Braga  Say e want to encode a tex
98K - views

Huffman Codes Example Otvio Braga Say e want to encode a tex

brPage 1br Huffman Codes Example Ot57569vio Braga brPage 2br Say e want to encode a text with the characters a Example Frequency 37 18 29 13 30 17 brPage 3br Total size is 37

Download Pdf

Huffman Codes Example Otvio Braga Say e want to encode a tex




Download Pdf - The PPT/PDF document "Huffman Codes Example Otvio Braga Say e..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.



Presentation on theme: "Huffman Codes Example Otvio Braga Say e want to encode a tex"— Presentation transcript:


Page 1
Huffman Codes Example Otvio Braga
Page 2
Say e want to encode a text with the characters a, Example Frequency 37 18 29 13 30 17
Page 3
Total size is: (37 + 18 + 29 + 13 + 30 + 17 + 6) x 3= 450 bits Fixed Length Code Frequency 37 18 29 13 30 17 Fixed length code 000 001 010 011 100 101 110
Page 4
Total size is: 37x2 + 18x3 + 29x3 + 13x4 + 30x2 + 17x3 + 6x4 = 402 bits A avings of approximately 11% Variable Length Code Frequency 37 18 29 13 30 17 Variable length code 10 011 111 1101 00 010 1100
Page 5
Constructing a Huffman Code


Page 6
Constructing a Huffman Code
Page 7
Constructing a Huffman Code
Page 8
Constructing a Huffman Code
Page 9
Constructing a Huffman Code
Page 10
Constructing a Huffman Code
Page 11
Constructing a Huffman Code
Page 12
Constructing a Huffman Code
Page 13
Constructing a Huffman Code
Page 14
Constructing a Huffman Code
Page 15
Constructing a Huffman Code
Page 16
Constructing a Huffman Code
Page 17
Constructing a Huffman Code
Page 18
Constructing a Huffman Code


Page 19
Constructing a Huffman Code
Page 20
Constructing a Huffman Code
Page 21
Constructing a Huffman Code
Page 22
Resulting Code 10 011 111 1101 00 010 1100