[Math] Maximum number of guaranteed coins to get in a “30 coins in 3 boxes” puzzle

elementary-number-theorygame theorynumber theorypuzzle

There are a total of 30 gold coins in three wooden boxes (but you do not know
how many in each individual box). However, you know that one box has exactly 4 coins more than another box.

For each box, you can ask for a number of coins from that box, of your choice. If there are at least that many coins in that box, then you get as many coins as you asked for. Otherwise, you get nothing from that box. You must place all your demands simultaneously in the beginning.

What is the maximum number of coins that you can guarantee yourself to get?

Added for clarification: you don't know which box has 4 coins more.

Let $x, y, y+4$ be the coin contents $=> x+2y=26$ $=>$ solutions $(0,13,17),…,(24,1,5)$.

What next?

Best Answer

If you ask for $13,13,13$, then you get nothing if the boxes are $10,8,12$.

If you ask for $12,12,12$, you will always get exactly $12$ coins, since in all cases, exactly one of the boxes has at least $12$ coins.

Claim $12$ is best possible.

Certainly it's best possible with all requests equal.

Suppose a better request triple is $a,b,c$, with $a \le b \le $c, and $a < c$.

But any of the $3$ requests might fail if that box contains $0$ coins, hence to be sure to get more than $12$ coins, every pair must sum to more than $12$.

From $a \le b \le c $, and $a + b > 12$, we get $6 < b \le c$.

But if the boxes are some permutation of $26,0,4$, the $b,c$ requests might both fail, so to be sure to get more than $12$, we must have $a > 12$.

But then $a,b,c$ all exceed $12$, so all requests would fail if the boxes are $10,8,12$.

Thus, unequal requests can't beat the uniform $12,12,12$ request strategy.

It follows that $12$ is the maximum number of coins which can be guaranteed.

Related Question