2021 AMC Fall 10B Problem 10
Forty slips of paper numbered to are placed in a hat. Alice and Bob each draw one number from the hat without replacement, keeping their numbers hidden from each other. Alice says, "I can't tell who has the larger number." Then Bob says, "I know who has the larger number." Alice says, "You do? Is your number prime?" Bob replies, "Yes." Alice says, "In that case, if I multiply your number by and add my number, the result is a perfect square. " What is the sum of the two numbers drawn from the hat?
Show solution without answering
Key insight
Alice's doubt rules out 1 and 40. Then Bob can only be sure with 1, 2, 39 or 40; prime means 2, and 200 + 25 = 225.
Solution
Let Alice's number be and Bob's be . Go through the conversation one sentence at a time, and after each one ask what it rules out.
1. Alice: "I can't tell who has the larger number." If Alice had , she would know Bob is larger. If she had , she would know she is larger. So Alice has something from to .
2. Bob: "I know who has the larger number." Bob heard step 1, so he knows Alice is between and .
- If Bob has : Alice cannot also have (the slips are different), so she has to . Bob knows he is smaller.
- If Bob has : Alice has to . Bob knows he is larger.
- If Bob has or : he obviously knows.
- If Bob has, say, : Alice could have or , so he cannot know.
So Bob has , , or .
3. Bob's number is prime. Of , only is prime ( is not prime, , is even). So .
4. is a perfect square. That is , with from to , so it is between and . Squares near there: , , . Only fits, so .
5. The sum is .
The answer is .
Why this works
In puzzles where people take turns saying what they know, each statement cuts down the possibilities, and the next speaker uses the smaller list. Bob could only be sure with or because Alice had already ruled out and . After the logic narrows things down, a small arithmetic check finishes the problem.
Concise solution
A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.
Let Alice hold and Bob hold .
Alice cannot tell who is larger, so is neither nor : .
Bob hears this. He now knows who is larger, so his number must beat or lose to every value in other than his own. That happens exactly when : with , Alice's number is at least ; with , hers is at most .
Bob's number is prime, so .
Finally is a perfect square with , i.e. between and . The only square in that range is , so .
The sum is .
The answer is .
Review in the AoPS books
- Intermediate Counting & Probability, Chapter 2: Sets and Logic (§2.4)
- Introduction to Number Theory, Chapter 1: Integers: The Basics
- Introduction to Number Theory, Chapter 2: Primes and Composites
- Introduction to Algebra, Chapter 20: Special Functions (§20.3)
Similar problems
Problem © Mathematical Association of America (MAA), American Mathematics Competitions. Reproduced for non-commercial educational use. Solution and commentary are original to this site.