How statement and proof provenance work
The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.
- Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
- AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
- AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.
These labels describe origin, not correctness: citations and verification chips remain separate evidence.
Approximation Algorithms and Gap Reductions: Examples and Counterexamples
1 · Prerequisites
- Approximation Algorithms and Gap Reductions
- Binary Operations, Monoids, Groups and Subgroups
- Classical NP-Completeness Reductions
- Construction of the Natural Numbers
- Construction of the Real Numbers via Cauchy Sequences
- Construction of the Real Numbers via Dedekind Cuts
- Countability and Uncountability
- Eulerian and Hamiltonian Graphs
- Finite Counting, Factorials and Binomial Coefficients
- Finite Probability Spaces and Random Variables
- Formal Languages, Encodings, and Decision Problems
- Foundations of the Real Numbers for Analysis
- Graphs, Walks and Connectivity
- Linear Recurrences and Rational Generating Functions
- Matchings, Covers, Menger and Network Flows
- P, NP, coNP, and Polynomial Reductions
- Relations, Functions, and Quotients
- Resource Bounds and Machine Invariance
- Rings, Subrings, Integral Domains and Fields
- Roots, Rational Powers, and Classical Inequalities
- Suprema and Infima
- The Cook--Levin Theorem
- The ZFC Axioms and the Basic Set Constructions
- Trees, Forests and Spanning Trees
- Turing Machines, Configurations, and Computation
2 · Summary
These examples check the page's definitions and reductions on small inputs. A concrete four-element set-cover instance runs the weighted greedy algorithm to completion, with OPT=4, unit charges, and the harmonic bound 25/3; the pointwise charge bounds are evaluated with the remaining count of each round. The four-vertex square metric gives an MST of weight 3, a doubled-tree Euler walk of cost 6, and a first-visit shortcut tour of cost 4, which is also optimal; the closing shortcut replaces a segment of length 3 with an edge of length 1.
Conditional expectation is run by hand on the triangle: the initial expectation is 3/2, fixing the first vertex leaves candidates 1 and 2 for the second, and either choice for the third returns a cut of two edges. The clause-literal graph of the two-clause formula (x or x or x) and (not x or not x or not x) has six vertices but independent-set number one, equal to the formula's maximum satisfied-clause count, exhibiting an L-reduction with both constants equal to one. A four-vertex path shows that a maximal matching of the middle edge yields the optimal cover of size two while the two outer edges realize the factor-two bound, refuting the claim that exact NP-hardness rules out constant-factor approximation.
3 · Logical flowchart
4 · Definitions, theorems and proofs
None yet.
5 · Examples, counterexamples and false statements
A four-element greedy set-cover charge calculation
Example
Take , of cost , of cost , and of cost . Greedy chooses then (input-order tie), charges each element , and costs . The pointwise bounds , , , are conservative: the actual charges satisfy them with equality only at the first index, and the correct uncovered count must be used at each round.
Facts & Assumptions
Given: The weighted set-cover instance with universe , listed sets , , of costs , and the weighted greedy algorithm run in the listed order.
The greedy algorithm chooses a listed set of positive newly covered count minimizing cost divided by that count, ties going to the smallest input index, and charges every newly covered element that same ratio; the total cost of the chosen cover is the sum of all charges. (Weighted greedy set cover and element charges)
With elements uncovered before a step, the chosen price is at most , and the -th element in first-coverage order receives charge at most for a universe of size . (The greedy charge on each newly covered element is at most OPT divided by the remaining count)
For this instance the greedy cover has total cost at most with and . (Weighted greedy set cover has approximation factor H_n, Harmonic numbers for set-cover analysis)
Verification
The cover has cost . Every cover containing costs at least , since costs are nonnegative; every cover not containing must contain to cover element and to cover element , hence costs at least . Therefore the minimum cover cost is .
Initially all four elements are uncovered, so and the ratios are for , for and for ; the minimum is attained by both and , and the input-order tie rule selects , which charges to each of the elements and . With elements uncovered, the ratios are for and for ; the algorithm selects and charges to each of and . The uncovered set is then empty, so the algorithm stops with cover of total cost .
At the first round and the chosen price satisfies ; at the second round and . Ordering the elements by first coverage, ties by input order, gives , so the four charges are all and satisfy for , namely , , , ; the first of these is an equality and the other three are strict. The sum of the charges is by [F3].
Thus the total greedy cost here equals the optimum , the pointwise charge bound of [F2] holds at each element with the remaining count actually in force, and the harmonic bound is strictly larger than both the greedy cost and the optimum; the example also shows the two bound forms at work: the per-round bound uses the remaining count of that round, while the per-element bound is the index-based consequence.
The clause graph is an L-reduction with constants one and one
Example
On the Max-3SAT-to-independent-set clause-literal graph, the optimum values are equal and every independent set of size decodes to an assignment satisfying at least clauses. Hence this explicit map is an L-reduction with , and any independent-set approximation ratio transfers with the same relative error to Max-3SAT.
Facts & Assumptions
Given: The clause-literal consistency construction that carries a 3-CNF formula with clauses of three literal occurrences to a simple graph with vertices, with and with a polynomial-time decoder from independent sets to assignments.
Vertices of are the literal occurrences, vertices in a clause are pairwise adjacent, vertices from distinct clauses are adjacent exactly when their literals are complementary, for every such formula, and an independent set of size yields in polynomial time an assignment satisfying at least clauses. (Clause-literal consistency graph preserves the Max-3SAT optimum)
An L-reduction from optimization problem to consists of polynomial-time maps and and constants with and . (L-reductions between optimization problems)
If L-reduces to with constants , then a feasible solution of relative error at most decodes to a solution of relative error at most whenever the target optimum is positive, and zero target optimum forces an optimal decoded solution; consequently L-reductions transfer approximation quality. (L-reductions compose and transfer PTAS and APX-hardness)
Both Max-3SAT and maximum independent set are maximization problems in the finite-instance model: the value of a feasible solution is nonnegative, and the optimum is the attained maximum, so a feasible solution's quality is measured by how far its value falls below the optimum. (Optimization problems and approximation ratios, Clique, independent set, and vertex cover decision problems)
Verification
Take the instance map of [F1], which runs in polynomial time and produces a finite simple graph whose independent sets have value . Take the decoder of [F1], which from every independent set of produces in polynomial time an assignment of satisfying at least clauses, of value equal to its satisfied-clause count. Both objectives are maximization with nonnegative values by [F4].
The first L-reduction inequality holds with : by the exact optimum equality of [F1], for every 3-CNF formula with three literal occurrences per clause.
The second L-reduction inequality holds with : writing for the number of clauses satisfied by the decoded assignment, [F1] gives , and therefore , where the last step uses and step 2.1.
Steps 2.1 and 3.1 exhibit the maps and constants required by [F2], so is an L-reduction from Max-3SAT to maximum independent set. By the transfer statement [F3], a feasible independent set with relative error at most , that is , decodes to a Max-3SAT assignment with relative error at most ; when the decoded assignment is optimal.
A concrete formula is with clauses of three literal occurrences. No assignment satisfies both clauses: true satisfies only the first and false satisfies only the second, so . The graph has vertices in two clause clusters of three; an independent set takes at most one vertex per cluster, and every vertex of the first cluster is complementary to every vertex of the second, so no independent set has size , while a single vertex is independent; hence , and an independent set of size decodes to an assignment satisfying at least clause.
The explicit clause-literal construction therefore is an L-reduction with constants : the optimum values agree, and every independent set of size decodes to an assignment satisfying at least clauses, so errors transfer unchanged and an independent-set approximation ratio carries over to Max-3SAT with the same relative error.
Minimum vertex cover refutes the exact-hardness approximation claim
Statement refuted
Minimum vertex cover has an NP-complete exact threshold problem and a deterministic polynomial-time -approximation. For the three-edge path , a maximal middle-edge matching returns the two middle vertices, the matching lower bound is one, and a maximal matching of the two outer edges returns all four vertices; the general theorem, not this single graph, establishes the uniform factor two. This refutes the unqualified claim that exact NP-hardness rules out every constant-factor approximation; it does not refute a conditional claim that no approximation exists unless .
Facts & Assumptions
Given: The universal claim under examination, and the minimum vertex cover problem on finite simple graphs.
The claim under examination is: if exact optimization of a problem is NP-hard, then no polynomial-time constant-factor approximation exists. (False: exact NP-hardness rules out constant-factor approximation)
VERTEX COVER, deciding whether a finite simple graph has a vertex cover of size at most , is NP-complete, where a vertex cover meets every edge. (INDEPENDENT SET and VERTEX COVER are NP-complete, Clique, independent set, and vertex cover decision problems)
Every maximal matching in a finite simple graph gives, in deterministic polynomial time, a vertex cover consisting of its endpoints with ; a matching is a set of pairwise disjoint edges, and a maximal matching is contained in no strictly larger matching. (A maximal matching gives a 2-approximate minimum vertex cover, Matchings, saturated vertices, maximal and maximum matchings, perfect matchings and )
A finite simple graph is a pair with finite vertex set and edges the two-element subsets of distinct vertices. (A finite simple graph is a finite vertex set together with a set of two-element vertex subsets)
Counterexample
Minimum vertex cover has NP-hard exact optimization: by [F2] its threshold problem is NP-complete, so a polynomial-time exact optimizer would decide an NP-complete problem and imply . Yet [F3] gives a deterministic polynomial-time algorithm that always returns a vertex cover of size at most . Thus the existence of a constant-factor approximation is compatible with exact NP-hardness and refutes the unqualified claim of [F1]; it does not establish or refute a lower bound conditioned on .
The four-vertex path with vertices and edges exhibits the two matchings. The single edge is a maximal matching whose endpoint set is a vertex cover: it meets at , itself, and at . One vertex meets at most two of the three edges, so no cover of size one exists and ; the matching lower bound is . Scanning edges in the order instead inserts the disjoint outer edges and , a maximal matching whose endpoint set is all of with , realizing the factor-two upper bound on this graph.
Minimum vertex cover has NP-hard exact optimization and a polynomial-time factor-two approximation by step 1.1, so it refutes the unqualified claim of [F1]. The path in step 2.1 illustrates the tightness of the factor but does not establish the uniform ratio; that is the content of the general theorem in [F3]. A conditional claim that approximation is impossible unless is not refuted here.
Conditional expectation derandomizes Max-Cut on a triangle
Example
Run the conditional-expectation algorithm on with vertices in that order. The initial expected cut size is . Fix . Setting leaves conditional expectation , while setting gives , so choose . The two choices for then both give final cut size . Thus the returned cut has edges.
Facts & Assumptions
Given: The complete graph on with edge set , so , and the independent fair bits of the conditional-expectation algorithm applied in the vertex order .
For a graph with edges the independent uniform placement crosses edges in expectation, and every placement crosses at most edges, so . (A random cut crosses half the edges in expectation)
The conditional-expectation algorithm fixes the vertices one at a time, choosing at each step the value of the next bit whose conditional expected final cut size is larger, with ties resolved by the value ; its conditional expectation is the average of the cut size over the equally weighted completions, and it is computable from the finished and unfinished edge contributions. (Conditional expectation yields a deterministic half-approximation for Max-Cut)
For Max-Cut the objective is the number of crossing edges and is the attained maximum over the finitely many placements. (Optimization problems and approximation ratios)
Verification
For the edge set has elements, so by [F1] the initial conditional expectation over no fixed bits is the expected cut size ; the algorithm of [F2] now fixes in order.
At the first step every one of the three edges has at least one unfixed endpoint, so each contributes to both candidates for and both conditional expectations equal ; the tie rule of [F2] selects . With fixed, the candidate finishes the edge as non-crossing and leaves and with an unfixed endpoint each, giving conditional expectation , while the candidate makes crossing and again leaves the other two edges half-crossing, giving ; since the algorithm fixes .
With and fixed, the candidate gives crossing edges and but not , a cut size of , and the candidate gives crossing edges and but not , also a cut size of ; both conditional expectations equal the actual final cut size because every edge is then finished, and the tie rule fixes .
The returned placement has cut against with crossing edges and , so its cut size is , and this equals , since a triangle placement crosses at most two of its three edges and the displayed cut crosses exactly two. The instance therefore realizes the conditional-expectation guarantee with the initial expectation .
Double-tree shortcutting on the four-vertex square metric
Example
Let the four vertices be , with the four cyclic side lengths and diagonals . For , the doubled-tree Euler walk has cost . First-visit shortcutting gives the tour of cost ; in particular the closing edge has length , at most the bypass of length . The MST has weight , the optimum tour has weight , and the output meets the bound.
Facts & Assumptions
Given: The four-vertex graph with distances and , the tree , and the doubled-tree algorithm.
A metric-TSP instance has nonnegative symmetric rational lengths with and the triangle inequality , a tour is a cyclic ordering with cost the sum of consecutive lengths including the closing edge, and all ties are resolved by fixed orders. (Metric traveling-salesperson problem)
A spanning tree of a graph is a spanning connected acyclic subgraph, its weight is the sum of its edge lengths, and a tree on vertices has exactly edges. (Spanning trees of a graph, Real edge-weighted graphs, total tree weight and minimum spanning trees, A tree on vertices has edges)
Doubling the edges of a spanning tree and shortcutting an Euler circuit in first-visit order yields a Hamiltonian tour of cost at most , with each shortcut edge bounded by the length of the walk segment it replaces. (Euler-tour shortcutting of a doubled tree does not increase metric cost)
A minimum spanning tree satisfies , and the double-tree algorithm returns a tour of cost at most in polynomial time. (A minimum spanning tree lower-bounds metric-TSP optimum, Double-tree shortcutting is a 2-approximation for metric TSP)
Verification
The six stated distances are nonnegative and symmetric with ; every distance between distinct vertices is or , so for any three vertices with one has , and inserting or gives the equality . The triangle inequality therefore holds and the data form a metric-TSP instance on four vertices.
The edge set has vertices, edges, and forms the path , hence is connected and acyclic, a spanning tree; its weight is . Every spanning tree of a four-vertex graph has exactly edges by [F2] and every edge length is at least , so every spanning tree has weight at least ; therefore is a minimum spanning tree and .
Every tour is a cyclic ordering of the four vertices and consists of four edges, each of length at least , so every tour has cost at least ; the cyclic ordering has cost . Hence .
Doubling the three tree edges produces the multigraph with edges ; it is connected and the degrees are , , , , all even. The closed walk uses each of the six edges exactly once, so it is an Euler circuit of the doubled multigraph, with total cost .
The vertices occur for the first time along this walk in the order , so first-visit shortcutting yields the tour . Its segments are the walks , , of length each and the return segment of length ; the shortcut edge has length , the sum of the segment lengths, so the shortcut tour has cost , and by step 2.2 it equals .
The computed tree satisfies , in agreement with the minimum-spanning-tree lower bound, and the shortcut tour has cost , so this instance realizes the double-tree guarantee of [F4] with a strict improvement over the doubled walk.
Sources
- Williamson and Shmoys, The Design of Approximation Algorithms, §1.6 Algorithm 1.2 and Theorem 1.11, printed pp. 25–26
- Arora and Barak, Computational Complexity: A Modern Approach, §18.2.5 Lemma 18.16, printed pp. 359–361
- Williamson and Shmoys, The Design of Approximation Algorithms, §16.2 Definition 16.4 and Theorems 16.5–16.6, printed pp. 413–414
- Ghaffari, Advanced Algorithms, Lecture 1: Approximation Algorithms I, §2.2.2 Theorem 8, PDF pp. 4–5
- Cornell CS 4820, Lecture notes on randomized approximation algorithms, §1.1.2 conditional-expectation procedure, PDF pp. 2–3
- Williamson and Shmoys, The Design of Approximation Algorithms, §2.4 Theorem 2.12 algorithm and proof, printed pp. 45–46