# Room for one more column?

## The question

Take a finished covering array. Can you add one more column and keep every row as it is?

## Why it matters

Test plans change; knowing whether a new setting fits into the existing tests can save new test runs.

## What answering it would help with

The colouring rule decides such cases directly for small tables, and it frames the rest of the book.

## What our research shows

Sometimes yes and sometimes no: a table can take one more column exactly when its rows can be coloured 0 and 1 so that no required group of rows is all one colour, and this has been proved in Lean.

Chapters 1 to 4 were about finished tables: 29 arrays, each checked. This chapter asks a different question, and the rest of the book follows from it. It is also where the book says how those 29 arrays were made, because the rule below is the tool that built those at widths 200 to 206.

**Take a finished table. Can you add one more column, and keep every row as it is?**

In test language: a covering array has been designed for 200 switches. Someone asks for a 201st switch. Can you add it by writing one more 0 or 1 into each existing test, so that every group of switches still shows all its patterns, and without adding a single new test? We call this **one-column extension**.

### A small example

Start with the 16-row table that lists every pattern of four switches. It has strength 3 (indeed strength 4). Ask for a fifth column that keeps strength 3. There are 7,842 ways. Now take 8 rows: the three switches x, y, z written in all 8 ways, plus a fourth column x + y + z (counted mod 2). Every three switches show all 8 patterns, so this has strength 3. But there is no way to add a fifth column: this table is **finished** in a strong sense, a fixed point. A table that has room is not always the one you would guess. Anyone can recompute both counts from the colouring rule below; the Check it yourself guide gives the exact test.

### The rule that decides it

Pick two switches, say columns a and b, and one of the four settings of them, say a = 0 and b = 1. Look at the rows that show that setting. Call that set of rows a **pair class**. A new column keeps strength 3 exactly when it contains both a 0 and a 1 inside every pair class. If a pair class were all 0 in the new column, then the three switches a, b and the new one would never show the pattern 0, 1, 1.

So adding a column is a **colouring puzzle**. Colour each row 0 or 1 so that no pair class is all one colour. That is the whole of it, and Lean has checked it:

- **The class lemma** (every strength): a new column keeps strength t exactly when it takes both values on every class defined by t-1 of the old columns. Proved in Lean.
- **The support criterion** (strength four): for every choice of three old columns and every pattern on them, the rows showing that pattern must contain both a 0 and a 1 of the new column. Proved in Lean.

Both are in the 48-theorem Lean package shipped in this book; the Lean theorem table explains each theorem in plain words. The criterion itself is known in the literature (Kokkala's 2017 thesis, section 3.5, and Hiess's 2024 thesis); we claim no priority for it. Everything built on it in the next chapters is where our work is, and for each result the register of results says exactly what was proved and how it was checked.

### How the strength-four arrays of this book were made

The 29 strength-four arrays of this book grow from one piece of classical mathematics: R. E. A. C. Paley's 1933 construction from quadratic residues. There are three starting tables.

- **Widths 200 to 206.** I started from Christopher Smolen's CA(141; 4, 199, 2), a table of 141 rows and 199 columns in his ca-tools table (which he built from Paley's construction). He offers it under CC BY 4.0. I added columns one at a time with the rule above: each added column takes both values on every class of rows, and where a column needed it, I added a row. The 143 × 200 and 145 × 201 arrays keep every cell of his table unchanged. For widths 202 to 206 I went on to 148 rows and 206 columns, then removed rows one at a time, repairing each removal by changing cells in a local search, until 145 rows were left; the arrays for widths 202 to 205 keep the leading columns of the 145 × 206 array. This row-removal-and-repair step follows the post-optimization approach of Nayeri, Colbourn and Konjevod (2009; 2013): adjust a covering array to reduce its rows while keeping full coverage (Peyman Nayeri, Charles Colbourn and Goran Konjevod, Randomized postoptimization of covering arrays, IWOCA 2009, Lecture Notes in Computer Science, doi:10.1007/978-3-642-10217-2_40; journal version, Randomized post-optimization of covering arrays, European Journal of Combinatorics 34 (2013) 91-103, doi:10.1016/j.ejc.2012.07.017). The comparison table this book links lists post-optimization constructions for many of its rows (postop NCK, postop TJ-SA). No priority is claimed for this step.
- **Widths 325 to 328.** I started from Christopher Smolen's CA(165; 4, 324, 2), a table of 165 rows and 324 columns in his ca-tools table (which he built from Paley's construction). He offers it under CC BY 4.0. I added columns one at a time with the rule above: each added column takes both values on every class of rows, and where a column needed it, I added a row. The arrays keep every cell of his table unchanged, and no rows were removed. The added rows and columns are 1 and 1 at width 325, 2 and 2 at width 326, 4 and 3 at width 327, and 4 and 4 at width 328.
- **Width 223 and widths 329 to 345.** I computed the half-Paley array of order 359 from Paley's formula, so these arrays use no one else's file. Its 179 rows are the nonzero squares x modulo 359, its 358 columns are y = 1 to 358, and an entry is 1 when x + y is a nonzero square modulo 359. I cut it to the columns needed and removed rows one at a time in the same way: 153 rows at width 223, and 170 rows at each width from 329 to 345.

Keeping the leading columns of a wider array keeps every choice of four columns covered, so one search can serve several widths. The data file beside each array gives its exact construction: the starting table, how many rows and columns were added or removed, and the width it was cut from. Every array passes the check of every choice of four columns by two separately written programs (chapter 4). At each of the 29 widths the array has fewer rows than the smallest size listed at that width or wider in Smolen's living table at commit 0fc74c0 (chapter 3).

The arrays are free to share. They are offered under CC BY 4.0: anyone may share, redistribute and build on them, with credit to Sonny (gocheckyourself.org), the site that publishes this book. The arrays for widths 200 to 206 and 325 to 328 also carry Christopher Smolen's credit for the 141 × 199 and 165 × 324 tables they start from; he offers those tables under CC BY 4.0, which allows building on them with credit. A suggested credit line: "Covering array from Sonny, gocheckyourself.org, CC BY 4.0; built from Paley's construction (1933)", adding "starting from C. Smolen's CA(141; 4, 199, 2), ca-tools, CC BY 4.0" for widths 200 to 206, or "starting from C. Smolen's CA(165; 4, 324, 2), ca-tools, CC BY 4.0" for widths 325 to 328. The licence is summarised in [LICENSE-CC-BY-4.0.txt](../LICENSE-CC-BY-4.0.txt); as CC BY 4.0 asks, say so if you changed an array.

### What the rest of the book does with it

| Chapter | Question | What we found |
|---|---|---|
| 6 | Strength 2: can one more column be added? | The question is exactly the same as a famous hitting-set puzzle, monotone duality. It can be decided in quasi-polynomial time, and (assuming the Exponential Time Hypothesis) it is not NP-hard. |
| 7 | Strength 3: what makes a table easy? | Pair classes, a counting test, a local-lemma test, small cases. |
| 8 | Why do the obvious ways of proving hardness fail? | Eighteen walls: a written map of failed routes. |
| 9 | Is strength 3 hard after all? | Yes: NP-complete, and so is every fixed strength from 3 up. A Lean proof covers the construction's correctness. |
| 10 | Strength four: rules we use to build and extend arrays. | An exact rule for finishing a table with a few extra rows, growth that works but costs too much, lower bounds. |
| 11 | A 346th column for the 345-column array | Open for the 170-row array supplied here; the chapter gives the rule such a column must meet. |
| 12 | The Mirror Route and the Ladder | An attempt to turn strength 3 into a duality question, with a scoreboard. |
| 13 | Other kinds of tables | Three symbols instead of two. |
| 14 | More arrays | Small exact cases: a cyclic array, a non-extendible array, a proof about constant rows. |
| 15 | The collection of strength-2 arrays | A summary, with which arrays were fully re-checked. |
| 16 | The ledger | What did not hold, and what is still open. |

### What a reader should keep in mind

Every claim in these chapters is one of: a Lean theorem (status PROVED-Lean), a proof written on paper (PROVED-written), a finite computation (COMPUTED), a statement that holds only under a stated condition (CONDITIONAL), or an open question. The register gives the status of each, and the chapters never state a result more strongly than its status.

### Yesterday, today, tomorrow

**Yesterday.** Garn and Simos (2017, Problem 6; Garn's 2019 thesis, Problem 5.1.6) posed the question as parameter extension, with its complexity left open there. Kokkala (2017) and Hiess (2024) gave the colouring criterion and used SAT solvers to extend arrays.

**Today.** Sonny wrote the strength-2 and strength-3 results in the next chapters, other than those credited there to others (the class criterion is Kokkala's and Hiess's; the reverse reduction from duality to a table is Eiter and Gottlob's, who credit Seymour; the link between duality and colouring intersecting hypergraphs is Elbassioni's and Kokkala's), with checks and a Lean package for the finite parts, and used the criterion to build the strength-four arrays at widths 200 to 206 (above).

**Tomorrow.** The recipes work on any small binary array in plain text. A reader can try the colouring puzzle on their own tables, check the Lean files, or look for other tables that are finished in the sense above. Recommended further research: a Lean proof of the polynomial-time parts, and an outside review of the proofs that are only written.

## Check it yourself

Recipe 4 of the [check guide](../VERIFY.md) counts the valid new columns of five small tables; recipe 9 builds the Lean package that proves the rule.

## Where to go next

- Is the question easier at strength 2? [Chapter 6: strength two and duality](06-strength-two-and-duality.md).
- Is it hard at strength 3? [Chapter 9: strength three is NP-complete](09-strength-three-is-np-complete.md).
