eight queens puzzle

(redirected from Eight queens)

eight queens puzzle

(algorithm)
A puzzle in which one has to place eight queens on a chessboard such that no queen is attacking any other, i.e. no two queens occupy the same row, column or diagonal. One may have to produce all possible such configurations or just one.

It is a common students assignment to devise a program to solve the eight queens puzzle. The brute force algorithm tries all 64*63*62*61*60*59*58*57 = 178,462,987,637,760 possible layouts of eight pieces on a chessboard to see which ones meet the criterion. More intelligent algorithms use the fact that there are only ten positions for the first queen that are not reflections of each other, and that the first queen leaves at most 42 safe squares, giving only 10*42*41*40*39*38*37*36 = 1,359,707,731,200 layouts to try, and so on.

The puzzle may be varied with different number of pieces and different size boards.

References in periodicals archive ?
The corridor of the new lab (figure 10) was reworked within its limits by including whiteboard spaces for collaborative work, a barely suspended ceiling with new lighting under the existing hard ceiling, and floor tiles that incorporate the Eight Queens Chess Puzzle.
WHEN there are eight queens and three kings at your wedding, you'd best observe a royal pecking order.
And the ceremony attracted eight queens, three kings and a pack of princes and prin- cesses - each ready for a kiss on the cheek.
22 /PRNewswire/ -- Queens Moat Houses PLC and Holiday Inn Worldwide, the hotels' subsidiary of Bass PLC, announced today, an agreement to convert an initial eight Queens Moat Houses hotels to the Holiday Inn brand, including four to Holiday Inn Crowne Plaza status.
There were sixty-seven pieces, including eight kings, eight queens and sixteen bishops; their colours were natural ivory and deep red.