Each test divides the current candidate set into a tested subset and its complement: failure places the defective item inside the subset, whereas success places it outside. A sequence of tests is therefore a binary decision tree, and minimizing its expected depth is the Huffman coding problem with weights .
Combine the smallest two current weights repeatedly. One choice of merges is , , , , , , , , . It gives this explicit prefix code:
At any node, test the candidate items whose next code digit is one. Assign failure to digit one and success to digit zero, and repeat until only a single codeword remains. This specifies every test, including the first subset . Huffman coding minimizes the weighted codeword lengths, so the optimal expected number is
The sum of the successive merged weights is another check on the numerator .

Articles by others on the same topic (0)

There are currently no matching articles.