...And Now for Some Math on Pi Day!

Curious about more math this Pi Day? Here’s the problem we included in this year’s Pi Day card:

Problem:

Two logicians (A and B) each secretly pick a whole number from 1 to 30, inclusive. They have the following conversation:

A: “Is your number double mine?”
B. “I don’t know. Is your number double mine?”
A. “I don’t know. Is your number half mine?”
B: “I don’t know. Is your number half mine?”
A: “I don’t know.” 

B: “I know your number.”

All the statements are true. What is A’s number and how did B know?

Solution:

Let’s break this down into what everybody knows after each exchange.

A: Is your number double mine? B: I don’t know.

If B’s number is odd he could say, “No, my number is not double yours.” But instead he says he doesn’t know, so B’s number must be even.

At this step B’s number is one of the following 2, 4, 6, …, 30. A’s number is still anything from 1, 2, …, 30.

B: Is your number double mine? A: I don’t know. 

This definitely tells us that A’s number is at least even too, but it actually tells us more. Because A already knows B’s number must be even, so A’s number must be double an even number (which is another way to say it must be a multiple of 4).

So at this point both logicians know that:

B’s number is one of these: 2, 4, 6, ..., 30 and A’s number is one of these: 4, 8, 16, 20, 24, 28. 

A: Is your number half mine? B: I don’t know.

Now B knows that the largest A’s number could be is 28, so if B’s number is greater than 14 he could say with certainty that no, his number is not half of A’s. But he says “I don’t know,” so now we know that B’s number is 14 or less.

Now both logicians know that:

B’s number is one of these: 2, 4, 6, 8, 10, 12, 14, and A’s number is one of these: 4, 8, 16, 20, 24, 28.

B: Is your number half mine? A: I don’t know.

A knows that the largest B’s number could be is 14, so if A’s number was larger than 7, A would know that their number was certainly not half B's. However, A says I don’t know, so their number must be equal to or less than 7. But we already knew that A’s number was 4, 8, 16, 20, 24, or 28. Only one of these options is less than or equal to 7, and that is 4.

So now both logicians know that A’s number is 4. 

WANT TO LEARN ABOUT the pizza theorem?

Check out our Pi Day blog post!