Very distant inspiration from what a family member asked me some years ago on epiphany, this might be a classical logic exercise, but due to the flavor it's quite hard to find the same problem under a different formulation, let alone confirm an original. Additional note: This is a fairly easy one, and intended as such, more of the kind you can retell to your friends after you find the solution
Alice, Bob and Charlie meet on epiphany to eat the traditional king cake. The rule says that the youngest goes under the table and name the recipient of each piece as they are cut. However, our three guests are very shy, and revealing their age is unthinkable as none wants the other to know if they are the elder of the group. They've never shared it before between themselves, it's not going to change now. The cake is slowly getting colder, and we're not anywhere close to finding out who's the youngest. So, they agree to call Zorro, a common friend, only problem being that Zorro is logician, and he will not reveal who is the youngest without a little twist of his own. Instead, he asks to speak privately with each one of them and this is what he said:
- "I can tell you whether or not you are the oldest", to Alice;
- "I can tell you whether or not Charlie is older than Alice", to Bob;
- "I can tell you whether or not you are in the middle", to Charlie.
Zorro tells each one of them their piece of information (for example now Alice knows if she is the elder or not) and hangs up. Very satisfied with his trick, he is confident that after a little discussion they will get to eat the king cake hot enough and without anyone feeling uncomfortable. Keeping in mind that Zorro knows the ages of Alice, Bob and Charlie, is Zorro a good logician?
Additional notes due to comments:
Every agent in this problem is rational, they all want to please their friends so they won't voluntarily reveal the oldest one just for the fun.
If there is a way for them to succeed then they will succeed (i.e. in some configurations if they can mess up but also succeed, then they will do the latter). The power of friendship will guide them.
Order doesn't matter, each one chooses to reveal or not their piece and they all share it at the same time and the discussion stops. After the exchange, in order to send someone under the table, every one should have the certitude of who's the youngest but no one should have the certitude that someone knows they are the oldest.