Counting Solutions
The following table gives the number of solutions for placing n queens on an n × n board, both unique (sequence A002562 in OEIS) and distinct (sequence A000170 in OEIS), for n=1–14, 24–26.
n: | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | .. | 24 | 25 | 26 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
unique: | 1 | 0 | 0 | 1 | 2 | 1 | 6 | 12 | 46 | 92 | 341 | 1,787 | 9,233 | 45,752 | .. | 28,439,272,956,934 | 275,986,683,743,434 | 2,789,712,466,510,289 |
distinct: | 1 | 0 | 0 | 2 | 10 | 4 | 40 | 92 | 352 | 724 | 2,680 | 14,200 | 73,712 | 365,596 | .. | 227,514,171,973,736 | 2,207,893,435,808,352 | 22,317,699,616,364,044 |
Note that the six queens puzzle has fewer solutions than the five queens puzzle.
There is currently no known formula for the exact number of solutions.
Read more about this topic: Eight Queens Puzzle
Famous quotes containing the words counting and/or solutions:
“Is it not manifest that our academic institutions should have a wider scope; that they should not be timid and keep the ruts of the last generation, but that wise men thinking for themselves and heartily seeking the good of mankind, and counting the cost of innovation, should dare to arouse the young to a just and heroic life; that the moral nature should be addressed in the school-room, and children should be treated as the high-born candidates of truth and virtue?”
—Ralph Waldo Emerson (18031882)
“Science fiction writers foresee the inevitable, and although problems and catastrophes may be inevitable, solutions are not.”
—Isaac Asimov (19201992)