> ABOUT ME >RESUME >LINKS I LIKE >MAIN PAGE>GUESTBOOK>PROGRAMS

 

Check out the new Site I'm building : Visualizations in Computer Science ( Java Applets)

The N - Queens / Eight Queens / 8 Queens Problem : ( In C / C++ )

( Click on the underlined heading above to see the program code . )

You may also see : 8 Queens Java Applet

The aim was to place 8 queens on an 8x8 chessboard , so that none of them attack each other .

The generalized version places N Queens on an N x N ChessBoard . There are three programs :

1) A simple recursive N queens program. 2) A programs without recursive function calls .

3) A program which uses some heuristics which I myself developed . This produces a

solution quite quickly even for a 70x70 chessboard . All the programs print the positions

of the queens for all possible solutions . You may also see the Applet I made :

8 Queens Java Applet

This shows the 92 solutions for the 8 x 8 ChessBoard . Of course , most of the solutions

are basically obtained by rotation / reflection . There are only 12 truly unique solutions and

the others are obtained by inverting / reflecting / rotating these .

 

> ABOUT ME >RESUME >LINKS I LIKE >MAIN PAGE>GUESTBOOK>PROGRAMS