This directory contains a specification of a parallel algorithm to
solve the N-queens problem.

THE PROBLEM.
The N-queens problem consist of placing N queens on an NxN chess board
such that they cannot take eachother. The parallel algorithm which
calculates all solutions works as follows.

Start with an empty chess board.
Generate, starting from this chess board N new (indepent/concurrent)
chess boards. To each of these boards a queen is added to the first
column, all in a different row. Every chess board then checks if there
are now queens that can take eachother. If this is the case, the board
ready. If there is a legal placement, N new sub boards are generated,
on each of which a new queen is placed.
If there is a board with a legal placement of N queens, the solution
is reported.

OPERATION
1) Compile the file Q5.psf to TIL format. The specification makes use of
   the PSF library, so the location of the library should be specified
   first. Substitute the mark ??? by the correct path leading to the
   PSF-Library.

example% setenv PSFPATH ".:???/psflib"
example% psf -v Q5

2) Simulate the specification and display the solutions.

example% sim -o Q5.til | display

Click on "Default trace" in the "FUNCTION" menu.
Select "Start" in the "CHOOSE" menu.
Click on "Random" in the "FUNCTION" menu.
   Watch the Trace window and the window in which you started the
   simulator. If the "MESSAGE" window displays "THE END", the simulation is
   finished.
Select "Special/Quit simulator" in the "CHOOSE" menu.
