Queens on Sticks: the diagonal-string view of n-queens, a polynomial-budget completion method, and parity puzzles as queens boards

Read along its diagonals, an n-queens solution becomes two binary strings, one marking the occupied sum-diagonals r + c and one the occupied difference-diagonals r − c. In a confocal-conic picture these diagonals are ellipses and hyperbolae. The paper develops this "sticks" view of the problem. It proves an energy law for the two strings, Σs² + Σd² = (2/3)n(n−1)(2n−1), formally verified in Lean 4 with Mathlib. It then turns the view into a polynomial-budget completion method (fewest-options-first over rows and columns, a scrambled order and bounded restarts), which decided all 600 random completion boards tested (n = 40 and 80, every density). Relaxing queens to fractions gives polynomial-time certificates of impossibility, as weights on the sticks. One level of the Sherali–Adams hierarchy proved every one of the 63 locally invisible impossible boards near the switch impossible, while arithmetic modulo 2 proved none. At n = 56, fractions, a semidefinite (sum-of-squares) test and Sherali–Adams level 1 proved 9, 20 and 24 of 24 such boards impossible, a strict ladder of polynomial-time global tests. The paper relates this to the CSP dichotomy theorem and to the Stepanov-type polynomial method. The paper also maps where the method fails. Near the density at which random boards switch from completable to impossible, the impossible boards look locally like completable ones. The same method stays fast on satisfiable random 3-SAT but cannot refute unsatisfiable formulas. On parity (Tseitin) puzzles its cost grows about 1.45^N. Finally, parity puzzles are turned into actual n-queens completion boards through the Gent–Jefferson–Nightingale reduction. Every reduction step is checked by exact solution counts, including on full queens boards of side up to about 500,000. On these boards the sticks method fails even on the smallest solvable case. The paper also states plainly which parts are known techniques and what remains open. The upload includes an interactive explorer (HTML), all code, all data, and the Lean proofs.

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-12-01
DOI
https://doi.org/10.5281/zenodo.24724126
Primary Topic
Constraint Satisfaction and Optimization
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Queens on Sticks: the diagonal-string view of n-queens, a polynomial-budget completion method, and parity puzzles as queens boards

Víctor Blanco Bataller
Zenodo (CERN European Organization for Nuclear Research)
Constraint Satisfaction and Optimization
preprint

Queens on Sticks: the diagonal-string view of n-queens, a polynomial-budget completion method, and parity puzzles as queens boards

Víctor Blanco Bataller
preprint en

Abstract

Read along its diagonals, an n-queens solution becomes two binary strings, one marking the occupied sum-diagonals r + c and one the occupied difference-diagonals r − c. In a confocal-conic picture these diagonals are ellipses and hyperbolae. The paper develops this "sticks" view of the problem. It proves an energy law for the two strings, Σs² + Σd² = (2/3)n(n−1)(2n−1), formally verified in Lean 4 with Mathlib. It then turns the view into a polynomial-budget completion method (fewest-options-first over rows and columns, a scrambled order and bounded restarts), which decided all 600 random completion boards tested (n = 40 and 80, every density). Relaxing queens to fractions gives polynomial-time certificates of impossibility, as weights on the sticks. One level of the Sherali–Adams hierarchy proved every one of the 63 locally invisible impossible boards near the switch impossible, while arithmetic modulo 2 proved none. At n = 56, fractions, a semidefinite (sum-of-squares) test and Sherali–Adams level 1 proved 9, 20 and 24 of 24 such boards impossible, a strict ladder of polynomial-time global tests. The paper relates this to the CSP dichotomy theorem and to the Stepanov-type polynomial method. The paper also maps where the method fails. Near the density at which random boards switch from completable to impossible, the impossible boards look locally like completable ones. The same method stays fast on satisfiable random 3-SAT but cannot refute unsatisfiable formulas. On parity (Tseitin) puzzles its cost grows about 1.45^N. Finally, parity puzzles are turned into actual n-queens completion boards through the Gent–Jefferson–Nightingale reduction. Every reduction step is checked by exact solution counts, including on full queens boards of side up to about 500,000. On these boards the sticks method fails even on the smallest solvable case. The paper also states plainly which parts are known techniques and what remains open. The upload includes an interactive explorer (HTML), all code, all data, and the Lean proofs.

Zenodo (CERN European Organization for Nuclear Research)
Constraint Satisfaction and Optimization
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon