104 交大 Huffman code
題目是這樣的:
Huffman codes are used as a very effective technique for compressing data. A data file of 100 characters contains only the characters a-f,with frequency 45,12,13,9,16,and 5.Use the Huffman variable-length codes,the file can be encode in how many bits?
(A) 224
(B) 300
(C) 100
(D) 124
(E) 324
以下是我建的tree
http://i.imgur.com/XfmMWbu.jpg

不知道哪個環節出錯
請大家指正
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 101.13.82.21
※ 文章網址: https://www.ptt.cc/bbs/Grad-ProbAsk/M.1484748000.A.F49.html
→
01/18 22:02, , 1F
01/18 22:02, 1F
→
01/18 22:08, , 2F
01/18 22:08, 2F
推
01/18 22:22, , 3F
01/18 22:22, 3F
→
01/18 22:23, , 4F
01/18 22:23, 4F
推
01/30 20:00, , 5F
01/30 20:00, 5F
推
01/30 20:02, , 6F
01/30 20:02, 6F
→
02/03 20:14, , 7F
02/03 20:14, 7F