ANSWER Logic Puzzle: Russian Roulette

Here is my answer to the puzzle that was posted here.

Label the chambers {A,B,C,D,E,F}.

Let chambers {A,B} contain bullets.

Spin the barrel. Our expectation distribution of the current chamber is X={1/6, 1/6, 1/6, 1/6, 1/6, 1/6}.

Fire the gun. We get an observation z that the chamber was empty. We want to update our expectation to P(X|z).

P(X|z) = P(X)*P(z|X)

                (where the ‘equals’ sign really means proportional)

P(z|X) is the likelihood function that we would observe our specific value of z for each value of X.

P(z|x) = {0, 0, 1, 1, 1, 1}

P(X|z) = (0, 0, 1/4, 1/4, 1/4, 1/4}

With this belief distribution we can clearly see that there is only one possible chamber that is adjacent to a bullet. The chance we are on that chamber is 1/4. If they spin, then chance we land on a bullet is 2/6=1/3. Since 1/4 < 1/3 you should ask that they just pull the trigger again.

Comments (9)

  1. Gregory Suvalian says:

    Please apply this logic if you gun already had 3 chambers and 2 bullets inside.

  2. In that case instead of it being 1/4 for each, it would be 100% chance of which one it is in, so you would always want to spin it.

  3. RN says:

    Its Called as Bayes Theorem. Something taught in 12th Grade.

  4. Hamzeh says:

    Hi there.

    I have a problem in using HttpContext.

    when i use server.transfer method   i can’t use session in new page.


    1- I’m in ASP.Net

    2- I have a project SyncModule,for managing application in the same Solution

     public void OnBeginRequest(Object s, EventArgs e)


               HttpApplication app = s as HttpApplication;

               HttpContext ctx = app.Context;



    my error in new page look like


    Object reference not set to an instance of an object.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

    Source Error:

    Line 17:     protected void Page_Load(object sender, EventArgs e)

    Line 18:     {

    Line 19:        

    Line 20:         if (Session[“UserID”] == null)

    Line 21:         {


    please help me .

    i’m in

  5. GPirate says:

    maybe wrong! you forget the gravity… i spin!

  6. Hamzeh,

    This isn’t really a good post for that question, but try using the Context to store the data instead of Session.  Something like:

    Context.Items["Message"] = "Your password was changed successfully";

  7. Gregory Suvalian says:

    How about if it’ll be 4 chambers? Basically answer to the question will depend on number of chambers in pistolet?

  8. Russ Blake says:

    I think there is a flaw in your logic.  Once the gun has been fired, the probability of a loaded cylindar is 1/6, not the original 2/6 = 1/3.  Spin it, if you are still amongst the living….Bayes Theorem is the heart of Decision Theory, a relatively new branch of Artificial Intelligence.  Microsoft use it for diagnostic help (you know: the wizard that helps you get your printer working.)  Quite interesting stuff.