# Fighting stormtroopers

This Riddler puzzle is about fighting a group of stormtroopers. Why are they so inaccurate anyway?

In Star Wars battles, sometimes a severely outnumbered force emerges victorious through superior skill. You panic when you see a group of nine stormtroopers coming at you from very far away in the distance. Fortunately, they are notoriously inaccurate with their blaster fire, with only a 0.1 percent chance of hitting you with each of their shots. You and each stormtrooper fire blasters at the same rate, but you are $K$ times as likely to hit your target with each shot. Furthermore, the stormtroopers walk in a tight formation, and can therefore create a larger target area. Specifically, if there are $N$ stormtroopers left, your chance of hitting one of them is $(K\sqrt{N})/1000$. Each shot has an independent probability of hitting and immediately taking out its target. For approximately what value of $K$ is this a fair match between you and the stormtroopers (where you have 50 percent chance of blasting all of them)?

Here is my solution.
[Show Solution]

## 3 thoughts on “Fighting stormtroopers”

1. Hector Pefo says:

Maybe slightly simpler (but still numerical): Facing N stormtroopers, your chance of killing a stormtrooper before they kill you is (p-pq)/(p + q – pq), where p is your chance of killing with each shot, that is, (K*sqrt(N))/1000, and q is their chance of killing you with one shot each, which is one minus the chance of their all missing, or (1 – (.999)^N). Your chance of survival is the product of the chances of your killing first for N from 9 to 1.

2. Shiang Yong says:

Here’s my Mathematica code to solve for K as a function of N, https://gist.github.com/ShiangYong/f85a481510fdb860da3d13f54b044c0e

Here are the values I got for 9<=N<=20

N=9 – 26.7969
N=10 – 31.3241
N=11 – 36.0804
N=12 – 41.0557
N=13 – 46.2411
N=14 – 51.6288
N=15 – 57.2119
N=16 – 62.9841
N=17 – 68.9399
N=18 – 75.0741
N=19 – 81.3819
N=20 – 87.8591