# 107 competition/games/chess/knight.control.p

How many knights does it take to attack or control the board?

competition/games/chess/knight.control.s

Fourteen knights are required to attack every square:

```    1   2   3   4   5   6   7   8
___ ___ ___ ___ ___ ___ ___ ___
h |   |   |   |   |   |   |   |   |
--- --- --- --- --- --- --- ---
g |   |   | N | N | N | N |   |   |
--- --- --- --- --- --- --- ---
f |   |   |   |   |   |   |   |   |
--- --- --- --- --- --- --- ---
e |   | N | N |   |   | N | N |   |
--- --- --- --- --- --- --- ---
d |   |   |   |   |   |   |   |   |
--- --- --- --- --- --- --- ---
c |   | N | N | N | N | N | N |   |
--- --- --- --- --- --- --- ---
b |   |   |   |   |   |   |   |   |
--- --- --- --- --- --- --- ---
a |   |   |   |   |   |   |   |   |
--- --- --- --- --- --- --- ---
```

Three knights are needed to attack h1, g2, and a8; two more for b1, a2,
and b3, and another two for h7, g8, and f7.

The only alternative pattern is:

```    1   2   3   4   5   6   7   8
___ ___ ___ ___ ___ ___ ___ ___
h |   |   |   |   |   |   |   |   |
--- --- --- --- --- --- --- ---
g |   |   | N |   |   | N |   |   |
--- --- --- --- --- --- --- ---
f |   |   | N | N | N | N |   |   |
--- --- --- --- --- --- --- ---
e |   |   |   |   |   |   |   |   |
--- --- --- --- --- --- --- ---
d |   |   | N | N | N | N |   |   |
--- --- --- --- --- --- --- ---
c |   | N | N |   |   | N | N |   |
--- --- --- --- --- --- --- ---
b |   |   |   |   |   |   |   |   |
--- --- --- --- --- --- --- ---
a |   |   |   |   |   |   |   |   |
--- --- --- --- --- --- --- ---
```

Twelve knights are needed to control (attack or occupy) the board:

```    1   2   3   4   5   6   7   8
___ ___ ___ ___ ___ ___ ___ ___
a |   |   |   |   |   |   |   |   |
--- --- --- --- --- --- --- ---
b |   |   | N |   |   |   |   |   |
--- --- --- --- --- --- --- ---
c |   |   | N | N |   | N | N |   |
--- --- --- --- --- --- --- ---
d |   |   |   |   |   | N |   |   |
--- --- --- --- --- --- --- ---
e |   |   | N |   |   |   |   |   |
--- --- --- --- --- --- --- ---
f |   | N | N |   | N | N |   |   |
--- --- --- --- --- --- --- ---
g |   |   |   |   |   | N |   |   |
--- --- --- --- --- --- --- ---
h |   |   |   |   |   |   |   |   |
--- --- --- --- --- --- --- ---
```

Each knight can control at most one of the twelve squares a1, b1, b2,
h1, g1, g2, a8, b8, b7, h8, g8, g7. This position is unique up to
reflection.

References
Martin Gardner, _Mathematical Magic Show_.

Continue to: