maximum number of independent bishops on a nxn chessboard

1.6k Views Asked by At

So I came across this problem where we have to find the maximum number of independent bishops on a nxn chessboard such that no two bishops attack each other . So after drawing the cases for $3$x$3$ , $4$x$4$ and $5$x$5$ , it seems like that the pattern is $n$ on one side and $n-2$ on the other so the total number is $2n-2$ for a $n$x$n$ chessboard , but this is just a intuition , even if it is the right answer , I can't come with a justifiable logic.

What is the logic , actually ?

2

There are 2 best solutions below

0
On

Count the number of NE-SW diagonals, including both corners.

1
On

As @Michael says, you can count the diagonals in one direction, and note that you can't have both ends of a long diagonal, which then reduces the number by $1$

As for configurations, note that the bishops on black squares and those on white squares are completely independent of each other. So, for example, the black-squared bishops could be on the first and last row, and the white-squared bishops in the first and last column.