# 21 knights covering a 11x11 chess board

Can you place 21 knights on a 11x11 chess board, such that every empty cell is under attack? Good luck!

Here is a similar question for 10x10: Knights covering a 10x10 chess board

You can solve the problem via integer linear programming as follows. Define a graph with one node per cell and an edge for each pair of cells that are a knight's move away from each other. For node $$i\in N$$, let $$N_i \subset N$$ be the neighbors of $$i$$, and let binary decision variable $$x_i$$ indicate whether node $$i$$ is selected. The problem is to minimize $$\sum_{i\in N} x_i$$ subject to $$x_i + \sum_{j\in N_i} x_j \ge 1 \quad \text{for i\in N}.$$ The constraint enforces that either node $$i$$ or one of its neighbors is selected.

Here's one optimal solution:

  . . . . . . . . . . .
. . X . . . . . X . .
. X X X . . X X X X .
. . . . . . . . . . .
. . . . X . . . . . .
. . . . . . . . . . .
. . X . . . . . . . .
. . X . X . . . X X .
. . X . . . . . X X .
. . X . X . . X . . .
. . . . . . . . . . . 

The minimum such domination number for an $$n \times n$$ board is in OEIS A006075.

• How do you actually minimaze that? Do you use some program? – Greedoid Feb 8 at 16:15
• Yes, @Greedoid I used the MILP solver in SAS. – RobPratt Feb 8 at 16:18
• As always, excellent work Rob! – Dmitry Kamenetsky Feb 8 at 22:25
• Any way, are those computations doable by hand (in reasonable time)? – Greedoid Feb 9 at 14:45
• @Greedoid There are 121 variables, 121 constraints, and 841 constraint coefficients. Tiny for a MILP solver, but nothing I'd want to do by hand. – RobPratt Feb 9 at 15:19

@RobPratt's answer is correct. Here are the alternative arrangements I've found, all of which are only slightly different from each other.

Picking exactly one white knight from each color group will lead to a valid arrangement, giving a total of $$5 \cdot 5 \cdot 2 \cdot 2 \cdot 8 = 100$$ arrangements unique up to reflection and rotation.

• This matches the count of inequivalent solutions in oeis.org/A006076 – RobPratt Feb 8 at 15:55
• Are you sure the picture is correct? Last row, third column - this field is only attacked by one of the blue knights and by no black one. – daw Feb 8 at 16:04
• @daw Well spotted. Same for third row, first and fifth columns – xhienne Feb 8 at 16:18
• @daw Thanks for pointing that out! I got one of the "volatile" knight positions wrong. Fix incoming :) – Zoir Feb 8 at 16:20
• @Zoie. There is still a problem with the third row (see my comment above). Knight in (3,2) is necessary. – xhienne Feb 8 at 16:30