Puzzles/Chess puzzles/Rook Polynomial
The puzzle first proposed by Henry Ernest Dudeney in his book "Amusements In Mathematics" in the year 1917 with his quote as below:
Every square is again either occupied or attacked, but in this case every rook is unguarded. Now, in how many different ways can you so place the eight rooks on the board that every square shall be occupied or attacked and no rook ever guarded by another? I do not wish to go into the question of reversals and reflections on this occasion, so that placing the rooks on the other diagonal will count as different, and similarly with other repetitions obtained by turning the board round.
The premise is similar to Puzzle/Chess puzzles/Eight Queens, where as many of the possible placements of eight rooks are placed on the 8X8 chess board so that the rooks wont attack/guard one another.
Based on that animation aboves, you can see the X represent the rooks area of attack and with each successive rooks, the rooks have lesser and lesser places to be put on the board .
Since the rooks piece can only move in straight lines: It must be in every row and every column.
Starting with the top row, it is clear that we may put our first rook on any one of eight different squares.
Wherever it is placed, we have the option of seven squares for the second rook in the second row.
Then we have six squares from which to select the third row, five in the fourth, and so on.
Therefore the number of our different ways must be 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 40,320 (that is 8! / 8 factorial), which is the correct answer.