Skip to content

goodluck3301/eight-queen-problem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

8 Queens Problem

The eight queens puzzle is the problem of placing eight chess queens on an 8×8 chessboard so that no two queens threaten each other.

The problem of finding all solutions to the 8-queens problem can be quite computationally expensive, as there are 4,426,165,368 possible arrangements of eight queens on an 8×8 board,[a] but only 92 solutions. It is possible to use shortcuts that reduce computational requirements or rules of thumb that avoids brute-force computational techniques. For example, by applying a simple rule that chooses one queen from each column, it is possible to reduce the number of possibilities to 16,777,216 (that is, 88) possible combinations. Generating permutations further reduces the possibilities to just 40,320 (that is, 8!), which can then be checked for diagonal attacks.

The eight queens puzzle has 92 distinct solutions. If solutions that differ only by the symmetry operations of rotation and reflection of the board are counted as one, the puzzle has 12 solutions. These are called fundamental solutions; representatives of each are shown below.

A fundamental solution usually has eight variants (including its original form) obtained by rotating 90, 180, or 270° and then reflecting each of the four rotational variants in a mirror in a fixed position. However, one of the 12 fundamental solutions (solution 12 below) is identical to its own 180° rotation, so has only four variants (itself and its reflection, its 90° rotation and the reflection of that).[b] Such solutions have only two variants (itself and its reflection). Thus, the total number of distinct solutions is 11×8 + 1×4 = 92.

ur

8 Queens Problem app with WPF in C#

About

8 Queens Problem app with WPF in C#

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages