# Which Cowboy will kill himself?

Which unlucky Cowboy will have to shoot himself?

This is spin-off (probably harder) of another Cowboy Puzzle which I read a few days ago.

One hundred drunken cowboys stand in a circle. Let’s say they have been assigned numbers from 1 to 100.

We start with number 1. Number 1 spares (or skips) number 2 (first neighbor in sequence) and shoots number 3 dead. Then he gives the gun to number 4. Number 4 spares/skips TWO of his neighbors( 5 and 6), and shoots number 7. Then number 4 gives the gun to the next guy in sequence, number 8. Number 8 now spares/skips THREE of his neighbors in sequence (9,10 and 11) , kills number 12 and gives the gun to number 13. Then number thirteen spares FOUR cowboys in progression( 14,15,16 and 17) and kills number 18. And so on. So each time someone gets a gun he spares/skips a number of cowboys (in progression) equal to 1 more number than the previous killer spared.

Since they are standing in a circle the killing game continues and they go round and round. Of course only those alive and standing are counted in the deadly game. Also assume that the gun can be reloaded as required.

One cowboy is very unlucky. He will have to shoot himself! So which number is the first Cowboy in sequence that will have to shoot himself?

As a side question (if you want to try) if they continue playing the game after he shoots himself, will there be more cowboys who will have to shoot themselves?

And in your own time if you want to have fun with this then which Cowboy kills the most number of men?

BTW the orginal puzzle I read included cowboy killing his immediate neighbour (1 person) only and asked for the last man standing.

• why no programming? is there really any benefit to bash this out by hand? is there a "clever" way to do it? Sep 3, 2017 at 23:12
• If there's a way to "clever" this, it eluded me. I'm curious to know how Deepak expected it to be solved.
– Rubio
Sep 4, 2017 at 3:48
• Even cowboys are smart enough realize that this is a stupid game because several cowboys will end up shoot themselves. A very different game results if cowboy #1 spares himself, shoots cowboy #2, gives the gun to cowboy #3, who in turn spares himself and cowboy #4, shoots cowboy #5, gives the gun to cowboy #6, and so on. With this variation, all of the cowboys still end up dead, but only one cowboy will have been stupid enough to shoot himself. Sep 4, 2017 at 7:20

The cowboy who shoots himself first is

#55

Here's how the game progresses1 -

         1         2         3         4         5         6         7         8         9
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1X+2.X+3..X+4...X+5....X+6.....X+7......X+8.......X+9........X+10........X+11.........X+12.........
.X +13 .... ..... ..X+14 ....... .....X+1 5........ .....X+16. ........... ..X+17...... .........X+1
8  ... .... ..... .. ..X +19.... ..... .. ......X+2 0.... .... ..........X +2 1........ ......... ..
X  +22 .... ..... .. ..  ....... X+23. .. ...... .. ..... .... .X+24.....  .. ......... ......X+2 5.
... .... ..... .. ..  ......X  +26. .. ...... .. ..... .... . ...X+27.  .. ......... ...... .. ..
... X+28 ..... .. ..  ......   .... .. .....X +2 9.... .... . ... ....  .. ......... X+30.. .. ..
...  ... ..... .. ..  ......   .X+3 1. .....  .. ..... .... . ... ....  .. ..X+32...  ..... .. ..
...  ... ..... .. ..  ...X+3   3 .. .. .....  .. ..... .... . ... ....  .. .X +34...  ..... .. ..
...  ... ..... .. ..  ... ..   X +3 5. .....  .. ..... .... . ... ....  .. .  .....X  +36.. .. ..
...  ... ..... .. ..  ... ..     .. .. ....X  +3 7.... .... . ... ....  .. .  .....   ..... .. ..
..X  +38 ..... .. ..  ... ..     .. .. ....   .. ..... .... . ..X +39.  .. .  .....   ..... .. ..
..   ... ..... .. ..  ... ..     X+ 40 ....   .. ..... .... . ..  ....  .. .  .....   ..... .. .X
+4   1.. ..... .. ..  ... ..      . .. ....   .. ..... .... . ..  ..X+  42 .  .....   ..... .. .
..   ... ..... .. ..  ... ..      . .. ....   X+ 43... .... . ..  .. .  .. .  .....   ..... .. .
..   ... ..... .. X+  44. ..      . .. ....    . ..... .... . ..  .. .  .. .  .....   ..... .. .
X+   45. ..... ..  .  ... ..      . .. ....    . ..... .... . ..  .. .  .. .  ...X+   46... .. .
.   ... ..... ..  .  ... ..      . .. ....    . ..... .... . ..  .X +  47 .  ... .   ..... .. .
.   ... ..... ..  .  ... ..      . .. ....    . ..... ..X+ 4 8.  .  .  .. .  ... .   ..... .. .
.   ... ..... ..  .  ... ..      . .. ....    . ...X+ 49 . . ..  .  .  .. .  ... .   ..... .. .
.   ... ..... ..  .  ... ..      . .. ....    . .X+ 5 0. . . ..  .  .  .. .  ... .   ..... .. .
.   ... ..... ..  .  ... ..      . .. ....    . . X + 51 . . ..  .  .  .. .  ... .   ..... .. .
.   ... ..... ..  .  ... ..      . .. ....    . .   . .X + 5 2.  X  +  53 .  ..X +   54... .. X
+   55. ..... .X  +  56. ..      . .. ...X    + 5   7 .  . . ..     .  .. .  ..  X   +58.. ..
.   ... ..... X   +  59. ..      . .. ...     . .   . .  . . X+     6  0. .  ..      ..... ..
.   ... ..X+6     1  ... ..      . .. ...     . .   . .  . .  .     .  X+ 6  2.      ..... ..
.   ... .. ..     .  ... .X      + 63 ...     . .   . .  . .  .     .   . .  ..      ..... ..
.   X+6 4. ..     .  ... .       . .. ...     . .   . .  . .  .     .   . .  .X      +65.. ..
.    .. .. ..     .  ... .       . .. ...     . .   . .  . X  +     6   6 .  .       ..... ..
.    .. .. ..     .  ... .       . .. ...     . .   X +  6    7     .   . .  .       ..... ..
.    .. .. ..     .  ... .       . .. ...     . .     X  +    6     8   X +  6       9...X +7
0    .. .. ..     X  +71 .       . .. ...     . .        X    +     7     2  .       ....  ..
.    .. .. X+        73. .       . .. ...     . .             .     .     .  .       .X+7  4.
.    .. ..  .        ... .       . .. ...     . X             +     7     5  .       . ..  ..
.    .. ..  .        ... .       . .. ..X     +               7     6     .  .       . ..  ..
.    .. ..  .        ... .       . .. ..      .               .     X     +  7       7 ..  .X
+    78 ..  .        ... .       X +7 9.      .               .           .  .       . ..  .
.    .X +8  0        ... .         .. ..      .               .           .  .       . ..  X
+    8  1.  .        ... .         .. ..      .               .           .  .       . ..
.    .  X+  8        2.. .         .X +8      3               .           .  .       . ..
.    .   .  X        +84 .         .  ..      .               .           .  .       . ..
.    .   .           X+8 5         .  ..      X               +           8  6       . ..
.    .   .            .. .         X  +8                      7           .  X       + 88
.    .   .            .. .            ..                      X           +          8 9.
.    .   X            +9 0            X+                                  9          1 ..
.    .                .. .             .                                  .          X +9
2    X                +9 3             .                                  .            .X
+                     94 .             X                                  +            9
5                     .. .                                                X            +
9                     6. .                                                             .
.                     X+ 9                                                             7
.                      . .                                                             X
+                      9 8
X                      + 9
9 .
X +    (...100...)
X

The "+" are the shooters, and the numbers and dots which follow count out the number of still live cowboys being skipped. The "X" marks which cowboy gets shot. After 49 shootings, number 50 starts with cowboy 55 who has to skip 50 live cowboys, and ends up shooting himself.

When the number of men to skip is greater than the number of men remaining, I don't show all the dots; the "+" stands for the greatest multiple of men remaining that is less than the number to skip (more or less), so we don't show lines of just dots, or this table gets absurdly long.

1 thanks to ffao for pointing out I originally missed a "+", leaving my answer at that time off a little. Fixed!

As you can see, I did this out by hand - if there's a non-brute-force approach to solving this, it escapes me completely. It can easily be determined that

the 50th shooter is the one who will shoot himself, as there are 49 of 100 now dead; with 51 standing, whoever has to skip 50 is skipping all the others and landing right back at themselves.
Similarly, after 66 shootings with 34 men standing, having to skip 67 means that shooter skips everyone but himself, then everyone including himself, and lands back at himself and shoots himself. After 83 shootings leaving 17 standing, the shooter who skips 84 kills himself (16+17+17+17+17=84). After 94 with 6 remaining, skipping 95 kills himself (6 + 5*15). And the last 3 shooters will also kill themselves; the final one (skipping himself 100 times only to land back at himself) finishes the game by leaving everyone dead.

But determining who will end up shooting themselves doesn't seem like it can be determined without working it out manually.

Brute force shows the self-shooters are --
#55, at turn 50
#59, at turn 67
#26, at turn 84
#79, at turn 95
#5, at turn 98
#28, at turn 99
#30, at turn 100

And finally ...

With 6 kills, cowboy #5 kills the most men -- finishing by shooting himself.

• The first self-shooter is #55, not #54 (your table is correct, but the text isn't)
– ffao
Sep 4, 2017 at 2:11
• (fixed, thanks. I can't draw a straight line to save my life)
– Rubio
Sep 4, 2017 at 2:41
• Confirmed by <ugh!>programming</ugh!>. Sep 4, 2017 at 6:36

#4 (+3 = 4, 1 K 3) (+4 = 8, 4 K 7) (+5, 8 K 12) (+6, 13 K 18) (+7, 19 K 25) (+8, 26 K 33) (+9, 34 K 42) (+10, 43 K 52) (+11, 53 K 63) (+12, 64 K 75) (+13, 76 K 88) (+14, 89 K 2) Number 3 is dead so it moves to number 4 (+15, 4 K 18) Number 13 already killed number 18 so number 4 must kill themselves because they cannot kill 18.

If we continue this pattern

The next cowboy to shoot themselves will be #23

Math:

(+16, 5 K 20) (+17, 21 K 37) (+18, 38 K 55) (+19, 56 K 74) (+20, 75 IS DEAD 76 K 95) (+21, 96 K 16) (+22, 17 K 38) (+23, 39 K 61) (+24, 62 K 85) (+25, 86 K 10) (+26, 11 K 36) 37 and 38 are dead (+27, 39 K 65) (+28, 66 K 93) (+29, 94 K 22) (+30, 23 K 52) 52 IS DEAD SO 23 KILLS THEMSELVES (+31, 24 K 54) 55 IS DEAD(+32, 56 K 87) (+33, 89 K 21) 88 IS DEAD

Explanation:

If we take the first example (+3 = 4, 1 K 3) The addition tells us which number will receive the gun next, in this example it will be #4. To do this we take the original number we started with, 1, and add 3. 1+3=4. The "K" tells us who is killed which will be the number before, in this example #3.

Logic and reasoning:

For this I supposed that a number could not kill nobody. If this were the case then as soon as a player is required to shoot someone who has already been killed they must kill themselves. If however, the player after the one killed is dead and cannot receive the gun then the next person alive in order will receive the gun.

• my answer is different Jason.
– DrD
Sep 3, 2017 at 22:16
• My method says #89 is the 31st person killed by someone else.
– DrD
Sep 3, 2017 at 22:21
• @DeepakMahulikar okay I've check my math 3 times and I think I got it correct. Sep 3, 2017 at 23:18
• But they are in a circle... and you don't count dead people. For instance, 1 spares 2, kills 3. 4 is now the new #3, 5 is #4, etc.
– Josh
Sep 4, 2017 at 1:01
• @Josh , Maybe, but the question asker did say " Let’s say they have been assigned numbers from 1 to 100." In this case no ones number would actually change because they were assigned. What would you say? Sep 4, 2017 at 1:04