The procedure in part (i) sometimes needs five tests, for items one or two. A binary decision tree of height has at most leaves, so distinguishing ten possibilities requires .
A prefix code attaining this worst-case bound is
Use the same subset-testing rule. The minimum worst-case number is four, so the expected-optimal procedure is not worst-case optimal. This four-test procedure has expectation , illustrating the small cost of imposing the smaller maximum depth.

Articles by others on the same topic (0)

There are currently no matching articles.