A, B, GuessA, GuessB, Winner, AmountC, Chance, EV
H, H, H, H, AB, -3, 0.25, -0.75
H, T, H, T, C, +1, 0.25, +0.25
T, H, T, H, C , +1, 0.25, +0.25
T, T, T, T, AB, -3, 0.25, -0.75
Sum(EV)=-1 per round
So C should not playBy using the algorithm that hmexx says (use the result of your own coin flip to make the guess of the other's coin flip) what this is really doing is reducing the problem to "What is the probability that two coin flips are the same?"
The probability that two coin flips are the same is 50% (HH or TT vs HT or TH). The algorithm could also be "Use your own coin flip and then guess the opposite of your own result" and the probabilities would be the same, ie. 50%.
Give the fact that you have a 50% chance of losing $2 and a 50% chance of winning $1, this is not a game that C should play, since the expected value is -$0.50.
The first is described by: 'If I get heads, I will guess you got heads, otherwise I will guess you got tails' The second: 'If I get heads, I will guess you got tails, otherwise I will guess you got heads'
These are functionally identical, in that in half of the cases they get the same result (first strategy wins these) and in the other half they get opposite results (second strategy wins these) - they get 2$ for winning and give 1$ when they lose, since they win half the time under either strategy C should not play this game.
import random
# Modify strategy here
def turn():
toss = random.randint(0, 1)
guess = random.randint(0, 1)
# Uncomment to make A/B win
# guess = toss
return toss, guess
random.seed()
score_ab, score_c = 0, 0
for i in range(1, 1001):
score_ab -= 1
score_c += 1
toss_a, guess_a = turn()
toss_b, guess_b = turn()
if toss_a == guess_b and toss_b == guess_a:
score_ab += 3
score_c -= 3
print i, 'ab:', score_ab, 'c:', score_c
if score_ab > score_c:
print "Players A, B win"
else:
print "Player C wins"Isn't that step 1 where they can agree on a strategy (of which randomly, independently guessing is just one possible strategy)?
Are you the author of the original problem? Perhaps the English prose could be tighter to be more correct with the solution you have in mind.
-------------------------- The fact that there is no communication ensures that whether A is right and whether B is right are completely indpendent. Conceptually, predicting a coin flip is like making a statement "1" or "0" which will then be XOR'd with a 1 or 0 from a securely, randomly, uniformly generated OTP of which no copies exist. In other words, the plaintext is immediately lost forever and you just have the ciphertext.
As a result of this, we must truly consider that A being right is a 50/50 proposition. It is also indpendent of B being right.
Thus we have the following four cases:
A right, B right - Result value * Percent chance = EV
0, 0 = +1 * 0.25 = +0.25
0, 1 = +1 * 0.25 = +0.25
1, 0 = +1 * 0.25 = +0.25
1, 1 = -2 * 0.25 = -0.5
------------------------------- sum of above: +0.25. Therefore, as long as each team member is independently predicting their own coin (which means that their prediciton will be xor'd by a random bit) C should play this game long-term.
(The values of +1 is because each round starts with the team giving C +1. If at the end of the roudn C must return 3 then this is +1 -3 = -2 for the round.)
Now here is another interesting question. What if under the same conditions A and B both try to predict C's coin toss, of which there is only one? Should C now play? Here is the answer is: "No", because A can predict heads, B can predict heads, and then it looks like this: A right, B right - Result value * Percent chance = EV
0, 0 = +1 * 50% = 0.5
0, 1 = +1 * 0% = 0 } not possible
1, 0 = +1 * 0% = 0 }
1, 1 = -2 * 50% = -1
-------------------
-0.5
In this case, C should not play. This is because in this case the events are not truly independent, there is a way to break the 25% 25% 25% 25% into 50% and 50% - namely by picking the same prediction together.
--------------------------