Apply the Huffman coding algorithm for the alphabet and frequencies given below. What will be the length of the binary codeword for the letter 'L'? Note that frequency can be considered as a weight, or probability of occurance if we divide them by the total frequency (105 in this question). Letter Frequency A 13 C 1 D 4 E 21 H 6 I 10 L 2 N 9 O 12 R 5 S 8 T 14 4 2 3 5 6
Added by Lisa B.
Close
Step 1
In this case, the total frequency is 105. Show more…
Show all steps
Your feedback will help us improve your experience
Sri K and 54 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
ALGORITHM Suppose that we have a text made up of the characters A, B, C, D, E which occurs with the following frequencies: Character Frequency A 2 B 3 C 5 D 8 E 13 How much space (measured in bits) will an optimal Huffman code use to encode this text? 25 62 64 65 None of the above
Sri K.
Madhur L.
Construct a Huffman code for the letters of the English alphabet where the frequencies of letters in typical English text are as shown in this table. Suppose that $m$ is a positive integer with $m \geq 2$ . An m-ary Huffman code for a set of $N$ symbols can be constructed analogously to the construction of a binary Huffman code. At the initial step, $((N-1) \bmod (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.
Trees
Applications of Trees
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD