What is the biggest number of White Queens that can be placed on a chessboard in such a way that a Black King, also placed on the board, is not under attack? You can place the King wherever you think is more profitable.
Bonus: Generalize it for a chessboard.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Note that wherever the King is placed, no Queen can be placed in its same row, column or diagonals, but a Queen can be placed on any of the other empty squares. If we place place the King on and edge (including the corners), there will be 7 diagonal squares. This is the most profitable position to place the King because if we place the King closer to the center, the diagonals become bigger.
For a m × n , with m ≤ n , there are m n − ( m + n + m ) + 2 = m n − 2 m − n + 2 squares where a Queen can be placed, as each row consists of m squares, each column consists of n squares and there are a total of m diagonal squares, and we're counting the King square three times.
When m = 8 and n = 8 , 6 4 − 1 6 − 8 + 2 = 4 2 Queens can be placed on the board. This is biggest number because if we place one more Queen, it will be placed on the King row, column or diagonal, thus, will be attacking the King.