作者qwer123073 (NullSpace)
看板Grad-ProbAsk
標題104 交大 Huffman code
時間Wed Jan 18 21:59:57 2017
題目是這樣的:
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
→ ken52011219: 30 ,25 01/18 22:02
→ qwer123073: 抱歉我寫太快了,已解決 01/18 22:08
推 yupog2003: 25要跟30合併,而不是跟45合併 01/18 22:22
→ yupog2003: 哈哈沒看到已解決就推文了XD 01/18 22:23
推 ck960785: 答案是A嗎? 01/30 20:00
→ qwer123073: 是的 02/03 20:14