binary prefix code in huffman algorithm -


in huffman coding algorithm, there's lemma says:

the binary tree corresponding optimal binary prefix code full

but can't figure out why. how can prove lemma?

from wikipedia,

a full binary tree (sometimes 2-tree or strictly binary tree) tree in every node other leaves has 2 children.

the way in tree huffman code produced produce full binary tree. because @ each step of algorithm, remove 2 nodes of highest priority (lowest probability) queue , create new internal node these 2 nodes children.


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -