Bob always chooses the same as his flip, Alice always chooses the opposite of her flip.
B A
H H - Bob chooses heads, Win
H T - Alice chooses heads, Win
T H - Alice chooses tails, Win
T T - Bob chooses tails, WinBob always chooses the same as his flip, Alice always chooses the opposite of her flip.
B A
H H - Bob chooses heads, Win
H T - Alice chooses heads, Win
T H - Alice chooses tails, Win
T T - Bob chooses tails, WinThe next level is: Eve joins the game, and the coin gets another side.
I started with a truth table as well. It's pretty easy to show that if Alice (or without loss of generality Bob) uses a fixed "always guess H" or "always guess T" strategy, that wins in two cases, but in the other two cases Bob has no way to reliably win. For instance, if Alice always guesses H, then two cases become wins:
A B
H H W
H T ?
T H W
T T ?
But in the other two cases, Bob has the same T each time, so he doesn't have enough information to distinguish those cases, and thus he can't reliably guess correctly.So Alice needs to use a strategy that depends on her flip. There are only two such strategies that don't trivially reduce to a constant guess: guess what you flip or guess the opposite of what you flip. Going with the former, where Alice guesses what she flips:
A B
H H W
H T ?
T H ?
T T W
From this, clearly if Bob guesses the opposite of what he flips, someone wins in all four cases.The only other solution is to reverse the two: Alice guesses the opposite of what she flips, and Bob guesses what he flips.
This seems like a nice warm-up for other protocols that depend on agreed-upon strategy but not a secure channel for direct communication, such as Diffie Hellman or the Socialist Millionare Problem.
I was going to post a hint rather than the solution, but you beat me to the punch.
A Alice's coin
Ac Alice's choice
B Ben's coin
Bc Ben's choice
They win if A's and Bc's OR B's and Ac's are the same A Ac B Bc
T T T T W
H T T T W
T H T T W
H H T T L
T T H T W
H T H T L
T H H T W
H H H T W
T T T H W
H T T H W
T H T H L
H H T H W
T T H H L
H T H H W
T H H H W
H H H H W
It's easier to check for when they are losing: A Ac B Bc
H H T T |they both stick to their choices
H T H T |they both flip
T H T H |they both flip
T T H H |they stick
So the winning strategy is if one of them sticks to his choice and other flips it's choice.So knowing that, I just looked for what extra, non-obvious piece of information A and B had. It seems impossible to guess what the results of a coin-flip are in another room. But the players also know the result of their own flip, and so basing a strategy on that extra info is certainly going to be the answer. From there, since there are so few combinations of such a strategy, getting the right answer is pretty trivial.
I like this brain teaser (and I suspect the reason that Felton likes it as well) because it shows this general pattern for brain teasers very clearly. The "extra" piece of information is pretty obvious with a moments thought. And once you have it, the number of possible strategies using it is small enough that you can see the correct one quickly.
A lot of other brain teasers require a lot of pen and paper work even after you've guessed the "trick" in order to work through all the possiblities. So this is sort of a nice, boiled down "essence du brainteaser".
A_coin B_coin A_guess B_guess
H H ? ?
H T ? ?
T H ? ?
T T ? ?
Then I tried to fill in the guesses, given that A_guess has to be based on B_coin and vice-versa. After making Alice guess the same as her coin flip, since that's a simple thing to try first, it was clear that Bob had to guess the opposite of his coin flip for each row to have exactly one correct match.If a fixed strategy can't work, then the guesses must be decided dynamically. At the time the guess is made, only one bit of information (their own flip) is available to each participant, so each guess has to be based on that. With one bit of information, you could only choose two things: do the same, or do the inverse. The correct, asymmetric pair of strategies popped into my head at this point, and a quick truth table check confirmed it.
Then I realized if one took the "guess same" strategy and the other took the "guess opposite" strategy that would cover the bases.
This seems a bit awkward, but information theory "guessing" is called "error correction", and parity-checking is the simplest and by far most common strategy. (Advanced algorithms are fancier multidimensional parity computations) So, their two guesses are "same" and "different" (aka parity 0 and 1). A and B each are allocated one of the two strategyGuesses, and translate observedCoin+strategyGuess=hiddenCoinGuess
\exists f,g: \forall a,b: (f(b)=a) | (g(a)=b)
where f,g are the guesses and a,b are the flips. Each guess is a function of the information available to the respective player -- the outcome of his own coin flip. There's only 4 unary boolean functions: f,g \in {true,false,id,not}
The constant functions are out and order doesn't matter, so we're left with {(id,not),(id,id),(not,not)}
Here I just tried (id,not) first, but 3 choices are easy to check exhaustively.First, I assume there is an answer, and at least a moderately interesting answer.
There is no way they can communicate information post-flip, therefore they must be able to cover every possible option.
They cannot cover every possible option by deciding what to write in advance, therefore they must decide what to write based on the flip. In fact, they must both decide based on the flip or they will not gain anything.
If you decide what to write based on the flip, there are only two real choices per player: write the same as what you got, or write the other one.
That leaves you with 3 overall options. Both taking the same of these choices won't work (I skipped over the calculation because they're not interesting solutions), so they must agree to take opposite choices.
When I re-read the description and said "oh, they only have to have one correct answer between them," it was just like, "how can I make sure that when Alice is wrong then Bob is right?". The solution followed about a second later, "well if Alice guesses the same as her flip, maybe Bob guesses the opposite of his", without any logic tables or further reasoning or anything. Then I drew up the 4 possible coin flips and the resulting predictions and wins, to prove that it was correct, just in case I was somehow missing something.
Suppose Alice got Heads. Say she guesses Heads. Then when Bob gets Heads they win. When Bob gets Tails Alice is wrong so Bob needs to guess Heads when he gets Tails.
Flip the scenario around when Alice gets Tails and you get the whole strategy
For Alice to lose, Bob would have to have flipped heads. Now Bob knows, because he has discussed strategy with Alice prior to doing the flips that either Alice flipped tails, in which case she has won, or she has flipped heads, in which case she has lost. But Bob can then bet on heads, in which case he knows that he wins if Alice loses.
That was my way of reasoning things anyhow. As you can see from the other responses, there are many different ways of arriving at the right answer.
Both of them sticking to prior choice was shown not to work, leaving 8 permutations to investigate at most. But it is easier than that.
I started by assuming Alice will guess her flip result. Looking at the truth table
A B
h h :-)
h t :-(
t h :-(
t t :-)
This means the only losing possibilities are when the coins are different. Therefore Bob must guess the opposite of his flip result, to ensure no losing possibilities at all.I have to say I feel somewhat inadequate coming to the answer experimentally as opposed to what others did here.
The answer just appeared with zero awareness of any effort or reasoning that may have lead to it -- the only reasoning I perceived was in verifying the solution. So I got curious as to how intuition could solve this problem roughly on its own, or with so little help from conscious reasoning that I didn't notice it.
From the replies it seems there are two key realizations that combined could lead directly to the solution, and both realizations strike me as things that intuition would be good at noticing. The first is that each player likely has deterministic rule that is dependent on their coin, so there are only two candidate strategies per player. And the second is that the players likely have different strategies.
EDIT: To be clear, I am not downvoting because I think that this comment is unconstructive; clearly it is a useful contribution. At least as good as, and probably better than, having it appear later would be having more whitespace between the spoiler warning and the actual spoiler.