You have a standard chess board, and as many queens as you need. What is the most queens that you can put on the board so that no two queens can attack each other? What is the formation to put them in?
Keep in mind that a chess board has 64 squares (8x8), and queens can go diagonal, up and down, and left and right.
Certainly no more than 8 queens can be so placed, as each must be in its own row and own column. That in fact 8 can be so placed is demonstrated in a classic programming exercise to find such placements.
There are 12 basically different ways to arrange the 8 queens. Except for one such arrangment, there are 7 other trivial variations: 3 rotations (90, 180 and 270 degrees), a reflection and the rotations of the reflection. There is one basic arrangement that has only one rotation (90 degrees) for itself and one for its reflection, so the total, counting reflections and rotations, is 92, which is 11 x 8 + 1 x 4.
I hope the following comes out ok using the html pre tag.
* . . . . . . . * . . . . . . . . . . . . * . .
. . . . . . * . . . . . . . * . * . . . . . . .
. . . . * . . . . . . * . . . . . . . . * . . .
. . . . . . . * . . . . . * . . . * . . . . . .
. * . . . . . . . . . . . . . * . . . . . . . *
. . . * . . . . . * . . . . . . . . * . . . . .
. . . . . * . . . . . . * . . . . . . . . . * .
. . * . . . . . . . * . . . . . . . . * . . . .
--------------- --------------- ---------------
. . . * . . . . . . . . * . . . . . * . . . . .
* . . . . . . . * . . . . . . . * . . . . . . .
. . . . * . . . . . . . . . . * . . . . . . * .
. . . . . . . * . . . * . . . . . . . . * . . .
. * . . . . . . . * . . . . . . . . . . . . . *
. . . . . . * . . . . . . . * . . * . . . . . .
. . * . . . . . . . * . . . . . . . . * . . . .
. . . . . * . . . . . . . * . . . . . . . * . .
--------------- --------------- ---------------
. . . . * . . . . . . . . . * . . . . . * . . .
* . . . . . . . * . . . . . . . * . . . . . . .
. . . * . . . . . . * . . . . . . . . . . . . *
. . . . . * . . . . . . . . . * . . . . . * . .
. . . . . . . * . . . . . * . . . . * . . . . .
. * . . . . . . . . . * . . . . . . . . . . * .
. . . . . . * . . * . . . . . . . * . . . . . .
. . * . . . . . . . . . * . . . . . . * . . . .
--------------- --------------- ---------------
. . . . * . . . . . . . * . . . . . . . . * . .
. . * . . . . . . . . . . . * . . . * . . . . .
* . . . . . . . * . . . . . . . * . . . . . . .
. . . . . . * . . . . * . . . . . . . . . . . *
. * . . . . . . . * . . . . . . . . . * . . . .
. . . . . . . * . . . . . . . * . * . . . . . .
. . . . . * . . . . . . . * . . . . . . . . * .
. . . * . . . . . . * . . . . . . . . . * . . .
--------------- --------------- ---------------
|
Posted by Charlie
on 2003-06-03 08:20:48 |