I don't know what category this comes under, so i just guessed..
This is the question i am having trouble with:
Consider the symbols and frequencies:
e: 0.34 a: 0.16 d:0.28 s:0.14 t:0.08
a) Find the Huffman code for this situation, and the average length of an encoded symbol.
b) Give another prefix code for these symbols? Comment on the average length.
Now for a) i got the following:
Letter: e | a | d | s | t
Coding:11 | 00 | 10 | 011 | 010
With an average length of 2.52
I'm not sure if that's right or not. Would appreicate if someone could let me know if it's right or wrong.
And also, i don't understand that b) actually means. What does it want me to do?
Thanks.
This is the question i am having trouble with:
Consider the symbols and frequencies:
e: 0.34 a: 0.16 d:0.28 s:0.14 t:0.08
a) Find the Huffman code for this situation, and the average length of an encoded symbol.
b) Give another prefix code for these symbols? Comment on the average length.
Now for a) i got the following:
Letter: e | a | d | s | t
Coding:11 | 00 | 10 | 011 | 010
With an average length of 2.52
I'm not sure if that's right or not. Would appreicate if someone could let me know if it's right or wrong.
And also, i don't understand that b) actually means. What does it want me to do?
Thanks.