0
$\begingroup$

Consider the weights: 10, 12, 13, 16, 17, 17.

(a) Construct an optimal coding scheme for the weights given by using a tree.

(b) What is the total weight of the tree you found in part (a)?

  • 2
    This is an easy question about [Huffman coding](http://en.wikipedia.org/wiki/Huffman_coding); can you at least take the first step?2012-12-06
  • 1
    would you just have all of the numbers at the bottom of the tree and keep adding up the two smallest ones so you would have 10+12, 13+16, 17+17, and then 22+29, and then lastly 34+51 to get a total weight of 85?2012-12-07
  • 0
    That’s the right start. Now just organize that into tree form and use the tree to specify the codes for the six weights, and you’re done.2012-12-07
  • 0
    i dont know how to specify the codes for the six weights2012-12-07
  • 0
    On this site, it's considered good manners to click on the checkmark below an answer you find acceptable, since that gives a reputation boost to both you and the answerer. @Brian and I have provided good answers; why not be generous and check his?2012-12-11
  • 0
    @Rick: You just reminded me that I’d not upvoted your answer; fixed.2012-12-11

2 Answers 2