## Teaser 2988: Open the box

**From The Sunday Times, 29th December 2019** [link]

Game show contestants are shown a row of boxes, each containing a different sum of money, increasing in regular amounts (eg, £1100, £1200, £1300, …), but they don’t know the smallest amount or the order. They open one box then take the money, or decline that and open another box (giving them the same choices, apart from opening the last box when they have to take the money).

Alf always opens boxes until he finds, if possible, a sum of money larger than the first amount. Bert’s strategy is similar, except he opens boxes until he finds, if possible, a sum of money larger than both of the first two amounts. Remarkably, they can both expect to win exactly the same amount on average.

How many boxes are there in the game?

[teaser2988]

## Jim Randell 4:37 pm

on27 December 2019 Permalink |With

kboxes, we always win a base amount, along with some multiple of the increment. So we can just consider the boxes to take on the values from 1 tok.This Python program considers increasing numbers of boxes, looking at the total winnings for

AandBfor all possible arrangements of boxes. Until it finds two totals with the same value. It runs in 75ms.Run:[ @repl.it ]Solution:There are 6 boxes.For 3 to 5 boxes A’s strategy is better than B’s. When there are more than 6 boxes B’s strategy is better.

Using prizes with values from 1..

kI found that the average winnings for A and B are:In general we have:

So, as

kincreases the ratio of A’s average approaches 3/4 (= 75.0%) of the maximum available prize. And the ratio of B’s average approaches 5/6 (= 83.3%) of the maximum prize.From the equations we see that the average winnings are the same when:

In general a strategy of looking at

nvalues and then taking the next highest value gives average winnings fromkboxes according to the following formula:So:

A(k) = S(1, k)andB(k) = S(2, k).LikeLike