Question

Which of the following is the greedy choice in solving the Huffman code problem? A. Lowest frequency of character(s) B. Highe

0 0
Add a comment Improve this question Transcribed image text
Answer #1

A. Lowest frequency of characters

Huffman code is a data compression algorithm which uses the greedy technique for its implementation. The algorithm is based on the frequency of the characters appearing in a file. The characters with lowest frequest are chosen and linked together as children of a common parent symbol. This method is repeated till a huffman tree is generated. Refer the image below to understand how the tree is created.

(a) f:5 e:9 c:12 b:13 d:16 a:45 (b) c:12 b:13 14 d:16) a:45 0 1 f:5 e:9 14 d:16 (25 a:45 (d) 25 (30 a:45 0. 0 c:12 b:13 0 1 c

In the image above we get a path for each character. The low the frequency of that character, longer is the path/code for it. For eg: a has the highest frequency so the smallest code.

a = 0

b = 101

c = 100

d = 111

e = 1101

f = 1100

Add a comment
Know the answer?
Add Answer to:
Which of the following is the greedy choice in solving the Huffman code problem? A. Lowest...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT