Obsession

June 7, 2009

Last Wednesday, I quoted the following puzzle:

Ken and Bob find themselves in possession of three blank-sided dice. These are ordinary cubic dice, with six faces each.

Ken writes the numbers from 1 to 18 on the sides. No number is repeated. Each side of each of the three dice now shows a number from 1 to 18.

Bob then chooses one of the three dice. Ken chooses one of the other two. The third die is discarded.

The two men then play a game of dice war. The war consists of a hundred “rounds.” In each round, first Ken rolls his die, then Bob rolls his. The man with the highest number showing on the topmost face of his die, wins the round.

Whichever man wins the larger number of rounds, wins the war.

Question: If both men followed the strategy that gave them the best mathematical chance to win this war, what would the numbers on the dice look like?

Some people have actually found my site by searching for the puzzle, so I’ll go ahead and post the solution.

I don’t know what happened with that dice puzzle, but somehow my feelings about it progressed from utter disdain to obsession (accompanied by disdain). Real geniuses would be able to put the problem in an easy-to-conceptualize format and solve it. Sadly, I’m not a genius, so I had to find another way. I determined that if I was to have any chance of solving it, it would have to be through the brute force of the computer.

One problem: I don’t know how to write computer programs! At least, I didn’t know how to write programs when I first started working on this problem. But, I thought, I don’t have anything to do anyway, so if I have to learn Python to solve this problem, then that’s what I’m going to do.

So I spent a couple days learning Just Enough Python(TM). The result is far from pretty, but it is, I am fairly confident, accurate.

Ready? The Three Dice are…

1: [1, 2, 9, 14, 15, 16]
2: [3, 4, 5, 10, 17, 18]
3: [6, 7, 8, 11, 12, 13]

No matter which die you choose, I can choose a die that has a 58% chance of beating it on any given roll. Is there any reason we should have known in advance that those would be the best dice? I have no idea. Like I said, finding this solution involved brute force, nothing else.

Alright, here’s the program that will deliver that answer. It compares 2,858,856 sets of dice, and takes about 3 minutes to run on my computer (Hey, that’s 15,883 sets per second!). [Edit: Actually I couldn’t figure out how to upload the file. Oh well. Trust me, it exists.]

P.S. The two-word phrase you could google to find a discussion of problems like these was “Nontransitive dice

Advertisements

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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: