Construct a Huffman code for the letters of the English al-phabet where the freq
ID: 3085524 • Letter: C
Question
Construct a Huffman code for the letters of the English al-phabet where the frequencies of letters in typical English text are as shown in this table.
Suppose that m is a positive integer with m ? 2. An m-ary Huffman code for a set of N symbols can be constructed anal-ogously to the construction of a binary Huffman code. At the initial step, ((N ? 1) mod (m? 1)) + 1 trees consisting of a single vertex with least weights are combined into a rooted tree with these vertices as leaves. At each subsequent step, the m trees of least weight are combined into an m-ary tree.
Explanation / Answer
SYMBOL WEIGHT HUFFMAN CODE
B 0.0145 0
C 0.0248 10
D 0.0431 110
E 0.1232 1110
F 0.0209 11110
G 0.0182 111110
H 0.0668 1111110
I 0.0689 11111110
J 0.0010 111111110
K 0.0080 1111111110
----------------Answered by Ravi------------------------------
L 0.0397 11111111110
M 0.0277 111111111110
N 0.0662 1111111111110
O 0.0781 11111111111110
P 0.0156 111111111111110
Q 9.0E-4 1111111111111110
R 0.0572 11111111111111110
S 0.0628 111111111111111110
----------------Answered by Ravi------------------------------
T 0.0905 1111111111111111110
U 0.0304 11111111111111111110
V 0.0102 111111111111111111110
W 0.0264 1111111111111111111110
X 0.0015 11111111111111111111110
----------------Answered by Ravi------------------------------
Y 0.0211 111111111111111111111110
A 0.0817 1111111111111111111111110
Z 5.0E-4 1111111111111111111111111
----------------Answered by Ravi------------------------------