Huffman trees are used in a specific application - Huffman coding - for finding the minimum-expected-length binary-coding for a set of strings, with respect to a probability distribution over the string set.
Optimal binary search trees (as defined in CLRS's Introduction to Algorithms) are used for finding the optimal binary search tree for a set of elements, so that the expected look-up time is minimized, with respect to a probability distribution over the set.
Noticing how similar they are to each other, I have some questions
Is it correct that the applications of Huffman trees are not limited to Huffman coding?
What kinds of problems can Huffman trees be used to solve?
Can Huffman trees be used for solving the same problems that optimal binary search trees can?
Can optimal BSTs be used for solving the same problems that Huffman trees can?
One difference I notice between Huffman trees and optimal binary search trees is that
In Huffman trees, all the elements are stored in the leaves, so that a successful search always end up in a leaf.
In optimal binary search trees, not all the elements are stored in the leaves, and a successful search may end up in an internal node.
So if Huffman trees and optimal BSTs can both solve a problem, then is the Huffman tree always higher than an optimal BST, and thus will the Huffman tree take longer on average to look up an element?
Thanks.