View Single Post
  #30  
Old 01-15-2005, 05:58 AM
JoshuaD JoshuaD is offline
Senior Member
 
Join Date: Sep 2004
Location: NJ, USA
Posts: 341
Default Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)

Alright, my math up above was all done in my head, and was wrong. Here's the actual right answer:

Assuming every previous shot is a blank, here are the chances on each round of getting blown away:

1) 1/3
2) 1/4
3) 1/3
4) 1/2
5) 1

HOWEVER, this answer suggests flawed results:

If we don't assume every previous shot is a blank, here are the chances of the person getting blown away on each round if there is never a respin, (That is, you're at round one, what are the chances of the gun going off on each round).

1) 1/3
2) 2/3 * 1/4 = 1/6
3) 2/3 * 3/4 * 1/3 = 1/6
4) 2/3 * 3/4 * 2/3 * 1/2 = 1/6
5) 2/3 * 3/4 * 2/3 * 1/2 = 1/6

So, if you're firing on all even rounds, and he's firing on all odd rounds, you get blown away 1/3 of the time, he gets blown away 2/3 of the time. So handing him the gun first was definitely a good idea.

However, if you assume he already shot the first round and he missed, AND if there is never a re-spin, the chances of the gun going off in each round is:

1) 0 < (already happened)
2) 1 * 1/4 = 1/4
3) 1 * 3/4 * 1/3 = 1/4
4) 1 * 3/4 * 2/3 * 1/2 = 1/4
5) 1 * 3/4 * 2/3 * 1/2 = 1/4

Giving you even money on getting blown away and not.

The problem here is, I can't remember how to figure out your chances of getting blown away if you just spin between every shot, but I'm pretty sure the person who shoots first is at a disadvantage. If that's true, you should take the even money proposition in Ed's example.

However, if you can spin the gun whenever you want, you should spin everytime after you shoot, and never after he does.

In short:

If you can spin whenever you want, optimal strategy is to let him shoot, then you shoot, then to re-spin.

If you have to decide before he shoots whether to always spin or never spin, you should choose to never spin.

And to answer Ed Miller's exact question: You shouldn't spin. (I assumed it's worse than even money for the first shooter to go back and forth spinning then shooting).
Reply With Quote