字符ABCD出現的次數為其哈夫曼編碼如下A:B:C:D:
.
()wpl=(+)*+*+(++)*+(+)*=
() 編碼為: : : : : : : :
() 常用哈夫曼樹為通訊用的字符編碼本題中集合的數值解釋為字符發生的頻率(次數)由哈夫曼樹構造出哈夫曼編碼譯碼時進行編碼的匹配即從左往右掃描對方發來的編碼串用字符編碼去匹配得到原來的元素(本題中的數)
[] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
From:http://tw.wingwit.com/Article/program/sjjg/201311/22636.html