Dicey Business

This week’s Riddler asks us to pick 4 numbers such that we have the best chance of equaling at least one of the pairs of sums produced by a roll of 4 dice:

“We’re playing a game where you have to pick four whole numbers. Then I will roll four fair dice. If any two of the dice add up to any one of the numbers you picked, then you win! Otherwise, you lose.”

We look at a roll of 4 dice and observe the following:

  • There are 6 possible pairs of sums created by this roll of 4 dice (d1-d4) : {[d1+d2], [d1+d3], [d1+d4], [d2+d3], [d2+d4], [d3+d4]}
  • Suppose we want to have picks that cover all the possible rolls (ie win percentage = 100%). We certainly need to at least cover the rolls [1,1,1,1], [2,2,2,2], [3,3,3,3], [4,4,4,4], [5,5,5,5], [6,6,6,6]. To do so requires us to have bets on [2,4,6,8,10,12].
  • We also see that since there are 4 dice, there is no possibility that the 6 pairs of sums for any roll of 4 will not include an even number. And since [2,4,6,8,10,12] are all the even numbers possible we conclude that if we had 6 picks of numbers we would pick [2,4,6,8,10,12] and we would win 100% of the time.
  • But we only have 4 picks. What to do? Well we can look at the relative frequency of the different sums given one pair of dice:

So since 2 and 12 are relatively rare we might guess that a good answer for 4 picks would be [4,6,8,10]. Is it? We write a little Python code and vary our number of guesses from 1-6 and find the following:

Best 1 guesses: [7], Percent wins: 64.35
Best 2 guesses: [6, 7], [7, 8], Percent wins: 83.56
Best 3 guesses: [6, 7, 8], Percent wins: 91.98
Best 4 guesses: [4, 6, 8, 10], Percent wins: 97.53
Best 5 guesses: [2, 4, 6, 8, 10], [4, 6, 8, 10, 12] Percent wins: 99.00
Best 6 guesses: [2, 4, 6, 8, 10, 12], Percent wins: 100.00

So our intuition is correct.


Dicey Business

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s