104 交大 Huffman code

看板Grad-ProbAsk作者 (NullSpace)時間9年前 (2017/01/18 22:00), 編輯推噓3(304)
留言7則, 4人參與, 最新討論串1/1
題目是這樣的: 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
30 ,25
01/18 22:02, 1F

01/18 22:08, , 2F
抱歉我寫太快了,已解決
01/18 22:08, 2F

01/18 22:22, , 3F
25要跟30合併,而不是跟45合併
01/18 22:22, 3F

01/18 22:23, , 4F
哈哈沒看到已解決就推文了XD
01/18 22:23, 4F

01/30 20:00, , 5F
答案是A嗎?
01/30 20:00, 5F

01/30 20:02, , 6F

02/03 20:14, , 7F
是的
02/03 20:14, 7F
文章代碼(AID): #1OVtJWz9 (Grad-ProbAsk)