Huffman code?

  • Thread starter *Jas*
  • Start date
  • #1
*Jas*

Main Question or Discussion Point

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

Answers and Replies

  • #2
HallsofIvy
Science Advisor
Homework Helper
41,795
925
You should be aware that most people will not open a "doc" file from someone they don't know. They area notorious for having viruses.
 
  • #3
CRGreathouse
Science Advisor
Homework Helper
2,820
0
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.
 
  • #4
*Jas*
So far iv drawn the tree for the code concerned (attached image!)...however im not sure whether it looks correct!?!? im 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

  • #5
1
0
dis is wrong u shuld dissconect from the site. u dnt deserve 2 be on the the website
 

Related Threads for: Huffman code?

  • Last Post
Replies
6
Views
3K
  • Last Post
Replies
0
Views
603
Replies
3
Views
920
  • Last Post
Replies
7
Views
142
  • Last Post
Replies
4
Views
3K
  • Last Post
Replies
1
Views
3K
  • Last Post
Replies
4
Views
2K
Replies
1
Views
2K
Top