Figure out the number I'm thinking of with a single question!
Follow me on Twitter, where I write about Python, APL, and maths.
I'm thinking of a number amongst 1, 2, and 3. You are allowed to ask me a single question, to which I will truthfully answer with “yes”, “no”, or “I don't know”.
How can you find out the number I picked?
Give it some thought!
If you need any clarification whatsoever, feel free to ask in the comment section below.
(I originally found this puzzle on Reddit.)
Know how to solve this? Be the first to join the list of solvers by emailing me your solution!
Congratulations to the ones that solved this problem correctly and, in particular, to the ones who sent me their correct solutions:
Join the list of solvers by emailing me your solution!
Lots of people sent in their solutions and I was very pleased with the amount of different solutions people came up with! Hence, the solution I present here is not the only one, but it's one I find very elegant.
The question you will ask me is
“If I pick one of the other two numbers, is yours larger?”
If I picked 3, then I know 3 is larger than any of the two other numbers (1 and 2). Therefore, I answer “Yes.”.
If I picked 1, then I know 1 is smaller than any of the two other numbers (2 and 3). Therefore, I answer “No.”.
If I picked 2, then I have no idea if you got 1 or 3, and that implies I need to reply “I don't know.”.
That's a pretty elegant solution, isn't it?
Feel free to share alternative solutions in the comments!
Don't forget to subscribe to the newsletter to get bi-weekly problems sent straight to your inbox.
I hope you learned something new! If you did, consider following the footsteps of the readers who bought me a slice of pizza 🍕. Your small contribution helps me produce this content for free and without spamming you with annoying ads.