The fewest and the most toroidal conflicts of an n-queens solution

A solution of the n-queens problem places n non-attacking queens on an n × n board. Viewed on the torus, two of its queens may share a wrapped diagonal; Engelhardt calls such a pair a conflict. Pólya's theorem says that a solution with no conflicts exists exactly when gcd(n,6)=1, and Engelhardt asked whether a solution can have exactly one conflict. We show that it cannot, and that the fewest conflicts of a solution is exactly 0, 2 or 3, according as neither, exactly one, or both of 2 and 3 divide n. The same counting rules out further levels: no solution has exactly 2 conflicts when n ≥ 5 is prime, and none has exactly 3 when n=2q with q ≥ 5 prime. Finally, every solution with the fewest conflicts is balanced modulo every prime K ≥ 5 dividing n: each residue class of i+p(i) and of i-p(i) modulo K receives exactly n/K queens, as for a toroidal solution. An example on the 75 × 75 board shows that this can fail for composite K. At composite n prime to 6, by contrast, solutions with exactly 2 conflicts exist; we give examples for n=25,35,49,55,65. We also answer Engelhardt's second question: no solution has a cycle of conflicts, and no cycle of conflicts can even be placed on the board with all its conflicts broken by the edges. The inequality behind this, combined with a weighting of the rows and columns, shows that a solution has at most (√5-1)n/2 ≈ 0.618n conflicts, and the floor of this bound is the exact maximum for every n from 6 to 50 except 10,13,18, at nineteen larger n up to 233 and, through products with toroidal solutions, at 221 further n below 10^5, but not at n=89, where the same argument gives one less; the same products show that the largest number of conflicts reaches 144n/233 for infinitely many n.

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-10-29
DOI
https://doi.org/10.5281/zenodo.23755750
Primary Topic
Advanced Combinatorial Mathematics
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
preprint

The fewest and the most toroidal conflicts of an n-queens solution

Jouko Kines
Zenodo (CERN European Organization for Nuclear Research)
Advanced Combinatorial Mathematics
preprint

The fewest and the most toroidal conflicts of an n-queens solution

Jouko Kines
preprint en

Abstract

A solution of the n-queens problem places n non-attacking queens on an n × n board. Viewed on the torus, two of its queens may share a wrapped diagonal; Engelhardt calls such a pair a conflict. Pólya's theorem says that a solution with no conflicts exists exactly when gcd(n,6)=1, and Engelhardt asked whether a solution can have exactly one conflict. We show that it cannot, and that the fewest conflicts of a solution is exactly 0, 2 or 3, according as neither, exactly one, or both of 2 and 3 divide n. The same counting rules out further levels: no solution has exactly 2 conflicts when n ≥ 5 is prime, and none has exactly 3 when n=2q with q ≥ 5 prime. Finally, every solution with the fewest conflicts is balanced modulo every prime K ≥ 5 dividing n: each residue class of i+p(i) and of i-p(i) modulo K receives exactly n/K queens, as for a toroidal solution. An example on the 75 × 75 board shows that this can fail for composite K. At composite n prime to 6, by contrast, solutions with exactly 2 conflicts exist; we give examples for n=25,35,49,55,65. We also answer Engelhardt's second question: no solution has a cycle of conflicts, and no cycle of conflicts can even be placed on the board with all its conflicts broken by the edges. The inequality behind this, combined with a weighting of the rows and columns, shows that a solution has at most (√5-1)n/2 ≈ 0.618n conflicts, and the floor of this bound is the exact maximum for every n from 6 to 50 except 10,13,18, at nineteen larger n up to 233 and, through products with toroidal solutions, at 221 further n below 10^5, but not at n=89, where the same argument gives one less; the same products show that the largest number of conflicts reaches 144n/233 for infinitely many n.

Zenodo (CERN European Organization for Nuclear Research)
Advanced Combinatorial Mathematics
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