Export citation

Export citation

Choose format for download:

Download Citation

    Statistical mechanics of the N-queens problem

    Zong-Yue Liu*, Hai-Jun Liao, and Lei Wang

    • *Contact author: 3042386730@qq.com

    Phys. Rev. E 114, 034125 – Published 14 September, 2026

    DOI: https://doi.org/10.1103/cx7m-n3d5

    Abstract

    The N-queens problem asks for the number Q(N) of ways to place N mutually nonattacking queens on an N×N chessboard. Simkin [M. Simkin, Adv. Math. 427, 109127 (2023)] proved Q(N)∼(N/eγ)N, and subsequent work [P. Nobel, A. Agrawal, and S. Boyd, Optim. Lett. 17, 1229 (2023)] refined the constant to γ=1.94400(1), settling the asymptotic behavior of this classical combinatorial problem. In this work, we pursue a thermodynamic-integration route in an unrestricted lattice-gas ensemble. We map the N-queens problem to a lattice gas with pairwise repulsive interactions along shared rows, columns, and diagonals, and we perform extensive Monte Carlo simulations for N=8−1024 with 108 sweeps per temperature point. The specific heat per queen Cv/N converges to a size-independent function with a broad, nondivergent maximum at T*≈0.235J, associated with a defect-proliferation crossover. This convergence, combined with the trivially exact high-temperature entropy S(∞)/N=1Nln(N2N), enables a thermodynamic integration of Cv/T that extracts the ground-state entropy and yields γMC=1.946±0.003 at N=1024, within 0.1% of the precise combinatorial value. The Simkin-Nobel value enters only as a benchmark; the thermodynamic route requires no prior knowledge of Q(N). We further present a transfer-matrix-based tensor-network formulation that encodes the nonattacking constraints into a rank-9 site tensor with 17 nonzero elements, providing a complementary exact-enumeration route.

    Physics Subject Headings (PhySH)

    Authorization Required

    We need you to provide your credentials before accessing this content.

    References (Subscription Required)

    Outline

    Information

    Sign In to Your Journals Account

    Filter

    Filter

    Article Lookup

    Enter a citation