Live data from Hacker News

Coin Puzzle: Predict the Other's Coin

pratikpoddarcse.blogspot.in

21–30 of 50 posts

Re: Coin Puzzle: Predict the Other's Coin

#21

Spoiler. The below contains an exact response -------------------------- 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 i…

Your analysis is incorrect because A and B are allowed to decide on a strategy ahead of time - and there are two simple and similar strategies that allow A and B to guess correctly, together, half the time.

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.

Re: Coin Puzzle: Predict the Other's Coin

#22

Spoiler. The below contains an exact response -------------------------- 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 i…

But they _do_ get to communicate beforehand and could collude to always vote the value of the coin they tossed as their guess for the other coin toss?

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.

Re: Coin Puzzle: Predict the Other's Coin

#23
post #21

Spoiler. The below contains an exact response -------------------------- 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 i…

Your analysis is incorrect because A and B are allowed to decide on a strategy ahead of time - and there are two simple and similar strategies that allow A and B to guess correctly, together, half the time. 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 ar…

Play with different strategies:

  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"

Re: Coin Puzzle: Predict the Other's Coin

#24
post #9

If they both agree to use their own coins result as the guess of the OTHER person's coin, they should get it right 50% of the time instead of 25%. Possible tosses: TT win HT lose TH lose HH win Counter-intuitive though isn't it. Why does using your own result improve the odds of winning the game!?

It doesn't, you're simply wrong. See my other comments.

If you want to say someone is wrong, it would be better to provide an explanation of exactly why they're wrong rather than point everyone elsewhere and make then figure out the hole in the logic.

Point out the hole directly.

Re: Coin Puzzle: Predict the Other's Coin

#25
post #5

The team of A and B can increase the chance from ¼ to ½ by consistently taking their output from step 2 and using it as the guess for step 3. Same thing if they both agree to guess the inverse of step 2.

This does not work because the text says "Players A and B build a team, they have one fair coin each" NOT one fair coin total.

_but_ they can communicate a strategy ahead of time in step 1.

Re: Coin Puzzle: Predict the Other's Coin

#26
Hmm. If A and B are unwitting investors, and C is a quant with inside information, OF COURSE C should take this "bet".

It's not like C would ever everrrr....Lie....

And when G(overnment) comes around to fix this evil fraud, they fine for 10% of the profits. Everybody but A and B make out like a bandit. Sound like '09, doesn't it?

(tongue in cheek, only because there were multiple vald analysees of this question elsewhere in the comments.)

Re: Coin Puzzle: Predict the Other's Coin

#27

Spoiler. The below contains an exact response -------------------------- 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 i…

No, you are wrong and hmexx is right.

By 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.

Re: Coin Puzzle: Predict the Other's Coin

#28

Spoiler. The below contains an exact response -------------------------- 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 i…

The problem with this analysis is that with the "choose the same as your flip strategy", the case where A is right and B is wrong do not occur. Likewise when A is wrong and B is right does not occur. The results of each coin flip are independent, however the strategy produces a non-independent result.

  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 play

Re: Coin Puzzle: Predict the Other's Coin

#29
Dysfunctional teams never can agree. By that I mean, if A decides to use the strategy "guess what I flip"; B decides on the strategy "guess opposite what I flip". And vice versa. These teams can never win! So for dysfunctional teams, C can play the game no matter the payout.

Re: Coin Puzzle: Predict the Other's Coin

#30
post #28

Spoiler. The below contains an exact response -------------------------- 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 i…

The problem with this analysis is that with the "choose the same as your flip strategy", the case where A is right and B is wrong do not occur. Likewise when A is wrong and B is right does not occur. The results of each coin flip are independent, however the strategy produces a non-independent result. 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…

C loses 2, not 3, when he loses (he gets one from AB at the start of each round). C's EV should therefore be -0.5
Post reply on HN