alphaFeedback

WorksComputer Science

The Esperanza Algorithm for Maximum Independent Set

AI contributions
  • Anthropic Claude Opus 5.5
View details
Ancillary data
1 code link
View

Abstract

The maximum independent set problem asks for the largest set of pairwise non-adjacent vertices in an undirected graph. It is NP-hard to approximate within n1−εn^{1-\varepsilon} for every ε>0\varepsilon>0, and under the Unique Games Conjecture it is hard to approximate within O(Δ/log⁡2Δ)O(\Delta/\log^2\Delta) on graphs of maximum degree Δ\Delta; the Khot–Regev form of the conjecture, for which a proof has been reported but not yet peer reviewed, also rules out a (2−ε)(2-\varepsilon)-approximation of Minimum Vertex Cover. We present version 0.1.6 of Esperanza, which takes the better of a dynamic minimum-degree (Caro–Wei) greedy set and the complement of the Salvador vertex cover, and improves it by three budgeted local searches: repair-and-grow restarts at the cover vertices and at a maximum-degree vertex, chained local restarts realising (k,k+1)(k,k+1)-improvements, and an iterated (1,2)(1,2)-swap search. We prove that it runs in O((n+m) αA(n))O((n+m)\,\alpha_{\mathrm A}(n)) expected time for fixed budgets, with αA\alpha_{\mathrm A} the inverse Ackermann function. We prove that the output is a maximal independent set, that its complementary vertex cover has at most 2τ−r2\tau-r vertices, where τ\tau is the minimum cover size and rr the number of components with an edge, and that the ratio is at most (Δ+2)/3(\Delta+2)/3 on graphs of maximum degree Δ\Delta. We prove the ratio 2n2\sqrt n on every graph with Δ≤n\Delta\le\sqrt n and on three further classes, and state it for all graphs as a conjecture, whose proof would imply P=NP\mathrm{P}=\mathrm{NP}. We also state the conjecture that the complementary cover has at most 2τ−∣M∣2\tau-|M| vertices for the NetworkX minimum maximal matching MM; a proof would give a 3/23/2-approximation for Minimum Vertex Cover and refute the Unique Games Conjecture unless P=NP\mathrm{P}=\mathrm{NP}. In reproducible experiments the returned set is optimal on all 30 00030\,000 graphs of a suite certified by an exact integer program; on 4040 Khot–Regev YES instances with 640640 to 2 5602\,560 vertices the conjectured bound is certified on 3838 and open on 22; and on 3131 bounded-degree graphs the certified ratio is at most 1.07691.0769 on the families with a planted independent set.

Introduction

Given an undirected graph G=(V,E)G=(V,E), an independent set is a subset S⊆VS \subseteq V in which no two vertices are joined by an edge. The maximum independent set (MIS) problem asks for such a set of largest possible cardinality; its size is the independence number α(G)\alpha(G). A set C⊆VC \subseteq V is a vertex cover if every edge has an endpoint in CC; CC is a vertex cover if and only if V∖CV \setminus C is independent, so the minimum cover size is τ(G)=n−α(G)\tau(G)=n-\alpha(G). We write n=∣V∣n=|V|, m=∣E∣m=|E|, Δ\Delta for the maximum degree, and r(G)r(G) for the number of connected components of GG that contain an edge. The ratio of a returned independent set SS is ρ=α(G)/∣S∣\rho=\alpha(G)/|S|. MIS is on Karp’s list of NP-complete problems [1].

On general graphs, MIS cannot be approximated within n1−εn^{1-\varepsilon} for any ε>0\varepsilon> 0 unless NP = ZPP [2], and the same threshold is NP-hard [3]. The best known polynomial-time ratios are O(n/(log⁡n)2)O(n/(\log n)^2) by subgraph exclusion [4] and O(n(log⁡log⁡n)2/(log⁡n)3)O(n(\log\log n)^2/(\log n)^3) [5]. On graphs of maximum degree Δ\Delta, the minimum-degree greedy algorithm has ratio (Δ+2)/3(\Delta+2)/3 [6], and the best known ratio, due to Halperin [7], is O(Δlog⁡log⁡Δ/log⁡Δ)O(\Delta\log\log\Delta/\log\Delta). Under the Unique Games Conjecture [8], Austrin, Khot and Safra proved that MIS on graphs of maximum degree Δ\Delta is hard to approximate within O(Δ/log⁡2Δ)O(\Delta/\log^2\Delta) [9], and Chan proved that O(Δ/log⁡4Δ)O(\Delta/\log^4\Delta) is NP-hard without any conjecture [10]. Khot and Regev proved, under UGC, that for every ε,δ>0\varepsilon,\delta> 0 it is hard to distinguish graphs with an independent set of (12−ε)n(\frac{1}{2}-\varepsilon)n vertices from graphs with no independent set of more than δn\delta n vertices; equivalently, Minimum Vertex Cover is hard to approximate within 2−ε2-\varepsilon for every ε>0\varepsilon> 0 [11]. In October 2026 the OpenAI Math Team released a manuscript with Lean artifacts reporting a proof of UGC in the NP-hardness form that the theorem of Khot and Regev requires [12]; at the time of writing it has not been peer reviewed. If it holds, both hardness results above hold unless P = NP.

This paper describes version 0.1.6 of Esperanza, which is implemented in Python [13]. The algorithm takes the best of a dynamic minimum-degree (Caro–Wei) greedy set [14, 15, 6] and the complement of the vertex cover returned by Salvador [16, 17], and improves it by three budgeted local searches: a repair-and-grow restart at every cover vertex and at a maximum-degree vertex, chained local restarts that realise (k,k+1)(k,k+1)-improvements, and an iterated (1,2)(1,2)-swap local search [18].

Contributions. The contributions of this paper are:

  • The algorithm (§ 3, Algorithms 1–4) and the proof that it returns a maximal independent set (Theorem 4.5).

  • A near-linear running time: for fixed work budgets the algorithm runs in O((n+m)αA(n))O((n+m)\alpha_A(n)) expected time, with αA\alpha_A the inverse Ackermann function (Theorem 7.2).

  • Proved bounds (§ 5): the complementary vertex cover V∖SV \setminus S is never larger than the Salvador cover, so ∣V∖S∣≤2τ(G)−r(G)|V \setminus S| \le2\tau(G)-r(G) on every graph without self-loops (Theorem 5.1); ∣S∣≥2α(G)−n+r(G)|S| \ge2\alpha(G)-n+r(G) (Corollary 5.2); and ∣S∣≥∑v1/(deg⁡v+1)|S| \ge\sum_v 1/(\deg v+1) with ratio at most (Δ+2)/3(\Delta+2)/3 on graphs of maximum degree Δ\Delta (Theorem 5.3); and the ratio 2n2\sqrt{n} on every graph with Δ≤n\Delta\le\sqrt{n} and on three further classes (Theorem 5.4).

  • The conjecture that the ratio is at most 2n2\sqrt{n} on every graph (Conjecture 6.6), with the theorem that a proof would imply P = NP (Theorem 6.7).

  • The conjecture that ∣V∖S∣≤2τ(G)−∣M∣|V \setminus S| \le2\tau(G)-|M| for the NetworkX minimum maximal matching MM (Conjecture 6.1), which is implied by the corresponding conjecture for Salvador, a per-instance certificate for it, and the conditional theorem that a proof would refute UGC unless P = NP, and would imply P = NP if the theorem reported in [12] holds (Theorem 6.5).

  • Reproducible experiments (§ 8): 30 000 graphs with an optimum certified by an exact integer program, 40 YES-type instances of the Khot–Regev reduction with 640 to 2 560 vertices, and 31 bounded-degree graphs with Δ\Delta up to 128.

Section 3 describes the algorithm, Section 4 proves correctness, Section 5 the bounds, Section 6 states the conjecture and its consequences, and Section 7 the running time. Section 8 reports the experiments and Section 9 concludes.

Research Data

The algorithm is implemented in the Python package esperanza, available on the Python Package Index [13]. The version described in this paper is v0.1.6. Table 1 lists the code metadata.

Nr.Code metadata descriptionMetadata
C1Current code versionv0.1.6
C2Permanent link to code/repositoryhttps://github.com/frankvegadelgado/esperanza
C3Permanent link to Reproducible Capsulehttps://pypi.org/project/esperanza/
C4Legal Code LicenseMIT License
C5Code versioning system usedgit
C6Languages, tools, and services usedPython
C7Compilation requirements and dependenciesPython ≥3.12\ge3.12, Salvador ≥0.1.4\ge0.1.4
C8Experiment scripts (§ 8)car/ directory of the repository

Table 1. Code metadata for the esperanza package.

The Esperanza Algorithm

Algorithms 1–4 give the pseudo-code of Esperanza; they follow the published implementation (version 0.1.6 [13]). Throughout, GG denotes the working graph obtained in Algorithm 1 after removing self-loops and isolated vertices; its parameters nn, mm and Δ\Delta are those of the working graph. For a set SS and a vertex vv, the tightness of vv is tS(v)=∣N(v)∩S∣t_S(v)=|N(v)\cap S|.

Algorithm 1 FindIndependentSet(GG; BRB_R, BLB_L, BIB_I, σ\sigma)

Require: Undirected graph G=(V,E)G=(V,E); work budgets BRB_R, BLB_L, BIB_I (default 100 each); seed σ\sigma

Ensure: A maximal independent set of GG

  1. if ∣V∣=0|V|=0 then return ∅\emptyset

  2. end if

  3. G←G.copy()G\leftarrow G.\mathrm{copy}(); remove all self-loops from GG

  4. Iiso←{v∈V:deg⁡G(v)=0}I_{\mathrm{iso}}\leftarrow\{v\in V:\deg_G(v)=0\}; remove IisoI_{\mathrm{iso}} from GG

  5. if ∣V(G)∣=0|V(G)|=0 then return IisoI_{\mathrm{iso}}

  6. end if

  7. ICW←PureCaroWeiBaseline(G)I_{\mathrm{CW}}\leftarrow\mathrm{PureCaroWeiBaseline}(G) ▷ Algorithm 2

  8. C←Salvador(G)C\leftarrow\mathrm{Salvador}(G) ▷ [16, 17]; Lemma 4.3

  9. S←ICWS\leftarrow I_{\mathrm{CW}} if ∣ICW∣>∣V(G)∖C∣|I_{\mathrm{CW}}|>|V(G)\setminus C| else V(G)∖CV(G)\setminus C

  10. vmax⁡←v_{\max}\leftarrow a vertex of maximum degree in GG

  11. IR←V(G)∖RefineCover(G,C,vmax⁡,BR)I_R\leftarrow V(G)\setminus\mathrm{RefineCover}(G,C,v_{\max},B_R) ▷ restarts from C∪{vmax⁡}C\cup\{v_{\max}\}

  12. if ∣IR∣>∣S∣|I_R|>|S| then S←IRS\leftarrow I_R

  13. end if

  14. IL←LocalRestartSearch(G,S,BL)I_L\leftarrow\mathrm{LocalRestartSearch}(G,S,B_L) ▷ Algorithm 4

  15. if ∣IL∣>∣S∣|I_L|>|S| then S←ILS\leftarrow I_L

  16. end if

  17. II←V(G)∖ImproveVertexCover(G,V(G)∖S,BI,σ)I_I\leftarrow V(G)\setminus\mathrm{ImproveVertexCover}(G,V(G)\setminus S,B_I,\sigma) ▷ (1, 2)-swaps [18]

  18. if ∣II∣>∣S∣|I_I|>|S| then S←IIS\leftarrow I_I

  19. end if

  20. S←MaximizeSolution(G,S)S\leftarrow\mathrm{MaximizeSolution}(G,S) ▷ Algorithm 3

  21. return S∪IisoS\cup I_{\mathrm{iso}}

The calls to Salvador. Three routines of the package salvador (version ≥0.1.4\geq0.1.4) [17] are used. Salvador(G)\mathrm{Salvador}(G) in line 8 is salvador.algorithm.find_vertex_cover, the final cover of the seventeen-strategy ensemble of [16]. RefineCover(G,C,vmax⁡,B)\mathrm{RefineCover}(G,C,v_{\max},B) in line 11 is salvador.algorithm.refine_cover: for every u∈C∪{vmax⁡}u\in C\cup\{v_{\max}\} it forms the vertex cover (C∖{u})∪N(u)(C\setminus\{u\})\cup N(u), that is, it moves uu into V∖CV\setminus C and evicts the neighbours of uu, grows the resulting independent set into a maximal one by MaximizeSolution\mathrm{MaximizeSolution}, and keeps the smallest resulting cover. When CC is a minimal cover, the routine evaluates each restart locally on the neighbours of the evicted vertices, which gives the same set as the global MaximizeSolution\mathrm{MaximizeSolution} pass; every adjacency scan and the sorting of every local list are charged to a work counter, and the routine stops when the next restart would exceed B(n+m)B(n+m). ImproveVertexCover(G,C′,B,σ)\mathrm{ImproveVertexCover}(G,C',B,\sigma) in line 17 is salvador.local_search.improve_vertex_cover: it improves the independent set V∖C′V\setminus C' by the (1, 2)-swaps of Andrade, Resende and Werneck [18], which remove one solution vertex and insert two non-adjacent 1-tight neighbours of it, followed by an iterated local search that forces a random vertex into the set, re-inserts free vertices, runs (1, 2)-swaps around the change and undoes the step when the set shrinks. Its random choices use the fixed seed σ\sigma (ILS_SEED = 20261031 in the package), and its work is charged to a counter with limit B(n+m)B(n+m).

Local restarts. Algorithm 4 applies the restart of RefineCover\mathrm{RefineCover} to the incumbent SS instead of the Salvador\mathrm{Salvador} cover. A move at u∉Su\notin S forces uu into SS, evicts the k=t(u)k=t(u) vertices of X=N(u)∩SX=N(u)\cap S, and refills the freed region with every vertex w∈N(X)w\in N(X) that has no neighbour left in SS, in ascending order of degree. The move is committed when it inserts at least kk vertices besides uu, a (k,k+1)(k,k+1)-improvement, and undone otherwise; committed moves requeue the vertices whose tightness decreased, so improvements are chained.

Algorithm 2 PureCaroWeiBaseline(GG): dynamic minimum-degree greedy

Require: Undirected graph G=(V,E)G = (V, E)

Ensure: A maximal independent set II with ∣I∣≥∑v1/(deg⁡G(v)+1)|I| \ge\sum_{v} 1/(\operatorname{deg}_G(v) + 1)

1: deg⁡[v]←deg⁡G(v)\operatorname{deg}[v] \leftarrow\operatorname{deg}_G(v) for every vv; place every vv into bucket B[deg⁡[v]]B[\operatorname{deg}[v]]; ptr⁡←0\operatorname{ptr} \leftarrow0 2: removed⁡←∅\operatorname{removed} \leftarrow\varnothing; I←∅I \leftarrow\varnothing 3: while some vertex is not removed do 4: &nbsp;&nbsp;&nbsp;&nbsp;advance ptr⁡\operatorname{ptr} to the first bucket whose front is not removed, discarding removed fronts 5: &nbsp;&nbsp;&nbsp;&nbsp;v←v \leftarrow pop front of B[ptr⁡]B[\operatorname{ptr}]; I←I∪{v}I \leftarrow I \cup\{v\}; mark vv removed 6: &nbsp;&nbsp;&nbsp;&nbsp;for each neighbour uu of vv that is not removed do 7: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mark uu removed 8: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for each neighbour w≠vw \ne v of uu that is not removed do 9: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;deg⁡[w]←deg⁡[w]−1\operatorname{deg}[w] \leftarrow\operatorname{deg}[w] - 1; append ww to B[deg⁡[w]]B[\operatorname{deg}[w]] 10: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if deg⁡[w]<ptr⁡\operatorname{deg}[w] < \operatorname{ptr} then ptr⁡←deg⁡[w]\operatorname{ptr} \leftarrow\operatorname{deg}[w] 11: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end if 12: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end for 13: &nbsp;&nbsp;&nbsp;&nbsp;end for 14: end while 15: return II

Algorithm 3 MaximizeSolution(GG, SS): repair and grow in O(n+m)O(n + m)

Require: Undirected graph G=(V,E)G = (V, E); candidate set S⊆VS \subseteq V (may contain conflicts)

Ensure: A maximal independent set of GG

1: I←SI \leftarrow S; conflicts⁡[u]←∣N(u)∩I∣\operatorname{conflicts}[u] \leftarrow|N(u) \cap I| for u∈Iu \in I 2: for each edge {u,v}∈E\{u, v\} \in E do                                      ▹ Phase 1: conflict resolution 3: &nbsp;&nbsp;&nbsp;&nbsp;if u∈Iu \in I and v∈Iv \in I then 4: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ℓ←u\ell\leftarrow u if conflicts⁡[u]≥conflicts⁡[v]\operatorname{conflicts}[u] \ge\operatorname{conflicts}[v] else vv 5: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I←I∖{ℓ}I \leftarrow I \setminus\{\ell\}; decrement conflicts⁡[w]\operatorname{conflicts}[w] for every w∈N(ℓ)∩Iw \in N(\ell) \cap I 6: &nbsp;&nbsp;&nbsp;&nbsp;end if 7: end for 8: place every u∉Iu \notin I into the bucket B[deg⁡G(u)]B[\operatorname{deg}_G(u)]                       ▹ Phase 2: growth by counting sort 9: for d=0,…,Δd = 0, \ldots, \Delta do 10: &nbsp;&nbsp;&nbsp;&nbsp;for each u∈B[d]u \in B[d] do 11: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if N(u)∩I=∅N(u) \cap I = \varnothing then I←I∪{u}I \leftarrow I \cup\{u\} 12: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end if 13: &nbsp;&nbsp;&nbsp;&nbsp;end for 14: end for 15: return II

Algorithm 4 LocalRestartSearch($G$, $S$, $B$): budgeted local restarts
Require: Graph $G$ without self-loops; independent set $S$; budget $B$
Ensure: An independent set $S'$ with $|S'| \ge |S|$
1: maintain $t(v)=|N(v)\cap S|$ for every $v$; work $\leftarrow$ cost of the initialisation; limit $\leftarrow$ work $+B(n+m)+1$
2: $Q \leftarrow$ the vertices outside $S$, sorted by $(t(v),\deg v)$ with two counting sorts
3: while $Q\ne\varnothing$ and work $\le$ limit do
4: \phantom{while }u \leftarrow Q.\mathrm{PopFront}(); work $\leftarrow$ work $+1$
5: \phantom{while }if $u\in S$ then continue
6: \phantom{while }end if
7: \phantom{while }if $t(u)=0$ then insert $u$ into $S$; continue
8: \phantom{while }end if
9: \phantom{while }$X\leftarrow N(u)\cap S$; $T\leftarrow\sum_{x\in X}\deg x$; work $\leftarrow$ work $+\deg u$
10: \phantom{while }if work $+3(T+\deg u+|X|+1)+T\log_2(T+1)>\mathrm{limit}$ then continue
11: \phantom{while }end if
12: \phantom{while }remove every $x\in X$ from $S$; insert $u$ into $S$ \hfill $\triangleright$ logged
13: \phantom{while }$R\leftarrow\{w\in N(X):w\notin S,\ t(w)=0\}$, sorted by $(\deg w,w)$
14: \phantom{while }for each $w\in R$ do
15: \phantom{while }\phantom{while }if $w\notin S$ and $t(w)=0$ then insert $w$ into $S$ \hfill $\triangleright$ logged
16: \phantom{while }\phantom{while }end if
17: \phantom{while }end for
18: \phantom{while }if $S$ grew then append to $Q$ every $w\in N(X)\setminus S$ not in $Q$ \hfill $\triangleright$ commit
19: \phantom{while }else undo the logged operations
20: \phantom{while }end if
21: end while
22: return $S$

Correctness of the Algorithm

Lemma 4.1. For every S′⊆V(G)S'\subseteq V(G), MaximizeSolution(G,S′G,S') returns a maximal independent set of GG that contains every vertex of S′S' having no neighbour in S′S'. In particular, if S′S' is independent, then S′S' is contained in the output.

Proof. During Phase 1 the set only shrinks. If an edge had both endpoints in the set at the end of Phase 1, both endpoints would have been present when that edge was scanned, and one of them would have been discarded; so the set is independent after Phase 1. A vertex of S′S' without neighbours in S′S' never lies on a scanned conflicting edge, so it is never discarded. Phase 2 adds a vertex only if it has no neighbour in the current set, so independence is preserved. Every vertex outside the set after Phase 1 is placed in a bucket and examined; if it is rejected, it has a neighbour in the set at that moment, and that neighbour is never removed. Hence the output is maximal.

Lemma 4.2. Algorithm 2 returns a maximal independent set II of GG that is produced by the minimum-degree greedy rule: every chosen vertex has minimum degree in the graph of the vertices not yet removed. Consequently ∣I∣≥∑v∈V1deg⁡G(v)+1≥nΔ+1|I|\ge\sum_{v\in V}\frac{1}{\deg_G(v)+1}\ge\frac{n}{\Delta+1}.

Proof. A chosen vertex is never adjacent to a previously chosen one, because all neighbours of a chosen vertex are removed at once; every vertex is either chosen or removed as a neighbour of a chosen vertex, so II is maximal. Degrees only decrease, and every vertex is appended to the bucket of its current degree whenever that degree changes, with the pointer moved back when a degree drops below it. Hence a vertex popped from bucket ptr that is not removed has current degree at most ptr, and every bucket below ptr contains only removed vertices; so the chosen vertex has minimum current degree. Let vv be chosen when its current degree is dd, and let N[v]N[v] be its closed neighbourhood in the current graph. Every u∈N[v]u\in N[v] has current degree at least dd and original degree at least its current degree, so ∑u∈N[v]1deg⁡G(u)+1≤(d+1)1d+1=1\sum_{u\in N[v]}\frac{1}{\deg_G(u)+1}\le(d+1)\frac{1}{d+1}=1. The closed neighbourhoods of the chosen vertices partition VV, so ∑v∈V1deg⁡G(v)+1≤∣I∣\sum_{v\in V}\frac{1}{\deg_G(v)+1}\le|I|, and deg⁡G(v)≤Δ\deg_G(v)\le\Delta gives the second inequality.

Lemma 4.3 (Properties of the Salvador routines). Let GG be a graph without self-loops and isolated vertices.

(i) The cover CC of line 8 is a vertex cover with ∣C∣≤2τ(G)−r(G)|C| \le2\tau(G) - r(G), computed in O((n+m)αA(n))O((n + m)\alpha_A(n)) time [16].

(ii) RefineCover and ImproveVertexCover return vertex covers no larger than their input cover, in O(B(n+m)+n+m)O(B(n+m)+n+m) time for a budget BB [16, 17].

Proof. (i) is the bound 2τ−r2\tau-r and the running time proved for Salvador 0.1.4 in [16]. For (ii), RefineCover returns either its input or a cover of the form V∖IV \setminus I with II independent and strictly larger than V∖CV \setminus C; ImproveVertexCover returns the complement of an independent set that is at least as large as the complement of its input, because worse steps are undone. The running times are those of the strategies c17c_{17} and c14c_{14} of [16], whose work counters stop after B(n+m)B(n+m) units plus the cost of one step, which is O(n+m)O(n+m).

Lemma 4.4. For an independent set SS of a graph without self-loops, Algorithm 4 returns an independent set S′S' with ∣S′∣≥∣S∣|S'| \ge|S|.

Proof. The tightness counters are updated on every insertion and removal, so t(v)=∣N(v)∩S∣t(v)=|N(v)\cap S| holds at all times. A vertex is inserted only when its tightness is 0: a free vertex directly, the vertex uu after all of N(u)∩SN(u)\cap S has been removed, and a refill vertex ww after the check t(w)=0t(w)=0. Hence SS stays independent. A free insertion increases ∣S∣|S|. A move is kept only if 1+(number of refill insertions)>∣X∣1+(\text{number of refill insertions})>|X|, that is, if ∣S∣|S| increases; otherwise the log is undone in reverse order, which restores SS and all counters. So ∣S∣|S| never decreases.

Theorem 4.5. Algorithm 1 (FindIndependentSet) returns a maximal independent set of the input graph, where self-loops are ignored.

Proof. ICWI_{\mathrm{CW}} is independent by Lemma 4.2. V(G)∖CV(G)\setminus C, IRI_R and III_I are complements of vertex covers by Lemma 4.3, hence independent, and ILI_L is independent by Lemma 4.4. So the incumbent SS is independent before the last call, and MaximizeSolution(G,S)(G,S) returns a maximal independent set of the working graph by Lemma 4.1. Isolated vertices have no neighbours, so S∪IisoS\cup I_{\mathrm{iso}} is independent in the input graph; it is maximal, because a vertex outside it is a non-isolated vertex of the working graph and has a neighbour in SS.

Proved Bounds

Theorem 5.1 (The complementary cover). Let GG be a graph without self-loops, SS the set returned by Algorithm 1 and CC the Salvador cover of line 8. Then V∖SV\setminus S is a vertex cover of GG and

∣V∖S∣≤∣C∣≤2τ(G)−r(G).|V\setminus S| \le|C| \le2\tau(G)-r(G).

Proof. V∖SV\setminus S is a vertex cover because SS is independent (Theorem 4.5). The incumbent starts with at least ∣V(G)∖C∣|V(G)\setminus C| vertices and is only replaced by larger sets; the final MaximizeSolution call keeps the incumbent, which is independent, by Lemma 4.1. Hence ∣S∣≥∣V(G)∖C∣+∣Iisol∣|S|\ge|V(G)\setminus C|+|I_{\mathrm{isol}}|, and ∣V∖S∣≤∣C∣|V\setminus S|\le|C|. Isolated vertices change neither τ\tau nor rr, so Lemma 4.3(i) gives ∣C∣≤2τ(G)−r(G)|C|\le2\tau(G)-r(G).

The package exposes this cover as esperanza.algorithm.find_vertex_cover, which also adds every vertex with a self-loop.

Corollary 5.2. For every graph GG without self-loops, ∣S∣≥2α(G)−n+r(G)|S|\ge2\alpha(G)-n+r(G). Hence, if α(G)=βn\alpha(G)=\beta n with β>12\beta>\frac{1}{2}, then α(G)/∣S∣≤β/(2β−1)\alpha(G)/|S|\le\beta/(2\beta-1).

Proof. By Theorem 5.1, ∣S∣≥n−2τ(G)+r(G)=n−2(n−α(G))+r(G)|S|\ge n-2\tau(G)+r(G)=n-2(n-\alpha(G))+r(G). For α=βn\alpha=\beta n with β>12\beta>\frac{1}{2} this gives ∣S∣≥(2β−1)n|S|\ge(2\beta-1)n.

Theorem 5.3 (Bounded degree). For every graph GG of maximum degree Δ\Delta, the set SS returned by Algorithm 1 satisfies

∣S∣≥∑v1deg⁡v+1≥nΔ+1|S| \ge\sum_v \frac{1}{\deg v+1} \ge\frac{n}{\Delta+1}

and

α(G)∣S∣≤Δ+23.\frac{\alpha(G)}{|S|} \le\frac{\Delta+2}{3}.

Proof. The incumbent starts with at least ∣ICW∣|I_{\mathrm{CW}}| vertices on the working graph and never shrinks (proof of Theorem 5.1), and isolated vertices are added to both SS and every maximum independent set. ICWI_{\mathrm{CW}} is produced by the minimum-degree greedy rule (Lemma 4.2), which has ratio at most (Δ+2)/3(\Delta+ 2)/3 on graphs of maximum degree Δ\Delta [6], and satisfies the Caro–Wei bound by Lemma 4.2.

Theorem 5.4 (Ratio O(n)O(\sqrt{n}) on four classes). Let GG be a graph on nn vertices without self-loops and isolated vertices, α=α(G)\alpha= \alpha(G), CC the Salvador cover of line 8 and SS the set returned by Algorithm 1. If at least one of the following conditions holds, then α/∣S∣≤2n\alpha/|S| \le2\sqrt{n}:

(a) α≤2n\alpha\le2\sqrt{n};

(b) 2α−n≥α/n2\alpha- n \ge\alpha/\sqrt{n};

(c) ∣I∗∖C∣≥α/n|I^* \setminus C| \ge\alpha/\sqrt{n} for some maximum independent set I∗I^* of GG;

(d) Δ≤n\Delta\le\sqrt{n}.

Proof. By the proofs of Theorems 5.1 and 5.3, ∣S∣≥∣V∖C∣|S| \ge|V \setminus C| and ∣S∣≥∣ICW∣|S| \ge|I_{\mathrm{CW}}|. (a) SS is non-empty, so α/∣S∣≤α≤2n\alpha/|S| \le\alpha\le2\sqrt{n}. (b) ∣C∣≤2τ=2(n−α)|C| \le2\tau= 2(n-\alpha) by Lemma 4.3(i), so ∣S∣≥n−∣C∣≥2α−n≥α/n|S| \ge n-|C| \ge2\alpha-n \ge\alpha/\sqrt{n} and α/∣S∣≤n\alpha/|S| \le\sqrt{n}. (c) I∗∖C⊆V∖CI^* \setminus C \subseteq V \setminus C, so ∣S∣≥∣I∗∖C∣≥α/n|S| \ge|I^* \setminus C| \ge\alpha/\sqrt{n} and α/∣S∣≤n\alpha/|S| \le\sqrt{n}. (d) By Lemma 4.2 and α≤n\alpha\le n,

∣S∣≥∣ICW∣≥nΔ+1≥nn+1≥n2≥α2n,|S| \ge|I_{\mathrm{CW}}| \ge\frac{n}{\Delta+1} \ge\frac{n}{\sqrt{n}+1} \ge\frac{\sqrt{n}}{2} \ge\frac{\alpha}{2\sqrt{n}},

where nn+1≥n2\frac{n}{\sqrt{n}+1} \ge\frac{\sqrt{n}}{2} is equivalent to n≥nn \ge\sqrt{n}. Hence α/∣S∣≤2n\alpha/|S| \le2\sqrt{n}.

The four conditions do not cover every graph. A graph satisfies none of them exactly when Δ>n\Delta> \sqrt{n}, 2n<α2\sqrt{n} < \alpha, 2α−n<α/n2\alpha-n < \alpha/\sqrt{n} and ∣I∗∖C∣<α/n|I^* \setminus C| < \alpha/\sqrt{n} for every maximum independent set I∗I^*. In that case every maximal independent set has at least n/(Δ+1)n/(\Delta+1) vertices, because each of its vertices dominates at most Δ+1\Delta+1 vertices, but n/(Δ+1)<α/(2n)n/(\Delta+1) < \alpha/(2\sqrt{n}), and this does not give ∣S∣≥α/(2n)|S| \ge\alpha/(2\sqrt{n}). The ratio 2n2\sqrt{n} on all graphs is therefore stated as Conjecture 6.6 in § 6. On general graphs, by [2, 3], a polynomial-time ratio of n1−εn^{1-\varepsilon} for some ε>0\varepsilon> 0 would imply P = NP.

The barrier Δ/log⁡22Δ\Delta/\log_2^2 \Delta. Austrin, Khot and Safra proved that, assuming the Unique Games Conjecture, Maximum Independent Set on graphs of maximum degree Δ\Delta is hard to approximate within a factor O(Δ/log⁡22Δ)O(\Delta/\log_2^2 \Delta) for all sufficiently large Δ\Delta [9]. Without any conjecture, Chan proved that the factor O(Δ/log⁡4Δ)O(\Delta/\log^4 \Delta) is NP-hard [10], and the best known polynomial-time ratio is O(Δlog⁡log⁡Δ/log⁡Δ)O(\Delta\log\log\Delta/\log\Delta) [7]. Consequently, a polynomial-time algorithm whose ratio on graphs of maximum degree Δ\Delta is o(Δ/log⁡22Δ)o(\Delta/\log_2^2 \Delta) as Δ→∞\Delta\to\infty would refute the Unique Games Conjecture unless P = NP. The ratio (Δ+2)/3(\Delta+2)/3 proved in Theorem 5.3 is linear in Δ\Delta, so it lies above this threshold for large Δ\Delta and is consistent with both hardness results. § 8.3 reports the measured ratios of Esperanza together with the value Δ/log⁡22Δ\Delta/\log_2^2 \Delta for each instance; since the threshold is asymptotic and its constant is not explicit, finite instances do not decide whether the ratio of Esperanza grows more slowly than Δ/log⁡22Δ\Delta/\log_2^2 \Delta.

The Conjectured Bounds and Their Consequences

Let MM be the maximal matching returned by NetworkX’s min_maximal_matching [19] on the working graph; it is the matching of the strategy c2c_2 of Salvador [16]. Every vertex cover contains an endpoint of each of the ∣M∣|M| disjoint edges of MM, and the 2∣M∣2|M| matched vertices form a vertex cover, so ∣M∣≤τ(G)≤2∣M∣|M| \le\tau(G) \le2|M|.

Conjecture 6.1 (Esperanza bound). For every graph GG without self-loops and isolated vertices, the set SS returned by Algorithm 1 satisfies

∣V∖S∣≤2τ(G)−∣M∣,equivalently∣V∖S∣−τ(G)≤τ(G)−∣M∣.|V \setminus S| \le2\tau(G)-|M|,\qquad\text{equivalently}\qquad|V \setminus S|-\tau(G) \le\tau(G)-|M|.

Proposition 6.2. Conjecture 6.1 is implied by the Ensemble-bound conjecture of [16], which states ∣C∣≤2τ(G)−∣M∣|C| \le2\tau(G)-|M| for the Salvador cover CC. If Conjecture 6.1 holds, then ∣V∖S∣≤32τ(G)|V \setminus S| \le\frac{3}{2}\tau(G) for every graph.

Proof. ∣V∖S∣≤∣C∣|V \setminus S| \le|C| by Theorem 5.1. The second statement follows from ∣M∣≥τ(G)/2|M| \ge\tau(G)/2.

Proposition 6.3 (Per-instance certificate). Let L≤τ(G)≤UL \le\tau(G) \le U be a lower and an upper bound. If ∣V∖S∣≤2L−∣M∣|V \setminus S| \le2L - |M|, then Conjecture 6.1 holds on GG; if ∣V∖S∣>2U−∣M∣|V \setminus S| > 2U - |M|, it fails on GG. If ∣V∖S∣≤32L|V \setminus S| \le\frac{3}{2}L, then ∣V∖S∣≤32τ(G)|V \setminus S| \le\frac{3}{2}\tau(G).

Proof. 2L−∣M∣≤2τ−∣M∣≤2U−∣M∣2L - |M| \le2\tau- |M| \le2U - |M|, and 32L≤32τ\frac{3}{2}L \le\frac{3}{2}\tau.

Proposition 6.4 (NO-type instances). If GG has no independent set of more than δn\delta n vertices with δ≤14\delta\le\frac{1}{4}, then every vertex cover C′C' of GG satisfies ∣C′∣≤2τ(G)−∣M∣|C'| \le2\tau(G) - |M|. In particular, Conjecture 6.1 holds on the NO-type instances of the reduction of Khot and Regev [11] with δ≤14\delta\le\frac{1}{4}.

Proof. τ(G)=n−α(G)≥(1−δ)n\tau(G) = n - \alpha(G) \ge(1 - \delta)n and ∣M∣≤n/2|M| \le n/2, so ∣C′∣−τ≤n−τ≤δn≤(12−δ)n≤τ−∣M∣|C'| - \tau\le n - \tau\le\delta n \le(\frac{1}{2} - \delta)n \le\tau- |M|.

Theorem 6.5 (Conditional consequence). Assume that for every fixed ε0>0\varepsilon_0 > 0 it is NP-hard to approximate Minimum Vertex Cover within 2−ε02 - \varepsilon_0. If Conjecture 6.1 is proved, then P = NP. The assumption holds if UGC holds [11], and in particular if the theorem reported in [12] holds; without any assumption, a proof of Conjecture 6.1 would refute UGC unless P = NP.

Proof. Algorithm 1 runs in polynomial time (Theorem 7.2), and the function G↦V∖SG \mapsto V \setminus S returns a vertex cover. A proof of Conjecture 6.1 makes it a 32\frac{3}{2}-approximation (Proposition 6.2), a ratio of the form 2−ε02 - \varepsilon_0 with ε0=12\varepsilon_0 = \frac{1}{2}, so under the assumption it solves an NP-hard problem in polynomial time. The theorem of Khot and Regev [11] derives the assumption from UGC.

Theorem 6.5 is a conditional implication, not a proof of P = NP. The theorem of [12] had not been peer reviewed at the time of writing; we cite it as reported and have not checked the formalization. By Proposition 6.4, a counterexample to Conjecture 6.1 with α≤n/4\alpha\le n/4 does not exist, so a counterexample has an independent set of more than a quarter of the vertices.

Conjecture 6.6 (Ratio O(n)O(\sqrt{n})). For every graph GG on nn vertices without self-loops, the set SS returned by Algorithm 1 satisfies α(G)/∣S∣≤2n\alpha(G)/|S| \le2\sqrt{n}.

By Theorem 5.4, Conjecture 6.6 holds on every graph that satisfies one of the conditions (a)–(d), in particular on every graph with Δ≤n\Delta\le\sqrt{n}; a counterexample has Δ>n\Delta> \sqrt{n} and satisfies none of (a)–(c).

Theorem 6.7 (Conditional consequence of Conjecture 6.6). If Conjecture 6.6 is proved, then P = NP.

Proof. Algorithm 1 runs in polynomial time (Theorem 7.2). For n≥16n \ge16, 2n≤n3/42\sqrt{n} \le n^{3/4}, so Conjecture 6.6 would give a polynomial-time approximation of Maximum Independent Set within n1−εn^{1-\varepsilon} with ε=14\varepsilon= \frac{1}{4}, which is NP-hard [3].

Runtime Analysis

Hash-table operations on vertex sets are counted as O(1)O(1) expected time, as in the implementation.

Lemma 7.1. Algorithm 4 runs in O(B(n+m)+n+m)O(B(n + m) + n + m) time.

Proof. The initialisation, the counters and the two counting sorts take O(n+m+Δ)=O(n+m)O(n + m + \Delta) = O(n + m) time. Every operation of the main loop is charged to the counter work: each pop costs 1, the computation of XX costs deg⁡u\deg u, every insertion or removal of a vertex vv costs deg⁡v+1\deg v + 1, the scan of N(X)N(X) costs ∑x∈Xdeg⁡x\sum_{x\in X}\deg x, the sort of kk refill candidates costs klog⁡2kk\log_2 k, and the requeueing costs ∑x∈Xdeg⁡x\sum_{x\in X}\deg x. The loop runs only while work ≤\le limit =O(B(n+m)+n+m)= O(B(n + m) + n + m), and a move is started only if work plus the bound 3(T+deg⁡u+∣X∣+1)+Tlog⁡2(T+1)3(T + \deg u + |X| + 1) + T\log_2(T + 1) is at most limit. The bound covers every charge of the move except the insertions of the refill candidates and their updates, which cost at most 2∑w(deg⁡w+1)≤2(2m+n)2\sum_w(\deg w + 1) \le2(2m + n) over distinct vertices ww; such a move ends the loop as soon as work exceeds limit. Hence the total work is O(B(n+m)+n+m)O(B(n + m) + n + m).

Theorem 7.2 (Running time). For fixed budgets BRB_R, BLB_L, BIB_I, Algorithm 1 runs in O((n+m)αA(n))O((n + m)\alpha_A(n)) expected time, where αA\alpha_A is the inverse Ackermann function; in general it runs in O((n+m)(αA(n)+BR+BL+BI))O((n + m)(\alpha_A(n) + B_R + B_L + B_I)) time.

Proof. Copying the graph and removing self-loops and isolated vertices take O(n+m)O(n+m) time. Algorithm 2 takes O(n+m)O(n+m) time: every vertex is removed once, every degree decrement costs O(1)O(1) and appends one bucket entry, and the pointer moves forward at most Δ\Delta times plus once for every backward move, each of which follows a decrement. Salvador takes O((n+m)αA(n))O((n+m)\alpha_A(n)) time, and RefineCover and ImproveVertexCover take O(B(n+m)+n+m)O(B(n+m)+n+m) time each (Lemma 4.3). Building the adjacency lists, Algorithm 4 (Lemma 7.1), Algorithm 3, the set differences and the comparisons take O(B(n+m)+n+m)O(B(n+m)+n+m) time.

With the default budgets BR=BL=BI=100B_R=B_L=B_I=100, the bound of Theorem 7.2 is O((n+m)αA(n))O((n+m)\alpha_A(n)). Passing restart_budget=None removes the cap of RefineCover, whose running time is then O(∣C∣(n+m))O(|C|(n+m)).

Experiments

All experiments use Esperanza 0.1.6 and Salvador 0.1.4, and the three scripts of the folder car/ of the repository: experiment.py (§ 8.1), ugc_candidate.py (§ 8.2) and bounded_degree.py (§ 8.3). The scripts import the repository’s own esperanza/. Exact optima and bounds are computed with scipy.optimize.milp [20], which calls the HiGHS solver [21]. The environment is Windows 11, Python 3.12.3 and NetworkX 3.6.1 [19]; wall-clock times are machine dependent.

Certified suite of 30000 graphs

Instance generation. A single master generator random.Random(42) is consumed in the order of Table 2. Each random graph receives its own seed, drawn as randrange(2^{31}) from the master generator. The amplified family is built after the first six. Its bases are the connected gnp and regular instances with n≤12n \le12, ranked by their ratio ρ\rho with a stable sort, of which the first 25 are kept; since ρ=1\rho=1 on all of them, these are the first 25 such instances in generation order. Each amplified instance draws a base uniformly. With probability 1/21/2 it is a disjoint union of c∼U{2,…,8}c \sim U\{2,\ldots,8\} copies of the base, and otherwise an independent blow-up with cluster size t∼U{2,…,6}t \sim U\{2,\ldots,6\}, in which each vertex becomes tt pairwise non-adjacent copies and each edge a complete bipartite join between the corresponding clusters.

FamilyCountGeneratorParametersnnmm
gnp15000gnp_random_graph(nn, pp)n∼U{6,…,16}n \sim U\{6,\ldots,16\}, p∼U(0.15,0.85)p \sim U(0.15,0.85)6–160–109
bipartite_gnp6000bipartite_random_graph(a,b,pa,b,p)a,b∼U{3,…,14}a,b \sim U\{3,\ldots,14\}, p∼U(0.10,0.50)p \sim U(0.10,0.50)6–280–104
regular3000random_regular_graph(d,nd,n)d∼U{3,…,5}d \sim U\{3,\ldots,5\}, n∈{max⁡(d+1,8),…,16}n \in\{\max(d+1,8),\ldots,16\}, ndnd even8–1612–40
star2000star_graph(kk)k∼U{3,…,80}k \sim U\{3,\ldots,80\}4–813–80
complete1000complete_graph(nn)n∼U{3,…,30}n \sim U\{3,\ldots,30\}3–303–435
complete_bipartite1000complete_bipartite_graph(a,ba,b)a∼U{2,…,12}a \sim U\{2,\ldots,12\}, b∼U{a,…,20}b \sim U\{a,\ldots,20\}4–324–240
amplified2000disjoint union or blow-upsee text12–9616–1368

Table 2. Instance families of the certified suite (master seed 42). U{a,…,b}U\{a,\ldots,b\} is uniform on integers and U(a,b)U(a,b) uniform on reals; all generators are NetworkX functions. The last two columns give the realised ranges of nn and mm.

Exact optimum. For each instance we solve

max⁡∑v∈Vxvsubject toxu+xv≤1 ∀{u,v}∈E,xv∈{0,1},\max\sum_{v\in V} x_v \quad\text{subject to}\quad x_u+x_v\le1\ \forall\{u,v\}\in E,\quad x_v\in\{0,1\},

with the default options of scipy.optimize.milp (no time limit; HiGHS relative gap tolerance 10−410^{-4}), accept a solve only when HiGHS reports an optimal status, and round the objective to the nearest integer; since α(G)≤96\alpha(G)\le96, the tolerance is below one vertex, so the rounded value is α(G)\alpha(G). Every returned set is verified to be independent. The reported ratio is ρ=α(G)/∣S∣\rho=\alpha(G)/|S|.

Results. Esperanza 0.1.6 returns a maximum independent set on all 30 000 instances; the worst and the mean ratio are 1.000000 in every family (Table 3), and the returned sets have 269 247 vertices in total. The complete run, including the integer programs, took 747.9 s.

FamilyCountWorstMean
gnp150001.0001.000
bipartite_gnp60001.0001.000
regular30001.0001.000
star20001.0001.000
complete10001.0001.000
complete_bipartite10001.0001.000
amplified20001.0001.000
All300001.0001.000

Table 3. Certified suite: worst and mean ratio α(G)/∣S∣\alpha(G)/|S| of Esperanza 0.1.6 per family.

YES-type instances of the Khot–Regev reduction

The instances are those of Part D of the Salvador experiments [16], with the same generator, seed (20261009) and instance names. A Unique Games instance with labels [k][k] is generated on a random dd-regular graph with NN vertices and a planted labelling LL, each edge carrying a permutation πvw\pi_{vw} with πvw(L(w))=L(v)\pi_{vw}(L(w)) = L(v) (random, or a shift modulo kk in the linear variant), and a fraction η\eta of the edges receive a random constraint. Every vertex vv becomes a block of ss subsets x⊆[k]x \subseteq[k] drawn from the pp-biased measure, and (v,x)(v,x) and (w,y)(w,y) are joined when xx and πvw(y)\pi_{vw}(y) are disjoint [11].

The dictator set {(v,x):L(v)∈x}\{(v,x) : L(v) \in x\}, made independent greedily on violated constraints, gives the planted cover, an upper bound on τ\tau. The base family has k=4k = 4, p=0.45p = 0.45, η=0\eta= 0, d=4d = 4, s=16s = 16, and nine more change one parameter. With N∈{40,80}N \in\{40, 80\} and two instances per family and size, this gives 40 instances with 640 to 2 560 vertices.

For every instance, LL is the larger of the linear relaxation and the dual bound of an integer program (HiGHS, 90 s), and UU is the smaller of the planted cover, the integer-program value and the two covers computed; the integer program proved τ\tau on 26 instances. Each instance is classified by Proposition 6.3 as certified (∣C∣≤2L−∣M∣|C| \le2L - |M|), violated (∣C∣>2U−∣M∣|C| > 2U - |M|) or open, for C=V∖SC = V \setminus S (E) and for the Salvador cover (S). Table 4 reports the counts.

FamilyInst.E cert.E openE viol.S cert.S openS viol.E<SOpt.32\frac{3}{2}max ∣C∣/L|C|/Lmin ∣S∣/n|S|/n
Base family (k=4k = 4, p=0.45p = 0.45, η=0\eta= 0)44004000241.04870.4445
Label size k=3k = 344004000341.02320.4469
Label size k=6k = 644004000441.00000.5055
Bias p=0.35p = 0.3543103101141.15130.3812
Bias p=0.49p = 0.4944004000441.00000.5070
Noise η=0.02\eta= 0.0244004000141.04680.4406
Noise η=0.1\eta= 0.144004000041.02390.4469
Constraint degree d=8d = 844004000341.00670.4164
Samples per block s=32s = 3243103100041.14830.4191
Linear UG, Max-2-Lin(Zk\mathbb{Z}_k)44004001141.01480.4656
All4038203820219401.15130.3812

Table 4. Khot–Regev YES instances: classification of ∣C∣≤2τ−∣M∣|C| \le2\tau- |M| for Esperanza (E) and Salvador (S); “E<S” counts covers of Esperanza strictly smaller than the Salvador cover; “Opt.” counts optimal covers of Esperanza; “32\frac{3}{2}” counts covers with ∣C∣≤32L|C| \le\frac{3}{2}L; the last two columns give the largest ∣C∣/L|C|/L and the smallest ∣S∣/n|S|/n.

The inequality ∣C∣≤2τ−∣M∣|C| \le2\tau- |M| is certified on 38 instances and violated on none, for both covers. The two open instances have τ\tau unknown: on kr_p0.35_N80_r0 (n=1 280n = 1\,280), ∣C∣=776|C| = 776, ∣M∣=574|M| = 574 and L=674L = 674, so 2L−∣M∣=7742L - |M| = 774; on kr_s32_N80_r0 (n=2 560n = 2\,560), ∣C∣=1 487|C| = 1\,487, ∣M∣=1 134|M| = 1\,134 and L=1 295L = 1\,295, so 2L−∣M∣=1 4562L - |M| = 1\,456. On both, the two covers have the same size. Esperanza is strictly smaller than Salvador on two instances (683 against 707 on kr_linear_N80_r0, and 763 against 766 on kr_p0.35_N80_r1). Where τ\tau is known, the cover is optimal on 19 of 26 instances, with mean ratio 1.0024 and maximum 1.0232 (705 against 689 on kr_s32_N40_r0, planted cover 690). The cover is no larger than the planted one on 34 instances and strictly smaller on 28. Every instance passes the 32\frac{3}{2} certificate, and the largest certified ratio is ∣C∣/L=1.1513|C|/L = 1.1513. In the independent-set form of the reduction, the returned set contains at least 0.3812 nn vertices on every instance. Esperanza took at most 5.72 s per instance (mean 2.01 s), and the whole run 2 058.9 s, mostly in the integer programs.

Bounded-degree graphs

The script bounded_degree.py measures the ratio on graphs of bounded degree. For every instance it computes SS and the range αlow≤α(G)≤αup\alpha_{\mathrm{low}} \le\alpha(G) \le\alpha_{\mathrm{up}}, where αlow\alpha_{\mathrm{low}} is the largest of ∣S∣|S|, the planted independent set, the two baselines below and the integer-program value, and αup\alpha_{\mathrm{up}} is the smaller of nn minus the linear relaxation of vertex cover and the integer-program dual bound (HiGHS, 60 s). It reports αup/∣S∣\alpha_{\mathrm{up}/|S|}, a certified upper bound on the ratio, the same bound for the Caro–Wei baseline ICWI_{\mathrm{CW}} and for the complement of the Salvador cover, and the normalised value (αup/∣S∣)/(Δ/log⁡22Δ)(\alpha_{\mathrm{up}}/|S|)/(\Delta/\log_2^2 \Delta), with Δ\Delta the maximum degree of the instance. There are three families: random Δ\Delta-regular graphs; graphs of maximum degree at most Δ\Delta with a planted independent set of βn\beta n vertices, β∈{0.35,0.45}\beta\in\{0.35, 0.45\}, in which every planted vertex has Δ\Delta random neighbours outside the planted set and the remaining stubs outside it are paired at random; and Khot–Regev YES graphs with k=4k = 4, p=0.45p = 0.45, η=0\eta= 0, d∈{3,4}d \in\{3, 4\} and s∈{4,8,16}s \in\{4, 8, 16\} samples per block. The run uses n=256n = 256 for the first two families, N∈{16,64}N \in\{16, 64\} for the third (64 to 1 024 vertices) and one instance per setting, 31 instances in total; the integer program proved α\alpha on 17 of them (Table 5).

FamilyΔ\Delta setΔ\DeltaInst.ExactOpt.max upmean upmax lowCWSalv.Δ/log⁡22Δ\Delta/\log_2^2 \Deltanorm.
kr12122221.00001.00001.00001.01341.00000.93371.0710
kr24242221.00001.00001.00001.07141.00001.14170.8759
kr32322221.00001.00001.00001.02461.00001.28000.7812
kr64642211.00861.00431.00861.06361.00861.77780.5673
planted442111.05771.02881.00001.15001.05771.00001.0577
planted882111.07691.03851.00001.11361.07690.88891.2115
planted16162221.00001.00001.00001.66671.00001.00001.0000
planted32322221.00001.00001.00002.30771.00001.28000.7812
planted64622221.00001.00001.00001.00001.00001.74880.5815
regular331101.00881.00881.00881.02701.00881.19420.8448
regular441001.04761.04761.00001.12241.04761.00001.0476
regular551001.09471.09471.00001.15561.09470.92741.1804
regular661001.17051.17051.00001.18391.17050.89791.3035
regular881001.24361.24361.00001.32881.24360.88891.3990
regular12121001.41941.41941.00001.49151.41940.93371.5201
regular16161001.52831.52831.00001.58821.52831.00001.5283
regular24241001.64291.64291.00001.76921.64291.14171.4390
regular32321001.87881.87881.00002.06671.87881.28001.4678
regular48481002.08002.08001.00002.36362.08001.53891.3516
regular64641002.25002.25001.00002.50002.25001.77781.2656
regular96961002.42862.42861.00002.83332.42862.21391.0969
regular1281281002.45452.45451.00003.37502.45452.61220.9396

Table 5. Bounded-degree graphs (n=256n = 256 for regular and planted). “Δ\Delta set” is the degree of the setting (dsds for kr), Δ\Delta the largest measured maximum degree; “Exact” counts instances with α\alpha proved and “Opt.” those on which SS is optimal; “up” is αup/∣S∣\alpha_{\mathrm{up}}/|S| and “low” is αlow/∣S∣\alpha_{\mathrm{low}}/|S|; “CW” and “Salv.” are αup/∣I∣\alpha_{\mathrm{up}}/|I| for the Caro–Wei baseline and the complement of the Salvador cover; “norm.” is the largest (αup/∣S∣)/(Δ/log⁡22Δ)(\alpha_{\mathrm{up}}/|S|)/(\Delta/\log_2^2 \Delta).

On the kr and planted families, α\alpha is proved on 16 of 18 instances and SS is optimal on 15 of them; the largest certified ratio is 1.0769. On the regular family, α\alpha is proved only for Δ=3\Delta= 3 (∣S∣=113|S| = 113, α=114\alpha= 114), and for Δ≥4\Delta\ge4 the bound αup\alpha_{\mathrm{up}} is the dual bound of the integer program at the time limit; for Δ=128\Delta= 128, ∣S∣=11|S| = 11 and αup=27\alpha_{\mathrm{up}} = 27. On these instances αlow=∣S∣\alpha_{\mathrm{low}} = |S|, so the ratio is only known to lie between 1 and the reported upper bound. On all 31 instances, the set SS has the same size as the complement of the Salvador cover. Esperanza took at most 1.48 s per instance, and the whole run 908.8 s.

Conclusion

Esperanza 0.1.6 returns a maximal independent set (Theorem 4.5) in O((n+m)αA(n))O((n + m)\alpha_A(n)) expected time for fixed work budgets (Theorem 7.2). Its complementary vertex cover has at most 2τ−r2\tau- r vertices (Theorem 5.1), and on graphs of maximum degree Δ\Delta its ratio is at most (Δ+2)/3(\Delta+ 2)/3 (Theorem 5.3), above the UGC-hardness threshold O(Δ/log⁡22Δ)O(\Delta/\log_2^2 \Delta) of [9]; its ratio is at most 2n2\sqrt{n} on every graph with Δ≤n\Delta\le\sqrt{n} and on the further classes of Theorem 5.4. On 30 000 graphs with a certified optimum it is optimal on every instance. On 40 Khot–Regev YES instances with 640 to 2 560 vertices, the inequality ∣V∖S∣≤2τ−∣M∣|V \setminus S| \le2\tau- |M| is certified on 38 and open on 2, and on 31 bounded-degree graphs the certified upper bound on the ratio is at most 1.0769 on the families with a planted independent set and at most 2.4545 on random regular graphs of degree up to 128.

We do not claim that Esperanza has ratio O(n)O(\sqrt{n}) on every graph; this is Conjecture 6.6, and a proof would imply P = NP (Theorem 6.7). Nor do we claim that Esperanza is a 32\frac{3}{2}-approximation for Minimum Vertex Cover. The bound ∣V∖S∣≤2τ−∣M∣|V \setminus S| \leq2\tau- |M| is a conjecture (Conjecture 6.1); the experiments concern graphs of at most 2 560 vertices; and a proof would refute UGC unless P = NP, and would imply P = NP if the theorem reported in [12] holds (Theorem 6.5). What is guaranteed on a given graph is the per-instance certificate of Proposition 6.3. The implementation is freely available as the esperanza package on PyPI [13].

Acknowledgements

The author would like to thank Iris, Marilin, Sonia, Yoselin, and Arelis for their support.

Statements and Declarations

Declaration of interests

The author declares no competing interests.

Funding sources

This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors.

Declaration of generative AI in scientific writing

The author designed the strategies of Esperanza, and used Claude Opus 5.5 to implement them by vibe coding and to improve the readability of this manuscript. After using this tool, the author reviewed and edited the code and the content as needed and takes full responsibility for the content of the publication.

Data availability

Code and data: https://github.com/frankvegadelgado/esperanza (release v0.1.6); the experiments of § 8 are reproduced by running the scripts of car/.

References

  1. [1]R. M. Karp, Reducibility among Combinatorial Problems, in: R. E. Miller, J. W. Thatcher, J. D. Bohlinger (Eds.), Complexity of Computer Computations, Plenum, New York, USA, 1972, pp. 85–103. doi:10.1007/978-1-4684-2001-2_9.DOI
  2. [2]J. Håstad, Clique is hard to approximate within n^{1−ε}, Acta Mathematica 182 (1) (1999) 105–142. doi:10.1007/BF02392825.DOI
  3. [3]D. Zuckerman, Linear degree extractors and the inapproximability of Max Clique and Chromatic Number, Theory of Computing 3 (6) (2007) 103–128. doi:10.4086/toc.2007.v003a006.DOI
  4. [4]R. Boppana, M. M. Hå?lldorsson, Approximating maximum independent sets by excluding subgraphs, BIT Numerical Mathematics 32 (2) (1992) 180–196. doi:10.1007/BF01994876.DOI
  5. [5]U. Feige, Approximating maximum clique by removing subgraphs, SIAM Journal on Discrete Mathematics 18 (2) (2004) 219–225. doi:10.1137/S089548010240415X.DOI
  6. [6]M. M. Halldórsson, J. Radhakrishnan, Greed is good: Approximating independent sets in sparse and bounded-degree graphs, Algorithmica 18 (1) (1997) 145–163. doi:10.1007/BF02523693.DOI
  7. [7]E. Halperin, Improved Approximation Algorithms for the Vertex Cover Problem in Graphs and Hypergraphs, SIAM Journal on Computing 31 (5) (2002) 1608–1623. doi:10.1137/S0097539700381097.DOI
  8. [8]S. Khot, On the Power of Two-Prover 1-Round Games, in: Proceedings of the 34th Annual ACM Symposium on Theory of Computing, Association for Computing Machinery, Montreal, Québec, Canada, 2002, pp. 767–775. doi:10.1145/509907.510017.
  9. [9]P. Austrin, S. Khot, M. Safra, Inapproximability of Vertex Cover and Independent Set in Bounded Degree Graphs, Theory of Computing 7 (3) (2011) 27–43. doi:10.4086/toc.2011.v007a003.DOI
  10. [10]S. O. Chan, Approximation Resistance from Pairwise-Independent Subgroups, Journal of the ACM 63 (3) (2016) 27:1–27:32.
  11. [11]S. Khot, O. Regev, Vertex Cover Might Be Hard to Approximate to Within 2 − ε, Journal of Computer and System Sciences 74 (3) (2008) 335–349. doi:10.1016/j.jcss.2007.06.019.DOI
  12. [12]OpenAI Math Team, The Unique Games Conjecture and Optimal Approximation Thresholds (Result Family 102), GitHub Repository, manuscripts and Lean artifacts available at https://github.com/openai/math/blob/main/lean/docs/102.md (October 2026). URL https://github.com/openai/math
  13. [13]F. Vega, Esperanza: Approximate Independent Set Solver, https://pypi.org/project/esperanza, python package version 0.1.6 (2026).
  14. [14]Y. Caro, New results on the independence number, Tech. rep., Tel-Aviv University (1979).
  15. [15]Y. K. Wei, A lower bound on the stability number of a simple graph, Tech. Rep. Technical Memorandum 81-11217-9, Bell Laboratories (1981).
  16. [16]F. Vega, An Approximate Solution to the Minimum Vertex Cover Problem: The Salvador Algorithm, manuscript; preprint at https://www.preprints.org/manuscript/202605.2000 (2026).
  17. [17]F. Vega, Salvador: Approximate Vertex Cover Solver, https://pypi.org/project/salvador, python package version 0.1.4 (2026).
  18. [18]D. V. Andrade, M. G. C. Resende, R. F. Werneck, Fast local search for the maximum independent set problem, Journal of Heuristics 18 (4) (2012) 525–547. doi:10.1007/s10732-012-9196-4.DOI
  19. [19]A. A. Hagberg, D. A. Schult, P. J. Swart, Exploring network structure, dynamics, and function using NetworkX, in: Proceedings of the 7th Python in Science Conference (SciPy 2008), Pasadena, CA, USA, 2008, pp. 11–15.
  20. [20]P. Virtanen, R. Gommers, T. E. Oliphant, et al., SciPy 1.0: Fundamental algorithms for scientific computing in Python, Nature Methods 17 (2020) 261–272. doi:10.1038/s41592-019-0686-2.
  21. [21]Q. Huangfu, J. A. J. Hall, Parallelizing the dual revised simplex method, Mathematical Programming Computation 10 (1) (2018) 119–142. doi:10.1007/s12532-017-0130-5.DOI

Paper details

vlnc:W_5yr5632z
v1 · latestHistory (1)

published · Fresh — published within the last 30 days

Usage

views · 12

downloads · 1

A view counts once per browser per day, a download each time the PDF is requested.

CC BY 4.0

Original source

  • Computer Science

Anthropic Claude Opus 5.5 · View statement →

Looking for related papers…
Contents