I'm trying to design a problem that should be as close as possible to the following setup, while meeting some requirements about its solutions.
Initial setup
There is a group of more than 2 people in a room. We know that exactly 2 people are candidates for a prize, and the others are watching. The prize will be given to the oldest of the two old persons.
However, because they are quite old, and because they have their pride, they
- do not want to disclose their age
- do not want to give out any information that could let anyone infer their actual age if they are not the same age
- do not mind however if they are the only ones to know their age in case they are the same age, they just don't want the rest of the group to know.
The goal is then to find out which one of the two is the oldest while keeping their actual age unknown. Note that they could also be the same age.
Constraints on the solutions
The goal is to design a problem that should be close to the initial one above, such that it has at least two solutions:
- one that seems straightforward but contains a hidden logical flaw (think of the "hidden division by zero" flaw of
3x = 2x => 3 = 2
, or a failure to address the age equality case [see Paul Evans' answer]) - an other one that seems counter-intuitive at first but actually works.
Additional guidelines
I'd like to keep the fact that we want to determine who is older while having very limited knowledge about their actual age.
Using other people or some message-passing is allowed.
Ideally the solution could borrow from number theory, information theory, or other mathematical fields (probabilities?). I know the initial setup is very simple, but I always get amazed at how subtle the solution to problems that are simple to state can be, and this is what I'm looking for.