Hi Marek,
Following your post about proving the 1-ED-filling property by induction, here are some results. For bands of height 3 the property is now proven, for latin rectangles and for sudoku bands of any box width.
1. Boxes and twins. You are right that boxes add nothing for twins: in a complete band, a box is valid iff the column sets of its columns are disjoint, and that depends only on the column sets. But boxes do change which fillings are allowed, so the pattern is not the latin one. For 3 rows:
- Code: Select all
latin rectangle sudoku band, boxes 3 x w (n = 3w)
......... .........
........1 ........1
.......12 .....1..2 (here w = 3)
In general the third row is 2w−1 dots, then 1, then w−1 dots, then 2. This matches our computed 6x6 (3x2), 9x9 and 12x12 (3x4) results.
2. Theorem (k = 3). For a sudoku band of 3 rows with boxes 3 x w, the pattern above is the minlex-smallest alive one. Its filling is unique up to relabelling the digits and permuting the clue-free columns inside each box. The same holds for 3 x n latin rectangles, with the clues at n−1 and n and the clue-free columns permuted freely.
Rows 1 and 2. If row 2 has no clue, swapping rows 1 and 2 everywhere gives a twin. So the smallest candidate for row 2 is a single 1 at column n. With it, rows 1-2 of an alive filling form a single cycle: otherwise, swapping the two rows on a cycle that avoids the clue gives a twin. That this configuration is achievable follows from the cyclic construction below. The two 1s of the pattern are the same digit a, as both are the same character in the minlex string.
The digraph criterion. Assume rows 1 and 2 form a single cycle, with the only clue in those rows being a in row 2, column n. The free columns are those with no row-3 clue. For distinct free columns c and d, draw an arc c → d if the current row-3 digit of d occurs in row 1 or 2 of c and is available for reassignment. The digit a in row 2, column n, is fixed.
A directed cycle gives a twin by rotating the row-3 digits along it. Each digit then occurs in exactly two of the pairs left for rows 1 and 2. These pairs form cycles on the digits, so orient each cycle to assign one digit per row in each column, keeping a in row 2, column n.
Conversely, any twin that changes row 3 permutes its digits along directed cycles. If row 3 stays fixed, the clue fixes the orientation of the original cycle of rows 1 and 2.
Thus the filling is alive exactly when the digraph is acyclic.
Lower bound. With ‘.’ before digits, a third row minlex-smaller than the pattern either has all its clues after column n−w, or has the 1 at n−w and no other clue. A clue between n−w and n would make it larger, and at column n the smallest possible digit is already 2, since 1 is in the same row.
Out-degree argument. With no row-3 clue, with the sole row-3 clue equal to a, or with the sole row-3 clue in column n, every free column has an outgoing arc. Away from column n, at most one of the two candidate digits is unavailable. If column n is free, only its protected digit a is unavailable there. Hence the digraph contains a directed cycle, and a twin. This covers the latin case and the sudoku case “only the 1 at n−w”.
All row-3 clues in the last box (sudoku). We may assume the whole row 3 of that box is given. Each digit lies in three different boxes, in three different rows. So for each column of boxes 1-2, its row-3 digit appears exactly once in rows 1-2 of boxes 1-2. Every vertex then has an incoming arc, hence a directed cycle and a twin.
Why the filling is cyclic. Write the pairs in cycle order as (s_i, s_{i+1}) in column g_i, with g_n = n and s_1 = a. The two fixed row-3 digits are a and r3c_n.
A sink must contain both in its pair. Since g_n is excluded, the first sink is g_1, and r3c_n = s_2.
After deleting g_1..g_k, the unavailable target digits are s_1..s_{k+1} together with the row-3 digit of g_k. No remaining pair lies entirely in that prefix, and only g_{k+1} can join it to the one additional digit, since g_n is excluded. So if a vertex remains, the next sink is g_{k+1} and the row-3 digit of g_k is s_{k+2}.
There are n−2 vertices, so the other clue column is g_{n−1}. The last unused digit completes row 3, giving s_{i+2} in every column g_i, with indices taken modulo n.
Conversely, with row 3 given by s_{i+2} and the clues in g_{n−1}, g_n, every arc goes to a smaller index. The cyclic filling is therefore alive.
Boxes. In the cyclic filling, a column covers three consecutive digits of the cycle. A box is valid iff these triples partition the cycle, i.e. iff its columns are one residue class of positions mod 3. Column n has position n, and the clue column has position n−1, so it is in another box. The rightmost choice is column 2w = n−w. Conversely, assign the residue classes 0 and 2 to the last and middle boxes, and place g_n and g_{n−1} in their last columns. This realizes the stated pattern. For the latin rectangle, simply place g_{n−1} and g_n in columns n−1 and n.
Remark. The two 1s must be the same digit. Here is an alive, non-cyclic band (boxes of width 2) where they are not:
- Code: Select all
154236 ......
465312 .....2
326154 ...1.4
Its minlex third row is ...2.3, larger than ...1.2, so it does not affect the theorem.
3. k ≥ 4. The rotation of row k along a directed cycle still works. Repairing rows 1..k−1 is easy when they contain at most one clue: after the rotation the column/digit graph is (k−1)-regular bipartite, so it splits into k−1 perfect matchings, one per row, and the clue’s row gets the matching that contains its edge. What remains open is the repair when rows 1..k−1 contain several clues, which is the case in the triangular pattern.
Computer check (latin rectangles):
Rows 1..k−1 carry the minimal pattern with its cyclic filling, under every permutation of their clue-free columns. Row k is any compatible row.
In row k, one of the k−1 pattern clues is replaced by ‘.’. The cells to its left follow the pattern, and every cell of row k to its right is given.
For k = 4 (n = 5, 6, 7) and k = 5 (n = 6, 7), each of these 23,240 cases has a twin that changes at most 3 rows.
Two related references:
For k = n, the triangular pattern is Nelder’s critical set of size (n²−n)/2 for the back-circulant latin square.
In that language, twins are latin trades.
with the help of Claude (AI)
JPF