Preprint
Article

This version is not peer-reviewed.

An Approximate Solution to the Minimum Vertex Cover Problem: The Salvador Algorithm

Submitted:

03 July 2026

Posted:

06 July 2026

You are already at the latest version

Abstract
The Minimum Vertex Cover problem is NP-hard. Its classical polynomial-time approximation ratio is 2, and Khot and Regev showed that, assuming the Unique Games Conjecture (UGC), no polynomial-time algorithm can achieve a factor 2 − ε for any fixed ε > 0. We present FINDVERTEXCOVER, an algorithm that reduces any graph to a linear-size planar forest core via a weighted Minimum Independent Dominating Set (MIDS) gadget and solves that gadget with an accuracy-controlled Baker-style PTAS whose layering width is k = ⌈1/ε⌉; non-core edges are then covered by a greedy repair step and a final redundancy-pruning p ass. For any fixed ε the algorithm runs in near-linear time and always returns a valid vertex cover. We include a reproducible experiment, stored in the car/ folder, that computes exact optima without MILP through a branch-and-bound maximum-independent-set solver, with K˝onig/maximum-matching certificates on bipartite i nstances. Under the default call ε = 0.1, across 1,718 feasible graphs—the graph atlas through seven vertices, random and structured bipartite families, grids, and random general graphs—every returned cover is valid and the maximum ratio is 7/4 = 2 − 1/4, attained by an explicit eleven-vertex bipartite graph; no instance exceeds 7/4. We therefore conjecture a universal 7/4 approximation ratio, a bound that the experiment shows is tight. If this 7/4 bound were proved, then, under the standard assumption P ≠ NP, the Khot–Regev UGC-based hardness theorem for Vertex Cover would force the Unique Games Conjecture to be false. An open-source implementation is released as the Salvador package (v0.0.6).
Keywords: 
;  ;  ;  ;  

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 G = ( V , E ) , a set C V 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 τ ( G ) . 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 2 Θ ( 1 / log n ) , which is 2 o ( 1 ) but falls short of a constant 2 ε . From the hardness side, Dinur and Safra [5] ruled out any ratio below 10 5 21 1.3606 under P NP , and under the Unique Games Conjecture [6], Khot and Regev [7] showed that no polynomial-time algorithm can approximate Minimum Vertex Cover within factor 2 ε for any fixed ε > 0 . Thus a proved constant sub-2 approximation ratio for a polynomial-time algorithm would have direct consequences for the Unique Games Conjecture, conditional on the standard belief that P NP .
Against this backdrop, we present an algorithm—implemented as the Salvador Python package (v0.0.6)—that, on every instance we have tested under the default call ε = 0.1 , produces a vertex cover whose size never exceeds 7 / 4 = 2 1 / 4 of the known optimum, a bound attained by an explicit bipartite witness. 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.
Reduction and kernel solve. The core routine SolveVC reduces the cleaned graph G to a weighted MIDS instance on a planar forest-core gadget H and solves H with an accuracy-controlled Baker-style PTAS [8] of layering width k = 1 / ε . All non-core edges are then covered by a greedy repair step.
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 | C | without compromising validity.
For any fixed ε all phases are bounded by O ( 1 / ε ) passes over vertices and edges, giving an overall complexity of O ( n + m ) / ε , where n = | V | and m = | E | ; this is near-linear for fixed ε .

Contributions

The main contributions of this paper are:
  • A practical vertex-cover algorithm with a linear planar forest-core reduction and an accuracy-controlled Baker-style weighted MIDS solver, running in O ( ( n + m ) / ε ) time (near-linear for fixed ε ).
  • A weighted MIDS gadget that encodes the planar forest core as a minimum-weight independent dominating set instance; because the gadget is itself a forest, the Baker PTAS solves it (near-)exactly, so the decoded set is a (near-)minimum cover of the core.
  • A reproducible experiment, stored in the car/ folder, that computes exact optima without MILP and evaluates the default call ε = 0.1 on the graph atlas, bipartite families, grids, and random general graphs.
  • An empirical conjecture that the universal approximation ratio under the default call is at most 7 / 4 = 2 1 / 4 . Across 1 , 718 feasible graphs the maximum ratio is exactly 7 / 4 (an explicit eleven-vertex bipartite witness) and no instance exceeds it, so the conjectured bound is tight.
  • A conditional UGC consequence: under P NP , any proof of a universal 7 / 4 ratio for this polynomial-time algorithm would refute the Unique Games Conjecture via the Khot–Regev hardness theorem.
  • An open-source implementation, Salvador v0.0.6, in which the accuracy parameter ε drives the Baker PTAS.
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 the Unique Games Conjecture. Section 6 establishes the time complexity. Section 7 reports the experimental results. Section 8 concludes.

2. Research Data

The algorithm is implemented in the Python package Salvador, freely available on the Python Package Index [9]. The current version is v0.0.6; the accuracy parameter ε drives the Baker PTAS layering (Remark 1). Code metadata is summarised in Table 1, and the local reduction gadget is depicted in Figure 1.

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 delegates to SolveVC and then applies the pruning pass.
Algorithm 1 FindVertexCover ( G , ε )
Require: 
Undirected graph G = ( V , E ) , accuracy parameter ε ( 0 , 1 ] (default ε = 0.1 ; smaller ε gives a more thorough solve, see Remark 1)
Ensure: 
A vertex cover C V
1:
Remove all self-loops from G
2:
G G { v V : deg G ( v ) = 0 } ▹ isolated vertices are in no edge
3:
if  E = then return
4:
end if
5:
C , _ SolveVC(G,ε)
6:
adj { v N G ( v ) : v V }
7:
C PruneRedundantVertices(adj, C)
8:
return C

3.2. Weighted MIDS Gadget and Planar Solve

Algorithm 2 implements the reduction from Vertex Cover to weighted Minimum Independent Dominating Set on a planar core, invokes the ε -controlled Baker PTAS pass, and repairs non-core edges in one scan.
Algorithm 2 SolveVC ( G , ε )
Require: 
Planar or non-planar graph G = ( V , E ) , parameter ε
Ensure: 
A vertex cover C V of G
1:
G p , removed S p a n n i n g F o r e s t C o r e ( G ) ▹ Union-Find; G p is planar
2:
N | V ( G p ) | ;    P N + 1 ▹ hub penalty
3:
H new graph
4:
for  v V ( G p ) do
5:
    Add nodes ( v , 0 ) with weight 1 and ( v , 1 ) with weight 0 to H
6:
    Add edge { ( v , 0 ) , ( v , 1 ) } to H
7:
end for
8:
for  ( u , v ) E ( G p ) do
9:
    Add hub node h u v with weight P to H
10:
    Add edges { ( u , 0 ) , h u v } and { ( v , 0 ) , h u v } to H
11:
end for
12:
S B a k e r P t a s W e i g h t e d I D S ( H , ε ) ε -controlled PTAS on the forest gadget H
13:
C { v V ( G p ) : ( v , 0 ) S } ▹ decode cover (near-minimum core cover)
14:
for ( u , v ) E ( G p ) with u C and v C do▹ repair core edges
15:
     C C { arg max w { u , v } deg G ( w ) }
16:
end for
17:
for ( u , v ) removed with u C and v C do▹ repair non-core edges
18:
     C C { arg max w { u , v } deg G ( w ) }
19:
end for
20:
return C
The pass BakerPtasWeightedIDS (Algorithm 3) is the accuracy-controlled weighted-IDS solver invoked by Salvador. It layers the gadget by BFS distance, removes each residue class modulo k = 1 / ε in turn, solves the remaining components exactly by tree-decomposition dynamic programming, greedily repairs the removed slab, and keeps the lightest independent dominating set found over the k shifts; the greedy maximal independent set of Algorithm 4 is the k = 1 baseline and a safe fallback. Because the gadget H built from a forest core is itself a forest (Section 3), each component is a tree and the per-component solve ExactWeightedIDS is an exact linear-time tree dynamic program; which shifts the PTAS explores, however, depends on ε , so the decoded cover is parameter-sensitive and need not be monotone in ε .
Remark 1 
(On the accuracy parameter ε ). The public entry pointfind_vertex_coverfixes the default ε = 0.1 , which is the configuration analysed throughout this paper. The parameter controls the Baker layering width k = 1 / ε ; ε 1 ( k = 1 ) reduces to the greedy maximal-independent-set baseline of Algorithm 4. The gadget construction is itself ε-independent; ε enters only the IDS pass. The returned cover depends on ε through the layer choices, and on the vertex ordering through the spanning-forest construction, so it is sensitive to both. As Section 7 reports, some hard bipartite instances are solved optimally under one labelling yet incur a positive gap under a permuted labelling. All claims below refer to the default call ε = 0.1 on the canonical (sorted) labelling used by the experiment.
Algorithm 3 BakerPtasWeightedIDS ( H , ε )
Require: 
Weighted gadget H, accuracy ε ( 0 , 1 ]
Ensure: 
An independent dominating set S V ( H )
1:
k max { 1 , 1 / ε }
2:
if  k = 1 thenreturnGreedyWeightedMIS ( H )
3:
end if▹ cheap baseline
4:
BFS-distance layering of H
5:
S G r e e d y W e i g h t e d M I S ( H ) ;    best w ( S )
6:
for  i 0 to  k 1 do
7:
     R { v : ( v ) i ( mod k ) } ▹ removed slab
8:
     S i
9:
    for each connected component K of H [ V ( H ) R ]  do
10:
         S i S i E x a c t W e i g h t e d I D S ( K ) ▹ tree-decomposition DP
11:
    end for
12:
    greedily add the cheapest still-undominated vertices of R to S i
13:
    if  S i is a valid IDS and w ( S i ) < best  then
14:
         S S i ;    best w ( S i )
15:
    end if
16:
end for
17:
return  S
Algorithm 4:GreedyWeightedMIS ( H ) k = 1 baseline
Require: 
Weighted gadget H with vertex weights w ( · ) { 0 , 1 , P }
Ensure: 
A maximal (hence independent dominating) set S V ( H )
1:
Partition V ( H ) into buckets B 0 , B 1 , B 2 by weight 0, 1, and P
2:
Let the processing order be B 0 , then B 1 , then B 2
3:
S ;    X X is the excluded set
4:
forv in processing order do
5:
    if  v X  then
6:
         S S { v } ;    X X { v } N H ( v )
7:
    end if
8:
end for
9:
return S
Figure 1 shows the local gadget introduced for each core edge ( u , v ) E ( G p ) in Algorithm 2. The nodes ( u , 0 ) and ( v , 0 ) are the weight-one cover-choice nodes, ( u , 1 ) and ( v , 1 ) are zero-weight pendant nodes, and the hub h u v has penalty weight P = N + 1 .
As illustrated in Figure 1, the gadget H is always planar because G p is a forest and H is a subdivision of G p augmented with pendant leaves ( v , 1 ) ; subdivisions of planar graphs are planar, and appending pendant leaves preserves planarity. The hub weight P = N + 1 enforces coverage inside the core: in any optimal MIDS for H, including a hub is more expensive than selecting all vertex nodes. The SpanningForestCore routine builds G p by Union-Find in one pass over E and records each cycle-closing edge in removed for the final repair scan.

3.3. Linear-Time Pruning

Algorithm 5 removes redundant vertices from a candidate cover in a single forward pass, running in O ( n + m ) total time.
Algorithm 5 PruneRedundantVertices ( adj , C )
Require: 
Adjacency map adj , candidate cover C V
Ensure: 
Valid vertex cover C C after one forward redundancy-removal pass
1:
C mutable copy of C
2:
L fixed snapshot of the elements of C ▹ Python iterates list(cover)
3:
for  v L (in snapshot order) do
4:
    if  N G ( v ) C then▹ test against the current (shrinking) set C
5:
         C C { v }
6:
    end if
7:
end for
8:
return  C

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 ( u , v ) E 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.
Core path. The Baker PTAS pass returns a feasible IDS S of the gadget H. The variable edge { ( v , 0 ) , ( v , 1 ) } guarantees that at least one of ( v , 0 ) , ( v , 1 ) is dominated for every v V ( G p ) . The repair loop then adds one endpoint of every core edge not yet covered by the decoded set C = { v : ( v , 0 ) S } , ensuring all core edges are covered.
Core and repair path. Let G p = ( V , E p ) be the spanning-forest core, with E p E and V ( G p ) = V . The weighted MIDS pass and residual repair produce a cover C valid for G p . Every edge in E E p is inspected in the repair loop: if neither endpoint is in C, the higher-degree endpoint is added. After the loop every edge of E has at least one endpoint in C.
Pruning. A vertex v C is removed by Algorithm 5 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 the Unique Games Conjecture

5.1. Structural Setup and Notation

Let G = ( V , E ) be the input graph with n = | V | and m = | E | . Write τ ( G ) for the size of a minimum vertex cover of G and let τ * = τ ( G ) . Let G p = ( V , E p ) be the spanning-forest core, let H be the weighted MIDS gadget of Algorithm 2, and set τ p * = τ ( G p ) .

5.2. Gadget Cost Identity

Lemma 1 
(Cost identity). For any planar graph G with n vertices and gadget hub penalty P = n + 1 , the minimum weighted MIDS cost of H equals τ * : τ H * = τ ( G ) .
Proof. 
Lower bound ( τ H * τ * ). Let S be any feasible MIDS of H. For each hub h u v S , both ( u , 0 ) and ( v , 0 ) must be in S, so the edge ( u , v ) is covered by C S = { v V : ( v , 0 ) S } . Any hub h u v S contributes weight P = n + 1 > n τ * , so any solution containing a hub has cost exceeding τ * . Hence the minimum-cost MIDS S * contains no hub and C S * is a valid vertex cover of G with cost ( S * ) = | C S * | τ * .
Upper bound ( τ H * τ * ). Let C * be an optimal vertex cover with | C * | = τ * . Define S * = { ( v , 0 ) : v C * } { ( v , 1 ) : v C * } . Every hub h u v has at least one of ( u , 0 ) , ( v , 0 ) in S * because C * covers ( u , v ) ; every variable-edge node is dominated by its companion. Thus S * is a valid MIDS of H with cost ( S * ) = | C * | = τ * , giving τ H * τ * .    □
In Algorithm 2 the gadget is built from the spanning-forest core G p , so Lemma 1 applies with the core G p in the role of G, yielding τ H * = τ ( G p ) . Because H is a forest, the per-component tree dynamic program is exact; the Baker PTAS, however, only explores the k = 1 / ε layer shifts, so at a fixed ε the decoded set is a near-minimum—not necessarily minimum—cover of the core. The total approximation loss is this layering slack plus the greedy repair of the non-core edges E E p ; both are bounded experimentally in Section 7.

5.3. Elementary Bounds

Proposition 1 
(Elementary bounds). For every graph G with n vertices and m edges, the cover C returned by Algorithm 1 satisfies | C | min { n , m } and is a valid vertex cover. Consequently | C | / τ ( G ) n / τ ( G ) , which is finite but not a constant in general.
Proof. 
Validity is Theorem 1. The decoded core cover has size at most | V ( G p ) | = n , each repair step adds at most one vertex and is triggered at most once per edge, so | C | n and | C | | core cover | + m ; pruning only removes vertices.    □

5.4. Linear Core Guarantee

Theorem 2 
(Core cover guarantee). For any input graph G, Algorithm 2 covers every edge of the spanning-forest core G p before the final repair scan and covers every edge of G after the repair scan.
Proof. 
The MIDS pass produces an independent dominating set of H. Decoding selects each v whose node ( v , 0 ) appears in this set. If a core edge ( u , v ) E p is not covered by the decoded set, the residual core-repair loop adds one endpoint, so all edges of G p are covered. The final repair loop scans E E p and adds one endpoint for every still-uncovered edge, so every original edge is covered.    □

5.5. Non-Planar Case

Lemma 2 
(Subgraph optimality). τ p * τ * .
Proof. 
Any vertex cover of G is also a vertex cover of G p G .    □
Proposition 2 
(Repair bound). For any input G, Algorithm 1 adds at most one repair vertex per edge in E E p after the core solve.
Proof. 
The repair loop visits each edge in E E p once. It does nothing when an endpoint is already in C and otherwise adds exactly one endpoint. Thus the number of repair additions is at most | E E p | .    □
In practice the repair adds far fewer vertices than Proposition 2 suggests, because most removed edges are already covered by the near-optimal core solution on G p . The experimental data in Section 7 confirms that the default call consistently achieves ratios well below 7 / 4 .

5.6. A Lower Bound and the 7 / 4 Hypothesis

The exact experiments force a lower bound on the worst-case ratio of the default call that matches the conjectured upper bound.
Proposition 3 
(A lower bound of 7 / 4 on the worst-case ratio). There is an explicit bipartite graph on which Algorithm 1 with ε = 0.1 returns a cover of size 7 while τ ( G ) = 4 , so the worst-case approximation ratio of the default call is at least 7 / 4 . No approximation factor smaller than 7 / 4 can hold for this configuration.
Proof. 
Take G on vertices { 0 , , 10 } with edge set
{ ( 0 , 7 ) , ( 0 , 8 ) , ( 0 , 9 ) , ( 0 , 10 ) , ( 1 , 7 ) , ( 1 , 8 ) , ( 1 , 9 ) , ( 1 , 10 ) , ( 3 , 7 ) , ( 3 , 8 ) , ( 3 , 9 ) , ( 3 , 10 ) , ( 4 , 7 ) , ( 4 , 9 ) , ( 4 , 10 ) , ( 5 , 7 ) , ( 5 , 8 ) , ( 5 , 9 ) } .
All edges run between { 0 , 1 , 3 , 4 , 5 } and { 7 , 8 , 9 , 10 } , so G is bipartite, and { 7 , 8 , 9 , 10 } is a cover of size 4; a maximum matching has size 4, so by Konig’s theorem τ ( G ) = 4 , certified without MILP. At ε = 0.1 the algorithm returns a cover of size 7, so the ratio is 7 / 4 . The instance is stored verbatim in the car/ results.    □
We state the matching empirical upper-bound hypothesis below.
Conjecture 1 
(Universal 7 / 4 approximation). For every undirected graph G, Algorithm 1 with the default parameter ε = 0.1 returns a vertex cover C with
| C | 7 4 τ ( G ) = ( 2 1 4 ) τ ( G ) .
Conjecture 1 is not a theorem. It is motivated by the reproducible experiment in Section 7, where, across 1 , 718 feasible graphs with exact optima, the maximum ratio is exactly 7 / 4 and no instance exceeds it. Together with Proposition 3, this makes the conjectured bound tight: a witness attains 7 / 4 , so the worst-case ratio of the default call is conjectured to be exactly 7 / 4 . The threshold 7 / 4 = 2 1 / 4 lies strictly below the UGC threshold of 2, with margin δ = 1 / 4 > 0 .

5.7. Why the 7 / 4 Ceiling Holds Across Graph Classes

The behaviour under the default call rests on two mechanisms in series. First, because the gadget H built from the forest core is itself a forest, the per-component tree dynamic program is exact, so the decoded set is a near-minimum vertex cover of the core G p (Lemma 1); the residual loss is the layering slack plus the greedy repair of the non-core edges E E p . Second, the final redundancy-pruning pass deletes any vertex all of whose incident edges are already covered. Across natural families the core solve already covers almost all edges, so the ratio stays at or near 1; it inflates only on graphs where many non-core edges survive the core solve at the default layering, and even then it never exceeded 7 / 4 . We survey the main classes below; Table 2 summarises them.

Classes solved optimally.

On stars  K 1 , k the core is the whole star, whose minimum cover is the centre alone; the decode returns it. On a matching the core is the matching itself and the decode returns one endpoint per edge. Forests and trees (paths, caterpillars, spiders, brooms) and cycles are solved exactly because the gadget reproduces the tree optimum. The experiment reports ratio 1 on every path, cycle, clique, star, complete-bipartite, wheel, grid, and barbell instance tested.

Dense and degree-heterogeneous classes.

Complete graphs K n have τ = n 1 ; the spanning-tree core is solved and the dense non-core edges are absorbed, returning the optimal ( n 1 ) -cover. Wheels W n , barbell and lollipop graphs concentrate their optima on hub or clique vertices captured by the core solve, and chordal and interval graphs on simplicial hubs. Random general graphs ( n 12 ) stay at mean ratio near 1 with maximum 5 / 4 .

Bipartite and planar classes: the stress region.

For bipartite graphs Konig’s theorem makes τ equal to the maximum matching, which is also how we certify the optima here. These are the graphs that most stress the default call: when many edges fall outside the spanning-forest core, the default layering ( k = 10 ) can decode a core cover whose non-core repair overshoots. Random bipartite graphs reached 3 / 2 , and a bipartite hill-climbing search reached 7 / 4 , producing the extremal witness of Proposition 3. Grids and other bounded-treewidth planar families are milder, topping out at 4 / 3 , because the forest core captures n 1 of the at most 3 n 6 edges and only O ( n ) non-core edges reach the repair.

The hard witness, and why it stops exactly at 7 / 4 .

The extremal instance of Proposition 3 is an eleven-vertex bipartite graph on which the default call returns 7 against optimum 4, ratio 7 / 4 . A relabel and edge-order stress sweep of a smaller seven-vertex bipartite obstruction reaches 5 / 3 , and the exhaustive graph atlas through seven vertices ( 1 , 245 graphs) tops out at 4 / 3 . No tested instance exceeded 7 / 4 , and one attains it, so Conjecture 1 is tight: the 7 / 4 = 2 1 / 4 ceiling coincides with the proven worst case (Proposition 3) and lies strictly below the UGC threshold 2. The ratio is sensitive to vertex ordering—the seven-vertex obstruction is solved optimally under its canonical labelling yet reaches 5 / 3 under permutations—so the worst case reflects the interaction of the default layering with the input ordering rather than an intrinsic limit of the gadget.

5.8. Conditional Consequence for the Unique Games Conjecture

Theorem 3 
(UGC consequence of a universal 7 / 4 bound). If Conjecture 1 were proved, then Algorithm 1 would be a polynomial-time 7 / 4 -approximation for Minimum Vertex Cover. Consequently, under the standard assumption P NP , the Unique Games Conjecture would be false.
Proof. 
The runtime theorem (Theorem 4) gives polynomial, indeed near-linear, time for the default fixed ε = 0.1 . A proof of Conjecture 1 would therefore give a polynomial-time approximation ratio 7 / 4 = 2 δ with δ = 1 / 4 > 0 . Khot and Regev [7], assuming the Unique Games Conjecture [6], showed that Vertex Cover is hard to approximate within factor 2 δ for every fixed δ > 0 . Therefore, if P NP , the simultaneous truth of UGC and Conjecture 1 would be impossible. Hence a proof of Conjecture 1 would refute UGC under P NP .    □
Remark 2. 
Theorem 3 is conditional. The experiment neither disproves UGC nor proves a 7 / 4 approximation theorem; its role is to sharpen the research question. The empirical evidence is compatible with a constant ( 2 δ ) phenomenon with δ = 1 / 4 ; the largest observed ratio is exactly 7 / 4 , so the conjectured bound is tight rather than conservative, and any single instance above 7 / 4 would refute it.

6. Runtime Analysis

Theorem 4. 
For a fixed accuracy ε ( 0 , 1 ] , Algorithm 1 runs in worst-case time O ( n + m ) α ( n ) + 1 / ε , where n = | V | , m = | E | , and α is the inverse Ackermann function. For the default ε = 0.1 this is near-linear.
Proof. 
We bound each phase.
Preprocessing. Removing self-loops and isolated vertices is one scan of the edge list and one scan of the vertex list, costing O ( n + m ) .
Spanning-forest core.SpanningForestCore initialises the disjoint-set forest in O ( n ) and performs mUnion/Find pairs, one per edge. With union by rank and path halving a sequence of m operations on n elements costs O ( n + m ) α ( n ) in the worst case, tight for path-compression heuristics [10].
Gadget size. For a forest core G p with | E p | n 1 edges, the gadget H has | V ( H ) | = 2 n + | E p | 3 n 1 vertices and | E ( H ) | = n + 2 | E p | 3 n 2 edges, so H is built in O ( n ) . Crucially H is itself a forest, hence of treewidth 1.
Baker PTAS pass.BakerPtasWeightedIDS uses k = 1 / ε shifts. Each shift removes one BFS residue class, splits the rest into components, and solves each by the tree dynamic program ExactWeightedIDS; since H is a forest, this DP runs in time linear in the component size, so one shift costs O ( | V ( H ) | + | E ( H ) | ) = O ( n ) . The greedy repair of the removed slab and the validity/weight checks are also O ( n ) per shift. Over k shifts the pass costs O ( k n ) = O ( n / ε ) . Decoding the cover is O ( n ) .
Repair and pruning. The two repair loops inspect each edge of E p and of removed = E E p once, with O ( 1 ) degree look-ups, costing O ( n + m ) . PruneRedundantVertices builds the adjacency map in O ( n + m ) and makes one pass of total work v C deg G ( v ) = O ( n + m ) .
Summing, the union-find pass contributes O ( ( n + m ) α ( n ) ) and the Baker pass contributes O ( n / ε ) ; all other phases are O ( n + m ) . The total is O ( n + m ) ( α ( n ) + 1 / ε ) , near-linear for fixed ε .    □
Remark 3. 
Because the gadget H is a forest, the minimum-weight independent dominating set of H can in fact be computed exactly in O ( n ) time by a single tree dynamic program, making the Baker layering unnecessary in principle; the layered PTAS is retained because the implementation reuses the general bounded-treewidth solver. The α ( n ) union-find factor can likewise be removed by building the spanning-forest core with a depth-first traversal, yielding a strictly O ( n / ε ) algorithm if desired.

7. Reproducible Experiment

The repository ships the reproducibility suite in the car/ folder, which records, for every tested graph, the cover returned by the default call, the exact optimum, the ratio, and a validity flag, together with the family-level summary of Table 3.
The experiment avoids MILP entirely. For every tested graph the optimum is computed exactly: on bipartite instances by maximum matching and Konig’s theorem, and otherwise by a deterministic branch-and-bound maximum-independent-set solver via
τ ( G ) = | V ( G ) | α ( G ) .
The candidate solver is salvador.algorithm.find_vertex_cover under the default call ε = 0.1 , and the reported ratio for a graph is | C | / τ ( G ) .
The suite has the following components: (i) the NetworkX graph atlas, i.e., all nonempty graphs on 2 n 7 vertices; (ii) an explicit seven-vertex bipartite obstruction together with a relabel/edge-order stress sweep of it; (iii) random bipartite graphs and a bipartite hill-climbing search, the latter producing the extremal witness of Proposition 3; (iv) bipartite grids; and (v) random general graphs for n 12 . In total the run considers 1 , 718 feasible graphs, all of which receive valid covers.
Table 3 reports the results. The maximum ratio anywhere is exactly 7 / 4 , attained by the eleven-vertex bipartite hill-climb witness of Proposition 3; no instance exceeds 7 / 4 . The seven-vertex obstruction is solved optimally under its canonical (sorted) labelling, giving ratio 1, while its relabelled and edge-order variants reach 5 / 3 ; this illustrates that the gap is driven by the interaction of the default layering with the input ordering.
The takeaway from Table 3 is that across 1 , 718 feasible graphs with exact optima the default-call ratio never exceeds 7 / 4 , with one witness attaining it. This does not prove Conjecture 1; it provides the empirical evidence that motivates the UGC-relevant 7 / 4 formulation of Theorem 3, and, since the bound is attained, shows it cannot be tightened for this configuration. Should a future run exhibit a graph whose default-call ratio exceeds 7 / 4 , the conjecture would have to be revised, exactly as the experiment is designed to detect.

8. Conclusion

We have presented the Salvador algorithm, an approximate solver for the Minimum Vertex Cover problem that combines a weighted MIDS gadget construction with an accuracy-controlled Baker-style PTAS and a redundancy-pruning step. The algorithm always returns a valid vertex cover (Theorem 1) and runs in near-linear time for any fixed accuracy ε (Theorem 4).
Because the gadget built from the forest core is itself a forest, the per-component tree dynamic program is exact, so the decoded set is a near-minimum cover of the core and the residual loss is the layering slack plus the repair of non-core edges. Under the default call ε = 0.1 , across 1 , 718 feasible graphs with exact optima, the ratio never exceeds 7 / 4 , a value attained by an explicit eleven-vertex bipartite witness. This motivates Conjecture 1: a universal 7 / 4 approximation hypothesis. Proposition 3 proves a matching 7 / 4 lower bound, so the conjectured ceiling is tight for this configuration.
The theoretical consequence is UGC-focused rather than a direct complexity-class equality claim. If Conjecture 1 were proved, then Salvador would be a polynomial-time 2 δ approximation with δ = 1 / 4 > 0 . By the Khot–Regev UGC-based hardness theorem for Vertex Cover [7], such a proof would refute the Unique Games Conjecture under the standard assumption P NP .
Future work includes: (i) establishing or refuting Conjecture 1 through structural analysis of the non-core repair step; (ii) understanding the parameter sensitivity that makes the default ε = 0.1 overshoot where larger ε recovers the optimum; (iii) isolating graph families that force the largest residual repair; and (iv) extending the weighted MIDS framework to dominating set, independent set, and set cover. The implementation is freely available as the Salvador package (v0.0.6) on PyPI [9].

Funding

This research received no external funding.

Acknowledgments

The author would like to thank Iris, Marilin, Sonia, Yoselin, and Arelis for their support. During the preparation of this work the author used AI assistance to help improve readability and to help generate the reproducible experiment reported in Section 7. After using these tools, the author reviewed and edited the content as needed and takes full responsibility for the content of the publication.

Conflicts of Interest

The author declares no conflict of interest.

References

  1. 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]
  2. Papadimitriou, C.H.; Steiglitz, K. Combinatorial Optimization: Algorithms and Complexity; Courier Corporation: North Chelmsford (MA), 1998. [Google Scholar]
  3. Karakostas, G. A Better Approximation Ratio for the Vertex Cover Problem. ACM Trans. Algorithms 2009, 5, 1–8. [Google Scholar] [CrossRef]
  4. 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]
  5. Dinur, I.; Safra, S. On the Hardness of Approximating Minimum Vertex Cover. Ann. Math. 2005, 162, 439–485. [Google Scholar] [CrossRef]
  6. 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]
  7. 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]
  8. Baker, B.S. Approximation algorithms for NP-complete problems on planar graphs. J. ACM 1994, 41, 153–180. [Google Scholar] [CrossRef]
  9. Vega, F. Salvador: Approximate Vertex Cover Solver. 2026, Version 0.0.6. Available online: https://pypi.org/project/salvador (accessed on 27 June 2026).
  10. Tarjan, R.E. Efficiency of a good but not linear set union algorithm. J. ACM 1975, 22, 215–225. [Google Scholar] [CrossRef]
Figure 1. Local weighted-MIDS gadget for a core edge ( u , v ) . Selecting ( u , 0 ) or ( v , 0 ) corresponds to paying for a vertex-cover endpoint, while selecting the heavy hub h u v incurs penalty P = N + 1 .
Figure 1. Local weighted-MIDS gadget for a core edge ( u , v ) . Selecting ( u , 0 ) or ( v , 0 ) corresponds to paying for a vertex-cover endpoint, while selecting the heavy hub h u v incurs penalty P = N + 1 .
Preprints 221569 g001
Table 1. Code metadata for the Salvador package (v0.0.6).
Table 1. Code metadata for the Salvador package (v0.0.6).
Nr. Code metadata description Metadata
C1 Current code version v0.0.6
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.4.2, NumPy ≥ 2.2.1, SciPy ≥ 1.15.0
C7 Compilation requirements and dependencies Python, NetworkX, NumPy, SciPy
Table 2. Behaviour of FindVertexCover at the default ε = 0.1 across graph classes, from the car/ experiment (exact optima, no MILP; Konig certificates on bipartite instances). The worst case found anywhere attains the conjectured ceiling 7 / 4 ; no instance exceeds it.
Table 2. Behaviour of FindVertexCover at the default ε = 0.1 across graph classes, from the car/ experiment (exact optima, no MILP; Konig certificates on bipartite instances). The worst case found anywhere attains the conjectured ceiling 7 / 4 ; no instance exceeds it.
Graph class Why the core solve (plus repair and pruning) tracks the optimum Ratio
Stars K 1 , k core optimum is the centre alone; decoded exactly 1
Matchings core optimum is one endpoint per edge 1
Paths, trees, caterpillars gadget reproduces the tree optimum exactly 1
Cycles C n spanning-path gadget is a tree; solved optimally 1
Complete graphs K n spanning-tree core solved; dense edges absorbed 1
Wheels / barbell / lollipop optima on hub or clique vertices captured by the core 1
Chordal / interval covers concentrate on simplicial hubs 1
Random general ( n 12 ) near-optimal core plus small repair 5 / 4
Grids / planar / outerplanar core captures most edges; O ( n ) repairs only 4 / 3
Graph atlas, n 7 exhaustive small graphs 4 / 3
Random bipartite (König) non-core edges can survive the default layering 3 / 2
Relabel/order stress of 7-vertex obstruction ordering-dependent overshoot 5 / 3
Bipartite hill-climb witness ( n = 11 ) default ε = 0.1 layering overshoots on repair 7 / 4 (extremal)
Table 3. The car/ experiment for Salvador v0.0.6 under the default call ε = 0.1 . Ratios are | C | / τ ( G ) with τ ( G ) computed exactly without MILP (Konig certificates on bipartite instances). All 1 , 718 covers are valid; the maximum ratio is 7 / 4 , attained but not exceeded.
Table 3. The car/ experiment for Salvador v0.0.6 under the default call ε = 0.1 . Ratios are | C | / τ ( G ) with τ ( G ) computed exactly without MILP (Konig certificates on bipartite instances). All 1 , 718 covers are valid; the maximum ratio is 7 / 4 , attained but not exceeded.
Test class Instances Max ratio
Bipartite obstruction, canonical (exact) 1 1.0000
Relabel / order stress (exact) 56 1.6667
Random bipartite (exact) 99 1.5000
Bipartite hill-climb (exact) 80 1.7500
Grids, bipartite (exact) 64 1.3333
Graph atlas, n 7 1,245 1.3333
Random general (exact, n 12 ) 173 1.2500
Total 1,718 1.7500
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.
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.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

© 2026 MDPI (Basel, Switzerland) unless otherwise stated

Accessibility

Disclaimer

Terms of Use

Privacy Policy

Privacy Settings