Group Abstract Group Abstract

Message Boards Message Boards

Peaceful chess queen armies

POSTED BY: Sander Huisman
7 Replies

I love to see the enthusiasm behind solving more Rosetta Code problems! Thanks Sander!

POSTED BY: Kevin Reiss
POSTED BY: Sander Huisman

Very neat! I do not entirely understand if GetSolution[] gives you a particular solution and are there more solutions for specific input numbers $[n,m]$? Also I am curious is there any easy way to say when the solution will be 2-fold or 4-fold rotationally symmetric.

POSTED BY: Sam Carrettie

If you remove the Abort[] in the SolveQueen function it will keep on finding all of them and printing them as they are found.

Using Transpose and Reverse one could quite easily check whether it has reflected or rotational symmetry.

Cheers!

POSTED BY: Sander Huisman
Posted 4 years ago

Nice! It makes me wonder if we could set this up using a generating function. Where the power of, say, x would be the column and the power of y would be the row (the coordinates). The coefficient would be the army (1 or 2 in this case). Your first picture with the yet unknown generating function GetSolutionGF[5, 4, 2] would have output 1XY+1X^5 Y+2X^3 Y^2 +2X^2 Y^3+2X^4 Y^3+2X^3 Y^4+1X Y^5+1X^5 Y^5.

POSTED BY: Dave Himes

I'm aware of generating functions but have never used them myself. Would rotations/reflections of non-symmetric solutions give different functions, is that problematic?

POSTED BY: Sander Huisman
POSTED BY: EDITORIAL BOARD
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard