Prove the correctness of Huffman’s algorithm by expanding the following steps.
a. Show that no node has only one child.
b. Show that the two least frequent characters must be the two deepest nodes in the tree.
c. Show that the characters in any two nodes at the same depth can be swapped without affecting optimality.
d. Use induction: As trees are merged, consider the new character set to be the characters in the tree roots.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here