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 ?
Count the number of NE-SW diagonals, including both corners.