Search arXiv⌕ Search

arXiv · 0808.4003

Counting Solutions for the N-queens and Latin Square Problems by Efficient Monte Carlo Simulations

Abstract

We apply Monte Carlo simulations to count the numbers of solutions of two well-known combinatorial problems: the N-queens problem and Latin square problem. The original system is first converted to a general thermodynamic system, from which the number of solutions of the original system is obtained by using the method of computing the partition function. Collective moves are used to further accelerate sampling: swap moves are used in the N-queens problem and a cluster algorithm is developed for the Latin squares. The method can handle systems of $10^4$ degrees of freedom with more than $10^10000$ solutions. We also observe a distinct finite size effect of the Latin square system: its heat capacity gradually develops a second maximum as the size increases.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Cheng Zhang, Jianpeng Ma. 2008-08-28. Counting Solutions for the N-queens and Latin Square Problems by Efficient Monte Carlo Simulations. https://doi.org/10.1103/physreve.79.016703

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Sharp Bounds on the Mean Efficiency of a Fluctuating Machine

The efficiency of a machine at the scale of thermal fluctuations is random, and the conventional ratio $-W/Q_h$ has no moment of any order: its input heat fluctuates through zero. We work instead with the exergetic ratio $η=W/(W+T_0S)$, which lies in $[0,1]$ pointwise for non-negative dissipation, and ask what the energy budget alone determines about its mean. With $α=T_0\langle S\rangle/W$ and $σ^2$ the relative variance of the dissipation, $1/(1+α)<\langleη\rangle\leσ^2/(1+σ^2)+1/\{(1+σ^2)[1+α(1+σ^2)]\}$, both ends sharp, with no distributional assumption. The floor is Jensen's inequality: fluctuating dissipation raises the mean efficiency above its deterministic value, and the mean alone gives nothing more. The ceiling is attained by an intermittently reversible law, dissipating nothing in a fraction $σ^2/(1+σ^2)$ of realisations, a prediction testable on trajectories. A third moment lifts the floor. Fixed delivered work is not required: when it too fluctuates, the bounds hold with the moments taken on $T_0S/W$, and the thermodynamic uncertainty relation on the work current converts the ceiling into a precision-efficiency frontier, whose zero-variance member is the known bound on a motor's ratio-of-means efficiency, shown here to be unsafe for the mean of the fluctuating ratio. Inside the interval lies the maximum-entropy benchmark $α^{-1}e^{1/α}E_1(1/α)$. Finally the bounds are worked out for a motor with futile cycles, observed until a fixed number of steps is delivered. There the dissipation cannot fall below the reversible cost of that work, and this floor $b$ sharpens the ceiling to $q/(1+αb)+(1-q)/(1+αc)$, $q=σ^2/[σ^2+(1-b)^2]$, $c=1+σ^2/(1-b)$, removing 40-67 per cent of the width. It is saturated when slips are rare: the extremal law is an operating regime, not an idealisation.

cond-mat.stat-mech↗

Amplified Memory and Finite-Time Regularity in Driven Non-Hermitian Systems

We study the roles of broken spectra and exceptional points in finite-time driven non-Hermitian fermionic dynamics. We compute the Nambu biorthogonal correlation matrix for this purpose. The imbalanced-pairing Kitaev chain serves as our concrete realization. Transient passage through a broken-spectrum region amplifies preparation memory. The effect survives when the final Hamiltonian returns to a real-spectrum regime. Negative imbalance forces spectral nonpositivity in the static endpoint state. We isolate the genuine drive history by subtracting out this baseline, leaving an excess that is strictly controlled by the accumulated imaginary-energy action and persists over the entire post-ramp time window. A connected longitudinal correlation mirrors this physics. Its slow-ramp growth tracks the corresponding doubled action. Unstable sectors instead continue amplifying post-ramp if the drive halts inside the broken-spectrum region. Exceptional points yield distinct physics. The finite-time propagator and subsystem correlation matrix remain entirely regular near an exceptional endpoint, even as the quasiparticle gap exhibits its characteristic square-root closing. This finite-time regularity reflects the analyticity of the matrix evolution in the endpoint parameter; a diagonalizable endpoint is strictly not required. A diverging long-time crossover eventually reveals the exceptional scale. We halt the drive exactly at the exceptional point to find that the correlation projector and the connected longitudinal correlation share an identical ballisti front. The subsystem saturation length establishes a distinct but comparable spatial scale. Memory and exceptional-endpoint scalings show no divergence across the tested negative-imbalance range. Memory scaling is fixed by the drive and remains insensitive to the specific choice of real-spectrum final endpoint.

cond-mat.stat-mech↗

Multidimensional dynamical centrality from Green functions in complex networks

Conventional centrality measures provide compact descriptions of node importance, but they emphasize specific structural relations and do not directly resolve the temporal and spectral organization of dynamical perturbation responses. Building on the Green function of a linearized networked system, we develop a multidimensional framework for dynamical node characterization. From the same response function, we extract three complementary indicators---Influence, Efficiency, and Distortion---that quantify cumulative response strength, temporal rate of response, and spectral concentration, respectively, together with a contribution matrix that resolves these quantities into source--target pathways. As a numerical demonstration, we apply the framework to weighted Kuramoto--Sakaguchi dynamics on heterogeneous Barabási--Albert networks. The three indicators distinguish implanted dynamical node classes through complementary dimensions of the perturbation response, while remaining strongly coupled to conventional topological centralities. These results demonstrate how a common dynamical response can be decomposed into distinct, physically interpretable characteristics rather than represented by a single aggregate descriptor. We finally discuss the scope and limitations of the linear-response assumption and extensions to time-dependent and nonlinear regimes.

cond-mat.stat-mech↗