n-queens problem

Place n queens on an n-by-n chess board so that no two queens attack each other (that is, there is exactly one queen in each row, each column and in each diagonal).

INPUT:  A set of ground atoms "queen(i)", i=1,2,...,n, where  n is the number of queens.

OUTPUT: a placement of the queens satisfying the constraints of the problem

NOTES:

  1. Two versions of the problem are of interest: (i) find a single placement, and (ii) find all placements
  2. For the problem to find a single placement, suggested values of k are: 20, 30, 40, 50
  3. For the problem to find all placements, suggested values of n are: 8, 9, 10.