Sparse Approximate Solutions to Linear Systems 2: An Exact Cover by 3-Sets Exists iff Its Incidence System Has a 1/2-Approximate Solution with at Most m/3 NonzerosResearch Paper
Motivation
Many problems in signal processing, statistics and function interpolation ask for a solution of a linear system that uses as few columns of as possible: a sparse approximate solution. Natarajan's 1995 paper Sparse Approximate Solutions to Linear Systems (SIAM J. Comput. 24(2):227–234) was motivated by radial basis interpolation, where each column corresponds to a basis function and fewer columns mean a cheaper interpolant. The paper does two things. It proves that finding the sparsest approximate solution is computationally hard (§2, Theorem 1), and it analyses a greedy column-selection algorithm whose number of chosen columns is within a factor, depending on the conditioning of , of the optimum (§3, Theorem 2; a separate mission of this series).
The hardness theorem is the reason the second half of the paper exists: once exact minimization is ruled out, one settles for approximation guarantees. It is cited throughout the compressed-sensing literature as the canonical statement that -minimization under an error constraint is NP-hard, and is the starting point for the later theory of when convex relaxations recover sparse solutions.
The argument follows the classical reduction from Exact Cover by 3-sets (X3C) to minimum-weight solutions of linear systems in Garey and Johnson (1979), pp. 221 and 246, adapted to an approximate right-hand side.
Setting
Sparse approximate solution (SAS). Given a matrix , a vector and a tolerance , find a vector with whose number of nonzero entries, written , is as small as possible. Here is the Euclidean norm.
Exact Cover by 3-sets (X3C). An instance is a ground set and a list of subsets of , each with exactly three elements. An exact cover is a sub-collection , , such that every element of occurs in exactly one set of .
The transformation. From an X3C instance build the SAS instance with
- the incidence matrix : if and otherwise, so column is the characteristic vector of ;
- the all-ones vector ;
- the tolerance .
In Lean, is Fin m, the collection is C : Fin n → Finset (Fin m) with hC : ∀ j, (C j).card = 3, an exact cover is an index set J with IsExactCover C J, the matrix is incidence C, the vector is onesVec m, is Matrix.toEuclideanLin (incidence C) x, and is nnz x.
Formalization targets
Goal: correctness of the reduction
For every X3C instance as above,
This is the sentence the proof of Theorem 1 (p. 228) establishes: "the constructed instance of SAS has a solution with or fewer entries if and only if the given instance of X3C has a solution."
Milestones
- Forward direction. If is an exact cover, the indicator vector satisfies and .
- Entry bounds. For every with , each entry of lies in .
- Lower bound on sparsity. For every such , .
- Exact cover from a sparse solution. If moreover , the sets with form an exact cover.
Significance
The result. The equivalence shows that deciding whether a sparse approximate solution with a prescribed number of nonzeros exists is at least as hard as X3C, which is NP-complete. Consequently no polynomial-time algorithm computes the optimum of SAS unless P = NP, and approximation algorithms such as the greedy method of §3 are the natural object of study. The same instance shows hardness persists for 0/1 matrices, a right-hand side of all ones and a constant tolerance, so the difficulty does not come from ill-conditioned data or from vanishing precision.
Formalizing it. The reduction is proved in the paper; this mission produces a machine-checked proof of its correctness, the combinatorial core of every NP-hardness claim for -constrained least squares. No prior machine-checked version is known to exist, on the platform or elsewhere. The complexity-theoretic wrapper is out of scope (see below).
Difficulty
The forward direction is a direct computation. The converse contains the only real step, which the paper passes over with "it is clear". From one gets only that every entry of is in ; the entries of themselves are arbitrary reals, possibly negative or not equal to , so need not be an indicator vector and need not hold. The exact-cover property must therefore be extracted from support sizes alone: every element is covered by some column in the support, the support has at most columns of three elements each, and a counting argument forces the chosen sets to be pairwise disjoint. Reading off a cover from the values of (for instance, taking the with ) does not work.
Formalization scope
- Vectors live in
EuclideanSpace ℝ (Fin m)andEuclideanSpace ℝ (Fin n), so‖·‖is the paper's . Using the sup norm ofFin m → ℝwould give a different statement. - The tolerance is exactly , as printed.
- The collection is indexed,
C : Fin n → Finset (Fin m): repeated sets are allowed and are distinct indices; an exact cover is a set of indices, and on the SAS side one nonzero entry is counted per index, so both sides treat duplicates consistently. - " or fewer" is written , never with natural-number division. With this form the equivalence holds for every (both sides are false when ), which absorbs the paper's "without loss of generality is a multiple of 3"; no divisibility hypothesis is assumed. For both sides are true.
- The hypothesis that every set has exactly three elements is essential for the converse (with , , , , , the vector solves with , yet has no exact cover since and must both be chosen) and is kept as
hC. - Not formalized: the infinite-precision RAM machine model, polynomial-time many-one reductions, polynomial-time computability of the transformation (evident: an 0/1 matrix), and the NP-completeness of X3C (cited by the paper from Garey–Johnson). The goal is therefore the correctness of the transformation, not a statement titled "SAS is NP-hard". A statement that only records the forward direction, or that fixes to be a 0/1 vector on the SAS side, would trivialize the converse and is not the target.
- Tools a solver will need are in Mathlib: coordinate bounds for the Euclidean norm (
PiLp.norm_apply_le),Finset.card_biUnion_le, andFinset.card_biUnionfor disjoint unions. Contributions of a reusable exact-cover API, or of a polynomial-time reduction framework that could later wrap this equivalence into an NP-hardness theorem, are welcome.
Selected references
- B. K. Natarajan, Sparse Approximate Solutions to Linear Systems, SIAM Journal on Computing 24(2):227–234, 1995. https://doi.org/10.1137/s0097539792240406
- M. R. Garey and D. S. Johnson, Computers and Intractability: A Guide to the Theory of NP-Completeness, W. H. Freeman, 1979 (X3C: problem [SP2], p. 221; minimum weight solution to linear equations: [MP5], p. 246).
- F. P. Preparata and M. I. Shamos, Computational Geometry: An Introduction, Springer, 1985 (the real RAM model). https://doi.org/10.1007/978-1-4612-1098-6