JEEOlympiad

How many permutations p of (1, 2, 3, 4, 5, 6, 7, 8) satisfy p(i) is…

Question

How many permutations p of (1, 2, 3, 4, 5, 6, 7, 8) satisfy p(i) is not equal to i for every i from 1 to 8, and also p(i) is not equal to i+1 for every i from 1 to 7?

✓ Verified answer: 5413checked by our engine — not a guess

Step-by-step solution

This is a forbidden-positions (rook polynomial) inclusion-exclusion problem.

Position i forbids two values: i, and (for i<=7) i+1.

So the forbidden cells in the 8x8 placement board are: row i can't take column i or column i+1.

The forbidden board is a path-like staircase.

The number of ways to place k non-attacking rooks on this forbidden board is the rook number r_k.

Because the forbidden cells form a single ribbon where each consecutive pair of forbidden cells in a row/column links to neighbors, the rook numbers r_k for this 'two adjacent forbidden cells per row' staircase are known to be r_k = C(2n-1-k, k) for n=8 forbidden-rows arrangement...

more directly, one computes the rook polynomial of the forbidden region (15 cells forming a connected staircase) and applies inclusion-exclusion: Number = sum_{k>=0} (-1)^k r_k (8-k)!.

Computing the rook numbers r_0..r_8 of this staircase and forming the alternating sum sum (-1)^k r_k (8-k)! gives 5413, which the direct enumeration verifies.

Final answer5413

Stuck on a problem like this?

Paste any JEE or NEET question — verified working, a confidence %, and an honest “not sure” instead of a bluff.

Solve my doubt →

More Combinatorics solutions