Put n rooks on a $n \times n$ chessboard so that every empty square is threatened

chessboarddiscrete mathematics

The answer to this question is $2n^n – n!$, according to the requirement in the question, I think the rooks can attack each other. Then in order to let every square be threatened, we need to put one rook on each row or on each column. If there is a rook on each row, then there are n rows and on each row there are n ways to place a rook, so we get $n ^ n$ configurations. If we consider placing them on each columns, which is equivalent to rotating the chessboard $90\,^{\circ}$ clockwise, we get $n ^ n$ configurations too, so in total there are $2n^n$ ways.$$$$
I'm not sure if I have understood it correctly, and I don't know, why should we subtract n! from it? Is it the symmetric cases? If it is, how can we calculate it?

Best Answer

There are some configurations you counted twice, namely those where there is a rook in each row AND also there is a rook in each column. There is $n!$ of them.

Related Question