1

In how many different ways can we place 8 identical rooks on a chessboard so that no two of them attack each other and none of them is on main diagonal?

I have tried many ways to solve it and I am quite sure it should be done by few cases. But I can't come up with any idea.

Anonymous Pi
  • 1,297
UfmdFkiF
  • 503
  • 4
    Incidentally, rooks and boars are both animals. – Théophile Mar 21 '17 at 21:35
  • 2
    Possible duplicate of Number of ways to arrange $8$ rooks on a chessboard - Ah no you also have a main diagonal restriction, so that does make a difference. Still those answers may help. – Joffan Mar 21 '17 at 21:36
  • 3
    @Joffan This isn't quite the same question as in the linked question the condition about no rooks being on the diagonal is missing. However, the bit about recognizing that such an arrangement of rooks is a permutation is helpful. It only takes one more step to recognize that this is instead a question about derangements. – JMoravitz Mar 21 '17 at 21:40
  • 1
    Very similar to Dr Pat's question from only 40 minutes ago ... http://math.stackexchange.com/questions/2197230/recurrence-relations-with-string ... is the answer $14833$ ? (if you avoid one main diagonal) – Donald Splutterwit Mar 21 '17 at 21:41

1 Answers1

0

From the following example of a non-attacking rook placements it is possible to see that there is a bijection between non-attacking rook placements and permutations of the numbers $1$ to $8$.

$$\begin{array}{cc} & \text{Positions}\\ \begin{array}{c}\text{Numbers}\\\text{to be}\\\text{permuted}\end{array}&\begin{array}{c|c|c|c|c|c|c|c|c|} & \mathbf{1} & \mathbf{2} & \mathbf{3} & \mathbf{4} & \mathbf{5} & \mathbf{6} & \mathbf{7} & \mathbf{8}\\ \hline 1& \bbox[silver,20px]{}& & & & & & &\Large\unicode{x265c}\\ \hline 2& &\bbox[silver,20px]{} & & & & &\Large\unicode{x265c} &\\ \hline 3& & &\bbox[silver,20px]{} & &\Large\unicode{x265c} & & &\\ \hline 4& &\Large\unicode{x265c} & &\bbox[silver,20px]{} & & & &\\ \hline 5& & & & &\bbox[silver,20px]{} &\Large\unicode{x265c} & &\\ \hline 6& & &\Large\unicode{x265c} & & &\bbox[silver,20px]{} & &\\ \hline 7& & & &\Large\unicode{x265c} & & &\bbox[silver,20px]{} &\\ \hline 8&\Large\unicode{x265c} & & & & & & &\bbox[silver,20px]{}\\ \hline\end{array} \end{array}$$

This is the permutation

$$\begin{pmatrix} 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8\\ 8 & 4 & 6 & 7 & 3 & 5 & 2 & 1 \end{pmatrix}$$

The forbidden diagonal squares then correspond to permutations with fixed points. As the reader may be aware permutations that avoid fixed points are referred to in the literature as 'derangements' and there are many ways to approach calculating them.

See here for how to derive the simplest formula for derangements using the nearest integer function: $[\:]$

$$!n=\left[\frac{n!}{e}\right]$$

giving

$$!8=\left[\frac{8!}{e}\right]=14\,833\tag{Answer}$$

Alternatively the problem can be easily solved using rook polynomials and for a quick way to see the solution input a diagonal forbidden subboard into an $8\times 8$ chessboard using this rook polynomial calculator.

The benefit of the rook polynomial method is that it can be used for more complicated sets of restricted position permutation problem such as this one I answered recently.

N. Shales
  • 3,683