SearcharxivSearch

arXiv · 2509.10472

Linear Equations for Solving Partial Latin Squares and Sudokus

Abstract

For Latin squares the units (rows and columns) have fixed sum. The same holds for rows, columns, and blocks in Sudokus. Summing the elements of a unit yields a linear equation, and the set of all such equations forms a system of linear equations that models the relations of the variables in Latin squares and Sudoku puzzles. Every completed Latin square or Sudoku satisfies this system, enabling analysis and completion of partially filled puzzles. The linear system provides necessary but not sufficient conditions for a solution. We analyze the structure and rank of these systems and establish limits on their ability to uniquely determine solutions. For Latin squares of size $n \times n$ with $k$ unknowns and Sudokus with block size $n = m \cdot l$, the system has full rank only if \[ k \leq 2n - 1 \quad \text{(Latin squares)}, \qquad k \leq 2n - 1 + (l - 1)(m - 1) \quad \text{(Sudokus)}. \] These conditions are necessary for uniqueness under the linear model, though counterexamples exist. We also highlight that this system captures only one of the three relations known to puzzle solvers, requiring extensions with additional (nonlinear) constraints for complete solutions. Our analysis shows that certain partial Latin squares and Sudokus can be solved in polynomial time using Gaussian elimination, placing them in complexity class P, while the general completion problem remains NP-complete.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Ralf Pöppel. 2025-08-26. Linear Equations for Solving Partial Latin Squares and Sudokus. https://arxiv.org/abs/2509.10472

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

KEEP EXPLORING

Related papers

Average Chord Lengths in a Triangle

Let $P$ be a point inside a triangle $T$. We consider the average length of the chords of $T$ through $P$, where the direction of the chord is chosen uniformly. An elementary formula is obtained in terms of the distances from $P$ to the sides and vertices of the triangle. Several classical triangle centers give especially simple specializations. For example, if $I$ is the incenter, then \[ M_T(I)=\frac{2r}{\pi} \log\left(\cot\frac A4\cot\frac B4\cot\frac C4\right). \] Our main result is the sharp inequality \[ M_T(P)\le \frac{p}{\pi\sqrt3}\log(2+\sqrt3), \] valid simultaneously for every triangle of perimeter $p$ and every interior point $P$. Thus, among all such pairs $(T,P)$, the largest possible average chord length occurs only when $T$ is equilateral and $P$ is its center. The proof is an elementary symmetrization argument. We close with brief remarks relating the problem to the radial center of a convex body, the electrostatic potential center of a triangle, and dual quermassintegrals.

math.GM

A Proof of Liu's Conjecture on the Fundamental Triangle Inequality

Let $a,b,c$ be the side lengths of a triangle, and let $R$ and $r$ denote its circumradius and inradius, respectively. We prove a conjecture of Liu stating that \[\sum_{\mathrm{cyc}} \left(\frac{a(b+c-a)}{bc}\right)^k \geq 2+\left(\frac{2r}{R}\right)^k,~~k>1, \] with the reverse inequality for $0<k<1$. The proof reduces the problem to three positive variables with fixed sum and product. We also determine the equality cases.

math.GM