07-18-2014, 01:32 PM
we have 21 characters. Of these, 17 characters are alphabets, 4 spaces . The ASCII code for space is 32.The ASCII value for ‘a’ is 95 and the value of A is 65. How many
bits we need to send 21 characters? As every character is of 8 bits, therefore for 21
characters, we need 21 * 8 = 168 we can save around 40% using the Huffman
algorithm.
Original text:
Deer is dear but dear
size: 21 characters (space)
Letters : Frequency
SP : 4
a : 2
b : 1
d : 3
e : 4
r : 3
h : 1
I : 1
S : 1
T : 1
bits we need to send 21 characters? As every character is of 8 bits, therefore for 21
characters, we need 21 * 8 = 168 we can save around 40% using the Huffman
algorithm.
Original text:
Deer is dear but dear
size: 21 characters (space)
Letters : Frequency
SP : 4
a : 2
b : 1
d : 3
e : 4
r : 3
h : 1
I : 1
S : 1
T : 1
