PDA

View Full Version : Magic-related Coin Flip Game



emidln
02-28-2008, 07:17 PM
I was working on some edge conditions for a magic-related computer program when I came into a condition in the logic that I couldn't easily resolve. It boils down to this situation (I'll give it abstractly):

You are playing a game where you can either win or lose. The rules of the game are as follows. You choose from two options, option A and option B.

Option A states that you flip a coin and if it's heads you win. If you don't win, your opponent flips a coin and if it's heads they win. If neither player wins, the coin flips continue in turn until someone wins.

Option B states that you will win the game if you defer and give your opponent the chance to first flip to see if they win the game first. If they don't win, you automatically win.

Which option is better?

Tosh
02-28-2008, 07:41 PM
I would choose Option A because it isn't simple a 50% chance to lose. Option A give you a 50% chance to win and if you don't make it in that 50% you don't automatically lose, there is a 50% chance after that to actually lose. In Option A there is a 25% chance to lose and a 50% chance to win whereas in Option B there is a 50% chance to lose and a 50% chance to win.

TSchultz
02-28-2008, 07:43 PM
Option A states that you flip a coin and if it's heads you win. If you don't win, your opponent flips a coin and if it's heads they win. If neither player wins, the coin flips continue in turn until someone wins.

Lets say that En is the event that you get heads for the first time on your nth flip.
That's the same as flipping a tails n-1 times in a row then flipping a heads, so it is equal to (1/2)^(n-1)*(1/2)=(1/2)^n.
The probability you win is the sum of (1/2)^n for all odd values of n,
Σ (0 to infinity) (1/2)^2n+1
You can factor out a 1/2 and bring down the 2 from the exponent and it will turn into:
1/2*Σ (0 to infinity) (1/4)^n
Which is just a geometric series, so it is equal to (1/2)*(1/(1-1/4))=(1/2)*(1/(3/4))=(1/2)*(4/3)=2/3
So there is a 2/3 chance of you winning, and a 1/3 chance that they will win.


Option B states that you will win the game if you defer and give your opponent the chance to first flip to see if they win the game first. If they don't win, you automatically win.

Which option is better?
This is just a normal coin flip. Heads they win, tails you lose.
So you'll win with a probability 1/2.

Option a is better assuming i did math correctly...

Nihil Credo
02-28-2008, 08:03 PM
I think Eldariel meant Option B = NOT (Option A). Although the "automatically" in that case would be redundant.

That still makes Option A better, because it's greater than 50% and thus Option B is less than 50%.

Also, TSchultz's maths are correct. The geometric series is clearly visible in this awesome Paint graph of Option A:

http://xs124.xs.to/xs124/08095/untitled895.jpg

You can also notice that Win + Lose = 100%, and that each Lose "piece" is associated to a Win piece that is twice as long. Therefore, Win = 2*Lose, which gives us Win = 2/3, Lose = 1/3.

freakish777
02-29-2008, 10:47 AM
You shouldn't even need to know math well in order to come to a conclusion of which to pick.

Option B is 50% (just a normal coin-flip always).

Option A you've won 50% of the time after the first flip, and 50% of the time still have a chance of winning after the first flip. You'd don't even have to know what your chances of winning after the first flip are to pick Option A (assuming the same "pay-out" for both options) because it will always be the same or better than Option B (again, this assumes the "pay-outs" for both choices are the same, as soon as you get into Winning With A gives X, and Winning With B gives you Y, you may want an Expectimax algorithm).

raharu
03-04-2008, 03:46 PM
Lets say that En is the event that you get heads for the first time on your nth flip.
That's the same as flipping a tails n-1 times in a row then flipping a heads, so it is equal to (1/2)^(n-1)*(1/2)=(1/2)^n.
The probability you win is the sum of (1/2)^n for all odd values of n,
Σ (0 to infinity) (1/2)^2n+1
You can factor out a 1/2 and bring down the 2 from the exponent and it will turn into:
1/2*Σ (0 to infinity) (1/4)^n
Which is just a geometric series, so it is equal to (1/2)*(1/(1-1/4))=(1/2)*(1/(3/4))=(1/2)*(4/3)=2/3
So there is a 2/3 chance of you winning, and a 1/3 chance that they will win.


This is just a normal coin flip. Heads they win, tails you lose.
So you'll win with a probability 1/2.

Option a is better assuming i did math correctly...


How figure maths? I don't see how you derived your exponential equation.

zulander
03-04-2008, 04:20 PM
Actually this is what you do.

Step 1: Put the coins back in your pocket where it belongs.
Step 2: Go outside and enjoy the nice weather.
Step 3: Reach inside your pocket for the coins you were going to play this game with and take them out.
Step 4: Buy some soda from the vending machine.

Rince repeat.

Now the not-a-complete-prick answer: Go with option a for reasons stated above.

Jak
03-04-2008, 07:03 PM
Actually this is what you do.

Step 1: Put the coins back in your pocket where it belongs.
Step 2: Go outside and enjoy the nice weather.
Step 3: Reach inside your pocket for the coins you were going to play this game with and take them out.
Step 4: Buy some soda from the vending machine.

Rince repeat.

Now the not-a-complete-prick answer: Go with option a for reasons stated above.

Where can I get soda for 50 cents?

mujadaddy
03-04-2008, 09:35 PM
Where can I get soda for 50 cents?

In front of a grocery store.

Jak
03-04-2008, 10:26 PM
Those are like a buck.

mujadaddy
03-04-2008, 10:30 PM
Those are like a buck.

Wal-mart too? I can get $.50 cokes at Wal-mart (real Cokes), and generics at Albertson's.

Jak
03-05-2008, 12:11 AM
Lucky bitch.


Oh! There is a discussion! It seems apparent that option A is correct.

thefreakaccident
03-05-2008, 07:24 PM
See... this is how it would really play out between two people:

Mark: "hey Jim!"

Jim: "What?"

Mark: "I said hey"

Jim: "oh", "what do you want?!"

Mark: "You wanna play a game?!"

Jim: "what game"

Mark: "ok, here's how you play...."

Jim: "Fuck that game, it sounds retarded"

Jim walks away from mark. Mark who after many years grows lonely and depressed, as he has made everyone he has ever known grow further away from him eventually commits suicide. Jim on the other hand, who had never played the game before moved on to live a very happy and successful life.

~~FIN

Jak
03-05-2008, 07:41 PM
Omg I Lol'd So Hard! Hahaha! You Are Hilarious!

TSchultz
03-05-2008, 10:47 PM
To raharu:

"The probability you win is the sum of (1/2)^n for all odd values of n" is
(1/2)^1+(1/2)^3+(1/2)^5...

"Σ (0 to infinity) (1/2)^2n+1" is
(1/2)^1+(1/2)^3+(1/2)^5...

Which are both the same thing.

Pinder
03-05-2008, 11:17 PM
Man, I was going to make a witty joke about how lame this game is, but then other people beat me to it.

Just read theirs, and imagine it's me saying it.