# In how many ways can a round table of $n$ knights impale each other?

$n$ knights sit around a round table, which magically adjusts its size to fit the number of knights sitting around it.

The knights cannot get up out of their seats and their swords are only long enough to impale their two immediate neighbours.

Unfortunately due to an argument about Guinevere's honour, they have an enormous falling out and start impaling their immediate neighbours. Any impaling is immediately fatal and obviously a dead knight cannot impale either of his neighbours. Once a knight is dead, his seat vanishes and the table shrinks.

At the end of the fight the table has shrunk to a single seat and all the knights but one are dead.

Obviously there are $n$ possible outcomes, but how many different ways (in terms of who killed whom, and in what order) are there of arriving at any given outcome in which some given knight remains?

• A macabre question! Do the killings happen simultaneoulsy or do we have only one fight at any time ? – Peter May 23 '17 at 16:36
• If its one at a time, then when you have $k$ knights, there are $k-1$ possibilities for the next dead one, and 2 possibilities for the murderer. Seems quite simple. Am I missing somethig? – thedude May 23 '17 at 16:38
• This sounds related to the Josephus problem youtube.com/watch?v=uCsD3ZGzMgE oeis.org/… – Benedict W. J. Irwin May 23 '17 at 16:38
• @Peter no two killings occur simultaneously. But a great question! I hadn't thought of that. – samerivertwice May 23 '17 at 16:41
• @thedude when you have $k$ knights, are there not $k$ possibilities for the next dead? – samerivertwice May 23 '17 at 16:57

Suppose we fix one knight as the survivor from the outset.

When there are $k$ knights, with $k>2$, there are $k-1$ possibilites for the next dead, and 2 possibilities for his murderer. So there are $2(k-1)$ possible outcomes.

Total number of outcomes is actually the product $$\prod_{k=3}^n 2(k-1)=2^{n-2}(n-1)!$$

• Only you can change the j to a k as it's only 1 char change. – samerivertwice May 24 '17 at 0:32

Let the total number of ways this can happen at an $n$ person table be $K(n)$.

Now, for the first death, we can choose $n$ different knights to be killed, and each knight can be killed in 2 different ways (left or right neighbor since this is a circle. Therefore, there are $2n$ ways to kill a knight at stage $n$.

The exception to this is the case of 2 knights, in which case only 2 outcomes are possible.

Then clearly, since $n$ is arbitrary, we can write

$$K(n) = 2 + \sum\limits_{k=3}^n 2k = 2 + 2 \sum\limits_{k=3}^n k = 2 + 2 * (n(n+1)/2 - 3) = n(n+1)-4$$

which is a valid equation for all $n \geq 2$. I did this pretty quickly so I might have made a mistake but I think that should do it. This could also be done using a linear recurrence, but I don't really have the time to work it out that way.