# Strength three is NP-complete, and so is every higher fixed strength

## The question

Is there a fast way to decide whether a finished strength-3 table can take one more column, or is the problem NP-complete?

## Why it matters

NP-completeness means that no fast exact method is expected to work for every table.

## What answering it would help with

It tells planners to choose search or approximate methods instead of hunting for an exact fast rule.

## What our research shows

Yes: deciding whether a strength-3 table can take one more column is NP-complete (a written proof; Lean checks that the construction is correct), and so is every higher fixed strength (the raising lemma that lifts the problem from one strength to the next is proved in Lean; putting it together with the hub-row reduction to get NP-completeness is a written proof).

This chapter states the covering-array results of the hardness family. They are results about one decision problem on tables. They are not about any other question.

### The problem

**One-column extension at strength t.** Input: a binary covering array of strength t. Question: can one more column be appended, keeping every row and adding none, so that the result still has strength t?

A problem is **NP-complete** if (a) a proposed answer can be checked quickly (here: a proposed column is checked in time O(N k²)), and (b) every problem of that checkable kind can be turned into it by a polynomial-time translation. No polynomial-time algorithm is known for any NP-complete problem. Chapter 6 described how the strength-2 case is quasi-polynomial and, assuming the Exponential Time Hypothesis, not NP-hard. The results below say that at strength 3 the situation changes.

### The results

| Result | Statement | Status |
|---|---|---|
| **The hub-row reduction** | One-column extension of binary strength-3 covering arrays is NP-complete. | PROVED-written; the correctness of the construction is Lean-checked (PROVED-Lean for that part); polynomial time is written, not formalised |
| **The raising lemma** | Raising lemma: from a table M of strength t one builds a table M' of strength t+1 that extends if and only if M extends. Hence one-column extension is NP-complete for **every fixed strength t ≥ 3**. | PROVED-Lean (raising lemma and size bounds). That the problem is NP-complete at every fixed strength, by composing the raising lemma with the hub-row reduction, is PROVED-written |
| **Distinct rows** | The problem stays NP-complete when all rows of the table are different. | PROVED-written |
| **Thin tables** | It stays NP-complete when the table is nearly square (about as many rows as columns), and with all rows different, at every fixed strength. | PROVED-written |

### The construction in plain words

The source problem is *positive 3-uniform not-all-equal satisfiability*: given m clauses of three variables each, can every variable be set to 0 or 1 so that no clause is all 0 or all 1? (Equivalently: can a set system whose members have three elements be two-coloured so that no member is a single colour? This problem is NP-complete by a theorem of Schaefer (1978), which we use as given.)

From the clauses, the construction writes a table with **k = 4m + 2 columns** and about m³ rows. Each clause owns four columns. Some pairs of columns are *designated*; one row for every column (a *hub* row) marks which designated pairs it carries; one row for every variable marks the clauses it appears in; and, for every set Y of at most three columns containing no designated pair, a padding row that is 0 exactly on Y is written twice. The point of the padding is to make every group of three columns show all eight patterns, whatever the clauses are. Two things are then true for every input:

1. the table has strength 3 (proved in Lean), and
2. the table can take a new column **if and only if** the clauses can be satisfied (proved in Lean).

If the input is malformed, the translation outputs a fixed table with no room (the odd-parity 8 × 4 table: the eight words of length 4 with an odd number of ones, the complement of the parity table of chapter 5). If there are no clauses, it outputs the 3-cube, which has room.

The main idea, which the failed attempts of chapter 8 led to, is that a new column is a colouring of the *rows*. A satisfying assignment gives a colouring that splits every pair class, and the other way round. Each column carries a *star* of hub links, so that it need only flip one hub row; it does not have to be a near-solution of the whole source problem.

### The raising lemma

Let M have strength t. Add a column w. Keep the old rows with w = 0. Add every row with at most t + 1 zeros with w = 1, each written twice. Then M' has strength t + 1, and M' can take a new column at strength t + 1 exactly when M can at strength t. Applying it t − 3 times to the output of the hub-row reduction gives hardness at strength t. The padding grows like k^(t+1): polynomial for a fixed strength, which is all that is claimed. Nothing is claimed for strength growing with the input.

### Distinct rows and thin tables

The padding rows of the hub-row reduction are written twice, so rows repeat. The distinct-row version writes each padding row once and colours it by the parity of its number of zeros (a *parity lemma*), removes *twin* variables (variables that appear in exactly the same clauses) before building, and outputs a fixed small table when at most one clause survives. The thin-table version shrinks the padding from about m³ rows to O(log m), using a small three-symbol covering array, so the hard tables have about as many rows as columns.

### How it was checked

- **Lean** proves, for every input, that the output of the hub-row reduction has strength 3 and extends exactly when the source is satisfiable, and proves the raising lemma and its size bounds. The files for the raising lemma are part of the 48-theorem package shipped in this book. The files for the hub-row reduction are in a separate hardness folder. **What Lean does not cover:** the running time of the translation (written in the notes, not formalised); the NP-completeness of the source problem (taken from Schaefer); and whether the Lean definitions match the plain statements above (read them to judge).
- **Computation.** For the hub-row reduction, 1,359 small source puzzles were run through the construction and compared with brute-force satisfiability in the working notes; 36 are unsatisfiable; there is no disagreement. The hub-row folder ships the written proof and the written polynomial-time argument. The check is a recipe anyone can follow: rebuild the table from a source by the construction in the proof, test strength 3 directly, search for a new column by brute force, and compare with brute-force satisfiability. It was rerun on all 1,024 clause families on five variables and 11 named sources (the Fano plane among them), with agreement throughout. A proof rebuilt from the theorem statement alone found no error; that is a check of the argument, not an outside referee's report. For the raising lemma and the distinct-row version, both were rebuilt from the written proofs and checked: 202 small raising cases and 19 full strength-four reductions; and all 1,359 sources for the distinct-row version.
- **The thin-table version** was read line by line in a separate reading; computer checks agree with brute force on more than 2,000 small puzzles. It has not yet been rechecked a second time.

### Prior art and credit

The decision problem is posed in the literature as the *decisional parameter extension* problem (Garn and Simos 2017, Problem 6; Garn's 2019 thesis, Problem 5.1.6; Kampel's thesis and the Kampel-Simos survey repeat the search version), with the complexity left open there. In the sources we checked (the Kampel-Simos survey, Kampel's thesis and Garn's thesis, read in the working notes) we found no statement that it is NP-complete. Seroussi and Bshouty (1988) remains unread; priority depends on completing that literature check (frontier not yet checked). The pair-class criterion that the proofs use is in Kokkala (2017) and Hiess (2024). The equivalence between detecting arrays and covering arrays of one more strength is in Colbourn and McClary (2008) and Shi, Tang and Yin; our part concerns the extension problem only.

### What this suggests

These theorems indicate that, for tables of strength 3 or more, deciding whether a finished table can take one more column is a hard problem in the usual sense, in contrast with strength 2. Further research is recommended on the cases not covered: alphabets with four or more symbols, strength growing with the input, and approximation versions. Nothing here is a claim about any other question.

### Lean sources and status

The Lean source files for the hub-row reduction are in the hardness folder; those for the other results of this book that are not in the 48-theorem package are in the rules folder. They were rebuilt for this edition with Lean 4.34.1 against the pinned Mathlib revision: every file compiled without errors and without admitted steps, and every listed theorem depends only on the standard axioms (some on none). That is a check by the Lean compiler on one machine. Lean's own replay checker (leanchecker) also passed on both folders, and the second kernel checker nanoda 0.4.26 accepted exports of the listed declarations (hardness folder: 12 declarations, 5,195 declarations checked; rules folder: 29 declarations, 7,503 declarations checked). Unlike the 48-theorem package, these files have not had a fresh-directory build with a pinned dependency cache, and no outside reader has looked at them. The Check it yourself guide gives the commands. Two comment lines in the header of the main hardness file, and one comment line of the rules file on the repair clique, were edited; no other byte differs from the project files. After the last edit both folders were compiled again with the same results, and leanchecker passed again.

## Check it yourself

Recipe 8 of the [check guide](../VERIFY.md) compares the construction with brute force on small sources; recipe 10 builds the hardness Lean folder and recipe 9 the package with the raising lemma.

## Where to go next

- What exact rules hold for strength four? [Chapter 10: strength four rules and bounds](10-strength-four-rules-and-bounds.md).
- What happens with three settings per switch? [Chapter 13: other kinds of tables](13-other-kinds-of-tables.md).
