Linear Equations for Solving Partial Latin Squares and Sudokus

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autor principal: Pöppel, Ralf
Formato: Preprint
Publicado: 2025
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866918140358688768
author Pöppel, Ralf
author_facet Pöppel, Ralf
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2509_10472
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Linear Equations for Solving Partial Latin Squares and Sudokus
Pöppel, Ralf
General Mathematics
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.
title Linear Equations for Solving Partial Latin Squares and Sudokus
topic General Mathematics
url https://arxiv.org/abs/2509.10472