Group Abstract Group Abstract

Message Boards Message Boards

Solving the Queens Puzzle with Graph Theory

5 Replies

Cool idea! The post left me wondering what the complexity of finding a solution is. After some detective work, I have found this:

Bell, J., & Stevens, B. (2009). A survey of known results and research areas for n-queens. Discrete mathematics, 309(1), 1-31.

Check out Theorem 3 - would be sweet to implement one of these, and have it as a WFR!

Apparently, the n-queens completion puzzle is NP-hard, see:

Gent, I. P., Jefferson, C., & Nightingale, P. (2017). Complexity of n-queens completion. Journal of Artificial Intelligence Research, 59, 815-848.

Would it be difficult to allow for pre-set placements, per the completion puzzle?

POSTED BY: Zsombor Méder
Posted 2 years ago
POSTED BY: Brad Klee

Hi Brad! Yes! I actually got the inspiration from your post "Analyzing a Competitive New Method for GenerateTiling," so thank you for the idea!

I agree with you that the compile advantage could be 10× or more by optimizing the code. It would be really cool to know how many nodes the search tree has. I can totally ask about it and check if it's possible to compare the search trees directly or at least output statistics about vertex count per level based on the algorithm to see if there is an interesting result for the chapter in your upcoming book about game theory. I will definitely get back to you, hopefully with some helpful results!

Posted 2 years ago

In your other recent post, there's now some competitive timing statistics, where it looks like DancingLinksX (DLX) wins the race. A similar approach is possible for the queens problem, but it looks like DLX is not especially fast in this case. Then it occurred to me that QueenGraph could be used with an n-tier level structure, and indeed this appears to lead to a faster time with DepthFirstSearch. I have an idea how to keep going with this calculation, and I will contact you about that soon. Calculations are included here:

POSTED BY: Brad Klee

enter image description here -- you have earned Featured Contributor Badge enter image description here Your exceptional post has been selected for our editorial column Staff Picks http://wolfr.am/StaffPicks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!

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