arXiv:2611.06003cs.DMNov 2026

Manuscript Offprint

arXiv:2611.06003

How Unbalanced Must a Latin Rectangle Be?

Zhengyu Li, Vijay Ganesh

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

We view a k×nk \times n Latin rectangle as nn points in the grid [n]k[n]^k. Each symbol gives one point, and its coordinates are the columns that the symbol occupies. The rectangle is balanced when these points are pairwise equidistant in the ℓ1\ell_1 metric. Its imbalance measures how far the rectangle is from this ideal. We study the minimum imbalance from three sides. Constructively, we use a simulated annealing that moves symbols within rows and only penalises column clashes. Against the reference table of Voboril et al. (2025), it improves 33 of the 51 non-square values for 8≤n≤138 \leq n \leq 13, by up to 39.4%, and matches the rest. A cheap invariant, the row group, certifies that none of the 33 new rectangles is isotopic to rows of a group table. Hence the earlier column-swapping local search cannot reach any of them. Exactly, a computer-assisted branch and bound proves that the minimum imbalance of a 3×93 \times 9 rectangle is 56. Díaz et al. found this value, but its optimality was open. A sharper pruning bound, derived from the identity I = 2\sum(d-t)^+\, reduces the search tree by a factor of 2.4 to 3.3 on the instances withk≥3k \geq 3that we solve. Asymptotically, the minimum imbalance isΘ(n3)\Theta(n^3)for every fixedkk. A pigeonhole argument gives a lower constant of orderk4−kk 4^{-k}, and random rectangles give an upper constant of orderk\sqrt{k}. Fork=2k=2, the limit ofmin⁡I/n3\min I/n^3exists, a permuton attains it, and it lies between 4/375 and 0.1196. We compute the upper value exactly from one explicit permuton. Perfect balance is anℓ1\ell_1-equilateral problem, so it forcesk=Ω(n/log⁡n)k = \Omega(n/\log n)rows. For2×n2 \times nrectangles, single two-minute annealing runs improve five of the seven six-hour MIP upper bounds for14≤n≤2014 \leq n \leq 20. Finally, the kernel of the Lean 4 proof assistant checks every rectangle reported in this paper against a 74-line specification that imports only Lean's core library. We also prove the pigeonhole lower bound in Lean with Mathlib.

1 Introduction

In an agricultural field trial, the treatments occupy a grid of plots. When some pairs of treatments are systematically planted closer together than others, spatial correlation in the soil can bias their comparison [14]. Latin designs remove the row and column effects, but not this one. Spatially balanced Latin squares ask, in addition, that every pair of treatments be equally far apart on average [5, 9]. Díaz et al. [3] posed the same question for k×nk \times n rectangles, observed that perfect balance is then usually impossible, and asked instead for rectangles of minimum imbalance. Later work on the problem uses SAT encodings that prove optima with checkable proof certificates [11] and mixed-integer programming [10]. It also uses streamliners written by large language models [16] and LLM agents that reformulate models [15]. Closest to our work, Xia et al. [17] use simulated annealing for spatially balanced Latin squares and reach

*Georgia Institute of Technology. brian.li@gatech.edu

†Georgia Institute of Technology. vganesh45@gatech.edu the optimum for n=10n=10 and n=13n=13 in under a second. They also prove an Ω(n2)\Omega(n^2) lower bound on the imbalance of squares with n≡1(mod3)n \equiv 1 \pmod{3}, by a parity argument. The starting point of this paper is the reference table of Voboril et al. [16], which collects the best values that the methods above obtained for rectangles. To our knowledge, this table is still current. The later work [15] reports aggregate model comparisons but no per-instance values, and Xia et al. [17] treat only squares.

Here is the point of view of this paper. Record, for each symbol uu, the columns c1(u),…,ck(u)c_1(u), \ldots, c_k(u) that it occupies in the kk rows. This gives a point xu∈[n]kx_u \in [n]^k. The distance between two symbols that the literature uses is exactly the ℓ1\ell_1 distance ∥xu−xv∥1\|x_u - x_v\|_1. A balanced rectangle is therefore a set of nn points in a kk-dimensional grid that are pairwise equidistant in the taxicab metric. When kk is small compared with nn, the grid is too crowded for equidistance, and Section 7 makes this quantitative. When k=nk=n there is room, consistent with the existence of balanced squares for infinitely many nn. The point picture also suggests a search that moves individual points, rather than one that rearranges a rigid algebraic pattern.