1

Can you place 8 white queens and 8 black queens on an 8x8 grid, such that no two queens of the same colour occupy the same row, column or diagonal?

Dmitry Kamenetsky
  • 35,897
  • 5
  • 66
  • 276

2 Answers2

9

For the question of maximizing the number of sets of $8$ queens, define a graph with a node for each of the $92$ solutions for $8$ queens and an edge for each pair of solutions that share a cell. Now find a maximum independent set in this graph. The maximum turns out to be

$6$, achieved as follows: \begin{matrix}&6&5&4&.&3&2&.&1\\&.&1&3&2&4&5&6&.\\&5&4&.&6&1&.&2&3\\&2&.&1&3&.&6&5&4\\&1&.&2&5&.&4&3&6\\&3&6&.&4&2&.&1&5\\&.&2&5&1&6&3&4&.\\&4&3&6&.&5&1&.&2\\\end{matrix}

RobPratt
  • 13,685
  • 1
  • 29
  • 56
6

The answer is

Yes.

Take any one of the well-known 8-queen solutions together with its horizontal or vertical mirror image.

loopy walt
  • 21,184
  • 33
  • 95