#41
|
|||
|
|||
Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)
Seems trivial. You know your buddy didn't get shot, so there is only one way it could have spun such that you will get killed with the next pull (knowing that the bullets are right next to each other).
There's a 1/6 chance of that having happened. If you spin, there's a 1/3 chance that you'll be in position to blow your brains out. The only way this could be countered that I can see is if there were an inherent flaw with the gun, and spinning it would always make it stop in non-lethal positions relative to the current placement of rounds. Assuming a fair firearm, though, do not spin. EDIT: I'm a tard and it should be 1/4 because the 2 slots gotta be thrown out. ~D |
#42
|
|||
|
|||
Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)
I can see it both ways, but I once worked at a company where a woman -- hired as a C++ programmer -- was fired after two weeks. Management cited her lack of productivity.
Her problem? She didn't know C++. -DB |
#43
|
|||
|
|||
Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)
ahh, adjacent chambers. Thank for the clarification- I missed that little part- haha [img]/images/graemlins/laugh.gif[/img]
|
#44
|
|||
|
|||
Answer
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. |
#45
|
|||
|
|||
Re: Answer
Bayes' Theorem relates the conditional probability of A given B to the conditional probability of B given A. Often, it is necessary to invoke Bayes' Theorem in order to transform a prior probability distribution into a posterior probability distribution.
However, in our case, A is the event that the second shooter finds a bullet and B is the event that the first shooter does not. While it is true that P(A|B)=1/4, nowhere do we need to relate this to P(B|A). In fact, we can just compute this directly from the definition of P(A|B) without using Bayes' Theorem at all. Definition of Conditional Probability: P(A|B) = P(A and B)/P(B) Bayes' Theorem: P(A|B) = P(B|A)*P(A)/P(B) It is the first formula, not the second, which captures the essence of the (correct) answers given in this thread. So while it may just be a matter of terminology, this is technically not an example of the use of Bayes' Theorem. It is simply an exercise in the computation of conditional probabilities. I just wanted to point this out for the benefit of those who may want to look further into this topic. |
#46
|
|||
|
|||
Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)
Ok, after rethinking my initial answer, I think my reasoning still applies, even though I overlooked the fact that there were 2 bullets. Since the friend has exposed one of the empty chambers, there is a 40% chance that the next chamber contains a bullet. However, if I spin, there is a 33% chance that the chamber that comes up will hold a bullet. Therefore, I spin.
Now to read on and see why I'm wrong.... [img]/images/graemlins/wink.gif[/img] -Mike |
#47
|
|||
|
|||
Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)
[ QUOTE ]
Ok, after rethinking my initial answer, I think my reasoning still applies, even though I overlooked the fact that there were 2 bullets. Since the friend has exposed one of the empty chambers, there is a 40% chance that the next chamber contains a bullet. However, if I spin, there is a 33% chance that the chamber that comes up will hold a bullet. Therefore, I spin. Now to read on and see why I'm wrong.... [img]/images/graemlins/wink.gif[/img] -Mike [/ QUOTE ] Alllllllrighty, then; I stand corrected. [img]/images/graemlins/blush.gif[/img] Somehow, I didn't manage to realize that the fact that the bullets were adjacent made that much difference. [img]/images/graemlins/smile.gif[/img] Nice problem. BTW, I seem to recall hearing of a problem that was also supposed to be a Microsoft interview question; it was something about 4 people walking at different speeds, crossing a bridge that could only hold 2 people at a time, and having to make the crossing while their flashlight held out. I remember being unable to solve it at the time (someone in my group at work relayed it to us), but I don't remember what the details were. Anybody else recognize this, and what the solution was? -Mike |
#48
|
|||
|
|||
Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)
I am not 100% sure of the details of the numbers, but I believe it was, 4 people must cross a bridge and have one flashlight. The people walk across at the slowest persons speed. Only 2 people can cross at a time. The people travel at 1 min, 2 min, 3 min, 4 min. Can they get across in 12 minutes? (warning my numbers are probably wrong).
|
#49
|
|||
|
|||
Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)
From the rec.puzzles archive: "Four people need to get across a bridge that can only support two at a time. It is night and one of the two must carry a flashlight. There is only one flashlight. How can they get across in 17 minutes if their crossings speeds are 1, 2, 5 and 10 minutes?"
Solution The above is often described involving the band U2. There are other variants with different speeds, the solutions are essentially the same. |
#50
|
|||
|
|||
Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)
Hey Ed,
Haven't read through any of the responses, but here's my knee-jerk reaction without having thought it through. There are 6 possible placements. After your friend pulls a blank, there's only 4 possible placements, all of them equally likely. One of them gives you death, the other three let you live. Your chances of survival if you don't respin are 75%. If you respin, you get a random chamber and your chances of survival are 67%. So you should choose to respin or stand accordingly, depending on your goal. GoT |
|
|