Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2009/ii/paper-1/4h/iii/solution

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.

New to topics? Read the docs here!