Submitted:
12 June 2026
Posted:
29 June 2026
Read the latest preprint version here
Abstract
The Minimum Vertex Cover problem is NP-hard. The best known polynomial-time approximation ratio is~$2$, matching a Unique Games Conjecture lower bound of~\(2-\varepsilon\). Without the conjecture, a~\(\sqrt{2}-\varepsilon\) inapproximability threshold follows from the 2-to-2 games line of work under \(\mathrm{P}\neq\mathrm{NP}\). We present Salvador, an approximation algorithm that maps each connected component to a weighted bipartite planar auxiliary graph, solves the auxiliary weighted vertex-cover problem exactly by a min-cut formulation, decodes the selected incidence nodes back to original vertices, and prunes redundant vertices. The algorithm returns a valid vertex cover and runs in \(O(\hat n^{3/2})\) time on the reduced planar bipartite instance, where \(\hat n\) is the auxiliary size; in the linear-incidence regime this is \(O(n^{3/2})\) in the original graph size. Experiments extracted from np\_bench.txt cover $52$ NPBench clique-complement instances and return near-optimal covers with mean displayed ratio $1.042$ and maximum displayed ratio $1.192$ against the DIMACS reference values. These theoretical and experimental signals make Salvador a concrete candidate for a sub-\(\sqrt{2}\) analysis: proving a universal \(1.4=\sqrt{2}-\varepsilon_0\) bound, with \(\varepsilon_0=\sqrt{2}-7/5>0\), would imply \(\mathrm{P}=\mathrm{NP}\). The implementation is distributed via PyPI as the Salvador package, version v0.0.3.
Keywords:
vertex cover
; approximation algorithm
; bipartite graphs
; planar graphs
; P vs NP
MSC: 05C69; 05C70; 68Q25; 90C27
1. Introduction
The Minimum Vertex Cover (VC) problem is one of the twenty-one NP-complete problems identified by Karp [1]. Given an undirected graph , a set is a vertex cover if every edge of E has at least one endpoint in C; the goal is to find a minimum-cardinality vertex cover, denoted . Vertex cover is central to computer science, modelling guard placement, network monitoring, error-correcting codes, and serving as the canonical starting point for parameterised and approximation algorithms.
The approximation landscape for VC is unusually well charted. The classical maximal-matching algorithm achieves a 2-approximation in linear time [2]; LP-based refinements by Karakostas [3] and Karpinski and Zelikovsky [4] reach factor , which is but falls short of a constant . From the hardness side, Dinur and Safra [5] ruled out any ratio below under ; subsequently, Khot, Minzer, and Safra [6,7,8] proved the 2-to-2 games conjecture, strengthening this barrier to for any fixed under ; and under the Unique Games Conjecture [9], no constant ratio below is achievable [10]. A polynomial-time algorithm achieving a constant ratio would therefore resolve P versus NP.
Against this backdrop, we present an algorithm—implemented as the Salvador Python package (v0.0.3)—that, on the logged NPBench clique-complement instances, produces vertex covers with displayed ratios at most against the DIMACS reference values. The algorithm, called FindVertexCover, operates in three phases.
- 1.
- Preprocessing. Self-loops are discarded; isolated vertices are removed (they appear in no edge and need not be covered).
- 2.
- Bipartite planar reduction and weighted solve. For every connected component, the core routine constructs a weighted oriented-incidence auxiliary graph B. Each original edge creates an auxiliary edge between the incidence nodes and ; local consistency edges complete the planar bipartite gadget. Salvador then solves weighted vertex cover exactly on B by the integral bipartite LP/min-cut formulation.
- 3.
- Linear-time pruning.PruneRedundantVertices makes a single forward pass over the candidate cover C and removes every vertex all of whose neighbours are already covered, reducing without compromising validity.
The construction and pruning phases are linear in the input and auxiliary sizes. The dominant step is the bipartite weighted vertex-cover solve on the planar auxiliary graph, which costs when because for planar graphs. When the auxiliary incidence size is linear in the original graph size, this is .
1.0.0.1. Contributions
The main contributions of this paper are:
- A practical polynomial-time vertex-cover heuristic based on a weighted bipartite planar auxiliary reduction and an exact min-cut solve on the reduced instance.
- A TikZ-specified gadget that makes explicit how oriented incidences encode an original edge and local consistency around a vertex.
- An experimental study on 52 logged NPBench clique-complement benchmark graphs showing displayed ratios in (mean ).
- A conjecture that the universal approximation ratio is at most for the explicit constant . Since , any proof of this conjecture places the algorithm strictly below the inapproximability barrier established by the 2-to-2 games hardness results, directly implying .
- An open-source implementation, Salvador v0.0.3.
The paper is organised as follows. Section 3 describes the algorithm and provides pseudocode. Section 4 proves correctness. Section 5 analyses the approximation ratio and discusses consequences for vs . Section 6 establishes the time complexity. Section 7 reports the experimental results. Section 8 concludes.
2. Research Data
3. Description of the Algorithm
We present the pseudocode for the three components of the Salvador algorithm.
3.1. Main Algorithm
Algorithm 1 is the entry point. After cleaning the graph it solves each connected component through the bipartite planar auxiliary reduction and then applies the pruning pass to the union of the decoded component covers.
| Algorithm 1:FindVertexCover |
|
3.2. Bipartite Planar Gadget and Weighted Solve
Algorithm 2 implements the component-level reduction used by Salvador. The routine processes a mutable copy of the component, so each original edge is handled exactly once, at which point it creates the two oriented-incidence nodes and with weights and . The forcing edge encodes the original edge, while local cyclic edges couple consecutive oriented incidences in the processing order. The implementation verifies that the resulting auxiliary graph is bipartite and planar before calling the exact weighted bipartite vertex-cover solver.
| Algorithm 2:ComponentCover |
|
The weighted solve is exact on B: the vertex-cover linear program is integral on bipartite graphs, equivalently by Konig’s theorem [12] and the max-flow/min-cut theorem. The selected auxiliary cover is then decoded by first coordinate. The forcing edge is the key correctness device: covering it forces the decoded solution to contain u or v.
Figure 1.
Bipartite planar reduction gadget. The original edge becomes the forcing edge in the auxiliary graph. Any vertex cover of the auxiliary graph selects at least one endpoint of this forcing edge; decoding by first coordinate therefore selects u or v in the original graph.
Figure 1.
Bipartite planar reduction gadget. The original edge becomes the forcing edge in the auxiliary graph. Any vertex cover of the auxiliary graph selects at least one endpoint of this forcing edge; decoding by first coordinate therefore selects u or v in the original graph.

3.3. Linear-Time Pruning
Algorithm 3 removes redundant vertices from a candidate cover in a single forward pass, running in total time.
| Algorithm 3:PruneRedundantVertices |
|
4. Correctness of the Algorithm
Theorem 1.
Algorithm 1 always returns a valid vertex cover of the input graph G.
Proof.
We must show that every edge has at least one endpoint in the output C. Isolated vertices are removed in preprocessing and appear in no edge, so they need not be covered.
Component solve. Consider one connected component and any original edge . Algorithm 2 adds the forcing edge to the auxiliary graph B. The set S returned by MinWeightVertexCoverBipartite is a vertex cover of B, so at least one of and lies in S. If , the decoder places u in ; if , it places v in . Hence every edge of is covered by .
Union over components. Distinct connected components have no edges between them. Therefore the union covers all edges of the cleaned graph.
Pruning. A vertex is removed by Algorithm 3 only when every neighbour of v lies in C. In that case every edge incident to v is already covered by the neighbour side, so removing v leaves every edge covered. □
5. Approximation Ratio and Consequences for P vs NP
5.1. What Is Proved and What Is Conjectured
Let be the input graph. Write for the size of a minimum vertex cover of G, and let be the cover returned by Algorithm 1. The correctness theorem proves that is always feasible whenever the bipartite planar reduction succeeds. The weighted auxiliary objective is a surrogate objective: Salvador solves the weighted vertex-cover problem exactly on the auxiliary graph B, but the decoded cardinality is not claimed here to be exactly equal to .
The approximation statement studied in this paper is therefore the ratio
For the logged DIMACS clique-complement instances, is computed as from the published clique number of the original DIMACS graph ; rows marked † use a best-known clique lower bound and therefore give a displayed reference ratio rather than a certified ratio.
5.2. The Conjecture and the Inapproximability Threshold
The following algebraic observation is central to the paper’s main theoretical consequence.
Proposition 1
(). The value satisfies for the positive constant . In particular, .
Proof.
Direct computation: and , so . □
Empirically, across the 52 logged NPBench benchmark instances in np_bench.txt, the displayed ratio lies in with mean (Section 7). Eleven logged instances are solved to the displayed optimum. We formalise the empirical finding as a conjecture.
Conjecture 1
(Universal -approximation). For every undirected graph G, the Salvador bipartite planar reduction succeeds and Algorithm 1 returns a vertex cover with
where .
Conjecture 1 is conservative relative to the current benchmark log: the largest displayed ratio observed is . The value is the algebraically natural threshold because places the conjectured ratio strictly below.
5.3. Consequences for P vs NP
Theorem 2
(Implication for vs ). If Algorithm 1 achieves an approximation ratio at most on every undirected graph, then .
Proof.
Khot, Minzer, and Safra [6,7,8] proved the 2-to-2 games conjecture and derived from it that, for every , approximating Minimum Vertex Cover within a factor of is NP-hard. Since with , the ratio is exactly of the form for . Algorithm 1 runs in polynomial time (Theorem 3). A universal ratio by this algorithm therefore constitutes a polynomial-time -approximation, contradicting the 2-to-2 games NP-hardness result unless . □
Remark 1.
Theorem 2 is a conditional implication: the missing ingredient is a proof of the universal ratio bound. The implication itself does not rely on the Unique Games Conjecture. Three layers of evidence motivate Conjecture 1: (i) Theorem 1 establishes feasibility of every returned cover; (ii) on every logged instance the displayed ratio lies in , with the maximum already below the weaker Dinur–Safra threshold [5]; (iii) the explicit constant makes the conjecture algebraically precise rather than asymptotic. Under the Unique Games Conjecture, Khot and Regev [10] showed the stronger hardness barrier; a proved universal ratio of would also conflict with that conjectural barrier.
6. Runtime Analysis
Theorem 3.
Let be the input graph, and let B be the disjoint union of the bipartite planar auxiliary graphs constructed across all connected components. Put and . Algorithm 1 runs in
time. Since B is planar, , so the auxiliary solve is . Writing n for the reduced auxiliary size gives the advertised bound.
Proof.
Preprocessing removes self-loops and isolated vertices in time. Constructing the oriented-incidence auxiliary graph creates two incidence nodes per original edge and a linear number of forcing and local gadget edges, so it costs time. Bipartiteness and planarity checks are linear in the auxiliary size.
The weighted vertex-cover subproblem on B is solved exactly by the standard bipartite LP/min-cut formulation. Equivalently, the bipartite vertex-cover structure can be solved by a matching/flow routine with worst-case time on the auxiliary instance [13]. Finally, decoding the selected auxiliary vertices and pruning the original cover scan incidence and adjacency lists once. Hence the total time is . Planarity gives , and therefore the dominant term is . □
7. Experimental Study
7.1. Setup
We evaluated Salvador v0.0.3 on the NPBench vertex-cover clique-complement collection [14]. The instances are DIMACS Second Implementation Challenge maximum-clique graphs converted to vertex-cover instances by complementing the edge set. A clique of size in the original graph is an independent set of size in the complement , and therefore the corresponding minimum vertex-cover optimum is . We use the compiled DIMACS clique-number values of Mascia [15]; entries marked † use a best-known clique lower bound, so the displayed is an upper bound on the true optimum and the displayed ratio is not a certified approximation ratio.
The command used for the logged run was
equivalently batch_vega -i ./experiments/ -c -l. The log is stored as experiments/np_bench.txt and records, for each completed instance, parsing time, Salvador algorithm time, and returned cover size. The log contains 52 completed runs. Because the log does not contain a competing baseline, Table 2 reports only values directly recoverable from the log together with the DIMACS reference optimum used to compute the displayed ratio.
7.2. Approximation Ratios
Table 2 reports the reference optimum, Salvador cover size, displayed ratio, parsing time, and algorithm time.
Across the 52 completed runs in np_bench.txt, Salvador has mean displayed ratio , minimum , and maximum on san200_0.9_1. Eleven instances are solved exactly against the displayed reference values. Restricting to the 49 rows without † gives essentially the same summary: mean , minimum , and maximum .
7.3. Running-Time Analysis and the Role of Sparsity
The log reports parsing and algorithm time separately. Parsing is negligible at this scale: cumulative parsing time is s, with median ms and maximum ms. Algorithm time totals s across the 52 instances, with mean ms, median ms, minimum ms, and maximum ms on C1000.9. Total parse-plus-algorithm wall time is s.
7.3.0.2. Sparse and Structured Families
The Hamming, Johnson, c-fat, and MANN families show the strongest solution-quality behavior: Salvador is exact on many of these instances and stays within of the displayed optimum on the logged MANN cases.
7.3.0.3. Medium-Density and Planted Families
The C, gen, and san families are harder for the decoder. The largest displayed Salvador ratio in the run is on san200_0.9_1; the planted gen200_p0.9_55 case has displayed ratio .
7.3.0.4. Dense Families
The brock, keller, p-hat, san, and sanr families keep Salvador close to the displayed reference values. On brock200_2, Salvador returns 193 vertices against optimum 188; on the slowest logged instance, C1000.9, it returns 951 against the displayed best-known-reference bound .
7.3.0.5. Take-away
With the displayed DIMACS reference values, every empirical Salvador ratio in Table 2 lies below both the inapproximability threshold and the conjectured bound of . The table is evidence for the conjecture, not a worst-case proof; the conditional implication of such a proof is isolated in Theorem 2.
8. Conclusions
We have presented the Salvador algorithm, an approximate solver for the Minimum Vertex Cover problem that combines a bipartite planar oriented-incidence gadget, an exact weighted vertex-cover solve on the auxiliary graph, decoding by first coordinate, and a linear-time redundancy-pruning step. The algorithm always returns a valid vertex cover when the reduction succeeds (Theorem 1) and runs in time on the reduced planar auxiliary instance (Theorem 3).
Across the 52 completed NPBench clique-complement runs in np_bench.txt, the displayed approximation ratio ranges from to with a mean of . We conjecture a universal upper bound of (Conjecture 1). The central observation of this paper is that for the explicit positive constant , so the conjectured ratio lies strictly below the inapproximability threshold. By Theorem 2, which rests on the 2-to-2 games hardness results of Khot, Minzer, and Safra [6,7,8], any proof of a universal Salvador ratio at most would imply .
Future work includes: (i) establishing or refuting Conjecture 1 through structural analysis of the auxiliary decoder; (ii) characterising exactly which graph families always yield a bipartite planar auxiliary instance; and (iii) tightening the constants in the weighted solve and pruning phases on dense instances. The implementation is freely available as the Salvador package (v0.0.3) on PyPI [11].
References
- Karp, R.M. Reducibility Among Combinatorial Problems. In 50 Years of Integer Programming 1958–2008: From the Early Years to the State-of-the-Art; Springer: Berlin, Germany, 2010; pp. 219–241. [Google Scholar] [CrossRef]
- Papadimitriou, C.H.; Steiglitz, K. Combinatorial Optimization: Algorithms and Complexity; Courier Corporation: North Chelmsford (MA), 1998. [Google Scholar]
- Karakostas, G. A Better Approximation Ratio for the Vertex Cover Problem. ACM Trans. Algorithms 2009, 5, 1–8. [Google Scholar] [CrossRef]
- Karpinski, M.; Zelikovsky, A. Approximating Dense Cases of Covering Problems. In Proceedings of the DIMACS Series in Discrete Mathematics and Theoretical Computer Science, Providence, Rhode Island, 1996; Vol. 26, pp. 147–164. [Google Scholar]
- Dinur, I.; Safra, S. On the Hardness of Approximating Minimum Vertex Cover. Ann. Math. 2005, 162, 439–485. [Google Scholar] [CrossRef]
- Khot, S.; Minzer, D.; Safra, M. On Independent Sets, 2-to-2 Games, and Grassmann Graphs. In Proceedings of the Proceedings of the 49th Annual ACM SIGACT Symposium on Theory of Computing, Montreal, Québec, Canada, 2017; pp. 576–589. [Google Scholar] [CrossRef]
- Dinur, I.; Khot, S.; Kindler, G.; Minzer, D.; Safra, M. Towards a proof of the 2-to-1 games conjecture? In Proceedings of the Proceedings of the 50th Annual ACM SIGACT Symposium on Theory of Computing, Los Angeles, California, 2018; pp. 376–389. [Google Scholar] [CrossRef]
- Khot, S.; Minzer, D.; Safra, M. Pseudorandom Sets in Grassmann Graph Have Near-Perfect Expansion. In Proceedings of the 2018 IEEE 59th Annual Symposium on Foundations of Computer Science, Paris, France, 2018; pp. 592–601. [Google Scholar] [CrossRef]
- Khot, S. On the Power of Unique 2-Prover 1-Round Games. In Proceedings of the Proceedings of the 34th Annual ACM Symposium on Theory of Computing, Montreal, Québec, Canada, 2002; pp. 767–775. [Google Scholar] [CrossRef]
- Khot, S.; Regev, O. Vertex Cover Might Be Hard to Approximate to Within 2-ϵ. J. Comput. Syst. Sci. 2008, 74, 335–349. [Google Scholar] [CrossRef]
- Vega, F. Salvador: Approximate Vertex Cover Solver. 2026, Version 0.0.3. Available online: https://pypi.org/project/salvador (accessed on 11 June 2026).
- Konig, D. Graphen und Matrizen. Mat. Es Fiz. Lapok 1931, 38, 116–119. [Google Scholar]
- Hopcroft, J.E.; Karp, R.M. An n5/2 Algorithm for Maximum Matchings in Bipartite Graphs. SIAM J. Comput. 1973, 2, 225–231. [Google Scholar] [CrossRef]
- Nguyen, T.; Bui, T. NP-Complete Benchmark Instances Vertex cover DIMACS clique complements. 2025. Available online: https://roars.dev/npbench/.
- Mascia, F. The Maximum Clique Problem – DIMACS Benchmark Set Compiled clique-number values for DIMACS Second Implementation Challenge instances. 2015. Available online: https://iridia.ulb.ac.be/~fmascia/maximum_clique/DIMACS-benchmark.
Table 1.
Code metadata for the Salvador package (v0.0.3).
| Nr. | Code metadata description | Metadata |
|---|---|---|
| C1 | Current code version | v0.0.3 |
| C2 | Permanent link to code repository | https://github.com/frankvegadelgado/salvador |
| C3 | Permanent link to reproducible capsule | https://pypi.org/project/salvador/ |
| C4 | Legal Code License | MIT License |
| C5 | Code versioning system used | git |
| C6 | Languages, tools, and services used | Python ≥ 3.12, NetworkX ≥ 3.0 |
| C7 | Compilation requirements and dependencies | Python, NetworkX |
Table 2.
NPBench clique-complement vertex-cover experiment extracted from experiments/np_bench.txt. is computed from the DIMACS clique-number table [15]; † marks best-known, not certified, clique values. Times are milliseconds.
Table 2.
NPBench clique-complement vertex-cover experiment extracted from experiments/np_bench.txt. is computed from the DIMACS clique-number table [15]; † marks best-known, not certified, clique values. Times are milliseconds.
| Instance | Parse | Alg. | |||
|---|---|---|---|---|---|
| brock200_1 | 179 | 184 | 1.028 | 17.1 | 4192.0 |
| brock200_2 | 188 | 193 | 1.027 | 24.7 | 15255.0 |
| brock200_3 | 185 | 191 | 1.032 | 31.2 | 8296.4 |
| brock200_4 | 183 | 189 | 1.033 | 22.3 | 7264.8 |
| brock400_1 | 373 | 385 | 1.032 | 57.1 | 38880.3 |
| brock400_2 | 371 | 384 | 1.035 | 70.0 | 42005.5 |
| brock400_3 | 369 | 383 | 1.038 | 60.0 | 44912.0 |
| brock400_4 | 367 | 384 | 1.046 | 75.5 | 45628.1 |
| c-fat200-1 | 188 | 188 | 1.000 | 116.4 | 66467.3 |
| c-fat200-2 | 176 | 177 | 1.006 | 73.8 | 85894.9 |
| c-fat200-5 | 142 | 142 | 1.000 | 52.9 | 27365.7 |
| C1000.9 | ≤932 | 951 | 1.020 | 166.9 | 143665.8 |
| C125.9 | 91 | 94 | 1.033 | 22.5 | 257.3 |
| C250.9 | 206 | 214 | 1.039 | 25.7 | 3466.8 |
| C500.9 | ≤443 | 464 | 1.047 | 60.0 | 13496.0 |
| gen200_p0.9_44 | 156 | 170 | 1.090 | 26.9 | 1187.4 |
| gen200_p0.9_55 | 145 | 169 | 1.166 | 24.4 | 868.3 |
| gen400_p0.9_55 | 345 | 366 | 1.061 | 32.2 | 8786.5 |
| gen400_p0.9_65 | 335 | 362 | 1.081 | 63.6 | 8631.0 |
| gen400_p0.9_75 | 325 | 360 | 1.108 | 37.0 | 10609.0 |
| hamming10-2 | 512 | 512 | 1.000 | 61.8 | 3036.9 |
| hamming6-2 | 32 | 32 | 1.000 | 33.1 | 333.2 |
| hamming6-4 | 60 | 62 | 1.033 | 16.2 | 345.8 |
| hamming8-2 | 128 | 128 | 1.000 | 0.0 | 319.5 |
| hamming8-4 | 240 | 240 | 1.000 | 142.7 | 6647.7 |
| johnson16-2-4 | 112 | 112 | 1.000 | 22.3 | 779.3 |
| johnson32-2-4 | 480 | 480 | 1.000 | 61.5 | 7749.2 |
| johnson8-2-4 | 24 | 24 | 1.000 | 0.0 | 23.4 |
| johnson8-4-4 | 56 | 56 | 1.000 | 9.2 | 117.4 |
| keller4 | 160 | 164 | 1.025 | 14.1 | 4494.3 |
| MANN_a27 | 252 | 253 | 1.004 | 2.6 | 294.7 |
| MANN_a45 | 690 | 703 | 1.019 | 0.0 | 473.3 |
| MANN_a81 | 2221 | 2225 | 1.002 | 15.9 | 2834.3 |
| MANN_a9 | 29 | 29 | 1.000 | 0.0 | 16.1 |
| p_hat300-1 | 292 | 294 | 1.007 | 80.2 | 85573.4 |
| p_hat300-2 | 275 | 285 | 1.036 | 180.1 | 55464.7 |
| p_hat300-3 | 264 | 276 | 1.045 | 94.6 | 15246.7 |
| p_hat500-3 | ≤450 | 471 | 1.047 | 165.5 | 78912.2 |
| san200_0.7_1 | 170 | 185 | 1.088 | 50.2 | 9117.5 |
| san200_0.7_2 | 182 | 188 | 1.033 | 25.4 | 5512.1 |
| san200_0.9_1 | 130 | 155 | 1.192 | 7.1 | 1774.6 |
| san200_0.9_2 | 140 | 163 | 1.164 | 15.2 | 1736.4 |
| san200_0.9_3 | 156 | 171 | 1.096 | 10.0 | 2013.5 |
| san400_0.5_1 | 387 | 393 | 1.016 | 232.8 | 135755.1 |
| san400_0.7_1 | 360 | 380 | 1.056 | 142.1 | 69143.0 |
| san400_0.7_2 | 370 | 384 | 1.038 | 86.6 | 59137.5 |
| san400_0.7_3 | 378 | 388 | 1.026 | 72.5 | 40035.9 |
| san400_0.9_1 | 300 | 350 | 1.167 | 36.8 | 10906.9 |
| sanr200_0.7 | 182 | 188 | 1.033 | 12.2 | 6429.0 |
| sanr200_0.9 | 158 | 171 | 1.082 | 0.0 | 985.9 |
| sanr400_0.5 | 387 | 391 | 1.010 | 97.7 | 141881.3 |
| sanr400_0.7 | 379 | 386 | 1.018 | 178.4 | 84044.0 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.