Optimal Binary Search Tree Problem
Given:
- a set of words {w1, …, wn}
- probabilities of each word’s occurrence {p1, …, pn}
Produce a Binary Search Tree which includes all the words and has the lowest expected cost:
Expected cost = (where di is the depth of word i in the tree)