Two Plus Two Older Archives  

Go Back   Two Plus Two Older Archives > General Gambling > Probability
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-16-2005, 08:08 PM
Dan Mezick Dan Mezick is offline
Senior Member
 
Join Date: Jun 2004
Location: Foxwoods area
Posts: 297
Default Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)

Guys, at the time the first player pulls the trigger, there are SIX possible states for 2 bullets in the 6-gun:

2 Bullets adjacent in 6 possible chambers:

1&2
2&3
3&4
4&5
5&6
6&1 (whoops)

OK, six.

Let's assume chamber #1 was the chamber that clicked for player #1.... with no bullet inside.

That eliminates the first possible state (1&2) and the last possible state (6&1) from consideration, leaving 4 possible states (of initially 6 possible) remaining for the 2nd player to deal with.

Only one of them can kill you now (2&3) so you are looking at 1 chance out of 4 that you are going to die if you do not spin.

If you choose to instead spin the 2 bullets in the 6 chambers, there is a 2/6 = 1 out of 3 chance you will get a headache.

Don't spin and you have a 1 in 4 chance of a bullet.

Spin and you have a 1 in 3 chance of a bullet.

Don't spin.
Reply With Quote
  #2  
Old 01-17-2005, 01:41 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)

Why is everyone ignoring the rounds subsequent to that one round? Your analysis ends up coming to the right answer, but there are times where not re-spinning is immediately +EV, but ends up being in the longterm (after a round or two more) -EV.
Reply With Quote
  #3  
Old 02-02-2005, 02:45 PM
Derek in NYC Derek in NYC is offline
Senior Member
 
Join Date: Jun 2004
Posts: 130
Default Another problem.

Part of the confusion by those who failed to get the right answer may come from a lack of familiarity with the way revolvers work. In a revolver, with each trigger pull, the cylinder holding the bullets rotates exactly 1/6 of the way, the hammer cocks, and releases on the cylnder that has just rotated into alignment with the barrel. If there is a bullet in that cylinder, the gun goes bang; if not, it goes click. On the next trigger pull, the same thing happens. After 6 trigger pulls, the hammer has cocked and fallen on every cylinder of the gun, and discharged all the bullets in all the cylinders.

A different problem. You and your friend wish to play Iraqi Roulette, a variation on Russian Roulette. A friend hands you a Glock pistol, inserts a fully loaded magazine into the gun, firmly seats the magazine, and cycles the slide. Who should go first? You or your friend?
Reply With Quote
  #4  
Old 01-15-2005, 02:15 AM
rt1 rt1 is offline
Member
 
Join Date: Jun 2004
Location: irc
Posts: 33
Default Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)

i drew this out on a piece of paper and it seemed rather easy to me. and im not smart.

your friend shot and hit a blank. that means that no bullet was about to fire so therefore the trigger wont be on the next bullet or the next empty slot. leaving 1 bullet and 3 empty slots (4 slots total) left for the next pull. 1/4 you kill yourself, 3/4 you live.

if you choose to respin, you land on a bullet 2/6 times or 1/3 of the time.

so, i dont respin, i just pull the trigger.
Reply With Quote
  #5  
Old 01-15-2005, 02:17 AM
RJT RJT is offline
Senior Member
 
Join Date: Nov 2004
Posts: 111
Default Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)

If you spin again you have a 4/6 chance of surviving. The chance that your friend had chamber next to live one is 1 / 4. That leaves 3 /4 chance it wasn’t next to live one. 3 / 4 = 9 /12. 4 /6 = 8/ 12. Chances are better not to spin?
Reply With Quote
  #6  
Old 01-15-2005, 02:20 AM
TomCollins TomCollins is offline
Senior Member
 
Join Date: Jul 2003
Location: Austin, TX
Posts: 172
Default Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)

This is all it takes to get a job at MS? Wonder what went wrong.

Number the chambers 1-6. 1-2 are loaded. So if your friend shoots and its empty, you know that he had 3-6. Only chamber 6 has the chamber next to it loaded. So your chances are 1/4 of dying.

On the other hand, if you choose one randomly, your chances are 2/6 = 1/3, which is worse.

So you shoot without turning the chamber.
Reply With Quote
  #7  
Old 01-15-2005, 06:20 AM
Ed Miller Ed Miller is offline
Senior Member
 
Join Date: Sep 2002
Location: Writing \"Small Stakes Hold \'Em\"
Posts: 4,548
Default Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)

This is all it takes to get a job at MS? Wonder what went wrong.

[img]/images/graemlins/smile.gif[/img]

The majority of my interview candidates really struggled with this question. To me it shows how superior the Microsoft style of interviewing (solve these problems now, please) is to a more traditional style ("So, tell me about a time when you faced a challenge, and how did you overcome it, blah blah blah..."). I learned stuff in five minutes about the candidate that a traditional interviewer couldn't know in an hour or more.

You'd be surprised how many people show up with "solid" resumes for CODING positions, yet balk when you ask them to write a function in C that calculates the fibonacci series. "Can I do it in pseudocode?" "Do I have to get the syntax right?" "Can I just tell you how to do it?"
Reply With Quote
  #8  
Old 01-15-2005, 06:34 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)

Hey Ed,

Is my answer right? I'm not familiar with the theorem you mentioned in your original post, so I'm not 100% confident in my answer.

Thanks,

Josh
Reply With Quote
  #9  
Old 01-15-2005, 10:16 AM
TomCollins TomCollins is offline
Senior Member
 
Join Date: Jul 2003
Location: Austin, TX
Posts: 172
Default Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)

In my expirience with MS, mediocre female and minority candidates from my university (not MIT), were the only ones who ever got hired. I was pretty sure that I was there for song and dance, since they couldn't just only interview those candidates.
Reply With Quote
  #10  
Old 01-15-2005, 10:53 AM
rt1 rt1 is offline
Member
 
Join Date: Jun 2004
Location: irc
Posts: 33
Default Re: A Microsoft Interview Question (aka basic Bayes\' Theorem)

[ QUOTE ]

You'd be surprised how many people show up with "solid" resumes for CODING positions, yet balk when you ask them to write a function in C that calculates the fibonacci series. "Can I do it in pseudocode?" "Do I have to get the syntax right?" "Can I just tell you how to do it?"

[/ QUOTE ]

No offense or anything here Ed, but I think you are way off here. I’ve worked as a coder for about 6 years now, with no college education or any of that jazz. I don’t think there is anything wrong about writing such functions in pseudocode… I mean, when are they going to have to code something that trivial from scratch, and when wont they have the resources right there in front of them? I don’t think its knowing code the counts, but more of knowing how to apply the coding to the app (process or writing the app etc). I mean, come on, now a days it takes 2 days to learn the syntax of a language. They are all pretty much the same.

I am a little touchy on this subject. My first 4 years of coding I worked for a great company out of boston. Lots of major schools there and anyone who showed up to our door from MIT got job. While some of these guys knew theyre [censored], a lot were right out of the classroom with no experience and couldn’t code for [censored]. Sorry to get way off subject…

Thanks!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:24 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.