#71
|
|||
|
|||
Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)
River crossing answer:
P = police, T = thief, F = Father, M = Mother, D = Daughter, S = Son. PT-> Cross P-> Back PS-> Cross PT-> Back FS-> Cross F-> Back FM-> Cross M-> Back PT-> Cross F-> Back MF->Cross M-> Back MD->Cross PT->Back PD->Cross P->Back PT->Cross WINNA! |
#72
|
|||
|
|||
Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)
I feel like I must be missing something, but I would not spin the chamber again. If I spin the chamber again (assuming that doing so would produce a random result), I will have a 1-in-3 chance of getting a bullet in the head when I pull the trigger.
If I do not spin the chamber, then, because the bullets are in adjacent chambers I have only a 1-in-4 chance of shooting myself because I know there is one full chamber and one empty that cannot be "on deck." I know this because my friend did not get bullet No. 1 or bullet No. 2. Therefore, the next chamber cannot be Bullet No. 2 or Empty No. 1. The only possible chambers for my pulling of the trigger are Empty No. 2, No. 3 or No. 4 or Bullet No. 1. |
#73
|
|||
|
|||
Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)
If he had shot himself, then I would be the winner, and I wouldn't need to guess.
But assuming I had to play on after he shot himself, then I would spin because w/o a spin, I would have a 1-in-2 chance of getting a bullet. With a spin, I would have a 1-in-5 chance, assuming that the gun was not reloaded. If the used (just fired) chamber was reloaded, a spin would still be correct, giving me a 2/3 chance of survival. Edit: change 1-in-5 to 1-in-6 in the 2nd graph; mental note: read your post in the made-for-checking pre-submit mode rather than the post-submission "view your post" mode. |
#74
|
|||
|
|||
Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)
[ QUOTE ]
He pulls the trigger... Click. He hands the gun to you. [/ QUOTE ] I think this part implies the gun didn't go off...LOL |
#75
|
|||
|
|||
Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)
I haven't read any posts to the original question but drawing some quick pictures to help my well below genius IQ out I'd have to say that you have a 75% chance of living if you do not spin the chamber again and a 67% chance of living if you do spin it again.
After your friend discovered a blank chamber you know that the revolver was in one of 4 states. 1 of those four states is fatal and the other 3 are safe (for the next shot anyway). So, 75/25 you live/die. If you spin it then you're going to get 67/33 live/die. Yugoslav Now to check my answer!!! [img]/images/graemlins/grin.gif[/img] Edit: In a hurry and apparently rounded 66.66 down ... meh. I'm still right baby! |
#76
|
|||
|
|||
Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)
Mau!
Sparks |
#77
|
|||
|
|||
Re: Answer
[ QUOTE ]
Bayes' Theorem is a way to adjust a prior probability given new information. In this case, the prior probability of finding a bullet directly after a spin is 2/6 or 1/3. The new information is that your friend pulled the trigger, and there was no bullet in the chamber. That tells you something about which chambers can or cannot be next. There are only four chambers that held no bullet in them. Thus, you know the gun must have been on one of those chambers when your friend fired. Of those four chambers he could have fired, three of them have empty chambers next to them. Only one of those four has a bullet next. So while the prior probability of finding a bullet is 1/3, the probability GIVEN THAT YOUR FRIEND DIDN'T FIND A BULLET, is only 1/4. Thus, you should just shoot the next chamber. [/ QUOTE ] This answer assumes that the weight of the 2 bullets chambered side-by-side does not influence their position after a robust spin in an oiled, well-maintained, perfectly balanced revolver. |
#78
|
|||
|
|||
Re: Answer
[ QUOTE ]
This answer assumes that the weight of the 2 bullets chambered side-by-side does not influence their position after a robust spin in an oiled, well-maintained, perfectly balanced revolver. [/ QUOTE ] Just point the gun straight up when spinning and the effect of gravity is nullified, no? Tim |
#79
|
|||
|
|||
Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)
back-of-the-envelope calculation: There are 4 possible states in which your friend would have fired a blank. Of those four, three will lead to a blank for you and 1 will not. So, your odds of pulling a blank here are 3/4 or 75%. If you just randomly spin the chamber, the normal odds would be 4/6 for a blank, or 66%. Thus, at least by my math, your odds of living are 75% if you don't spin, but only 66% if you do. Therefore, you shouldn't spin. q/q |
#80
|
|||
|
|||
Ed, here\'s a related Q for you
Did you take off points, if the applicant pulled out a pen & paper? That's how i solved the problem & would have taken the same approach in an interview.
==== I'm currently reading your book & Theory and there's a couple of issues that i'm still trying to resolve. Here's my related Q for you - HE, 10 players, a loose game, initial betting round. The 1st x players fold, say 4. It's now my turn to bet. Does the fact the 1st 4 folded mean that the remaining 5 are likely to have better cards than they would if a new deck was shuffled and these 5 were dealt another set of hole cards? Before people jump into the discussion, consider these points: - Don't just view this as 1 incident, imagine that it happened 10,000 times and all the results are tallied. [A billion times, whatever, high enough to smooth out the #'s] - Regardless of your betting criteria, there should be an average of Y good hole card pairs on each deal. Assume my cards are no good as well. Does that mean that, on average, the remaining 5 players will have 0.5*Y good hole card pairs? Y? something in between? - The 1st 4 folding could indicate that they didn't have good high cards --> that as the cards were dealt to the remaining 5 players, there were more high cards in the deck & the remaining 5 players had a greater % likelyhood of being dealt high cards than the 1st 4 players. Anyone is welcome to comment |
|
|