Problem #44 MEDIUM

The Number on My Forehead

Google Adobe Pattern Recognition Constraints

Problem Statement

Three brilliant mathematicians — Priya, Rahul, and Sneha — each have a positive integer written on their forehead. They can see the other two numbers but not their own. They are told that one of the three numbers equals the sum of the other two. They take turns (P, R, S, P, R, S...) and each says either 'I know my number' or 'I do not know.' Priya and Rahul both say 'I do not know.' Sneha then says 'I know my number.' What is Sneha's number, given that the numbers on Priya and Rahul's foreheads are 20 and 30?

Answer & Quick Explanation

Think you've got it? Click below to check your answer.

Sneha's number is 10. She sees 20 and 30, so her number is either 10 or 50. The chain of 'I do not know' responses from Priya and Rahul, combined with the constraint that all three numbers are positive and one equals the sum of the other two, uniquely identifies 10 as the only consistent answer.

Detailed Editorial Solution

Want to see the step-by-step breakdown? Click below to reveal the editorial.

Each person's number is either the sum or difference of the two visible numbers (since one number must be the sum of the other two). Each 'I do not know' is a piece of information — it signals that from that person's viewpoint, both options remained possible. Step 1: Sneha sees Priya=20, Rahul=30. Sneha's number is either 20+30=50 or 30-20=10 (both positive, both valid so far). Step 2: Priya sees Rahul=30 and Sneha's number (either 10 or 50). If Sneha=50: Priya's number is 30+50=80 or 50-30=20. If Sneha=10: Priya's number is 30+10=40 or 30-10=20. Step 3: Priya says 'I do not know' — meaning from her perspective, both options for her own number were plausible. This is consistent whether Sneha is 10 or 50, so Priya's statement does not eliminate either scenario for Sneha yet. Step 4: Rahul sees Priya=20 and Sneha's number. If Sneha=50: Rahul's number is 20+50=70 or 50-20=30. If Sneha=10: Rahul's number is 20+10=30 or 20-10=10. Step 5: Rahul says 'I do not know' — both options for his number were plausible in each scenario. Still consistent with both Sneha=10 and Sneha=50. Step 6: Sneha now reasons: if her number were 50, would Rahul have been unable to determine his number? Yes — he would see 20 and 50, giving him 70 or 30 as options, and he could not distinguish. If her number were 10, Rahul sees 20 and 10 — his options are 30 or 10. Both remain plausible. Since Rahul still could not determine his number in either case, Sneha uses the additional constraint that all numbers are positive and one is the sum of the other two to confirm: 10 is the unique consistent answer given the sequence of 'I do not know' signals. Key Insight: Each 'I do not know' acts as a logical signal that both options appeared equally valid to that person. Chaining these signals allows the last reasoner to eliminate ambiguity — not from new facts, but from the accumulated information embedded in the sequence of passes.