English

Sudoku Solving and Finding Magic Squares by Probability Models and Markov Chains

Other Statistics 2026-04-29 v1

Abstract

The sudoku puzzles have a long history, with variations going back more than a hundred years, but its current and perhaps surprising world-wide prominence goes back to certain initiatives and then puzzle-generating computer programmes from just after 2000. To solve a sudoko puzzle, a statistician can put up a probabilitymodel on the enormous space of 9×99\times9 matrix possibilities, constructed to favour `good attempts', and then engineer a Markov chain to sample a long enough chain of sudoku table realisations from that model, until the solution is found. The methods work also for other types of puzzles, like constructing `magic squares' with wished-for properties (sums of rows, columns, diagonals equal, etc.), as is also illustrated in this article; via magic models and equally magic Markov chains I find impressively magic 8×88\times8 and 10×1010\times10 squares.

Cite

@article{arxiv.2604.25402,
  title  = {Sudoku Solving and Finding Magic Squares by Probability Models and Markov Chains},
  author = {Nils Lid Hjort},
  journal= {arXiv preprint arXiv:2604.25402},
  year   = {2026}
}

Comments

11 pages, 5 figures. Statistical Research Report, Department of Mathematics, University of Oslo; will be submitted for publication

R2 v1 2026-07-01T12:38:49.837Z