Statistical mechanics of the N-queens problem
Abstract
We investigate the N-queens problem as a lattice gas -- a model in which N queens are placed on an N × N chessboard with pairwise repulsive interactions along shared rows, columns, and diagonals -- from the perspective of statistical mechanics. The ground states are exactly the Q(N) solutions of the classical N-queens problem, with entropy per queen s0 ≈ N - γ (γ ≈ 1.944). This entropy reflects a characteristic constraint hierarchy: each successive geometric constraint -- columns, then diagonals -- reduces the entropy from the free-placement value N by a definite constant. We derive the exact high-temperature energy E/N 5/3 as N ∞. Extensive Monte Carlo simulations with 108 sweeps per temperature point for N = 8--1024 reveal that the specific heat per queen Cv/N converges to a universal function of T as N ∞. The converged curve features a non-divergent peak Cv/N ≈ 1.63 at T* ≈ 0.235\,J, establishing the absence of a thermodynamic phase transition. Combined with the trivially exact high-temperature entropy S(∞)/N = (1/N) N2N, the convergence of Cv/N enables a thermodynamic integration of Cv/T from T = ∞ to T = 0 that recovers the ground-state entropy -- and hence the Simkin constant γ -- purely from Monte Carlo data. This provides an independent thermodynamic route to a fundamental combinatorial constant. Thermodynamic integration yields γ MC = 1.946 0.003 at N = 1024, within 0.1\% of the precise combinatorial value γ = 1.94400(1). We further present a transfer-matrix-based tensor network formulation that encodes the non-attacking constraints into a rank-9 site tensor with 17 nonzero elements, providing a complementary exact-enumeration route.
Turn this paper into a full lesson
ArcXiv compiles a staged curriculum from this paper: 8-12 lessons across beginner → advanced, synthesised section guides, visuals, flashcards, a quiz, exercises, and on-demand deep dives per section. Grounded in the abstract, never invented.