A solution is called distinct in a set of solutions, if no other solution can be retrieved by rotations and/or mirroring of the solution.
These are 1+2+1+6+12+46 = 68 distinct solutions, and 2+10+4+40+92+352 = 500 solutions overall.
Just for fun I opened n-queens.xsl.xml on a last century Thinkpad 600E with 288MB(!) of main memory.
Just in case you use a browser that has problems (all big5 browsers have no problems), you can see the output here: n-queens_xsl.pdf
- it uses the "...xsl.xml" technique from Valery Chernysh instead an embedded stylesheet:
this makes it work in all big5 browsers, including IE
- it uses David Carlisle's exslt:node-set() implementation for IE browsers:
find that at the bottom of the stylesheet, slightly modified to avoid "msxsl namespace pollution" anywhere else :-)
- it uses
<xsl:variable name="blah" select="exslt:node-set($blah0)"/>
technique to easily allow for repeated processing of node-set results produced in between;
this technique is NOT needed by DataPower XSLT processor, because that does not differentiate between XML trees
and RTFs (Result Tree Fragments)
- it uses single digit numbers to identify a queens column for ease of board:mirror and board:rot90 operations;
this restricts the stylesheet to at most the 9-queens problem
- n-queens:sieve template is really nice recursive template for sieving out threatened fields after placing a next queen
- because the output grouping is based on really complex mirror and rotation operations, duplicate elimination is done "by hand";
I saw now option on how to make use of Muenchian grouping
- there are some glue templates for converting a solution to board notation in order to reuse previously posted board drawing templates
- it allows to use "data:image/gif;base64,..." encoded images instead to refer to those in "gif/" sub directory
- and, last but not least, it really made fun to create this solution and see the nice output it generates!