Understanding Huffman Code and Symbol Encoding - Explained Simply

  • Context: Undergrad 
  • Thread starter Thread starter *Jas*
  • Start date Start date
  • Tags Tags
    Code
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
4 replies · 4K views
*Jas*
Huffman code?!?

Hi there!:smile:

Im having abit of trouble getting my head around this question concerning the Huffman code,the average length of an encoded symbol etc...
:confused:
the full question is attached!...help would be v. much appreciated!
 

Attachments

Physics news on Phys.org
The virus risks are overstated (that, and I'm using OOo not Word).

The problem reads:
"Consider the symbols and frequencies:
[itex]e:0.36\;\;a:0.14\;\;d:0.26\;\;s:0.24[/itex]

(a) Find the Huffman code, and the average length of an encoded symbol.
(b) Give another prefix code for the symbols a, e, d, s. Compare the average lengths of an encoded symbol for the two codes."

So, what have you done on the problem so far? Seems straightforward enough to me.
 
So far iv drawn the tree for the code concerned (attached image!)...however I am not sure whether it looks correct?? I am not sure about the bits in red?!?

im not sure which of the following to use:

d: 100
a: 101
s: 110
e: 111

or

e: 0.36 - 0

d: 0.26 - 10

s: 0.24 - 110

a: 0.14 - 111
 

Attachments

  • huffman.jpg
    huffman.jpg
    7.1 KB · Views: 521
dis is wrong u shuld dissconect from the site. u dnt deserve 2 be on the the website