Question

Given the following character frequencies from two different input text files, will the associated Huffman tree...

Given the following character frequencies from two different input text files, will the associated Huffman tree encoding have the same structure (ie. will a have the same bit encoding, b have the same bit encoding, etc). Explain, why or why not.

File 1 frequencies:
a:4, b:1, c:2, d:5

File 2 frequencies:
a:5, b:3, c:4, d:6

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

The answer is no , the huffman tree encoding for the two files will not be same because of the fact that the hiffman tree works by using the frequency sorted binary tree to encode the symbols as here the a in both files have different number of frequencies so the a in both files will have different encoding for them.

Add a comment
Know the answer?
Add Answer to:
Given the following character frequencies from two different input text files, will the associated Huffman tree...
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