The theory of Russian Roulette and the Sierpinski Gasket

Tomohide Hashiba
Yuta Nakagawa  
Akihiro Hyogu
Hiroshi Matsui
Ryohei Miyadera

1. Introduction

As we presented before (See R. Miyadera [1]), the triangle of the list of probabilities has the Pascal's triangle like property. If we make a triangle using the least nonnegative residues of the numerators of the fractions in the triangle taken modulo 2, then we get very interesting figures. When the number of the player is 2, then it is very similar to the Sierpinski Gasket. When the number of players is 3, it is slightly similar to the Sierpinski Gasket. 
4 freshmen (10th grade) in a high school studied the theory of Russian roulette, and discovered these figures. They and their teacher also made a very interesting animation of the figures based on the theory of Russian roulette.

2. Mathematical theory of general Russian roulette.(The result of this section is included in Miyadera[1].)

In the Russian roulette game we are going to study here, one does  not rotate the cylinder before he pulls the trigger.   We denote by F[p,n,m,v] the probability of death of the v-th player in this game.

We define  U[p, n, m, v] = \(∑\+\(z = 0\)\%\(t\ \  - 1\)\(\_\(n - v - pz\)\)\(C\_\(m - 1\)\)\),where
 t  =  [((n - m + p - v + 1)/p)].
Note that this number U[p,n,m,v] is an important number in this article.

Theorem 1.  F[p, n, m, v]= U[p, n, m, 
                v]/((Subscript[, n]))(Subscript[C, m]).

For a proof see Miyadera [1].

1. Mathematica code for  F[p,n,m,v].

F[p2_, n2_, m2_, v2_] := 
        Block[{t2, u}, t2 = IntegerPart[((1 + p2 - m2 + n2 - v2)/p2)]; 
          u = ((∑_(z = 0)^(t2 - 1))Binomial[n2 - v2 - p2*z, 
                  m2 - 1]); 
          FractionBox[u, Binomial[n2, m2]] // DisplayForm]

F[2, 6, 4, 1]

Example 1.  The purpose of this example is to observe a Pascal's triangle-like pattern of fractions.

To do this we have to make a triangle.  Here we let p = 2 and v = 1, and make F[p,n,m,v] for any natural number n,m with n ≤ 7 and m ≤ n. Then we get a triangle(See Figure 1).  If we calculate F[2,n,m,1] for each n and m, then we have the following triangle of fractions (See Figure 2).　
    The pattern is quite obvious in Figure (2). For example look at 6th row.  F[2,6,2,1]= (9/(15 )) and F[2,6,3,1]= (13/20) are the second and third ones in the row.   F[2,7,3,1]=(22/35)= ((9 + 13)/(15 + 20)), which is the third one in the 7th row.  This reminds us of Pascal's triangle.  By Theorem 1 and 2 there exists the same kind of relation among F[p,n,m,v] ,F[p,n,m+1,v], F[p,n+1,m+1,v] for any natural number p,v,n and m with n ≥ m.

Figure(1)

{F[2,1,1,1]}      
                           {F[2,2,1,1],F[2,2,2,1]}
                      {F[2,3,1,1],F[2,3,2,1],F[2,3,3,1]}
                {F[2,4,1,1],F[2,4,2,1],F[2,4,3,1],F[2,4,4,1]}
          {F[2,5,1,1],F[2,5,2,1],F[2,5,3,1],F[2,5,4,1],F[2,5,5,1]}
     {F[2,6,1,1],F[2,6,2,1],F[2,6,31,1],F[2,6,4,1],F[2,6,5,1],F[2,6,6,1]}
{F[2,7,1,1],F[2,7,1,1],F[2,7,3,1],F[2,7,4,1],F[2,7,5,1],F[2,7,6,1],F[2,7,7,1]}

Figure(2)

{1}  
                                          {(1/2), (1/1)}
                                      {(2/3), (2/3), (1/1)}
                                  {(2/4), (4/6), (3/4), (1/1)}
                             {(3/5), (6/10), (7/10), (4/5), (1/1)}
                          {(3/6),(9/15),(13/20),(11/15),(5/6),(1/1)}
                      {(4/7),(12/21),(22/35),(24/35),(16/21),(6/7),1}

2. Mathematica code to make the above triangle.

Clear[triangle,   death];
triangle[t_, p_, v_] := 
          Block[{death}, 
            death[p2_, n2_, m2_, v2_] := 
              Block[{t2, u}, t2 = IntegerPart[((1 + p2 - m2 + n2 - v2)/p2)]; 
                u = ((∑_(z = 0)^(t2 - 1))Binomial[n2 - v2 - p2*z, 
                        m2 - 1]); 
                FractionBox[u, Binomial[n2, m2]] // DisplayForm]; 
            ColumnForm[Table[Table[death[p, n, m, v], {m, 1, n}], {n, 1, t}], 
              Center]];

triangle[7, 2, 1]

3. New facts about Russian roulette.

Example 2. Here we calculate the probabilities of the 1st person's death when 3 persons play the game, and we make a triangle for the number of cylinders n = 1,2,3,..., 12.

Figure(3)

({{{(1/1)}}, {{(1/2), (1/1)}}, {{(1/3), (2/3), (1/1)}}, {{(2/4), (3/6), (3/4), (1/1)}}, {{(2/5), (5/10), (6/10), (4/5), (1/1)}}, {{(2/6), (7/15), (11/20), (10/15), (5/6), (1/1)}}, {{(3/7), (9/21), (18/35), (21/35), (15/21), (6/7), (1/1)}}, {{(3/8), (12/28), (27/56), (39/70), (36/56), (21/28), (7/8), (1/1)}}, {{(3/9), (15/36), (39/84), (66/126), (75/126), (57/84), (28/36), (8/9), 
              (1/1)}}, {{(4/10), (18/45), (54/120), (105/210), (141/252), (132/210), (85/120), 
              (36/45), (9/10), (1/1)}}, {{(4/11), (22/55), (72/165), (159/330), (246/462), (273/462), (217/330), 
              (121/165), (45/55), (10/11), (1/1)}}, {{(4/12), (26/66), (94/220), (231/495), (405/792), (519/924), (490/792), 
              (338/495), (166/220), (55/66), (11/12), (1/1)}}})

3. Mathematica code for the above triangle.

Clear[triangle,   death];
triangle[t_, p_, v_] := 
          Block[{death}, 
            death[p2_, n2_, m2_, v2_] := 
              Block[{t2, u}, t2 = IntegerPart[((1 + p2 - m2 + n2 - v2)/p2)]; 
                u = ((∑_(z = 0)^(t2 - 1))Binomial[n2 - v2 - p2*z, 
                        m2 - 1]); 
                FractionBox[u, Binomial[n2, m2]] // DisplayForm]; 
            ColumnForm[Table[Table[death[p, n, m, v], {m, 1, n}], {n, 1, t}], 
              Center]];

triangle[12, 3, 1]

Example 3. Next we are going to make a new triangle using the numerators of the fractions in the above triangle.

Figure(4)

4. Mathematica code to create the above triangle.

Clear[triangle,   death];
triangle2[t_, p_, v_] := 
          Block[{death}, 
            death2[p2_, n2_, m2_, v2_] := 
              Block[{t2, u}, t2 = IntegerPart[((1 + p2 - m2 + n2 - v2)/p2)]; 
                u = ((∑_(z = 0)^(t2 - 1))Binomial[n2 - v2 - p2*z, 
                        m2 - 1])]; 
            ColumnForm[
              Table[Table[death2[p, n, m, v], {m, 1, n}], {n, 1, t}], 
              Center]];

triangle2[12, 3, 1]

Example 4. One of the authors (Matsui) studied the least nonnegative residues of thenumerators of the fractions in the  triangle taken modulo 2, and he got a very interesting figures. He colored 1,0 with purple and blue. Here we have a triangle with 30 rows.

Figure(5)

5. Mathematica code to create the above triangle.

death2[p2_, n2_, m2_, v2_] := 
        Block[{t2, u}, t2 = IntegerPart[((1 + p2 - m2 + n2 - v2)/p2)]; 
          u = ((∑_(z = 0)^(t2 - 1))Binomial[n2 - v2 - p2*z, 
                  m2 - 1])];
t = 50; 
    s = Table[Table[Mod[death2[3, n, m, 1], 2], {m, 1, n}], {n, 1, t}]; 
    Show[Graphics[
        Evaluate[
Table[
            Table[{Hue[(6 + s[[x, y]])/4], 
                Text[s[[x, y]], {-0.5 x + 
                      y, -x}]}, 
{y, 1, x}], {x, 1, 
              30}]]], AspectRatio -> 1/0.9]

Example 5. Next we substitute numbers with a colored dots, then we get the following figure. 
Here we have 96 rows of probabilities of 1st person's death when 3 persons play the game.

Figure(6)

6. Mathematica code to create the above triangle.

figure[p_] := 
      Block[{death, s11}, 
        death[p2_, n2_, m2_, v2_] := 
          Block[{t2, u}, t2 = IntegerPart[((1 + p2 - m2 + n2 - v2)/p2)]; 
            u = ((∑_(z = 0)^(t2 - 1))Binomial[n2 - v2 - p2*z, 
                    m2 - 1])]; Clear[t, s11]; t = 100; 
        s11 = Table[Table[Mod[death[p, n, m, 1], 2], {m, 1, n}], {n, 1, t}]; 
        Show[Graphics[
            Evaluate[
Table[
                Table[{Hue[(6 + s11[[x, y]])/4], 
                    Disk[{-0.5 x + y, -x}, 
                      0.5]}, 
{y, 1, x}], {x, 1, 96}]]], 
          AspectRatio -> 1/0.9]]

figure[3]

Example 6.  Here we make triangles of  96 rows of probabilities of 1st person's death for 2-persons. This figure is very much like Sierpinski Gasket.

Figure(7)

7. Mathematica code to create the above triangle.

figure[p_] := 
      Block[{death, s11}, 
        death[p2_, n2_, m2_, v2_] := 
          Block[{t2, u}, t2 = IntegerPart[((1 + p2 - m2 + n2 - v2)/p2)]; 
            u = ((∑_(z = 0)^(t2 - 1))Binomial[n2 - v2 - p2*z, 
                    m2 - 1])]; Clear[t, s11]; t = 100; 
        s11 = Table[Table[Mod[death[p, n, m, 1], 2], {m, 1, n}], {n, 1, t}]; 
        Show[Graphics[
            Evaluate[
Table[
                Table[{Hue[(6 + s11[[x, y]])/4], 
                    Disk[{-0.5 x + y, -x}, 
                      0.5]}, 
{y, 1, x}], {x, 1, 96}]]], 
          AspectRatio -> 1/0.9]]

figure[2]

Remark.  If you want to study the case of p-person for various natural number p, please use the Mathematica function figure[p] defined in the above Mathematica code 7.

Example 7.  Here we use the same numbers of Figure (4), but instead of modulo 2 we used modulo 3. It is interesting that we have a figure that look like the Sierpinski Gasket this time.

Figure(8)

8. Mathematica code to create the above triangle with 3 colors.

death[p2_, n2_, m2_, v2_] := 
          Block[{t2, u}, t2 = IntegerPart[((1 + p2 - m2 + n2 - v2)/p2)]; 
            u = ((∑_(z = 0)^(t2 - 1))Binomial[n2 - v2 - p2*z, 
                    m2 - 1])];
p = 3;
t = 100; 
      s22 = Table[Table[Mod[death[p, n, m, 1], 3], {m, 1, n}], {n, 1, t}];
Show[
        Graphics[
          Evaluate[
Table[
              Table[{Hue[(6 + s22[[x, y]])/4], 
                  Disk[{-0.5 x + y, -x}, 
                    0.5]}, 
{y, 1, x}], {x, 1, 96}]]], 
        AspectRatio -> 1/0.9]

Example 8.  Here we can create a movie by making figures for p = 2, 3, 4, ..., 96. We omit the output, because it would take much disk space.

9. Mathematica code to create a beautiful ( color or black & white) movie based on the theory of Russian roulette.

Movie 1. You can create a movie based on the Russian roulette, but you cannot make a good QuickTime movie from this. (We do not know why.) You had better use the code in Movie 2.

death[p2_, n2_, m2_, v2_] := 
      Block[{t2, u}, t2 = IntegerPart[((1 + p2 - m2 + n2 - v2)/p2)]; 
        u = ((∑_(z = 0)^(t2 - 1))Binomial[n2 - v2 - p2*z, 
                m2 - 1])]; Clear[t, s11]; 
    Do[t = 100; 
      s11 = Table[Table[Mod[death[p, n, m, 1], 2], {m, 1, n}], {n, 1, t}]; 
      Show[Graphics[
          Evaluate[
Table[
              Table[{Hue[(6 + s11[[x, y]])/4], 
                  Disk[{-0.5 x + y, -x}, 
                    0.5]}, 
{y, 1, x}], {x, 1, 96}]]], 
        AspectRatio -> 1/0.9, Background -> Hue[6/4]], {p, 2, 
        96}]

Movie 2. This is different from Movie 1, because it has extra codes with it. These codes are colored in Green. With this code you can make a good QuikTime movie by the Mathematica command "Save selection as special".

death[p2_, n2_, m2_, v2_] := 
        Block[{t2, u}, t2 = IntegerPart[((1 + p2 - m2 + n2 - v2)/p2)]; 
          u = ((∑_(z = 0)^(t2 - 1))Binomial[n2 - v2 - p2*z, 
                  m2 - 1])];
Clear[t, s11];Do[t = 100;s11 = 
              Table[Table[Mod[death[p, n, m, 1], 2], {m, 1, n}], {n, 1, t}];Show[Graphics[Evaluate[{{Hue[0.4], Disk[{80, -120}, 0.5]},
Table[
                          Table[{Hue[(6 + s11[[x, y]])/4], 
                              Disk[{-0.5 x + y, -x}, 
                                0.5]}, 
{y, 1, x}], {x, 1, 
                            96}]}]],AspectRatio -> 1/0.9,Background -> Hue[6/4]],{p, 2, 96}]

Movie 3. You can create a black and white movie, but you had better use the following Movie 4 to make a QuickTime movie.

Clear[t, s11]; 
      Do[t = 100; 
        s11 = Table[Table[Mod[death[p, n, m, 1], 2], {m, 1, n}], {n, 1, t}]; 
        Show[Graphics[
            Evaluate[
Table[
                Table[{RGBColor[(1 - s11[[x, y]]), (1 - 
                          s11[[x, y]]), (1 - s11[[x, y]])], 
                    Disk[{-0.5 x + y, -x}, 
                      0.5]}, 
{y, 1, x}], {x, 1, 96}]]], 
          AspectRatio -> 1/0.9, 
          Background -> RGBColor[1, 1, 1]], {p, 2, 96}]

Movie 4. You can make a black and white QuickTime movie.

death[p2_, n2_, m2_, v2_] := 
          Block[{t2, u}, t2 = IntegerPart[((1 + p2 - m2 + n2 - v2)/p2)]; 
            u = ((∑_(z = 0)^(t2 - 1))Binomial[n2 - v2 - p2*z, 
                    m2 - 1])];
Clear[t, s11];Do[t = 100;s11 = 
                Table[Table[Mod[death[p, n, m, 1], 2], {m, 1, n}], {n, 1, 
                    t}];Show[Graphics[Evaluate[{{Hue[0.4], Disk[{80, -120}, 0.5]},
Table[
                            Table[{RGBColor[(1 - s11[[x, y]]), (1 - 
                                      s11[[x, y]]), (1 - 
                                      s11[[x, y]])], 
                                Disk[{-0.5 x + y, -x}, 
                                  0.5]}, 
{y, 1, x}], {x, 
                              1, 96}]}]],AspectRatio -> 1/0.9,Background -> RGBColor[1, 1, 1]],{p, 2, 96}]

[1] R. Miyadera,General theory of Russian roulette,MathSource,http://library.wolfram.com/infocenter/MathSource/5710/

[2] Sierpinski Sieve,MathWorld,http://mathworld.wolfram.com/SierpinskiSieve.html