## Another Reasoning Puzzle From ChefMongoose

My friend ChefMongoose had another reasoning problem come to him, and I’m happy to share it further. It’s rather like that famous Singapore Birthday Problem that drove people crazy a couple of months ago. Here’s the problem:

I have a combination lock at work. There are three digits, all in the range 1 – 40; they’re all prime numbers. They’re X+Y, X+2Y, X+3Y — where X and Y are positive integers.

If I told you what X was but not Y, you wouldn’t be able to tell me the combination. If I told you what Y was but not X, you wouldn’t be able to tell me the combination. Now, what’s the combination?

I did work out the puzzle. It did make me notice a couple of strings of uniformly-spaced prime numbers I hadn’t done before, too, such as 3-13-23. (However, 3-13-23 isn’t one of the possible answers, because of the constraints of the problem. There aren’t positive X and Y for which X + Y = 3, X + 2Y = 13, and X + 3Y = 23.)

As with the Singapore Birthday Problem, this is a puzzle based on reasoning about the information we have. Mercifully there aren’t actually many prime numbers below 40, so if you want you can take the brute force approach and find all the strings of uniformly-spaced prime numbers. Then you can find what one matches the rules in ChefMongoose’s second paragraph.

I confess I wasn’t that systematic. I had a strong suspicion what the starting number of the sequence had to be, and then did some tests to be sure. I credit that to just having stared at lot at the smaller prime numbers in my life, so I’d had some intuitive feel for it. That’s a dangerous way to work. My intuitive feel, for example, hadn’t warned me about 3-13-23. But then there aren’t other trios of prime numbers spaced by ten, so that set would be ruled out by the “If I told you what Y was but not X” constraint. But now I know how to get stuff out of ChefMongoose’s work locker, you know, just in case.

## Chiaroscuro 11:48 pm

onTuesday, 5 January, 2016 Permalink |You certainly could!

If I told you the locker number.

Which I’ll have to think about mathwise a little further for.

LikeLike

## Joseph Nebus 10:34 pm

onThursday, 7 January, 2016 Permalink |I’d just assumed it would be the one with your name on it.

Actually, I’d assumed it would be the one just low enough you have to bend uncomfortably far, but not low enough you can sit on a bench or stool, because that’s where everybody’s locker is.

LikeLike

## Geoffrey B 12:09 am

onWednesday, 6 January, 2016 Permalink |Hm, let’s see how far I can avoid trial-and-error methods here.

If X+Y=2, then X+3Y is even and larger than 2, which means it can’t be prime, ergo contradiction.

It follows that none of X+Y, X+2Y, X+3Y can be equal to 2, hence they can’t be even, which implies that X is odd and Y is even.

Applying the “knowing Y is not enough to find X” rule:

If Y is NOT a multiple of 3, then one of X+Y, X+2Y, X+3Y must be a multiple of 3. The only such prime is 3, and since this is the smallest possible prime after eliminating 2, that implies that X+Y=3, i.e. X=1, Y=2.

But this means that if Y is not a multiple of 3, then knowing Y would be enough to figure out the combination, which contradicts info given.

Hence Y must be a multiple of 2 and 3, i.e. a multiple of 6. It also follows that X cannot be a multiple of 3, else X+Y would be nonprime.

X+3Y is no greater than 40, hence X <= 40-3Y. If Y is 18 or higher, this would make X negative, which isn’t allowed.

If Y = 12, then X <= 4. We already know X is odd and not a multiple of 3, which means X must equal 1. Hence, knowing Y=12 would be enough to find X and solve the problem, not allowed.

This means that Y has to equal 6. Our sequence becomes X+6, X+12, X+18. X is not a multiple of 2 or 3, and must be less than 22. Hence the only possible values for X are 1, 5, 7, 11, 13, 17.

Of these values 7, 13, and 17 give non-prime numbers in the sequence and can be eliminated, so we’re down to three possibilities:

X=1, Y=6 (combination 7, 13, 19)

X=5, Y=6 (11, 17, 23)

X=11, Y=6 (17, 23, 29)

Now, forgetting the “knowing Y is not enough to find X” rule and applying the “knowing X is not enough to find Y” rule: if we knew the value of X out of those three, what could we deduce about Y?

Knowing X>1 would tell us that X+Y > 3, hence none of the numbers in the combination can be a multiple of 3. This then implies that Y must be a multiple of 3. We already established that Y is even (without needing to invoke the “knowing Y doesn’t give us X” value). But if X >= 5, Y can’t be greater than (40-5)/3 < 12, so Y could only be 6.

Hence, knowing X=5 or X=11 would be enough to deduce Y. Contradiction. So the only candidate solution left is X=1, Y=6, combination = 7, 13, 19.

We’ve shown that anything else contradicts the information given, but we still need to confirm that this solution IS legit. Perhaps there’s some other way we haven’t explored in which knowing X=1 would tell us Y=6, or vice versa?

If we’re told X, but not Y, we can’t rule out the solution X=1, Y=2 i.e. combination = 3, 5, 7.

If we’re told Y, but not X, we can’t rule out the solution X=5, Y=6, i.e. combination = 11, 17, 23. (Or the solution where X=11, Y=6.)

So we’re done. The combination is 7, 13, 19. Little bit of case-checking but not too much trial and error.

LikeLike

## Joseph Nebus 10:36 pm

onThursday, 7 January, 2016 Permalink |Excellently done, yes. Full marks.

As I hinted in the original post, my instinct was that “7 has got to be one of the numbers” and then it was a matter of could I rule out 3-5-7, 3-7-11, or any of the other sequences starting with 7. And then double back to see if there was reason to doubt 7-13-19. Nowhere near as safe, of course.

LikeLike

## davekingsbury 11:15 am

onWednesday, 6 January, 2016 Permalink |Your posts are a wonderful mystery to me, like reading shamanic texts! I had a maths block at school when I returned from illness and the teacher pilloried me for not understanding hundreds, tens and units. Quite proud of being able to do Sudoku, though …

LikeLike

## Joseph Nebus 10:37 pm

onThursday, 7 January, 2016 Permalink |Aw, dear, I’m sorry to be mysterious. I hope you do enjoy the experience though. There’s a lot of beauty in the subject, and a lot of it can be understood without needing to do calculations. A numbers-riddle puzzle obviously isn’t one of them, though.

LikeLike

## davekingsbury 10:59 pm

onThursday, 7 January, 2016 Permalink |Yeah, don’t understand everything but like reading for the gist. Just bought Simon Singh’s Fermat’s Last Theorem and looking forward to it.

LikeLike

## Garfield Hug 11:18 am

onSaturday, 9 January, 2016 Permalink |Ha ha you knew about our math problem 😉

LikeLike

## Joseph Nebus 3:47 am

onSaturday, 16 January, 2016 Permalink |Oh, yes, the Singapore Birthday Problem got to be quite popular for a week or so back around late summer. It was driving several of my friends crazy and they weren’t too happy even after the explanation was given. The New York Times did a good writeup on it that seems to have settled most people’s questions, at least.

LikeLiked by 1 person

## Garfield Hug 3:49 am

onSaturday, 16 January, 2016 Permalink |Lol! It seems USA is buying up our math, science, physics test papers and books for use in their schools. Apparently we are “famous” for setting mind boggling questions😉

LikeLike

## John Quintanilla 1:02 pm

onFriday, 15 January, 2016 Permalink |Reblogged this on Mean Green Math and commented:

I enjoyed this challenge.

LikeLike

## Joseph Nebus 3:54 am

onSaturday, 16 January, 2016 Permalink |Very glad you liked it and I’ll pass the word on to the puzzle’s author.

LikeLike

## How January 2016 Treated My Mathematics Blog | nebusresearch 3:01 pm

onWednesday, 3 February, 2016 Permalink |[…] Another Reasoning Puzzle From ChefMongoose that’ll let you get into his locker at work. […]

LikeLike