### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

- article (11)
- enigma (1,393)
- misc (4)
- project euler (2)
- puzzle (90)
- puzzle# (61)
- site news (62)
- tantalizer (105)
- teaser (7)
- today (1)

### Site Stats

- 244,211 hits

Programming Enigma Puzzles

23 May 2020

Posted by on **From New Scientist #3283, 23rd May 2020** [link] [link]

The Good, the Bad and the Bumbling have decided the only way to resolve their differences is with a three-way duel, aka a Mexican standoff. They stand in a triangle, each armed with a gun and unlimited ammunition. As you might expect, Good has the deadliest shot: he kills his target 99 per cent of the time. Bad is more hit-and-miss: his success rate is 66 per cent. And Bumbling, in his role as the comedy relief, only fatally hits the mark 33 per cent of the time. On a count of three, each will draw their gun and, using the best strategy they can, will keep shooting with the aim of being the last spaghetti westerner standing.

Roughly what is the chance that Bumbling will survive?

[puzzle#60]

%d bloggers like this:

(See also:

Enigma 1190).Assuming they all fire at the same time, and then pause to evaluate the outcome before simultaneously taking the next shot.

If each targets their deadliest remaining foe, then The Good will target The Bad, The Bad will target The Good, and the Bumbling will also target The Good.

So The Good is targeted by both the others. His chance of surviving the first shot is 34%×67% = 23%.

The Bad is targeted by The Good, so his chance of surviving the first shot is 1%.

The Bumbling is not targeted by either of the others, so he has a 100% chance of surviving the first shot, and there is a 99%×66% = 65% chance that The Good and The Bad will have eliminated each other after the first shot. So the chances of The Bumbling’s survival look pretty good.

Here is a Python program that runs a million random trials and reports the results.

Run:[ @repl.it ]Solution:The chance The Bumbling survives is around 77%.The result of a typical run is:

So about 7.6% of the time no-one survives.

If we do the maths (in a similar way to that described in

Enigma 1190), we get:giving survival probabilities of:

Which is a pretty good match to the probabilities calculated from the random trials.

Martin Gardner, in his book

More Mathematical Puzzles and Diversions(Penguin, 1961), has a variant in which the three do not fire simultaneously but first draw lots to decide who fires first and who second. They continue in the same cyclic order until only one is left alive.In that case the best strategy for the poorest shot, if he has first go or the others miss, is to shoot into the air, so as not to antagonize either of his opponents. Those two then continue to fire at each other until one is dead, when he has a good chance of getting a shot at the survivor.

The puzzle had presumably previously appeared in Gardner’s column in

Scientific American.Other versions had already appeared in print, the earliest known to him in 1938.

Treating the puzzle as an Absorbing Markov Chain, I get slightly different probabilities for the winner being Good, Bad, Bumbling and None of 15.09%, 0.44%, 76.81%, 7.65%

The calculations are shown in this spreadsheet.

@Arthur: You are quite right, I had typo in one of my expressions. My calculations now agree with the values you gave.

My program to do the calculations is on [ @repl.it ].