WorksComputer Science
The Esperanza Algorithm for Maximum Independent Set
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 for every , and under the Unique Games Conjecture it is hard to approximate within on graphs of maximum degree ; the Khot–Regev form of the conjecture, for which a proof has been reported but not yet peer reviewed, also rules out a -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 -improvements, and an iterated -swap search. We prove that it runs in expected time for fixed budgets, with the inverse Ackermann function. We prove that the output is a maximal independent set, that its complementary vertex cover has at most vertices, where is the minimum cover size and the number of components with an edge, and that the ratio is at most on graphs of maximum degree . We prove the ratio on every graph with and on three further classes, and state it for all graphs as a conjecture, whose proof would imply . We also state the conjecture that the complementary cover has at most vertices for the NetworkX minimum maximal matching ; a proof would give a -approximation for Minimum Vertex Cover and refute the Unique Games Conjecture unless . In reproducible experiments the returned set is optimal on all graphs of a suite certified by an exact integer program; on Khot–Regev YES instances with to vertices the conjectured bound is certified on and open on ; and on bounded-degree graphs the certified ratio is at most on the families with a planted independent set.
Introduction
Given an undirected graph , an independent set is a subset 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 . A set is a vertex cover if every edge has an endpoint in ; is a vertex cover if and only if is independent, so the minimum cover size is . We write , , for the maximum degree, and for the number of connected components of that contain an edge. The ratio of a returned independent set is . MIS is on Karp’s list of NP-complete problems [1].
On general graphs, MIS cannot be approximated within for any unless NP = ZPP [2], and the same threshold is NP-hard [3]. The best known polynomial-time ratios are by subgraph exclusion [4] and [5]. On graphs of maximum degree , the minimum-degree greedy algorithm has ratio [6], and the best known ratio, due to Halperin [7], is . Under the Unique Games Conjecture [8], Austrin, Khot and Safra proved that MIS on graphs of maximum degree is hard to approximate within [9], and Chan proved that is NP-hard without any conjecture [10]. Khot and Regev proved, under UGC, that for every it is hard to distinguish graphs with an independent set of vertices from graphs with no independent set of more than vertices; equivalently, Minimum Vertex Cover is hard to approximate within for every [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 -improvements, and an iterated -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 expected time, with the inverse Ackermann function (Theorem 7.2).
Proved bounds (§ 5): the complementary vertex cover is never larger than the Salvador cover, so on every graph without self-loops (Theorem 5.1); (Corollary 5.2); and with ratio at most on graphs of maximum degree (Theorem 5.3); and the ratio on every graph with and on three further classes (Theorem 5.4).
The conjecture that the ratio is at most on every graph (Conjecture 6.6), with the theorem that a proof would imply P = NP (Theorem 6.7).
The conjecture that for the NetworkX minimum maximal matching (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 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 description | Metadata |
| C1 | Current code version | v0.1.6 |
| C2 | Permanent link to code/repository | https://github.com/frankvegadelgado/esperanza |
| C3 | Permanent link to Reproducible Capsule | https://pypi.org/project/esperanza/ |
| C4 | Legal Code License | MIT License |
| C5 | Code versioning system used | git |
| C6 | Languages, tools, and services used | Python |
| C7 | Compilation requirements and dependencies | Python , Salvador |
| C8 | Experiment 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, denotes the working graph obtained in Algorithm 1 after removing self-loops and isolated vertices; its parameters , and are those of the working graph. For a set and a vertex , the tightness of is .
Algorithm 1 FindIndependentSet(; , , , )
Require: Undirected graph ; work budgets , , (default 100 each); seed
Ensure: A maximal independent set of
if then return
end if
; remove all self-loops from
; remove from
if then return
end if
▷ Algorithm 2
if else
a vertex of maximum degree in
▷ restarts from
if then
end if
▷ Algorithm 4
if then
end if
▷ (1, 2)-swaps [18]
if then
end if
▷ Algorithm 3
return
The calls to Salvador. Three routines of the package salvador (version ) [17] are used. in line 8 is salvador.algorithm.find_vertex_cover, the final cover of the seventeen-strategy ensemble of [16]. in line 11 is salvador.algorithm.refine_cover: for every it forms the vertex cover , that is, it moves into and evicts the neighbours of , grows the resulting independent set into a maximal one by , and keeps the smallest resulting cover. When 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 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 . in line 17 is salvador.local_search.improve_vertex_cover: it improves the independent set 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 (ILS_SEED = 20261031 in the package), and its work is charged to a counter with limit .
Local restarts. Algorithm 4 applies the restart of to the incumbent instead of the cover. A move at forces into , evicts the vertices of , and refills the freed region with every vertex that has no neighbour left in , in ascending order of degree. The move is committed when it inserts at least vertices besides , a -improvement, and undone otherwise; committed moves requeue the vertices whose tightness decreased, so improvements are chained.
Algorithm 2 PureCaroWeiBaseline(): dynamic minimum-degree greedy
Require: Undirected graph
Ensure: A maximal independent set with
1: for every ; place every into bucket ; 2: ; 3: while some vertex is not removed do 4: advance to the first bucket whose front is not removed, discarding removed fronts 5: pop front of ; ; mark removed 6: for each neighbour of that is not removed do 7: mark removed 8: for each neighbour of that is not removed do 9: ; append to 10: if then 11: end if 12: end for 13: end for 14: end while 15: return
Algorithm 3 MaximizeSolution(, ): repair and grow in
Require: Undirected graph ; candidate set (may contain conflicts)
Ensure: A maximal independent set of
1: ; for 2: for each edge do ▹ Phase 1: conflict resolution 3: if and then 4: if else 5: ; decrement for every 6: end if 7: end for 8: place every into the bucket ▹ Phase 2: growth by counting sort 9: for do 10: for each do 11: if then 12: end if 13: end for 14: end for 15: return
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 , MaximizeSolution() returns a maximal independent set of that contains every vertex of having no neighbour in . In particular, if is independent, then 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 without neighbours in 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 of 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 .
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 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 be chosen when its current degree is , and let be its closed neighbourhood in the current graph. Every has current degree at least and original degree at least its current degree, so . The closed neighbourhoods of the chosen vertices partition , so , and gives the second inequality.
Lemma 4.3 (Properties of the Salvador routines). Let be a graph without self-loops and isolated vertices.
(i) The cover of line 8 is a vertex cover with , computed in time [16].
(ii) RefineCover and ImproveVertexCover return vertex covers no larger than their input cover, in time for a budget [16, 17].
Proof. (i) is the bound 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 with independent and strictly larger than ; 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 and of [16], whose work counters stop after units plus the cost of one step, which is .
Lemma 4.4. For an independent set of a graph without self-loops, Algorithm 4 returns an independent set with .
Proof. The tightness counters are updated on every insertion and removal, so holds at all times. A vertex is inserted only when its tightness is 0: a free vertex directly, the vertex after all of has been removed, and a refill vertex after the check . Hence stays independent. A free insertion increases . A move is kept only if , that is, if increases; otherwise the log is undone in reverse order, which restores and all counters. So never decreases.
Theorem 4.5. Algorithm 1 (FindIndependentSet) returns a maximal independent set of the input graph, where self-loops are ignored.
Proof. is independent by Lemma 4.2. , and are complements of vertex covers by Lemma 4.3, hence independent, and is independent by Lemma 4.4. So the incumbent is independent before the last call, and MaximizeSolution returns a maximal independent set of the working graph by Lemma 4.1. Isolated vertices have no neighbours, so 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 .
Proved Bounds
Theorem 5.1 (The complementary cover). Let be a graph without self-loops, the set returned by Algorithm 1 and the Salvador cover of line 8. Then is a vertex cover of and
Proof. is a vertex cover because is independent (Theorem 4.5). The incumbent starts with at least vertices and is only replaced by larger sets; the final MaximizeSolution call keeps the incumbent, which is independent, by Lemma 4.1. Hence , and . Isolated vertices change neither nor , so Lemma 4.3(i) gives .
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 without self-loops, . Hence, if with , then .
Proof. By Theorem 5.1, . For with this gives .
Theorem 5.3 (Bounded degree). For every graph of maximum degree , the set returned by Algorithm 1 satisfies
and
Proof. The incumbent starts with at least vertices on the working graph and never shrinks (proof of Theorem 5.1), and isolated vertices are added to both and every maximum independent set. is produced by the minimum-degree greedy rule (Lemma 4.2), which has ratio at most on graphs of maximum degree [6], and satisfies the Caro–Wei bound by Lemma 4.2.
Theorem 5.4 (Ratio on four classes). Let be a graph on vertices without self-loops and isolated vertices, , the Salvador cover of line 8 and the set returned by Algorithm 1. If at least one of the following conditions holds, then :
(a) ;
(b) ;
(c) for some maximum independent set of ;
(d) .
Proof. By the proofs of Theorems 5.1 and 5.3, and . (a) is non-empty, so . (b) by Lemma 4.3(i), so and . (c) , so and . (d) By Lemma 4.2 and ,
where is equivalent to . Hence .
The four conditions do not cover every graph. A graph satisfies none of them exactly when , , and for every maximum independent set . In that case every maximal independent set has at least vertices, because each of its vertices dominates at most vertices, but , and this does not give . The ratio on all graphs is therefore stated as Conjecture 6.6 in § 6. On general graphs, by [2, 3], a polynomial-time ratio of for some would imply P = NP.
The barrier . Austrin, Khot and Safra proved that, assuming the Unique Games Conjecture, Maximum Independent Set on graphs of maximum degree is hard to approximate within a factor for all sufficiently large [9]. Without any conjecture, Chan proved that the factor is NP-hard [10], and the best known polynomial-time ratio is [7]. Consequently, a polynomial-time algorithm whose ratio on graphs of maximum degree is as would refute the Unique Games Conjecture unless P = NP. The ratio proved in Theorem 5.3 is linear in , so it lies above this threshold for large and is consistent with both hardness results. § 8.3 reports the measured ratios of Esperanza together with the value 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 .
The Conjectured Bounds and Their Consequences
Let be the maximal matching returned by NetworkX’s min_maximal_matching [19] on the working graph; it is the matching of the strategy of Salvador [16]. Every vertex cover contains an endpoint of each of the disjoint edges of , and the matched vertices form a vertex cover, so .
Conjecture 6.1 (Esperanza bound). For every graph without self-loops and isolated vertices, the set returned by Algorithm 1 satisfies
Proposition 6.2. Conjecture 6.1 is implied by the Ensemble-bound conjecture of [16], which states for the Salvador cover . If Conjecture 6.1 holds, then for every graph.
Proof. by Theorem 5.1. The second statement follows from .
Proposition 6.3 (Per-instance certificate). Let be a lower and an upper bound. If , then Conjecture 6.1 holds on ; if , it fails on . If , then .
Proof. , and .
Proposition 6.4 (NO-type instances). If has no independent set of more than vertices with , then every vertex cover of satisfies . In particular, Conjecture 6.1 holds on the NO-type instances of the reduction of Khot and Regev [11] with .
Proof. and , so .
Theorem 6.5 (Conditional consequence). Assume that for every fixed it is NP-hard to approximate Minimum Vertex Cover within . 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 returns a vertex cover. A proof of Conjecture 6.1 makes it a -approximation (Proposition 6.2), a ratio of the form with , 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 does not exist, so a counterexample has an independent set of more than a quarter of the vertices.
Conjecture 6.6 (Ratio ). For every graph on vertices without self-loops, the set returned by Algorithm 1 satisfies .
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 ; a counterexample has 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 , , so Conjecture 6.6 would give a polynomial-time approximation of Maximum Independent Set within with , which is NP-hard [3].
Runtime Analysis
Hash-table operations on vertex sets are counted as expected time, as in the implementation.
Lemma 7.1. Algorithm 4 runs in time.
Proof. The initialisation, the counters and the two counting sorts take time. Every operation of the main loop is charged to the counter work: each pop costs 1, the computation of costs , every insertion or removal of a vertex costs , the scan of costs , the sort of refill candidates costs , and the requeueing costs . The loop runs only while work limit , and a move is started only if work plus the bound 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 over distinct vertices ; such a move ends the loop as soon as work exceeds limit. Hence the total work is .
Theorem 7.2 (Running time). For fixed budgets , , , Algorithm 1 runs in expected time, where is the inverse Ackermann function; in general it runs in time.
Proof. Copying the graph and removing self-loops and isolated vertices take time. Algorithm 2 takes time: every vertex is removed once, every degree decrement costs and appends one bucket entry, and the pointer moves forward at most times plus once for every backward move, each of which follows a decrement. Salvador takes time, and RefineCover and ImproveVertexCover take time each (Lemma 4.3). Building the adjacency lists, Algorithm 4 (Lemma 7.1), Algorithm 3, the set differences and the comparisons take time.
With the default budgets , the bound of Theorem 7.2 is . Passing restart_budget=None removes the cap of RefineCover, whose running time is then .
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 , ranked by their ratio with a stable sort, of which the first 25 are kept; since on all of them, these are the first 25 such instances in generation order. Each amplified instance draws a base uniformly. With probability it is a disjoint union of copies of the base, and otherwise an independent blow-up with cluster size , in which each vertex becomes pairwise non-adjacent copies and each edge a complete bipartite join between the corresponding clusters.
| Family | Count | Generator | Parameters | ||
| gnp | 15000 | gnp_random_graph(, ) | , | 6–16 | 0–109 |
| bipartite_gnp | 6000 | bipartite_random_graph() | , | 6–28 | 0–104 |
| regular | 3000 | random_regular_graph() | , , even | 8–16 | 12–40 |
| star | 2000 | star_graph() | 4–81 | 3–80 | |
| complete | 1000 | complete_graph() | 3–30 | 3–435 | |
| complete_bipartite | 1000 | complete_bipartite_graph() | , | 4–32 | 4–240 |
| amplified | 2000 | disjoint union or blow-up | see text | 12–96 | 16–1368 |
Table 2. Instance families of the certified suite (master seed 42). is uniform on integers and uniform on reals; all generators are NetworkX functions. The last two columns give the realised ranges of and .
Exact optimum. For each instance we solve
with the default options of scipy.optimize.milp (no time limit; HiGHS relative gap tolerance ), accept a solve only when HiGHS reports an optimal status, and round the objective to the nearest integer; since , the tolerance is below one vertex, so the rounded value is . Every returned set is verified to be independent. The reported ratio is .
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.
| Family | Count | Worst | Mean |
| gnp | 15000 | 1.000 | 1.000 |
| bipartite_gnp | 6000 | 1.000 | 1.000 |
| regular | 3000 | 1.000 | 1.000 |
| star | 2000 | 1.000 | 1.000 |
| complete | 1000 | 1.000 | 1.000 |
| complete_bipartite | 1000 | 1.000 | 1.000 |
| amplified | 2000 | 1.000 | 1.000 |
| All | 30000 | 1.000 | 1.000 |
Table 3. Certified suite: worst and mean ratio 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 is generated on a random -regular graph with vertices and a planted labelling , each edge carrying a permutation with (random, or a shift modulo in the linear variant), and a fraction of the edges receive a random constraint. Every vertex becomes a block of subsets drawn from the -biased measure, and and are joined when and are disjoint [11].
The dictator set , made independent greedily on violated constraints, gives the planted cover, an upper bound on . The base family has , , , , , and nine more change one parameter. With and two instances per family and size, this gives 40 instances with 640 to 2 560 vertices.
For every instance, is the larger of the linear relaxation and the dual bound of an integer program (HiGHS, 90 s), and is the smaller of the planted cover, the integer-program value and the two covers computed; the integer program proved on 26 instances. Each instance is classified by Proposition 6.3 as certified (), violated () or open, for (E) and for the Salvador cover (S). Table 4 reports the counts.
| Family | Inst. | E cert. | E open | E viol. | S cert. | S open | S viol. | E<S | Opt. | max | min | |
| Base family (, , ) | 4 | 4 | 0 | 0 | 4 | 0 | 0 | 0 | 2 | 4 | 1.0487 | 0.4445 |
| Label size | 4 | 4 | 0 | 0 | 4 | 0 | 0 | 0 | 3 | 4 | 1.0232 | 0.4469 |
| Label size | 4 | 4 | 0 | 0 | 4 | 0 | 0 | 0 | 4 | 4 | 1.0000 | 0.5055 |
| Bias | 4 | 3 | 1 | 0 | 3 | 1 | 0 | 1 | 1 | 4 | 1.1513 | 0.3812 |
| Bias | 4 | 4 | 0 | 0 | 4 | 0 | 0 | 0 | 4 | 4 | 1.0000 | 0.5070 |
| Noise | 4 | 4 | 0 | 0 | 4 | 0 | 0 | 0 | 1 | 4 | 1.0468 | 0.4406 |
| Noise | 4 | 4 | 0 | 0 | 4 | 0 | 0 | 0 | 0 | 4 | 1.0239 | 0.4469 |
| Constraint degree | 4 | 4 | 0 | 0 | 4 | 0 | 0 | 0 | 3 | 4 | 1.0067 | 0.4164 |
| Samples per block | 4 | 3 | 1 | 0 | 3 | 1 | 0 | 0 | 0 | 4 | 1.1483 | 0.4191 |
| Linear UG, Max-2-Lin() | 4 | 4 | 0 | 0 | 4 | 0 | 0 | 1 | 1 | 4 | 1.0148 | 0.4656 |
| All | 40 | 38 | 2 | 0 | 38 | 2 | 0 | 2 | 19 | 40 | 1.1513 | 0.3812 |
Table 4. Khot–Regev YES instances: classification of for Esperanza (E) and Salvador (S); “E<S” counts covers of Esperanza strictly smaller than the Salvador cover; “Opt.” counts optimal covers of Esperanza; “” counts covers with ; the last two columns give the largest and the smallest .
The inequality is certified on 38 instances and violated on none, for both covers. The two open instances have unknown: on kr_p0.35_N80_r0 (), , and , so ; on kr_s32_N80_r0 (), , and , so . 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 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 certificate, and the largest certified ratio is . In the independent-set form of the reduction, the returned set contains at least 0.3812 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 and the range , where is the largest of , the planted independent set, the two baselines below and the integer-program value, and is the smaller of minus the linear relaxation of vertex cover and the integer-program dual bound (HiGHS, 60 s). It reports , a certified upper bound on the ratio, the same bound for the Caro–Wei baseline and for the complement of the Salvador cover, and the normalised value , with the maximum degree of the instance. There are three families: random -regular graphs; graphs of maximum degree at most with a planted independent set of vertices, , in which every planted vertex has random neighbours outside the planted set and the remaining stubs outside it are paired at random; and Khot–Regev YES graphs with , , , and samples per block. The run uses for the first two families, for the third (64 to 1 024 vertices) and one instance per setting, 31 instances in total; the integer program proved on 17 of them (Table 5).
| Family | set | Inst. | Exact | Opt. | max up | mean up | max low | CW | Salv. | norm. | ||
| kr | 12 | 12 | 2 | 2 | 2 | 1.0000 | 1.0000 | 1.0000 | 1.0134 | 1.0000 | 0.9337 | 1.0710 |
| kr | 24 | 24 | 2 | 2 | 2 | 1.0000 | 1.0000 | 1.0000 | 1.0714 | 1.0000 | 1.1417 | 0.8759 |
| kr | 32 | 32 | 2 | 2 | 2 | 1.0000 | 1.0000 | 1.0000 | 1.0246 | 1.0000 | 1.2800 | 0.7812 |
| kr | 64 | 64 | 2 | 2 | 1 | 1.0086 | 1.0043 | 1.0086 | 1.0636 | 1.0086 | 1.7778 | 0.5673 |
| planted | 4 | 4 | 2 | 1 | 1 | 1.0577 | 1.0288 | 1.0000 | 1.1500 | 1.0577 | 1.0000 | 1.0577 |
| planted | 8 | 8 | 2 | 1 | 1 | 1.0769 | 1.0385 | 1.0000 | 1.1136 | 1.0769 | 0.8889 | 1.2115 |
| planted | 16 | 16 | 2 | 2 | 2 | 1.0000 | 1.0000 | 1.0000 | 1.6667 | 1.0000 | 1.0000 | 1.0000 |
| planted | 32 | 32 | 2 | 2 | 2 | 1.0000 | 1.0000 | 1.0000 | 2.3077 | 1.0000 | 1.2800 | 0.7812 |
| planted | 64 | 62 | 2 | 2 | 2 | 1.0000 | 1.0000 | 1.0000 | 1.0000 | 1.0000 | 1.7488 | 0.5815 |
| regular | 3 | 3 | 1 | 1 | 0 | 1.0088 | 1.0088 | 1.0088 | 1.0270 | 1.0088 | 1.1942 | 0.8448 |
| regular | 4 | 4 | 1 | 0 | 0 | 1.0476 | 1.0476 | 1.0000 | 1.1224 | 1.0476 | 1.0000 | 1.0476 |
| regular | 5 | 5 | 1 | 0 | 0 | 1.0947 | 1.0947 | 1.0000 | 1.1556 | 1.0947 | 0.9274 | 1.1804 |
| regular | 6 | 6 | 1 | 0 | 0 | 1.1705 | 1.1705 | 1.0000 | 1.1839 | 1.1705 | 0.8979 | 1.3035 |
| regular | 8 | 8 | 1 | 0 | 0 | 1.2436 | 1.2436 | 1.0000 | 1.3288 | 1.2436 | 0.8889 | 1.3990 |
| regular | 12 | 12 | 1 | 0 | 0 | 1.4194 | 1.4194 | 1.0000 | 1.4915 | 1.4194 | 0.9337 | 1.5201 |
| regular | 16 | 16 | 1 | 0 | 0 | 1.5283 | 1.5283 | 1.0000 | 1.5882 | 1.5283 | 1.0000 | 1.5283 |
| regular | 24 | 24 | 1 | 0 | 0 | 1.6429 | 1.6429 | 1.0000 | 1.7692 | 1.6429 | 1.1417 | 1.4390 |
| regular | 32 | 32 | 1 | 0 | 0 | 1.8788 | 1.8788 | 1.0000 | 2.0667 | 1.8788 | 1.2800 | 1.4678 |
| regular | 48 | 48 | 1 | 0 | 0 | 2.0800 | 2.0800 | 1.0000 | 2.3636 | 2.0800 | 1.5389 | 1.3516 |
| regular | 64 | 64 | 1 | 0 | 0 | 2.2500 | 2.2500 | 1.0000 | 2.5000 | 2.2500 | 1.7778 | 1.2656 |
| regular | 96 | 96 | 1 | 0 | 0 | 2.4286 | 2.4286 | 1.0000 | 2.8333 | 2.4286 | 2.2139 | 1.0969 |
| regular | 128 | 128 | 1 | 0 | 0 | 2.4545 | 2.4545 | 1.0000 | 3.3750 | 2.4545 | 2.6122 | 0.9396 |
Table 5. Bounded-degree graphs ( for regular and planted). “ set” is the degree of the setting ( for kr), the largest measured maximum degree; “Exact” counts instances with proved and “Opt.” those on which is optimal; “up” is and “low” is ; “CW” and “Salv.” are for the Caro–Wei baseline and the complement of the Salvador cover; “norm.” is the largest .
On the kr and planted families, is proved on 16 of 18 instances and is optimal on 15 of them; the largest certified ratio is 1.0769. On the regular family, is proved only for (, ), and for the bound is the dual bound of the integer program at the time limit; for , and . On these instances , so the ratio is only known to lie between 1 and the reported upper bound. On all 31 instances, the set 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 expected time for fixed work budgets (Theorem 7.2). Its complementary vertex cover has at most vertices (Theorem 5.1), and on graphs of maximum degree its ratio is at most (Theorem 5.3), above the UGC-hardness threshold of [9]; its ratio is at most on every graph with 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 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 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 -approximation for Minimum Vertex Cover. The bound 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]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]J. Håstad, Clique is hard to approximate within n^{1−ε}, Acta Mathematica 182 (1) (1999) 105–142. doi:10.1007/BF02392825.DOI
- [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]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]U. Feige, Approximating maximum clique by removing subgraphs, SIAM Journal on Discrete Mathematics 18 (2) (2004) 219–225. doi:10.1137/S089548010240415X.DOI
- [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]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]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]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]S. O. Chan, Approximation Resistance from Pairwise-Independent Subgroups, Journal of the ACM 63 (3) (2016) 27:1–27:32.
- [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]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]F. Vega, Esperanza: Approximate Independent Set Solver, https://pypi.org/project/esperanza, python package version 0.1.6 (2026).
- [14]Y. Caro, New results on the independence number, Tech. rep., Tel-Aviv University (1979).
- [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]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]F. Vega, Salvador: Approximate Vertex Cover Solver, https://pypi.org/project/salvador, python package version 0.1.4 (2026).
- [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]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]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]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