Reply To: The Queens Puzzle in QBasic

Home Forums Previous Months 33 – October 2019: The 7th Guest The Queens Puzzle in QBasic Reply To: The Queens Puzzle in QBasic


sorceress
Participant
#2925

In the mathematical spirit of the puzzle, we can determine the number of solutions for different board sizes. Consider placing N queens on an NxN board:

N _ # Solutions _ as a % of all possible permutations

1 _ 1 _ 100%
2 _ 0 _ 0%
3 _ 0_ 0%
4 _ 2 _ 8.33%
5 _ 10 _ 8.33%
6 _ 4 _ 0.56%
7 _ 40 _ 0.79%
8 _ 92 _ 0.23%
9 _ 352 _ 0.097%
10 _ 724 _ 0.020%
11 _ 2680 _ 0.0067%
12 _ 14200 _ 0.0030%
13 _ 73712 _ 0.0012%
14 _ 365596 _ 0.00042%
15 _ 2279184 _ 0.00017%

The percentages in some way reflect the difficulty of finding a solution to each puzzle grid.