Full width home advertisement

Post Page Advertisement [Top]

What is Huffman's algorithm?

Ans: Huffman’s algorithm is a method for building an extended binary tree with a minimum weighted path length from a set of given weights. Initially construct a forest of singleton trees, one associated with each weight. If there are at least two trees, choose the two trees with the least weight associated with their roots and replace them with a new tree, constructed by creating a root node whose weight is the sum of the weights of the roots of the two trees removed, and setting the two trees just removed as this new node’s children. This process is repeated until the forest consists of one tree.

src: planetmath.org

No comments:

Post a Comment

Bottom Ad [Post Page]

| Designed by Colorlib