Talk:Eight queens puzzle

Mihail Georgiev's solution

 * I have found a modular solution for extremely big boards (e.g. N>1000). It is an extension of the Klove algorithm, but for arbitrary board sizes(the Klove

solution is only for gcd(N, 6)=1(odd numbers bigger than 6). A Matlab program is in the file-exchange repository. I will not include a link, but type in Matlab fileexchange: N-Queen problem modular. It will flash there. Mihail Georgiev 195.75.72.179 (talk) 16:01, 27 September 2017 (UTC)

Algorithm Attribution
How about some attribution or reference for the simple algorithm? When was it discovered? Given the number of published algorithms using various kinds of search even for finding single solutions, it would seem that this has to be a fairly recent discovery? Or?


 * Recent? Not really. The first proof of a simple algorithm for producing a solution to the n-queens problem for every n>=4 can be found here: Wilhelm Ahrens. Mathematische Unterhaltungen und Spiele. B.G. Teubner, 1910.


 * A proof in English can be found here: E.J. Hoffman, J.C. Loessi and R.C. Moore. Constructions for the Solution of the m Queens Problem. National Mathematics Magazine, March-April:66-72, 1969.
 * PittBill 13:28, 20 Apr 2005 (UTC)


 * I don't think any of those are on the Internet, so I can't check whether any of the published algorithms are simpler to follow or remember than the one in the article. If so, can you please replace the one in the article and give the source.  If not, please leave it be. &mdash; 131.230.133.185 08:31, 13 Jun 2005 (UTC)

Paul Muljadi
Who is Paul Muljadi? From a quick Google search, I gather that he is a Chess buff & possibly one of the top players, but seeing how his name is mentioned in a couple of Wikipedia articles & he provides no personal information on his website (or even a clear way to navigate it), it would be nice to provide an article with a few sentences about him. -- llywrch 15:25, 24 Apr 2004 (UTC)


 * I don't know who he is, but I know he's not a top player - he doesn't have a FIDE rating at all. I've never heard of him, myself. --Camembert


 * I was being polite by saying "possibly one of the top players": I'd rather be corrected for thinking he was one, than being corrected for thinking that he was not one. For the record, I might be able to name a dozen famous chess players, but only if I could include Philip Marlowe. -- llywrch 22:59, 24 Apr 2004 (UTC)


 * I came independently to the conlcusion that he was nobody in particular, that the "discoveries" described in the article were not mathematically interesting, and that he had probably placed them there himself out of vanity. I removed them, then saw this discussion on the talk page. -- Dominus 15:17, 25 Aug 2004 (UTC)


 * The Integer Sequences link at the bottom of the article goes to Paul Muljadi's webpage, which announces his "discoveries". The reason I haven't removed the link is that Paul's page does list the fundamental solutions to the eight queens problem. PittBill 14:31, 28 Aug 2004 (UTC)

It seems that almost the same web page exist, here is the link: http://www.informationclub.com/encyclopedia/e/ei/eight_queens_puzzle.html

Also say: Copyright ©2003 InformationClub.com This content from encyclopedia is licensed under the GNU Free Documentation License

--andrejj 18:55, 15 Aug 2004 (UTC)

I believe the InformationClub is copying their pages verbatim from the Wikipedia. Other entities have similar copies, such as http://www.wordiq.com and http://www.fact-index.com PittBill 23:08, 15 Aug 2004 (UTC)

Number of Solutions

 * In general, the number of possible solutions of placing N queens on a N by N board, considering the symmetries as distinct solutions, is:

And then the formula is not given, only the values. -- WhiteDragon 06:26, 10 Feb 2005 (UTC)

That's because the formula is unknown. See for more information on the numbers of possible solutions. PittBill 10:43, 10 Feb 2005 (UTC)

I do see WhiteDragon's point, and have removed the In general since the table only gives values for specific N's, not a general formula. PittBill 23:47, 12 Feb 2005 (UTC)

A rough approximation to the amount of "all" solutions up to N = 26 can be given by 5 * factorial(N) / 2.4^N. Sorry... don't have a reference for it :(

XWolfRH (talk) 22:20, 25 April 2016 (UTC)

Question
For N=2 and N=3 there are no solutions. For all other values of N<600 there is at least one solution. This I know because For each of these values of N I computed a solution. I conjecture that solutions exist for all values of N excep N=2 and N=3. Does somebody know something about this conjecture, may be even a proof or a counterfact? Thanks Jos.koot (talk) 18:00, 9 July 2010 (UTC)

Answer: Your conjecture has been known to be true for quite some time. Read the "Constructing a Solution" section of the Eight Queens Puzzle page. The procedure in that section produces a solution for every N>3. For similar proofs of your conjecture, read Bell, Jordan and Stevens, Brett, A survey of known results and research areas for n-queens, Discrete Mathematics, Vol. 309, Issue 1, 6 January 2009, 1-31. PittBill (talk) 14:18, 10 July 2010 (UTC)

Thanks, Jos.koot (talk) 14:58, 10 July 2010 (UTC)

What is CLP(FD)?
What is CLP(FD)? PittBill 01:23, 6 Jun 2005 (UTC)


 * Constraint logic programming over finite domains (http://www.google.com./search?btnI&q=CLP+FD). Fixed in article.  &mdash; 131.230.133.185 08:31, 13 Jun 2005 (UTC)

Minimum-Conflicts Heuristic?
I think the part talking about the 'minimum-conflicts' heuristic is incorrect, because that heuristic gets trapped at local optimal solutions(i.e. no single move can improve the solution quality).
 * It may get trapped, but not necessarily. It's the basic tradeoff between hillclimbing and exhaustive search. As mentioned, the gain is that the method can solve problem sizes way beyond the scope of an exhaustive search. The standard fix for 'stuck at local optimum' is to restart with a different random initial configuration.

C Program
I am missing either link or listing of brilliant sollution posted to Usenet. Philipz 09:07, 11 Sep 2005 (CEST)

#include 

static int count = 0;

void try(int row, int left, int right) { int poss, place; if (row == 0xFF) ++count; else { poss = ~(row|left|right) & 0xFF; while (poss != 0) { place = poss & -poss; try(row|place, (left|place)<<1, (right|place)>>1); poss &= ~place; }   } }

void main { try(0,0,0); printf("There are %d solutions.\n", count); }

It's not brilliant, though it is compact. Similar code that works for N other than 8 and takes half as long to run by counting vertically symmetric solutions only once can be found at https://rosettacode.org/wiki/N-queens_problem#C -- Jibal (talk) 09:39, 7 June 2022 (UTC)

Exact Cover
The eight-queens problem doesn't seem to be exact cover. A solution for a square larger than 1x1 can not use all the nontrivial diagonals (2x2 and 3x3 have no solutions, and for n > 3, 2n-3 > n). Should "such that every column has a 1 in precisely one of the chosen rows" be restated to "such that each of the first 2n columns has a 1 in precisely one of the chosen rows, and each other column has a 1 in at most one of the chosen rows."? Ralphmerridew 20:12, 17 January 2006 (UTC)

Maybe this should be more explicit, but it's easy to extend any problem of the form "these columns get exactly one 1 and these get at most one 1" to a normal exact cover by just adding a bunch of rows that are all zeros except for having a 1 in one of the "at most 1" rows. (Though it'll be more efficient to use an algorithm that understands the extended problem directly.) Glasser 14:04, 20 January 2006 (UTC)

Solution by Permutations in Python
Here's a simple implementation in Python that generates all 8-castles solutions by a permutations generator, then filters diagonals by checking that the set of diagonals represented has 8 elements. I think this is a more clear solution of the problem in Python, but the article's current recursive solution is probably better for readers because it represents how the problem would be solved in most languages.

You can shorten the code significantly at the expense of clarity by using generator expressions.

- Connelly 00:29, 11 May 2006 (UTC)

4-Queens Puzzle
..is it possible to cover a 8x8 chesstable with 4 queens?

The number of solutions for covering an n by n chessboard with 4 queens are as follows (including rotational and reflectional variants):

Computed by a J program. Roger Hui 06:10, 19 May 2006 (UTC)

See the actual program. Roger Hui 17:24, 19 May 2006 (UTC)

Complexity
The statement "The GNU Prolog program below resolved a 100 queens problem in less than a tenth of a second."

is meaningless without a frame of reference. Giving at least the processor used for the test and the time of a slower algorithm would help matters greatly. Andrew J. MacDonald 03:51, 30 November 2006 (UTC)

Distinct–Unique
The article seems to be arbitrarily using the words "distinct" and "unique" with its own meanings. While it does help to make it less verbose, "unique" already has the usual meaning of being the only one of something, and it's absurd to speak of "unique solution 1, unique solution 2", etc. If at all there is a unique solution, there can be only of it. Does anyone have any suggestions on what to use in place of "unique"? ("Truly distinct", "distinct even after considering symmetries", "nonisomorphic",...) --Shreevatsa 17:49, 6 January 2007 (UTC)


 * Durango Bill's website uses "unique", but the standard term seems to be "fundamental". (See for example, Watkins' book. Or Google 'fundamental solution n-queens') PittBill (talk) 12:14, 17 June 2008 (UTC)


 * I have fixed the abuse of language concerning "unique". Shreevatsa is correct; the word is wholly inappropriate.  There are two kinds of solution counts: those that consider symmetrically related configurations to be the same, and those that consider them to be distinct.  The correct term for the former is "fundamental".  The correct term for the latter is not so clear, but "all" would be appropriate.  I've allowed the article to call them "distinct", for lack of a better term.  Zaslav (talk) 04:43, 12 March 2014 (UTC)

Similar to Sudoku?
Isnt this in some way similiar to solving sudoku? Each row/column may only have one queen, is like every row may only have the same value once. Sould we include Sudoku in the Related Related Problems section? 81.221.196.70 14:17, 4 May 2007 (UTC)
 * Both this problem and Sudoku are examples of Exact cover problems. I've added a sentence to that effect to the Related Problems section. Oliphaunt 09:28, 5 May 2007 (UTC)

Move solution to the bottom of the page and add a spoiler warning
I came to this page to learn about the problem and try to solve it myself (and to find out if a solution was possible). The solution appears right at the top, spoiling the puzzle for those who just want to try it. —Preceding unsigned comment added by 70.171.221.203 (talk) 22:44, 27 September 2007 (UTC)


 * Wikipedia is about providing information, not hiding it. Also, 8 queens isn't really a puzzle and isn't "spoiled" in any way by knowing any or all of the 92 solutions. Jibal (talk) 09:49, 7 June 2022 (UTC)

comment moved from article
217.208.53.194 added the following comment to the article. I'm moving it here. Michael Slone (talk) 13:55, 11 February 2008 (UTC)
 * NOTE: This animation is incorrectly programmed. After finding a solution, the program returns to a previous placement of the second queen, instead of continuing with new placements from the found solution. Therefore, it gets stuck and repeatedly finds the same solution (with the first queen on A8 and the second on E7, after finding a solution it returns to placing the second queen on C7). Totally lousy programming and testing, in other words. —Preceding unsigned comment added by 217.208.53.194 (talk • contribs)

fastest algorith
Can anyone post the pseudocode version of the fastest algorithm that can find all unique solutions for n queens? 75.87.86.76 (talk) 23:05, 17 April 2008 (UTC)

its abt simetries... borderring n*n board to become (n+1)*(n+1) as a main backtracking step Hi, i think its a big challange 4 the analysts programmers to optimize the search 4 counting all solutions 4 n-queens problems, by using a hybrid technique between backtracking n divide and conquer, maybe counting more than one solution at a time... its still fuzzy to me im offering it to u as a challamge — Preceding unsigned comment added by 93.118.212.93 (talk • contribs)
 * fascinating contribs from that IP ... numerous screws loose. -- Jibal (talk) 10:11, 7 June 2022 (UTC)

Possible change
Currently under the section "Constructing a solution", it states:
 * "there are 4,426,165,368 (64×63×...×58×57/8!, [...]) possible arrangements"

I wonder if it would be better to write
 * "there are 4,426,165,368 ((64!–56!)/8!, [...]) possible arrangements"

Or would this just render it more obscure to a non-mathematical reader (especially one unfamiliar with the factorial)? − Twas Now ( talk • contribs • e-mail ) 01:23, 27 July 2008 (UTC)
 * Not, of course. You probably mean $$\frac{64!}{56!}8!$$. 16:38, 15 July 2009 (UTC) —Preceding unsigned comment added by Komap (talk • contribs)

an algo that might "capture" the "profile" of the part of bactracking type solution might count more than one solution at a time... — Preceding unsigned comment added by 93.118.212.31 (talk) 17:59, 24 July 2011 (UTC)

constrictive programming might help accelerate bactracking to produce the next solution more fast, in case we want to count them all...

anyway, i think it takes a bit of attention in order to make this really work

Florin Matei — Preceding unsigned comment added by 93.118.212.93 (talk) 11:05, 16 January 2012 (UTC)


 * Mr. Matei seems to like to drop irrelevant comments all over Wikipedia. Jibal (talk) 10:12, 7 June 2022 (UTC)

Problem with paragraph "Constructing a solution"
In the aforementioned paragraph, it says that there are around 4 billion possible arrangements when in fact an 8x8 board has ~16 mil arrangements. Am I missing something? —Preceding unsigned comment added by ThisThat911 (talk • contribs) 17:35, 5 February 2009 (UTC)


 * There are 4 billion arrangements of 8 queens on the board. But it is easy to see that you can restrict the possibilities to 1 per row (or column) and that reduces the possibilites to 16 million.  I'll try to clarify that in the article later.  Bubba73 (talk), 18:18, 5 February 2009 (UTC)

Eight queens puzzle solutions
The related article Eight queens puzzle solutions is being discussed for deletion here. Johnuniq (talk) 03:47, 12 August 2010 (UTC)

N-Queens; largest N
to give u trouble, lets say we got only small mem but we seek 4 bigger than mem possibilities n-queens solution, we might find usefull random generators or similaries to produce the brute solution of a slice of the board (virtual board)... in mem we might find usefull to note corrections from brute solutions.these brute solutions might b formed evn by markov sources like generators of numbers 93.118.212.93 (talk) 05:34, 24 August 2012 (UTC)

For random solutions, not to find total number of solutions. Is this of any interest? Points to "10000 Queens solved" by the website author himself. —Preceding unsigned comment added by Ronybc (talk • contribs) 21:28, 9 September 2010 (UTC)

Sosic and Gu solved a 3,000,000 Queens problem in 1991. See the article "3,000,000 Queens in Less Than One Minute", in ACM SIGART Bulletin, Volume 2, pages 22-24. PittBill (talk) 19:48, 11 September 2010 (UTC)

Polynomial solution
It should be noted somewhere inside that the N-Queens problem has a polynomial (and very quick) solution. I found it by accident, see http://doi.acm.org/10.1145/101340.101343

Neználek (talk) 13:00, 7 April 2011 (UTC)


 * There is no polynomial f(n) that gives the number of solutions of the n-Queens Problem. Zaslav (talk) 04:39, 12 March 2014 (UTC)
 * I believe that paper provides an algorithm to find a solution to an N-queens problem for large N, not to calculate the number of solutions. Jibal (talk) 10:17, 7 June 2022 (UTC)

if N is the size of the board, we might b able to use O(log(N)) complexity both code n data to describe fully the solutions that r more like independent of the size of the board, high... simetry lets call it :) 93.118.212.93 (talk) 05:39, 24 August 2012 (UTC)

Explicit Solutions - not included in the unique solutions
Why would the 'Explicit' solution shown for n=8 not appear to be among the 'Unique' or 'fundamental' solutions?Cander0000 (talk) 03:51, 31 December 2012 (UTC)


 * The explicit soluition for n=8 is a variation on #12 of the fundamental solutions. Bubba73 You talkin' to me? 04:12, 31 December 2012 (UTC)

Fundamental Solutions for N=10 wrong?
The tabular in this article mentions for N=10 that there are 92 fundamental solutions. I just implemented this myself and can confirm all numbers from 1 to 9, but I get 96 fundamentals for N=10. Can someone confirm one or the other? — Preceding unsigned comment added by 94.218.43.105 (talk) 21:08, 28 November 2016 (UTC)
 * This is not the right forum for this type of question, but you can follow the links (as I did) to see that all published values that I could find give 92. --Bill Cherowitzo (talk) 21:55, 28 November 2016 (UTC)

Computer code
There should not be too much computer code added to the article, see MOS:CODE. In particular, "Multiple source code implementations are not appropriate ...". There is already one example, referenced to a classic book. No more should be added. Bubba73 You talkin' to me? 15:35, 17 July 2013 (UTC)

3 Queens on a straight line
"Solution 10 has the additional property that no three queens are in a straight line.". Maybe I'm just missing something, but at least solution 9 has that property aswell.79.253.51.222 (talk) 22:56, 6 November 2015 (UTC)


 * A5, E3 and G2 are a straight line. --JBL (talk) 23:07, 6 November 2015 (UTC)

if ((n mod 6) !== 2) AND ((n mod 6) !== 3) then call horse_step_algo

function horse_step_algo { even numbers + odd numbers (2 4 6 8 10 12 1 3 5 7 9 11 13) }

if N not in sequence http://oeis.org/A047243, horse_step_algo return solve.

n mod 6 -> 2017 mod 6 = 1 -> 2 4 6 8 10 ..... 2016 1 3 5 7 9 ..... 2017 solve.

Amanda Sproule (talk) 21:58, 10 December 2017 (UTC)

No Three In A Line
"Solution 10 has the additional property that no three queens are in a straight line."

Isn't that obvious, and shared by all solutions? If there were three queens in a straight line, they'd be threatening each other, and it wouldn't be a solution.

2605:A000:EF84:2C00:10C:6B90:8406:330B (talk) 23:20, 18 April 2017 (UTC)


 * Not all lines are rows, columns, or diagonals. (See also the talk page section directly above this one.)  --JBL (talk) 23:50, 18 April 2017 (UTC)

This is unfortunately still unclear to me - most likely I am missing what is meant by "in a straight line"? When refering to cited article No-three-in-line problem it states: "no-three-in-line problem asks for the maximum number of points that can be placed in the n × n grid so that no three points are collinear. This number is at most 2n, since if 2n + 1 points are placed in the grid, then by the Pigeonhole principle some row and some column will contain three points." From this immediately follows, that a maximum number of 2 * 8 = 16 points (i.e. queens) can be placed on the common 8 × 8 chessboard, so that no row or column will contain 3 queens. But from "row or column" it also immediately follows for me in scope of the Eight queens puzzle, that not even *two* queens may share any row or column (and also not diagonal).

As already stated above I am obviously missing the definition of "straight line" in this context - as also mentioned by JBL above: "Not all lines are rows, columns, or diagonals." So what precisely *is* meant with "in a straight line" here? Maybe it would make sense to add that definition to the article, maybe even depicting the lines in one or all of the other 11 solutions, where three queens indeed are suppossed to be "in a straight line"? Dr.Big.Man (talk) 10:56, 9 January 2019 (UTC)


 * "line" means "line" in the usual geometric sense. In the section above, I have identified a set of three queens that lie in a straight line; does that help? --JBL (talk) 12:38, 9 January 2019 (UTC)
 * The meaning of "straight line" is well known and well documented elsewhere; there is no need to add it to this article. Ranks (rows), files (columns), and diagonals on a chessboard are lines at 0 (or 180), 90 (or 270), and 45 (or 135) degrees ... but that of course does not exhaust all the possibilities for straight lines. Jibal (talk) 10:30, 7 June 2022 (UTC)

Berea College, Martin Richards and Zongyan Qiu
Our citation of Martin Richards' 1997 bit-patterns paper was of the 2009 online version (because that's easier to verify than the original 1997 paper version), but the 2009 date caused the contributor of this anonymous edit (from a ChinaNet IP in Chongqing) to think Zongyan Qiu's 2002 paper had it first. That would have been only a minor matter, until this anonymous edit (from Berea College, USA) changed the main text to read that Martin Richards plagiarised Zongyan Qiu. Plagiarism is a serious allegation for which we have no evidence (even if Richards' first version were 2009—which it wasn't—we still wouldn't know he'd deliberately copied Qiu; they might have just both thought of the same thing), so it's not surprising that User:Sneftel in this edit ("rm nn infighting") deleted the lot. Which is a pity, because it's notable that the algorithm can be done using bit patterns and has been since at least 1997. I therefore reinstated the text, noted the 1997, but still kept Zongyan Qiu's reference as well because I like Chinese and I'm not anti-Qiu or anything like that, but the facts are that Richards first did it in 1997, 5 years before Qiu. We can mention Qiu as well because it's a different publication and it takes a slightly different approach in a different programming language. Everyone happy now? ;-) A1415 (talk) 08:45, 12 April 2019 (UTC)
 * I agree with Sneftel’s removal. If this is notable (as you say) then there should be a secondary  source that comments on it, mentioning these primary research articles.  —JBL (talk) 09:21, 12 April 2019 (UTC)
 * Notability applies to article subjects, not to sections of text or to citations, which don't need secondary sources (that would be nuts if we had to provide a secondary source for every research paper cited in Wikipedia). Jibal (talk) 10:37, 7 June 2022 (UTC)
 * I disagree with your addition. While I now understand that he didn't plagiarize, your addition swings heavily toward Richards' favor. Anyway, I agree with other editors that the whole algorithm may not be notable. If we end up adding, the IP edit is a good compromise. 71.31.30.66 (talk) 03:16, 15 April 2019 (UTC)
 * Favor? It's not a contest. Jibal (talk) 10:37, 7 June 2022 (UTC)

It was the allegation of plagiarism that brought the paragraph to my attention, but I removed the paragraph entirely rather than just reverting because the result did not seem particularly notable. I looked around for secondary references, and found a few "related work" mentions but nothing positioning it as an important aspect of the n-queens problem as a whole. Sneftel (talk) 11:40, 12 April 2019 (UTC)
 * The edit summary of that revert says "Smells strongly of WP:COISELF". I'm not sure which editor(s) Sneftel meant, but my only connection to Richards is having had him as a lecturer many years ago, does that count? A1415 (talk) 08:46, 20 April 2019 (UTC)

A Google scholar search shows 9 citations for Richards, including: Meanwhile there are 3 citations of Qiu, two of which are also in the above list of papers that cite Richards (so let's not double-count them), and the third is a conference paper called Research of Hybrid Genetic Algorithm in N-Queen Problem Based on HCI (with 2 citations).
 * Complexity of n-queens completion (a journal paper)
 * Using dynamic parallelism for fine-grained, irregular workloads: a case study of the n-queens problem (a conference paper about GPUs etc), seems to be the same team as this paper
 * this Chinese paper (about non-recursive methods?)
 * this Malay paper
 * this paper (not sure what it's getting at)
 * PrimerPooler: automated primer pooling to prepare library for targeted sequencing uses bit-patterns for the bioinformaticsy part and cites Richards N-queens as where the idea came from
 * Heterogeneous cluster computing for many-task exact optimization: Application to permutation problems
 * Enable back memory and global synchronization on LLC buffer (not sure I understand that)

Are these 10 citations enough to establish notability in some context? not sure if that context should be "the eight-queens puzzle" or bit manipulation though (although that article would need a lot more fleshing-out with applications etc before it would make sense to add this one). A1415 (talk) 08:46, 20 April 2019 (UTC)
 * I agree with the IP addition like this: Programs to count solutions to the n-queens problem using bitwise operations were published by Zongyan Qiu and Martin Richards.
 * The additions of who did first or what are not notable. 71.31.30.66 (talk) 18:00, 20 April 2019 (UTC)

I mean, clearly none of this is particularly notable, because none of us have gone to the trouble of noting it. You can count solutions through bitwise operations? Well that's potentially interesting if you're into bitwise operations, but in this discussion of wordings, nobody has tried to describe the method or argue that it is in any way important beyond the fact that someone gets to plant their flag in it. It doesn't help describe or explain or help people with the eight-queens puzzle. It's not notable to the eight-queens puzzle. It might be notable on Richards' or Qiu's articles since those are all about them, if it's among the more important things they did (though I doubt that's the case either). Sneftel (talk) 09:03, 25 April 2019 (UTC)
 * I agree with Sneftel, but am also not particularly bothered by the sentence suggested by IP 71... and implemented by IP 92.... --JBL (talk) 12:17, 25 April 2019 (UTC)

Counting solutions by bitwise operations is notable if someone published a paper about it, as they apparently did. There is also a paper about counting solutions through carry chains of hardware addition circuits. This article should actually include a write-up of the algorithm they used to decrease counting time by making better use of symmetry when enumerating the 27 queens problem. 67.164.113.165 (talk) 00:13, 26 April 2019 (UTC)
 * The general criteria for notability are described here. Someone publishing a paper about a topic is not sufficient to demonstrate the notability of the topic. The paper is an example of what's known as a "primary source". Those links should help you get up to speed on what sorts of things we look for. Sneftel (talk) 16:33, 26 April 2019 (UTC)
 * I believe those criteria are for having standalone articles. I think those criteria led us confused. At the end of the day, we're not talking about creating a new article titled "Bitwise solution for N-queen problem". We're talking about the notability of a mere sentence, which shouldn't be controversial. The WP:GNG took pains to state, "If a topic does not meet these criteria but still has some verifiable facts, it might be useful to discuss it within another article." 71.31.30.66 (talk) 17:39, 29 April 2019 (UTC)
 * Notability pertains to articles, not "topics" within an article or to citations, which do not need secondary sources. This whole discussion shows a serious lack of understanding of "what we look for" at Wikipedia. Jibal (talk) 10:42, 7 June 2022 (UTC)

Solutions Section: Further Duplications
In the solution to the Eight Queens section, it says that if you allow symmetry operations of rotations and reflections to be reduced to equivalence classes, you get 12 distinct solutions. I would like to point out that if, in addition, you allow translations, you can reduce the solution set to (at most) six equivalence classes. See this Problem of the Week at Math Help Boards that I posted for an explanation. We may or may not want to allow translations to reduce the solution set further, but I thought I would point this out. Ackbeet (talk) 17:18, 13 June 2019 (UTC)

Order of Solutions
The solutions have a certain order, but wouldn't it make more sense to show them in sequential order? I.e., decide on an order for the Quuens, say first from bottom to top, second from left to right [following the coordinate system]. Then solutions that have a Queen in the corner A1 appear first, then solutions with a Queen on B1, etc. If we use a coordinate system, we can use (c1,c2,c3,c4,...) to indicate that the n-th Queen is in the n-th row and cn-th column. The solutions should then be ordered as follows (using current numbering): 3 (1,2,4 - flipped), 2 (1,2,5 - flipped); 1 (2,4,6 - flipped), 4 (2,5,7,1), 5 (2,5,7,4), 6 (2,6,1), 7 (2,6,8), 8 (2,7,3), 9 (2,7,5); 12 (3,5,2), 10 (3,5,8), 11 (3,6,2). Considering that only 3 solutions are flipped and 10 solutions appear in the correct order, I assume that the shown order was not the one originally envisioned. Bcurfs (talk) 03:56, 16 November 2020 (UTC)
 * Yep, lexicographic ordering (of the minimal elements of the groups) does make sense, particularly as it's the order in which the solutions would be enumerated by a standard backtracking solver. The current ordering seems to be a holdover from a different, fairly OR-ish discussion of the structure of solutions. Sneftel (talk) 11:19, 18 November 2020 (UTC)
 * I don't care about what order they are listed in, but anyone who goes to change this should be aware that there are several different places in the article where solutions are referred to by number, so care is needed in re-ordering them. --JBL (talk) 12:37, 18 November 2020 (UTC)

Superqueen
The superqueen problem adds the constraint of moving like a knight to the n-queens problem. Besides for the regular rook and bishop movement, it adds the knight movement making the puzzle much more difficult. I think it would make for a good addition to the article and I would do it myself, but I wouldn't be able to articulate it so well. It is only solvable for n = 1 | n >= 10 Here are some papers I found on the subject as well as the oeis sequence for it.

http://www.ccs.neu.edu/home/kunkle/papers/techreports/superQueensOG.pdf http://www.durangobill.com/N_Queens.html https://oeis.org/A051223

What of these recent set of articles on a solution?
What of these recent set of articles on a "solution" by Harvard mathematician Michael Simkin?


 * https://phys.org/news/2022-01-harvard-mathematician-year-old-chess-problem.html
 * https://scitechdaily.com/harvard-mathematician-resolves-150-year-old-chess-problem/
 * https://www.sciencealert.com/a-harvard-mathematician-has-solved-an-epic-150-year-old-chess-problem
 * https://www.iflscience.com/editors-blog/dont-slay-queen-chess-puzzle-solved-after-150-years-thanks-to-mathematics/

This development should be in the article. I see Simkin mentioned only twice in the notes. TuckerResearch (talk) 18:48, 27 January 2022 (UTC)
 * It is already covered in the article. The real question is why there are a bunch of new churnalist rehashings of the Quanta piece (also cited in the article) from September. --JBL (talk) 21:31, 27 January 2022 (UTC)
 * I have restructured the article to better highlight the recent work, and also rewritten the lead section. --JBL (talk) 17:09, 29 January 2022 (UTC)

Sample code: how do we feel about it?
So back in February removed the sourced sample code as "outdated and provid[ing] no insight". Subsequently, has added it back -- except not actually, because what they've added is a rewritten version in a different language and with various changes made to the cited version. I was under the impression that this was something that's been discussed a lot here (in light of WP:OR and WP:CODE) but I'm either confused or incompetent because I don't see it on this page or in the article edit history. So let me try to kick off a discussion about it. Personally, I'm inclined towards the view that if we're going to include sample code, I would rather include a code sample directly cited to something, rather than reworked versions of it. --JBL (talk) 11:55, 17 April 2022 (UTC)


 * It would be desirable to have a citation for the code, but Python is essentially a runnable pseudocode which is certainly more useful to the reader as a high-level overview of one of the algorithms than Wirth's Pascal code which required reader to carefully examine to figure what it does. I'm not entirely sure it adds anything to the article more than what is covered in the previous section, but few lines of code sometimes read better than prose so I would tolerate it. We certainly don't want to have two versions differing only in insignificant details as in the current version of the article, though! If someone wants more, the External Links section already has a link to Rosetta Code (and two GitHub links of questionable usefulness; there are thousands of implementations written as an exercise every year). – MwGamera (talk) 16:24, 17 April 2022 (UTC)


 * In fact, I reintroduced the code for several reasons: First, I was intrigued by Niklaus Wirth's idea of ​​representing the chessboard by three lists (a, b, and c). I think that idea alone is worth presenting in some form. Second, to document that as languages ​​continue to evolve, it is possible to represent Wirth's basic idea without low-level operations. And third, because there are so many implementations that just take care of such low-level details. While there are over a hundred versions on Rosetta code, it takes a long time to find one that's optimized for readability and still works in the real world. That's exactly why I put Wirth's code in exactly this form. I also wanted to demonstrate the trick mentioned in the previous section of combining recursion and permutation to reduce the number of investigations. But because this is exactly what damages readability, I'm not sure if that was a good idea. --Majow (talk) 08:21, 18 April 2022 (UTC)
 * You may want to read through WP:CODE for potential reasons *not* to include certain types of sample code. I'm not sure whether Wirth's representation of the chess board is notable enough, or relevant enough to the eight-queens puzzle, to be captured in the article, but if it is then it should be discussed directly and supported by independent sources, not just hinted at in the sample code. But something being "worth preserving" doesn't necessarily make it worth including in an article. WP does not strive to be a repository of source code, even carefully hand-picked "best" source code. Sneftel (talk) 11:14, 19 April 2022 (UTC)
 * It may indeed be a personal problem, but I only understand some things because I can try them and change them in the process. When we discussed the eight queens puzzle at school, I could understand it only because of the explanation and code of N. Wirth (I still have a copy of the book "Algorithms and Data Structures"). I had a lot of trouble understanding the principle of recursion and kept adding print statements to the code and recompiling it again and again until I finally got the idea behind it. That's why I simply missed the sample code here and I personally think N. Wirth's solution is excellent. However, since the array data structure is used in the Pascal language, there are some low-level things you just don't need to do when using lists in Python. Therefore, code readability in Python is better, but memory consumption and execution speed are significantly worse than in Wirth's original. Wirth hardly uses the stack because he allocates the arrays globally and not locally, and the operations on arrays are of order O(1), while on lists they are significantly slower with order O(n). --Majow (talk) 09:45, 20 April 2022 (UTC)
 * None of these personal facts are relevant. Please review WP:OR Jibal (talk) 10:48, 7 June 2022 (UTC)

What you called beautification in Special:Diff/1083937760 is IMO not an improvement at all. It only makes the rendering of the code block inconsistent with the rest of the Wikipedia. One could argue these borders with shadows are visually helpful, but these kind of style changes belong to the site-wide skin or templates. This code isn't particularly special in any way that would mandate making it look different here. – MwGamera (talk) 21:48, 22 April 2022 (UTC)


 * Looking through the sample code, it's a great illustration of the difference between a pseudocode description of an algorithm and an "example implementation" of that algorithm, and is firmly in the latter camp. If one came to the page not knowing the backtracking algorithm to solve the eight-queens puzzle, that code is not formulated to help them. It involves generators, a relatively advanced feature of Python and one which would confuse someone with only a passing familiarity with the language; the variable names are opaque; and it gratuitously uses terse list operators which, again, would confuse someone with limited Python exposure. (It fails as an implementation as well: the state structures are copied rather than mutated, and there's an unnecessary iteration over the row, leading to an additional factor of n in the time complexity. But that's a comparatively minor concern.) I might suggest, Majow, that that is the sort of code which looks beautiful to one who has spent a long time looking at it, yet is opaque to one who is seeing it for the first time. And we really need to prioritize that latter group when writing an encyclopedia. Sneftel (talk) 09:29, 25 April 2022 (UTC)

Symmetrical Solutions
Just suggesting an extra column, symmetrical and fundamental solutions. For some reason I could not find this particular sequence in OEIS!

20×20 (“first” and “last”)
AndrejPodzimek (talk) 00:22, 19 May 2022 (UTC)