rec.puzzles Archive

How many ways are there to place n rooks on an n x n chessboard so that no rook attacks another?

competition/games/chess/nonattacking.rooks New

New entry, edited from material collected for the archive and not yet in a released version.

Problem

How many ways are there to place n rooks on an n x n chessboard so
that no rook attacks another?  Symmetric solutions are counted only
once.

-- QSCGZ <qscgz@aol.com>
Show solution
There are eight symmetry operations of the chessboard: three
rotations, four reflections, and the identity.  Counting the number of
positions that are left unchanged by the various symmetry operations
is a tedious but not terribly difficult combinatorial exercise.  For
n>1 there are

             [n/2]!
    R_Q(n) = ------  if [n/2] is even, 0 otherwise
             [n/4]!

positions unchanged by 90-degree rotations,

    R_S(n) = [n/2]! 2^[n/2]

positions unchanged by 180-degree rotations,

             [n/2]        n!
    R_L(n) =  Sum   --------------
              i=0   (n-2i)! i! 2^i

positions unchanged by each diagonal reflection, none unchanged by an
orthogonal reflection, and n! unchanged by the identity.

From the Cauchy-Frobenius-Polya-(not)Burnside theorem we can compute
the number of positions up to symmetry by counting the average, over
all symmetry operations, of the number of positions left unchanged:

    R(n) = (2 R_Q(n) + R_S(n) + 2 R_L(n) + 0 + n!)/8.

n    0 1 2 3 4  5   6   7     8      9      10        11         12
R(n) 1 1 1 2 7 23 115 694 5,282 46,066 456,454 4,999,004 59,916,028

and R(100)=11,665,776,930,493,019,085,212,404,857,033,337,561,339,-
              496,033,047,702,683,574,120,486,902,199,999,159,757,-
              068,380,354,180,755,001,424,896,581,199,329,890,890,-
              062,330,104,725,878,634,060,229,093,973,813,100,544.

This is sequence A000903 in Sloane and Plouffe (see
http://www.research.att.com/~njas/sequences).

-- Dan Hoey <Hoey@AIC.NRL.Navy.Mil> (January 1998)

[ Editor: the question also asked about bishops; no answer for bishops
was in the collected posting. ]