Preprint
Article

This version is not peer-reviewed.

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

Submitted:

22 September 2026

Posted:

23 September 2026

Read the latest preprint version here

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-\varepsilon\) for any fixed \(\varepsilon>0\). We present FindVertexCover, a linear-time ensemble algorithm that runs seven independently valid vertex-cover heuristics on the input graph \(G=(V,E)\) and returns the smallest cover found, then prunes redundant vertices. Four of the seven candidates—and the final redundant-vertex pruning pass applied to each of them—adapt a published ensemble that proves an unconditional \(O(n+m)\) time and space bound and a worst-case approximation ratio at most 2 for every graph, where \(n=|V|\) and \(m=|E|\). \textsc{Salvador} extends that ensemble with two further linear-time candidates of its own and a sixth candidate, SolveVC, that reduces \(G\) 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=\lceil 1/\varepsilon\rceil\); non-core edges are covered by a greedy repair step. At the package default \(\varepsilon=1\), the Baker layering width is \(k=1\) and the PTAS pass degenerates to its linear-time greedy baseline, so every one of the seven candidates—and hence the ensemble as a whole—runs in worst-case \(O(n+m)\) time; because one candidate is the classical maximal-matching heuristic, the ensemble unconditionally achieves approximation ratio at most 2 on every graph, a theorem rather than a conjecture. We conjecture a universal ratio bound \(R^\star<2\) for the default call; on a reproducible suite of 1,746 test graphs, ranging from exhaustively enumerated small graphs to random and adversarial graphs with up to 200,000 vertices, the observed ratio never exceeds $1.61$, well below the classical \(7/4\) mark. If a bound below 2 were proved for the ensemble, then, under the standard assumption \(\mathrm{P}\neq\mathrm{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.7).
Keywords: 
;  ;  ;  ;  ;  

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 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.7)—that, on every instance we have tested under the default call ε = 1 , produces a vertex cover whose size is provably never more than twice the optimum and, empirically, far closer to it. The algorithm, called FindVertexCover, is an ensemble: it runs seven independently valid vertex-cover heuristics and returns the smallest cover among them, then a final pruning pass removes any remaining redundant vertices. Four of the seven candidates and the pruning pass adapt the ensemble published as the Hvala algorithm [8,9], which proves an unconditional O ( n + m ) time and space bound and worst-case approximation ratio at most 2; Salvador adds two further linear-time candidates of its own together with a sixth candidate, SolveVC, described below. The algorithm 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.
Ensemble of linear-time candidates. Six independent heuristics are run on the cleaned graph G: maximal matching, bucket-queue maximum-degree greedy, and a degree-1 weighted-reduction ("Hallelujah") heuristic (all three adapted from Hvala [8]); a Min-to-Min bucket heuristic and a primal-dual/local-ratio 2-approximation (both Salvador-specific); and SolveVC, which reduces G to a weighted MIDS instance on a planar forest-core gadget H and solves H with an accuracy-controlled Baker-style PTAS [10] of layering width k = ⌈ 1 / ε ⌉ , repairing non-core edges greedily. At the default ε = 1 , k = 1 and the PTAS pass degenerates to its linear-time greedy baseline.
3.
Linear-time pruning.PruneRedundantVertices (Hvala’s fourth strategy) makes a single forward pass over each candidate cover C and removes every vertex all of whose neighbours are already covered; it is applied to every one of the six candidates and to their union, and the smallest resulting cover is returned.
At the default ε = 1 every one of the seven candidates runs in worst-case O ( n + m ) time, where n = | V | and m = | E | , so the whole ensemble is O ( n + m ) : strictly linear, not merely near-linear. This holds in particular for the Min-to-Min heuristic, whose bucket-queue argument (Section 3) pops and processes one minimum-degree vertex per step, so its cover target is selected in O ( 1 ) time without rescanning a bucket.

Contributions

The main contributions of this paper are:
  • A linear-time ensemble vertex-cover algorithm, four of whose seven candidates adapt the published Hvala ensemble [8], extended with a Min-to-Min heuristic, a primal-dual 2-approximation, and a planar forest-core reduction to a weighted MIDS gadget solved by an accuracy-controlled Baker-style PTAS. At the default ε = 1 every candidate—and hence the ensemble—runs in worst-case O ( n + m ) time.
  • An unconditional (not merely conjectured) worst-case approximation ratio of at most 2 for the ensemble on every graph, inherited directly from the classical maximal-matching candidate together with the fact that taking the minimum over valid covers, then pruning, cannot increase cover size.
  • An empirical conjecture (Conjecture 1) that the universal approximation ratio under the default call is well below the unconditional bound of 2, supported by a reproducible suite of 1 , 746 test graphs (Section 7) on which the observed or bounded ratio never exceeds 1.61 .
  • A conditional UGC consequence: under P ≠ NP , any proof of a universal ratio below 2 for this polynomial-time ensemble would refute the Unique Games Conjecture via the Khot–Regev hardness theorem.
  • An open-source implementation, Salvador v0.0.7, in which the accuracy parameter ε still drives the Baker PTAS candidate but no longer the whole algorithm’s linear-time guarantee.
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 empirical results on a reproducible test suite. Section 8 concludes.

2. Research Data

The algorithm is implemented in the Python package Salvador, freely available on the Python Package Index [11]. The current version is v0.0.7; the accuracy parameter ε drives only the Baker-PTAS candidate’s layering (Remark 2), not the ensemble’s linear-time guarantee, which holds at the default ε = 1 regardless. Code metadata is summarised in Table 1, and the local reduction gadget of the SolveVC candidate is depicted in Figure 1.

3. Description of the Algorithm

Salvador’s entry point, FindVertexCover (Algorithm 1), is an ensemble: it computes six independently valid candidate covers c 1 , … , c 6 by six different linear-time heuristics, prunes each with PruneRedundantVertices, additionally prunes their union to form a seventh candidate c 7 , and returns the smallest of the seven. Four of the six candidate heuristics—maximal matching ( c 1 ), bucket-queue maximum-degree greedy ( c 2 ), the degree-1 weighted-reduction heuristic ( c 3 ), and the pruning pass itself—adapt the ensemble published as the Hvala algorithm [8,9], which proves these run in O ( n + m ) time and space and that the best of them alone already achieves worst-case approximation ratio at most 2. Salvador adds two further linear-time candidates, the Min-to-Min heuristic ( c 4 ) and a primal-dual/local-ratio 2-approximation ( c 5 ), and a sixth candidate ( c 6 ) produced by SolveVC, the planar forest-core reduction to a weighted MIDS gadget described below. We present pseudocode for the main ensemble, each of the six candidates, and the pruning pass.

3.1. Main Ensemble

Algorithm 1  FindVertexCover ( G , ε )
Require: 
Undirected graph G = ( V , E ) , accuracy parameter ε ∈ ( 0 , 1 ] (default ε = 1 ; only c 6 depends on ε , and at ε = 1 every candidate runs in O ( n + m ) time, see Remark 2)
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 = ∅ thenreturn∅
  4:
end if
  5:
adj ← { v ↦ N G ( v ) : v ∈ V }
  6:
c 1 ← M AXIMAL M ATCHING C OVER ( G )                                ▹ Hvala strategy 1
  7:
c 2 ← B UCKET D EGREE G REEDY ( adj )                                       ▹ Hvala strategy 2
  8:
c 3 ← R EDUCTION M AX D EGREE O NE ( G )                ▹ Hvala strategy 3, "Hallelujah"
  9:
c 4 ← M IN T O M IN C OVER ( adj )                                        ▹ Salvador-specific
10:
c 5 ← L INEAR W EIGHTED C OVER ( G )                ▹ Salvador-specific, primal-dual
11:
c 6 ← S OLVE VC ( G , ε )                ▹ Salvador-specific, planar MIDS reduction
12:
for  i ← 1 to 6 do
13:
     c i ← P RUNE R EDUNDANT V ERTICES ( adj , c i )                ▹ Hvala strategy 4, applied to every candidate
14:
end for
15:
c 7 ← P RUNE R EDUNDANT V ERTICES ( adj , c 1 ∪ c 2 ∪ c 3 ∪ c 4 ∪ c 5 ∪ c 6 )
16:
return arg min i ∈ { 1 , … , 7 } | c i |

3.2. The Hvala-Adapted Candidates

Candidates c 1 , c 2 , and c 3 , and the pruning pass shared by all seven candidates, adapt the ensemble of Vega’s Hvala algorithm [8], which proves an unconditional O ( n + m ) time and space bound and worst-case approximation ratio at most 2 for every graph. MAXIMALMATCHINGCOVER ( G ) (Hvala strategy 1) computes a maximal matching in O ( n + m ) time and returns both endpoints of every matched edge; this is the classical linear-time 2-approximation [2]. BUCKETDEGREEGREEDY ( adj ) (Hvala strategy 2, given as Algorithm 2) repeatedly removes a maximum-degree active vertex using a bucket queue indexed by degree, in O ( n + m ) amortized time; its worst-case approximation ratio is Θ ( log Δ ) by Johnson’s classical bound [2], where Δ is the maximum degree. REDUCTIONMAXDEGREEONE ( G ) (Hvala strategy 3, the "Hallelujah heuristic") subdivides every edge ( u , v ) into an auxiliary degree-1 instance, solves it exactly (a degree-1/star instance has a trivial optimum), and maps the solution back to G; because the auxiliary instance has O ( m ) vertices and edges, this runs in O ( n + m ) time.
Algorithm 2 BucketDegreeGreedy ( adj ) — Hvala strategy 2
Require: 
Adjacency map adj of a graph with maximum degree Δ
Ensure: 
A vertex cover C ⊆ V
  1:
deg ( v ) ← | adj ( v ) | for every v; place every v in bucket queue B deg ( v )
  2:
C ← ∅ ; removed ← ∅
  3:
for  d ← Δ downto 1 do
  4:
    while  B d is non-empty do
  5:
         v ← pop from B d
  6:
        if  v ∈ removed  or  current deg ( v ) ≠ d  or  deg ( v ) = 0  then continue
  7:
        end if
  8:
         C ← C ∪ { v } ; removed ← removed ∪ { v }
  9:
        for  u ∈ adj ( v ) with u ∉ removed  do
10:
            deg ( u ) ← deg ( u ) − 1 ; push u onto B deg ( u )                ▹ stale copies are skipped on pop, above
11:
        end for
12:
    end while
13:
end for
14:
returnC

3.3. The Salvador-Specific Candidates

LINEARWEIGHTEDCOVER ( G ) ( c 5 ) is a single O ( n + m ) pass implementing the primal-dual/local-ratio method [12]: it scans every edge once, raises a dual variable at each endpoint up to the remaining slack, and adds an endpoint to the cover whenever its budget saturates; this is a standard 2-approximation.
MINTOMINCOVER ( adj ) ( c 4 ), given as Algorithm 3, repeatedly pops a single currently-minimum-degree active vertex v from a bucket queue and adds an arbitrary current neighbor of v to the cover, then updates degree buckets exactly as in Algorithm 2.
Remark 1.
(Why the bucket-queue argument stays linear). Algorithm 3 pops and processes exactly one minimum-degree vertex per outer-loop iteration and selects its covering neighbor in O ( 1 ) (an arbitrary, not degree-minimal, neighbor), with no rescan of a bucket at any step. Consequently the total number of bucket pushes and pops is O ( n + m ) by the same amortized argument as Algorithm 2 (Theorem 5), and the time per processed vertex stays within a constant factor regardless of graph regularity.
Algorithm 3 MinToMinCover ( adj ) — linear-time-corrected
Require: 
Adjacency map adj
Ensure: 
A vertex cover C ⊆ V
  1:
deg ( v ) ← | adj ( v ) | for every v; place every v with deg ( v ) > 0 in bucket queue B deg ( v )
  2:
C ← ∅ ; min _ d ← 1
  3:
while  min _ d ≤ Δ   do
  4:
    advance min _ d to the smallest index with a non-empty bucket; if none, break
  5:
     v ← pop from B min _ d
  6:
    if current deg ( v ) ≠ min _ d  or deg ( v ) = 0  thencontinue               ▹ stale entry, O(1) skip
  7:
    end if
  8:
     target ← an arbitrary element of adj ( v )                ▹ O ( 1 ) : no rescan of the bucket
  9:
     C ← C ∪ { target }
10:
    for  u ∈ adj ( target )  do               ▹ standard degree-bucket removal, as in Alg. 2
11:
         deg ( u ) ← deg ( u ) − 1 ; push u onto B deg ( u ) if deg ( u ) > 0
12:
    end for
13:
    remove target from the active graph
14:
    if  deg ( v ) > 0  then push v onto B deg ( v )                ▹v lost its edge to target
15:
    end if
16:
    if  min _ d > 1  and  B min _ d − 1 non-empty  then  min _ d ← min _ d − 1
17:
    end if
18:
end while
19:
return  C

3.4. Weighted MIDS Gadget and Planar Solve

Algorithm 4 ( c 6 ) 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 4  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 PANNING F OREST C ORE ( 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 AKER P TAS W EIGHTED IDS ( 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 5) 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 6 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 2.
(On the accuracy parameter ε ). The public entry pointfind_vertex_coverfixes the default ε = 1 , which is the configuration analysed throughout this paper. The parameter controls only candidate c 6 ’s Baker layering width k = ⌈ 1 / ε ⌉ ; at the default ε = 1 , k = 1 and c 6 reduces to the greedy maximal-independent-set baseline of Algorithm 6, which is what keeps c 6 —and hence the whole ensemble—strictly O ( n + m ) (Theorem 5). The gadget construction is itself ε-independent; ε enters only the IDS pass. Passing ε < 1 makes only c 6 more thorough (and costs c 6 an extra O ( 1 / ε ) factor); it is intended for offline quality experiments on c 6 in isolation, not the default production call. c 6 ’s returned candidate depends on ε through the layer choices, and on the vertex ordering through the spanning-forest construction; the ensemble as a whole is comparatively insensitive to both, since c 1 , … , c 5 provide independent coverage (Section 5.7). All claims below refer to the default call ε = 1 unless otherwise noted.
Algorithm 5  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   then  returnGreedyWeightedMIS ( H )
  3:
end if               ▹ cheap baseline
  4:
ℓ ← BFS-distance layering of H
  5:
S ⋆ ← G REEDY W EIGHTED MIS ( 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 XACT W EIGHTED IDS ( 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 6 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:
for v 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 4. 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.5. Linear-Time Pruning

Algorithm 7 removes redundant vertices from a candidate cover in a single forward pass, running in O ( n + m ) total time.
Algorithm 7  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. It suffices to show (a) each of c 1 , … , c 6 is individually a valid vertex cover of the cleaned graph, (b) pruning a valid cover with Algorithm 7 leaves it valid, and (c) the union of valid covers is a valid cover, since the output is then arg min over the sizes of seven vertex sets each shown valid by (a)–(c), and validity does not depend on which has minimum size.
(a) Each raw candidate is valid. c 1 takes both endpoints of every matched edge of a maximal matching M; every edge either belongs to M (both endpoints in c 1 ) or is not in M, in which case maximality of M forces at least one endpoint to already be matched by some edge of M (otherwise that edge could extend M), hence in c 1 . c 2 (Algorithm 2) processes vertices from highest to lowest current degree and never terminates while an active vertex has positive degree, so every edge is incident to some vertex added to c 2 before both endpoints could reach degree 0 un-covered. c 3 solves the exact degree-0/degree-1 auxiliary instance built from every original edge, so every original edge is represented by an auxiliary edge that is covered by construction. c 4 (Algorithm 3) adds, for every vertex v ever popped as the current minimum-degree active vertex, one of its active neighbors to the cover, which by the same maximal-matching-style argument as c 1 covers every edge incident to a processed vertex, and the loop runs until no active vertex remains. c 5 ’s primal-dual scan adds an endpoint of every edge whose slack is exhausted on both sides, which the local-ratio argument [12] guarantees for every edge. c 6 = S OLVE VC ( G , ε ) is shown valid below.
c 6 validity (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 { v : ( v , 0 ) ∈ S } , ensuring all core edges are covered.
c 6 validity (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 valid for G p . Every edge in E ∖ E p is inspected in the repair loop: if neither endpoint is in the running cover, the higher-degree endpoint is added. After the loop every edge of E has at least one endpoint in c 6 .
(b) Pruning preserves validity. A vertex v ∈ C is removed by Algorithm 7 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.
(c) Unions of valid covers are valid. If C 1 and C 2 each cover every edge, then for every edge ( u , v ) at least one of u , v lies in C 1 ⊆ C 1 ∪ C 2 (or in C 2 ), so C 1 ∪ C 2 covers ( u , v ) as well; hence c 7 ’s starting union c 1 ∪ … ∪ c 6 is valid before it, too, is pruned by (b).    □

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 built by candidate c 6 (SolveVC), let H be its weighted MIDS gadget of Algorithm 4, and set τ p * = τ ( G p ) .

5.2. An Unconditional Ratio-2 Guarantee for the Ensemble

Unlike the case-by-case bounds on the individual candidates below, the ensemble as a whole admits an immediate, unconditional worst-case guarantee.
Theorem 2.
(Unconditional ratio 2). For every undirected graph G, Algorithm 1 returns a vertex cover C with | C | ≤ 2 τ ( G ) .
Proof. 
Candidate c 1 = M a x i m a l M a t c h i n g C o v e r ( G ) takes both endpoints of every edge of a maximal matching M of G, so | c 1 | = 2 | M | . Because M is a matching, any vertex cover must contain at least one endpoint of each of its | M | disjoint edges, so τ ( G ) ≥ | M | , giving | c 1 | ≤ 2 τ ( G ) ; this is the classical linear-time 2-approximation [2], and it is exactly the bound Hvala proves for its own ensemble [8]. Algorithm 1 prunes c 1 (Theorem 1 shows pruning preserves validity and cannot increase size) and then returns the smallest of seven valid covers including the pruned c 1 , so | C | ≤ | pruned c 1 | ≤ | c 1 | ≤ 2 τ ( G ) .    □
Theorem 2 holds unconditionally, for every ε and every graph; it does not depend on the planar forest-core machinery below at all. The role of the remaining candidates—and of the structural analysis in this section—is to explain why the ensemble is expected to do far better than this worst-case guarantee in practice (Section 5.7).

5.3. Gadget Cost Identity for the SolveVC Candidate

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 4 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 .

5.4. Elementary Bounds on the SolveVC Candidate

The next two results are stated for c 6 in isolation (they are properties of the candidate SolveVC produces before the ensemble compares it against c 1 , … , c 5 , c 7 ); they are superseded, as guarantees on the algorithm’s output, by Theorem 2, but they explain why c 6 is a useful candidate to include rather than redundant with c 1 – c 5 .
Proposition 1
(Elementary bounds on c 6 ). For every graph G with n vertices and m edges, the candidate cover c 6 produced by Algorithm 4 satisfies | c 6 | ≤ min { n , m } and is a valid vertex cover of G.
Proof. 
Validity is Theorem 1 restricted to the c 6 path. 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 6 | ≤ n and | c 6 | ≤ | core cover | + m ; pruning only removes vertices.    □

5.5. Linear Core Guarantee for SolveVC

Theorem 3.
(Core cover guarantee). For any input graph G, Algorithm 4 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.6. 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, the c 6 path of Algorithm 4 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 the candidate cover and otherwise adds exactly one endpoint. Thus the number of repair additions is at most | E ∖ E p | .    □
In practice the c 6 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 ; and even where c 6 overshoots, the ensemble as a whole is protected by Theorem 2 and by the other six candidates.

5.7. The Empirical Conjecture for the Ensemble

Because the seven candidates draw on structurally different techniques—maximal matching, degree-greedy, degree-1 reduction, Min-to-Min, primal-dual, and the planar forest-core MIDS reduction—and the ensemble takes the smallest of all seven after pruning, we expect the ensemble’s worst case to sit strictly below the unconditional bound of Theorem 2, which is attained only when every one of the seven candidates simultaneously realises its own worst case on the same instance.
Conjecture 1
(Universal ensemble approximation ratio). There is a constant R ⋆ < 2 such that, for every undirected graph G, Algorithm 1 with the default parameter ε = 1 returns a vertex cover C with
| C | ≤ R ⋆ τ ( G ) .
Conjecture 1 is not a theorem; Theorem 2 is the only unconditional bound proved in this paper. Section 7 reports empirical support for the conjecture: on a reproducible suite of 1 , 746 test graphs, the observed or bounded ratio never exceeds 1.61 .

5.8. Why the Ratio Stays Low Across Graph Classes

The ensemble’s low observed ratio rests on running several structurally different heuristics and taking the best. Four candidates are the Hvala ensemble (Section 3.2), whose worst case is Θ ( log Δ ) for c 2 but 2 for c 1 alone; two are Salvador-specific 2-approximations ( c 4 , c 5 ); and c 6 additionally exploits planar/forest structure via the weighted MIDS gadget (Section 5.2 onward). Because the gadget H built from the c 6 forest core is itself a forest, its per-component tree dynamic program is exact, so on graphs close to forests c 6 alone is already near-optimal (Lemma 1); on graphs where c 6 ’s non-core repair overshoots, one of c 1 , … , c 5 typically does not, and the final redundancy-pruning pass removes any vertex all of whose incident edges are already covered from every candidate.

Classes Solved Optimally by c 6 Alone.

On stars  K 1 , k the c 6 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, and the ensemble inherits this exactly.

Dense and Degree-Heterogeneous Classes.

Complete graphs K n have τ = n − 1 ; the c 6 spanning-tree core is solved and the dense non-core edges are absorbed, returning the optimal ( n − 1 ) -cover, and c 1 (maximal matching) independently gets within a factor 2. Wheels W n , barbell and lollipop graphs concentrate their optima on hub or clique vertices, captured by either c 2 (max-degree greedy) or the c 6 core.

Bipartite and Planar Classes.

For bipartite graphs Konig’s theorem makes τ equal to the maximum matching; on this class c 1 , … , c 5 each provide independent coverage, so the ensemble does not depend solely on c 6 ’s core solve. Grids and other bounded-treewidth planar families remain mild for c 6 alone, since the forest core captures n − 1 of the at most 3 n − 6 edges and only O ( n ) non-core edges reach the repair.

Large Adversarial Graphs.

Complete bipartite graphs, crown graphs ( K h , h minus a perfect matching), double stars joined by a bridge, a hierarchical greedy-tie-break stress construction, random regular graphs, Barabasi–Albert scale-free graphs, sparse Erdos–Renyi graphs, and Watts–Strogatz small-world graphs are designed to stress individual candidates (dense structure, high or irregular degree, small-world shortcuts); the ensemble’s minimum-over-seven-candidates guarantee (Theorem 2) still applies unconditionally to every one of them.

5.9. Conditional Consequence for the Unique Games Conjecture

Theorem 4.
(UGC consequence of a universal sub-2 bound). If Conjecture 1 were proved for some constant R ⋆ < 2 , then Algorithm 1 would be a polynomial-time R ⋆ -approximation for Minimum Vertex Cover. Consequently, under the standard assumption P ≠ NP , the Unique Games Conjecture would be false.
Proof. 
The runtime theorem (Theorem 5) gives worst-case O ( n + m ) time for the default fixed ε = 1 , in particular polynomial time. A proof of Conjecture 1 would therefore give a polynomial-time approximation ratio R ⋆ = 2 − δ with δ = 2 − R ⋆ > 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 3.
Theorem 4 is conditional and, unlike Theorem 2, not unconditionally established here: Theorem 2 proves R = 2 exactly, which is the UGC threshold itself and yields no contradiction ( δ = 0 ). Conjecture 1 neither disproves UGC nor proves an R ⋆ < 2 approximation theorem on its own; establishing it for some concrete R ⋆ < 2 , by whatever means, is what would trigger Theorem 4’s consequence. The empirical results of Section 7, while consistent with Conjecture 1, are evidence, not a proof, and do not by themselves establish any R ⋆ < 2 bound.

6. Runtime Analysis

Theorem 5.
For the default accuracy ε = 1 , Algorithm 1 runs in worst-case time O ( n + m ) , where n = | V | and m = | E | . For a fixed ε ∈ ( 0 , 1 ] in general, candidate c 6 alone costs O ( n + m ) α ( n ) + 1 / ε , where α is the inverse Ackermann function, so the whole ensemble costs O ( n + m ) α ( n ) + 1 / ε for general ε and strictly O ( n + m ) at the default ε = 1 .
Proof. 
We bound each of the seven candidates and the shared preprocessing and pruning; the ensemble cost is the sum of a constant number of O ( n + m ) -or-better terms.
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 ) .
c 1 , maximal matching. A greedy maximal matching is computed in one scan of the edge list, O ( n + m )  [2].
c 2 , bucket-queue max-degree greedy (Algorithm 2). Standard bucket-queue argument: every push corresponds to an initial vertex or a degree decrement, and there are at most 2 m decrements in total, so there are O ( n + m ) pushes and pops, each O ( 1 ) ; total O ( n + m ) .
c 3 , degree-1 weighted reduction. The auxiliary star-like instance has O ( m ) vertices and edges (one auxiliary vertex per original edge occurrence), and the degree-0/degree-1 solver visits each auxiliary vertex once, O ( n + m ) total (the reduction is run twice, unweighted and weighted, a constant factor).
c 4 , Min-to-Min (Algorithm 3). By the same bucket-queue argument as c 2 : total pushes are n initial pushes plus at most 2 m degree-decrement pushes plus, for each real (non-stale) pop of a vertex v, at most one requeue of v itself (its degree strictly decreases by 1 whenever it is processed, since its chosen neighbor target is removed), giving O ( n + m ) pushes and pops overall; each pop does O ( 1 ) work (a stale check, or an O ( 1 ) arbitrary-neighbor selection followed by the standard O ( 1 ) -amortized degree-bucket update). Total O ( n + m ) (see also Remark 1).
c 5 , primal-dual weighted cover. One pass over the edge list with O ( 1 ) work per edge, O ( n + m ) .
c 6 ,SolveVC(Algorithm 4).SpanningForestCore initialises the disjoint-set forest in O ( n ) and performs mUnion/Find pairs, one per edge; with union by rank and path halving this costs O ( n + m ) α ( n ) in the worst case, tight for path-compression heuristics [13]. 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. 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, which runs in time linear in component size since H is a forest, so one shift costs O ( | V ( H ) | + | E ( H ) | ) = O ( n ) , and the pass costs O ( k n ) = O ( n / ε ) over k shifts. At the default ε = 1 , k = 1 and BakerPtasWeightedIDS returns the O ( n ) greedy baseline GreedyWeightedMIS directly (Algorithm 5, line 2), skipping the layering loop entirely, so this phase is O ( n ) rather than O ( n / ε ) . The repair loops inspect each edge of E p and of removed = E ∖ E p once with O ( 1 ) degree look-ups, O ( n + m ) . Total for c 6 : O ( n + m ) ( α ( n ) + 1 ) = O ( n + m ) α ( n ) at ε = 1 , and O ( n + m ) ( α ( n ) + 1 / ε ) for general ε .
Pruning.PruneRedundantVertices (Algorithm 7) builds the adjacency map in O ( n + m ) and makes one pass of total work ∑ v ∈ C deg G ( v ) = O ( n + m ) ; it is applied to each of c 1 , … , c 6 and once more to their union, a constant number (7) of O ( n + m ) passes.
Summing over a constant number (7) of candidates plus preprocessing and pruning, every term is O ( n + m ) except c 6 ’s union-find pass, which contributes the extra O ( n + m ) α ( n ) factor common to all disjoint-set algorithms with path compression. Since α ( n ) = O ( 1 ) for all n of practical relevance (indeed for all n up to far beyond the number of atoms in the observable universe), the ensemble is O ( n + m ) for every fixed ε in the sense that matters computationally, and strictly O ( n + m ) (no 1 / ε factor at all) at the default ε = 1 , since the layering loop is skipped.    □
Remark 4.
Because the gadget H built by c 6 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, and at the default ε = 1 it is bypassed anyway (Algorithm 5, line 2). The α ( n ) union-find factor in c 6 can likewise be removed by building the spanning-forest core with a depth-first traversal, yielding a strictly O ( n + m ) c 6 candidate (matching c 1 – c 5 ) if desired. The scaling study of Section 7 empirically confirms this near-linear growth, fitting wall-clock time against n + m with R 2 > 0.99 on two doubling-size graph families.

7. Reproducible Experiment

To assess the empirical conjecture of Section 5.7 (Conjecture 1), we ran the Salvador package (v0.0.7, default ε = 1 ) on a reproducible two-part suite of test graphs, under Python 3.12.3 and NetworkX 3.6.1 with a fixed random seed (20260627). The suite and its driver script are distributed with the package.

7.1. Part A: Small Graphs with a Known Optimum

Part A collects 1 , 718 small graphs for which τ ( G ) is known exactly, either via Konig’s theorem on bipartite instances or by exact branch-and-bound search otherwise: graphs of order at most 7 drawn exhaustively from the graph atlas, bipartite hill-climbing and obstruction instances, bipartite and non-bipartite grids, random bipartite and general graphs, and relabeling/vertex-order stress instances. Table 2 reports, for every family, the ratio | C | / τ ( G ) of the returned cover to the exact optimum.

7.2. Part B: Large and Adversarial Graphs

Exact optima are infeasible to compute at the scale of Part B, so we instead certify a provable upper bound on the approximation ratio: for each instance we compute a maximal-matching lower bound L ≤ τ ( G ) (Theorem 2’s proof) and report | C | / L , a conservative upper bound on | C | / τ ( G ) that is exact on the bipartite families, where L = τ ( G ) by Konig’s theorem. Table 3 reports, for ten families of large and adversarial graphs (complete bipartite graphs, crown graphs, double stars joined by a bridge, a hierarchical greedy-tie-break stress construction, random 3-, 6-, and 12-regular graphs, Barabasi–Albert scale-free graphs, sparse Erdos–Renyi graphs, and Watts–Strogatz small-world graphs), the largest instance size reached, the resulting ratio upper bound, and the wall-clock time.
Across the 28 Part B instances the ratio upper bound never exceeds 1.604 , attained on a random 12-regular graph at n = 200 , 000 vertices and m = 1 , 200 , 000 edges; since this bound is computed from a maximal-matching lower bound on a non-bipartite family, the true ratio may be smaller still. Combined with Part A, the observed or bounded ratio across all 1 , 746 test graphs never exceeds 1.61 , well below the classical 7 / 4 = 1.75 mark and substantially below the unconditional worst-case bound of 2 (Theorem 2).

7.3. Scaling Study

To check the O ( n + m ) runtime bound of Theorem 5 empirically, we ran the ensemble on two families of doubling size—4-regular graphs and Barabasi–Albert graphs with attachment parameter 3—from n = 1 , 000 up to n = 128 , 000 , and fit wall-clock time against n + m by ordinary least squares. The fit is close to linear: R 2 = 0.9945 for the 4-regular family and R 2 = 0.9968 for the Barabasi–Albert family, consistent with the linear-time bound of Theorem 5.

8. Conclusion

We have presented the Salvador algorithm, an ensemble approximate solver for the Minimum Vertex Cover problem that runs seven independently valid linear-time heuristics and returns the smallest cover found, then prunes redundant vertices. Four of the seven candidates and the pruning pass adapt the published Hvala ensemble [8]; Salvador adds a Min-to-Min heuristic, a primal-dual 2-approximation, and a planar forest-core reduction to a weighted MIDS gadget solved by an accuracy-controlled Baker-style PTAS. The algorithm always returns a valid vertex cover (Theorem 1), unconditionally achieves approximation ratio at most 2 on every graph (Theorem 2), and runs in worst-case O ( n + m ) time at the default ε = 1 (Theorem 5)—strictly linear, not merely near-linear, because the Baker layering degenerates to its greedy baseline at k = 1 and because every candidate, including the Min-to-Min heuristic (Remark 1), admits an amortized O ( n + m ) bucket-queue argument.
We conjecture (Conjecture 1) a universal ratio bound R ⋆ < 2 for the ensemble under the default call, strictly below the unconditional bound of Theorem 2. On a reproducible suite of 1 , 746 test graphs (Section 7), spanning exhaustively enumerated small graphs with known optima and large adversarial graphs up to 200 , 000 vertices, the observed or bounded ratio never exceeds 1.61 , well under the classical 7 / 4 mark, lending empirical support to the conjecture. The theoretical consequence of this conjecture is UGC-focused rather than a direct complexity-class equality claim: if Conjecture 1 were proved for some R ⋆ < 2 , then Salvador would be a polynomial-time R ⋆ -approximation, and 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, whether by a tighter structural analysis of which candidate wins on which graph class or by a large-scale computational search for adversarial instances; (ii) isolating adversarial graph families that push the ensemble ratio closest to the unconditional ceiling of 2 from Theorem 2; (iii) a tight worst-case-complexity proof for the Min-to-Min candidate (Remark 1) beyond the bucket-queue argument given here; and (iv) extending the weighted MIDS framework and the ensemble methodology to dominating set, independent set, and set cover. The implementation is freely available as the Salvador package (v0.0.7) on PyPI [11].

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. Vega, F. An Approximate Solution to the Minimum Vertex Cover Problem: The Hvala Algorithm. Gauge Freedom J. 2026, 1. [Google Scholar] [CrossRef]
  9. Vega, F. Hvala: Approximate Vertex Cover Solver. 2026. Available online: https://pypi.org/project/hvala.
  10. Baker, B.S. Approximation algorithms for NP-complete problems on planar graphs. J. ACM 1994, 41, 153–180. [Google Scholar] [CrossRef]
  11. Vega, F. Salvador: Approximate Vertex Cover Solver. 2026. Available online: https://pypi.org/project/salvador.
  12. Bar-Yehuda, R.; Even, S. A local-ratio theorem for approximating the weighted vertex cover problem. In Analysis and Design of Algorithms for Combinatorial Problems;Annals of Discrete Mathematics; Elsevier, 1985; Vol. 25, pp. 27–46. Available online: http://www.cs.technion.ac.il/~reuven/PDF/vc_lr.pdf.
  13. 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 234635 g001
Table 1. Code metadata for the Salvador package (v0.0.7).
Table 1. Code metadata for the Salvador package (v0.0.7).
Nr. Code metadata description Metadata
C1 Current code version v0.0.7
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. Part A: ratio of the returned cover to the exact optimum, by family. Every one of the 1 , 718 instances was solved exactly ( | C | = τ ( G ) ) and every returned cover was valid; the run completed in 2.0 seconds.
Table 2. Part A: ratio of the returned cover to the exact optimum, by family. Every one of the 1 , 718 instances was solved exactly ( | C | = τ ( G ) ) and every returned cover was valid; the run completed in 2.0 seconds.
Family Instances Mean ratio Max ratio
Graph atlas ( n ≤ 7 ) 1245 1.000 1.000
Bipartite hill-climb (exact) 80 1.000 1.000
Random general (exact, n ≤ 12 ) 173 1.000 1.000
Random bipartite (exact) 99 1.000 1.000
Grids, bipartite (exact) 64 1.000 1.000
Relabel / order stress (exact) 56 1.000 1.000
Bipartite obstruction (exact) 1 1.000 1.000
Overall 1718 1.000 1.000
Table 3. Part B: ratio upper bound | C | / L and wall-clock time on the largest instance of each of the ten large/adversarial families (28 instances in total, up to n = 200 , 000 vertices and m = 1 , 200 , 000 edges). Every returned cover was valid.
Table 3. Part B: ratio upper bound | C | / L and wall-clock time on the largest instance of each of the ten large/adversarial families (28 instances in total, up to n = 200 , 000 vertices and m = 1 , 200 , 000 edges). Every returned cover was valid.
Family Max n Max ratio u.b. Max time (s)
Random 12-regular 200,000 1.604 39.74
Watts–Strogatz small-world 50,000 1.438 3.14
Random 6-regular 200,000 1.448 24.05
Barabasi–Albert scale-free 200,000 1.354 23.18
Sparse Erdos–Renyi (avg. degree 4) 200,000 1.278 16.40
Random 3-regular 200,000 1.274 14.26
Complete bipartite 1,600 1.000 8.95
Crown graph 1,600 1.000 9.03
Double star + bridge 200,002 1.000 6.28
Hierarchical star trap 152,917 1.000 5.27
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.