[seqfan] Re: the revolver sequence
Andrew Weimholt
andrew at weimholt.com
Thu Sep 24 20:04:50 CEST 2009
Tanya,
For the case of bullets in 2 adjacent chambers, it should be better
NOT to spin after the first shot. If you survive the first shot, then
there is a 1/4 chance that the next chamber is loaded, which is less
than the 1/3 chance of fatality after an additional spin.
It seems some people want to claim that since one empty chamber is
taken out of the picture after the first shot, that the odds of the
next shot being fatal are 2/5 instead of 1/4, but this does not make
any sense. If we label the bullets A and B, and we put B immediately
after A in the revolver, then if the first shot is an empty chamber,
it is impossible for the next shot to be bullet B. Bullet B must
therefore also be taken out of the picture.
If the 2 bullets are NOT adjacent, then 2/5 is the correct value for
the odds of the second shot (without a spin) being fatal. In this
case, it is better to spin.
If the 2 bullets are placed randomly, and we do not know whether or
not they are adjacent, then the odds are 7/20 that the second shot
(without spnning) will be fatal, and in this case it is also better to
spin.
Andrew
On 9/24/09, Tanya Khovanova <mathoflove-seqfan at yahoo.com> wrote:
> Thank you Max,
>
> As always great coding!
>
> My definition of this sequence should be clarified:
> 1. The shooter spins before the first shot.
> 2. I do not count the case when the revolver is completely loaded.
>
> My goal was to reproduce the case in the famous problem with 6 chambers and 2 adjacent bullets, as it is for many surprising that it is better to spin after the first shot.
>
> Tanya
>
>
> --- On Wed, 9/23/09, Max Alekseyev <maxale at gmail.com> wrote:
>
> > From: Max Alekseyev <maxale at gmail.com>
> > Subject: [seqfan] Re: the revolver sequence
> > To: "Sequence Fanatics Discussion list" <seqfan at list.seqfan.eu>
>
> > Date: Wednesday, September 23, 2009, 11:12 PM
>
> > Thanks for explicit example - I've
> > found a typo in my code.
> >
> > Here is a formula and first 50 terms of your sequence:
> >
> > { a(n) = sum(z=0,n,sum(r=1,min(ceil(z-z^2/n)-1,n-z),
> > sumdiv(gcd([n,z,r]),d, eulerphi(d) * binomial(z/d - 1, r/d
> > - 1) *
> > binomial((n-z)/d - 1, r/d - 1) )/r )) }
> >
> > ? vector(50,n,a(n))
> > %2 = [0, 0, 0, 0, 2, 3, 4, 5, 18, 43, 60, 84, 294, 472,
> > 724, 1077,
> > 3504, 5807, 10396, 15944, 43664, 84308, 137004, 217728,
> > 582966,
> > 1134304, 1883360, 3225812, 8964134, 15461472, 27796942,
> > 45814765,
> > 123307634, 233218013, 396304692, 663041846, 1754000726,
> > 3300299482,
> > 5679338110, 9942238090, 24989323012, 47334027696,
> > 85892508384,
> > 146496196464, 359597562016, 690754558978, 1256104705128,
> > 2163505451106, 5289200995480, 10102216102758]
> >
> > Regards,
> > Max
> >
> > On Wed, Sep 23, 2009 at 10:25 PM, Tanya Khovanova
> > <mathoflove-seqfan at yahoo.com>
> > wrote:
> > > This is my list for n=9:
> > >
> > > {{0, 0, 0, 0, 0, 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 1, 1,
> > 1}, {0, 0, 0,
> > > 0, 0, 1, 1, 1, 1}, {0, 0, 0, 0, 1, 0, 1, 1, 1},
> > {0, 0, 0, 0, 1, 1,
> > > 0, 1, 1}, {0, 0, 0, 0, 1, 1, 1, 0, 1}, {0, 0, 0,
> > 1, 0, 0, 1, 1,
> > > 1}, {0, 0, 0, 1, 1, 0, 0, 1, 1}, {0, 0, 0, 1, 1,
> > 1, 0, 0, 1}, {0, 0,
> > > 0, 0, 1, 1, 1, 1, 1}, {0, 0, 0, 1, 0,
> > 1, 1, 1, 1}, {0, 0, 0, 1, 1,
> > > 0, 1, 1, 1}, {0, 0, 0, 1, 1, 1, 0, 1, 1}, {0, 0,
> > 0, 1, 1, 1, 1, 0,
> > > 1}, {0, 0, 1, 0, 0, 1, 1, 1, 1}, {0, 0, 1, 1, 0,
> > 0, 1, 1, 1}, {0, 0,
> > > 0, 1, 1, 1, 1, 1, 1}, {0, 0, 1, 1, 1,
> > 1, 1, 1, 1}}
> > >
> > > --- On Wed, 9/23/09, Max Alekseyev <maxale at gmail.com>
> > wrote:
> > >
> > >> From: Max Alekseyev <maxale at gmail.com>
> > >> Subject: [seqfan] Re: the revolver sequence
> > >> To: "Sequence Fanatics Discussion list" <seqfan at list.seqfan.eu>
> > >> Date: Wednesday, September 23, 2009, 6:58 PM
> > >> Hi Tanya,
> > >>
> > >> I've got different values starting with a(9) = 13,
> > a(10) =
> > >> 32 etc.
> > >> Could you please double check your values or lists
> > all 18
> > >> ways of
> > >> loading a revolver with n=9 chambers?
> > >>
> > >> Thanks,
> > >> Max
> > >>
> > >> On Wed, Sep 23, 2009 at 5:06 PM, Tanya Khovanova
> > >> <mathoflove-seqfan at yahoo.com>
> > >> wrote:
> > >> > Hello all,
> > >> >
> > >> > I just submitted a sequence related to the
> > revolver
> > >> puzzle:
> > >> > http://blog.tanyakhovanova.com/?p=174
> > >> >
> > >> > I generalized it to revolvers having n
> > chambers.
> > >> >
> > >> > I think there should be more sequences: for
> > example,
> > >> the one when it is preferable to spin and the one
> > when the
> > >> chances are the same.
> > >> >
> > >> > Also, my programs are usually not very
> > efficient. It
> > >> will be nice if someone can add more terms to
> > this
> > >> sequence.
> > >> >
> > >> > %I A165646
> > >> > %S A165646
> > 0,0,0,0,2,3,4,5,18,43,60,84,294,472,724
> > >> > %N A165646 The revolver sequence.
> > >> > %C A165646 a(n) is in how many ways you can
> > load a
> > >> revolver with n chambers, so that if a person
> > survives after
> > >> the first shot, he/she has better chances of
> > survival for
> > >> the second shot if the shooter continues rather
> > than spins.
> > >> a(n) <= A000031(n) as A000031(n) counts the
> > number of
> > >> possible revolver loadings.
> > >> > %H A165646 Tanya Khovanova, <a href="http://blog.tanyakhovanova.com/?p=174">Heard on the
> > >> Street</a>
> > >> > %e A165646 Based on the famous interview
> > question
> > >> where the revolver has six chambers and the
> > shooter loads
> > >> two adjacent bullets. As the answer to this
> > question is to
> > >> continue, a(6) must be at least 1.
> > >> > %t A165646 << Combinatorica` colors[x_]
> > :=
> > >> Table[PadLeft[Table[1, {n, i}], x], {i, 0, x}]
> > >> continueBetter[list_] := (len = Length[list]; c0 =
> > 0; c00 =
> > >> 0; rotateN = 0; While[rotateN < len, newList =
> > >> RotateLeft[list, rotateN]; If[newList[[1]] == 0,
> > c0++;
> > >> If[newList[[2]] == 0, c00++]]; rotateN++]; If[c0
> > > 0,
> > >> c00/c0 > c0/len, False]) continueNum[num_] :=
> > (neckNum =
> > >> Length[colors[num]]; ans = 0; count = 1;
> > While[count <=
> > >> neckNum, ans = ans +
> > Length[Select[ListNecklaces[num,
> > >> colors[num][[count]], Cyclic], continueBetter[#]
> > &]];
> > >> count++]; ans) Table[continueNum[n], {n, 2, 15}]
> > >> > %Y A165646 A000031
> > >> > %K A165646 more,nonn
> > >> > %O A165646 1,5
> > >> > %A A165646 Tanya Khovanova
> > (tanyakh(AT)yahoo.com), Sep
> > >> 23 2009
> > >> >
> > >> >
> > >> >
> > >> >
> > _______________________________________________
> > >> >
> > >> > Seqfan Mailing list - http://list.seqfan.eu/
> > >> >
> > >>
> > >>
> > >> _______________________________________________
> > >>
> > >> Seqfan Mailing list - http://list.seqfan.eu/
> > >>
> > >
> > >
> > > _______________________________________________
> > >
> > > Seqfan Mailing list - http://list.seqfan.eu/
> > >
> >
> >
> > _______________________________________________
> >
> > Seqfan Mailing list - http://list.seqfan.eu/
> >
>
>
> _______________________________________________
>
> Seqfan Mailing list - http://list.seqfan.eu/
>
>
More information about the SeqFan
mailing list