Huffman tree coding

SubathraKishore 78 views 50 slides Feb 27, 2020
Slide 1
Slide 1 of 50
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50

About This Presentation

Greedy Methodology


Slide Content

Huffman Tree Coding Greedy Technique 1 Dr. P. Subathra Prof/ IT KAMARAJ College of Engg . & Tech (AUTONOMOUS) Madurai

Huffman Tree Coding Encoding In computer technology,  encoding  is the process of putting a sequence of characters into a special format for transmission or storage purposes. Code Word The special format that represents each character is called as the code word Fixed Length Encoding fixed-length encoding that assigns to each symbol a bit string of the same length m Eg . ASCII codes Variable Length Encoding Variable-length encoding , which assigns codewords of different lengths to different symbols 2

Huffman Tree Coding Encoding In computer technology,  encoding  is the process of putting a sequence of characters into a special format for transmission or storage purposes. Code Word The special format that represents each character is called as the code word Fixed Length Encoding fixed-length encoding that assigns to each symbol a bit string of the same length m Eg . ASCII codes Variable Length Encoding Variable-length encoding , which assigns codewords of different lengths to different symbols 3

Huffman Tree Coding Encoding In computer technology,  encoding  is the process of putting a sequence of characters into a special format for transmission or storage purposes. Code Word The special format that represents each character is called as the code word Fixed Length Encoding fixed-length encoding that assigns to each symbol a bit string of the same length m Eg . ASCII codes Variable Length Encoding Variable-length encoding , which assigns codewords of different lengths to different symbols 4

Huffman Tree Coding 5

Huffman Tree Coding Frequency of Occurrence of English Alphabets 6

Huffman Tree Coding Encoding In computer technology,  encoding  is the process of putting a sequence of characters into a special format for transmission or storage purposes. Code Word The special format that represents each character is called as the code word Fixed Length Encoding fixed-length encoding that assigns to each symbol a bit string of the same length m Eg . ASCII codes Variable Length Encoding Variable-length encoding , which assigns codewords of different lengths to different symbols 7

Huffman Tree Coding Variable-length encoding assigns codewords of different lengths to different symbols Eg . E 1 A 10 P 101 Q 1010 How to decode: 110101 ? How can we tell how many bits of an encoded text represent the first ? 8

Huffman Tree Coding We can limit ourselves to the so-called prefix-free (or simply prefix ) codes . In a prefix code, no codeword is a prefix of a codeword of another symbol. Eg . E 1 A 01 P 100 Q 101 How to decode: 10101101 ? 1 01 01 101  E A A Q 9

Huffman Tree Coding Consider the five-symbol alphabet { A , B, C, D, _ } with the following occurrence frequencies in a text made up of these symbols : Create a Huffman Tree and Generate the Huffman Code. 10

Huffman Tree Coding 11

Huffman Tree Coding 12

Huffman Tree Coding 13

Huffman Tree Coding 14

Huffman Tree Coding 15

Huffman Tree Coding 16

Huffman Tree Coding 17

Huffman Tree Coding 18

Huffman Tree Coding 19

Huffman Tree Coding 20

Huffman Tree Coding 21

Huffman Tree Coding 22

Huffman Tree Coding 23

Huffman Tree Coding 24

Huffman Tree Coding 25

Huffman Tree Coding 26

Huffman Tree Coding 27

Huffman Tree Coding 28 Character Code A B C D -

Huffman Tree Coding 29 Character Code A 11 B C D -

Huffman Tree Coding 30 Character Code A 11 B 100 C D -

Huffman Tree Coding 31 Character Code A 11 B 100 C 00 D -

Huffman Tree Coding 32 Character Code A 11 B 100 C 00 D 01 -

Huffman Tree Coding 33 Character Code A 11 B 100 C 00 D 01 - 101

Huffman Tree Coding Encode: “DAD CAB” D A D C A B 34 Character Code A 11 B 100 C 00 D 01 - 101

Huffman Tree Coding Encode: “DAD CAB” D A D C A B 100 35 Character Code A 11 B 100 C 00 D 01 - 101

Huffman Tree Coding Encode: “DAD CAB” D A D C A B 100 11 36 Character Code A 11 B 100 C 00 D 01 - 101

Huffman Tree Coding Encode: “DAD CAB” D A D C A B 100 11 01 37 Character Code A 11 B 100 C 00 D 01 - 101

Huffman Tree Coding Encode: “DAD CAB” D A D C A B 100 11 01 101 38 Character Code A 11 B 100 C 00 D 01 - 101

Huffman Tree Coding Encode: “DAD CAB” D A D C A B 100 11 01 101 00 39 Character Code A 11 B 100 C 00 D 01 - 101

Huffman Tree Coding Encode: “DAD CAB” D A D C A B 100 11 01 101 00 11 40 Character Code A 11 B 100 C 00 D 01 - 101

Huffman Tree Coding Encode: “DAD_CAB” D A D _ C A B 100 11 01 101 00 11 100 41 Character Code A 11 B 100 C 00 D 01 - 101

Huffman Tree Coding Decode: 10011011010011100 42 Character Code A 11 B 100 C 00 D 01 - 101

Huffman Tree Coding Decode: 100 11 01 101 00 11 100 B 43 Character Code A 11 B 100 C 00 D 01 - 101

Huffman Tree Coding Decode: 100 11 01 101 00 11 100 B A 44 Character Code A 11 B 100 C 00 D 01 - 101

Huffman Tree Coding Decode: 100 11 01 101 00 11 100 B A D 45 Character Code A 11 B 100 C 00 D 01 - 101

Huffman Tree Coding Decode: 100 11 01 101 00 11 100 B A D _ 46 Character Code A 11 B 100 C 00 D 01 - 101

Huffman Tree Coding Decode: 100 11 01 101 00 11 100 B A D _ C 47 Character Code A 11 B 100 C 00 D 01 - 101

Huffman Tree Coding Decode: 100 11 01 101 00 11 100 B A D _ C A 48 Character Code A 11 B 100 C 00 D 01 - 101

Huffman Tree Coding Decode: 100 11 01 101 00 11 100 B A D _ C A B 49 Character Code A 11 B 100 C 00 D 01 - 101

Huffman Tree Coding 50
Tags