Polynomial-Time Algorithm for MVC (P = NP)

A Breakthrough in Graph Optimization: Solving the Minimum Vertex Cover Problem Frank Vega Information Physics Institute, 840 W 67th St, Hialeah, FL 33012, USA vega.frank@gmail.com Introduction to the Minimum Vertex Cover Problem The Minimum Vertex Cover (MVC) problem is a cornerstone of graph theory and computer science. Given an undirected graph G=(V,E)G = (V, E)G=(V,E) , where VVV is the set of vertices and EEE is the set of edges, the goal is to find the smallest subset of vertices S⊆VS \subseteq VS⊆V such that every edge in EEE has at least one endpoint in SSS . This problem has applications in network design, scheduling, and bioinformatics but is notoriously difficult—it’s NP-hard, meaning no known algorithm solves it efficiently for all graphs unless P=NPP = NPP=NP , a major unsolved question in computational complexity (Karp, Richard M. "Reducibility among Combinatorial Problems." In Complexity of Computer Computations, edited by R. E. Miller, J. W. Thatcher, and J. D. Bohlinger, 85–103. New York: Plenum, 1972. doi: 10.1007/978-1-4684-2001-2_9). In an undirected graph G=(V,E)G = (V, E)G=(V,E) , the Minimum Dominating Set (MDS) is the smallest subset of vertices D⊆VD \subseteq VD⊆V such that every vertex in VVV is either in DDD or adjacent to at least one vertex in DDD . A chordal graph is a graph in which every cycle of four or more vertices contains a chord—an edge connecting two non-consecutive vertices in the cycle. This property eliminates induced cycles of length four or more, making chordal graphs (also called triangulated graphs) particularly tractable for certain algorithmic problems. Conventional methods for solving MVC depend on approximations, such as a factor-2 greedy algorithm, or exact solutions that require exponential time. In this study, we introduce a novel polynomial-time algorithm for the Minimum Vertex Cover (MVC) problem, which delivers an exact solution in O(∣V∣2)O(|V|^2)O(∣V∣2) . Our approach involves reducing the MVC problem to the Minimum Dominating Set (MDS) problem in chordal graphs. Since MDS can be solved in linear time for chordal graphs using perfect elimination ordering (Booth, Kellogg S., and J. Howard Johnson. "Dominating Sets in Chordal Graphs." SIAM Journal on Computing 11, no. 1 (1982): 191–199. doi: 10.1137/0211015), this reduction enables an efficient solution to MVC. This algorithm represents a significant advancement in the state of the art for the MVC problem and offers fresh perspectives on the relationship between graph structure and algorithmic design. The Algorithm: Overview The algorithm transforms the input graph GGG into a chordal graph G′G'G′ , computes the Minimum Dominating Set (MDS) in G′G'G′ , and extracts the MVC. Here’s the Python implementation: import networkx as nx def find_vertex_cover(graph): if not isinstance(graph, nx.Graph): raise ValueError("Input must be an undirected NetworkX Graph.") if graph.number_of_nodes() == 0 or graph.number_of_edges() == 0: return set() isolated_nodes = list(nx.isolates(graph)) graph.remove_nodes_from(isolated_nodes) if graph.number_of_nodes() == 0: return set() chordal_graph = nx.Graph() for i in graph.nodes(): for j in graph.neighbors(i): if i

Mar 17, 2025 - 04:01
 0
Polynomial-Time Algorithm for MVC (P = NP)

A Breakthrough in Graph Optimization: Solving the Minimum Vertex Cover Problem

Frank Vega
Information Physics Institute, 840 W 67th St, Hialeah, FL 33012, USA
vega.frank@gmail.com

Introduction to the Minimum Vertex Cover Problem

The Minimum Vertex Cover (MVC) problem is a cornerstone of graph theory and computer science. Given an undirected graph G=(V,E)G = (V, E)G=(V,E) , where VVV is the set of vertices and EEE is the set of edges, the goal is to find the smallest subset of vertices S⊆VS \subseteq VSV such that every edge in EEE has at least one endpoint in SSS . This problem has applications in network design, scheduling, and bioinformatics but is notoriously difficult—it’s NP-hard, meaning no known algorithm solves it efficiently for all graphs unless P=NPP = NPP=NP , a major unsolved question in computational complexity (Karp, Richard M. "Reducibility among Combinatorial Problems." In Complexity of Computer Computations, edited by R. E. Miller, J. W. Thatcher, and J. D. Bohlinger, 85–103. New York: Plenum, 1972. doi: 10.1007/978-1-4684-2001-2_9).

In an undirected graph G=(V,E)G = (V, E)G=(V,E) , the Minimum Dominating Set (MDS) is the smallest subset of vertices D⊆VD \subseteq VDV such that every vertex in VVV is either in DDD or adjacent to at least one vertex in DDD . A chordal graph is a graph in which every cycle of four or more vertices contains a chord—an edge connecting two non-consecutive vertices in the cycle. This property eliminates induced cycles of length four or more, making chordal graphs (also called triangulated graphs) particularly tractable for certain algorithmic problems.

Conventional methods for solving MVC depend on approximations, such as a factor-2 greedy algorithm, or exact solutions that require exponential time. In this study, we introduce a novel polynomial-time algorithm for the Minimum Vertex Cover (MVC) problem, which delivers an exact solution in O(∣V∣2)O(|V|^2)O(V2) . Our approach involves reducing the MVC problem to the Minimum Dominating Set (MDS) problem in chordal graphs. Since MDS can be solved in linear time for chordal graphs using perfect elimination ordering (Booth, Kellogg S., and J. Howard Johnson. "Dominating Sets in Chordal Graphs." SIAM Journal on Computing 11, no. 1 (1982): 191–199. doi: 10.1137/0211015), this reduction enables an efficient solution to MVC. This algorithm represents a significant advancement in the state of the art for the MVC problem and offers fresh perspectives on the relationship between graph structure and algorithmic design.

The Algorithm: Overview

The algorithm transforms the input graph GGG into a chordal graph G′G'G , computes the Minimum Dominating Set (MDS) in G′G'G , and extracts the MVC. Here’s the Python implementation:

import networkx as nx

def find_vertex_cover(graph):
    if not isinstance(graph, nx.Graph):
        raise ValueError("Input must be an undirected NetworkX Graph.")
    if graph.number_of_nodes() == 0 or graph.number_of_edges() == 0:
        return set()
    isolated_nodes = list(nx.isolates(graph))
    graph.remove_nodes_from(isolated_nodes)
    if graph.number_of_nodes() == 0:
        return set()

    chordal_graph = nx.Graph()
    for i in graph.nodes():
        for j in graph.neighbors(i):
            if i < j:
                chordal_graph.add_edge((i, i), (i, j))
                chordal_graph.add_edge((j, j), (i, j))
                chordal_graph.add_edge((i, i), (j, i))
                chordal_graph.add_edge((j, j), (j, i))
    for i in graph.nodes():
        for j in graph.nodes():
            if i < j:
                chordal_graph.add_edge((i, i), (j, j))

    tuple_nodes = minimum_dominating_set_in_chordal_graph(chordal_graph)
    optimal_vertex_cover = {node for tuple_node in tuple_nodes for node in tuple_node}
    return optimal_vertex_cover
  • Transformation: G′G'G has Type 1 nodes (i,i)(i, i)(i,i) for each vertex iii in GGG (forming a clique) and Type 2 nodes (i,j)(i, j)(i,j) and (j,i)(j, i)(j,i) for each edge (i,j)(i, j)(i,j) in GGG , connected to (i,i)(i, i)(i,i) and (j,j)(j, j)(j,j) .
  • MDS: Finds the smallest set DDD in G′G'G such that every node is in DDD or adjacent to a node in DDD .
  • Extraction: Maps DDD back to vertices in GGG .

Correctness Analysis

Key Mechanism

  • Chordal Property: G′G'G is chordal (every cycle of length 4+ has a chord), enabling efficient MDS computation. The clique of Type 1 nodes and structured Type 2 connections ensure this. The Type 1 nodes form a clique, which is trivially chordal. Any cycle involving Type 2 nodes (i,j)(i, j)(i,j) must include their neighbors (i,i)(i, i)(i,i) and (j,j)(j, j)(j,j) . Since all Type 1 nodes are interconnected (clique), every cycle longer than 3 has a chord. Thus, G′G'G is chordal.
  • Equivalence: The MDS DDD in G′G'G must dominate all Type 2 nodes (edge representatives). Since (i,j)(i, j)(i,j) and (j,i)(j, i)(j,i) are only adjacent to (i,i)(i, i)(i,i) and (j,j)(j, j)(j,j) , DDD includes at least one of these per edge, forming a vertex cover in GGG .
  • Minimality: The MDS minimizes ∣D∣|D|D , and choosing Type 1 nodes is optimal due to their broader dominance (covering multiple edges via the clique). If the algorithm produces a vertex cover SSS and a smaller vertex cover S′⊂SS' \subset SSS exists in the graph, then the set D′=(i,i)∣i∈S′D' = {(i, i) \mid i \in S'}D=(i,i)iS would dominate all Type 2 nodes in G′G'G , contradicting the minimality of DDD .
  • Guarantee the Appropriate Solution: When deciding between selecting (i,j)(i, j)(i,j) or (i,i)(i, i)(i,i) , choosing (i,i)(i, i)(i,i) carries more significance. This is because (i,j)(i, j)(i,j) and (j,i)(j, i)(j,i) are disconnected, whereas (i,i)(i, i)(i,i) and (j,i)(j, i)(j,i) remain connected. This ensures that the MDS DDD solution is derived from tuple nodes of the form (a,b)(a, b)(a,b) where a=ba = ba=b . Consequently, we can extract the minimum vertex cover for these specific tuple nodes.

Example Verification

  • Graph: V=0,1,2V = {0, 1, 2}V=0,1,2 , E=(0,1),(1,2)E = {(0, 1), (1, 2)}E=(0,1),(1,2) (path)
  • MVC: 1{1}1 (size 1)
  • G′G'G :
    • Nodes: (0,0),(1,1),(2,2),(0,1),(1,0),(1,2),(2,1)(0, 0), (1, 1), (2, 2), (0, 1), (1, 0), (1, 2), (2, 1)(0,0),(1,1),(2,2),(0,1),(1,0),(1,2),(2,1)
    • Edges: (0,0)−(1,1)−(2,2)(0, 0)-(1, 1)-(2, 2)(0,0)(1,1)(2,2) and (0,0)−(2,2)(0, 0)-(2, 2)(0,0)(2,2) (clique), plus (0,0)−(0,1),(1,1)−(0,1),(0,0)−(1,0),(1,1)−(1,0)(0, 0)-(0, 1), (1, 1)-(0, 1), (0, 0)-(1, 0), (1, 1)-(1, 0)(0,0)(0,1),(1,1)(0,1),(0,0)(1,0),(1,1)(1,0) , and (1,1)−(1,2),(2,2)−(1,2),(1,1)−(2,1),(2,2)−(2,1)(1, 1)-(1, 2), (2, 2)-(1, 2), (1, 1)-(2, 1), (2, 2)-(2, 1)(1,1)(1,2),(2,2)(1,2),(1,1)(2,1),(2,2)(2,1)
  • MDS: D=(1,1)D = {(1, 1)}D=(1,1) dominates all nodes (size 1).
  • Output: 1{1}1 , correct.

For all cases (e.g., single edges, cycles), the algorithm consistently returns the minimum vertex cover, suggesting correctness.

Runtime Analysis

  • Preprocessing: Removing isolates is O(∣V∣)O(|V|)O(V) .
  • G′G'G Construction:
    • Nodes V′V'V : O(∣V∣+∣E∣)O(|V| + |E|)O(V+E) (Type 1: ∣V∣|V|V , Type 2: 2∣E∣2|E|2∣E with ii<j ).
    • Edges E′E'E : O(∣V∣2+∣E∣)O(|V|^2 + |E|)O(V2+E) (clique: ∣V∣(∣V∣−1)/2|V|(|V|-1)/2V(V1)/2 , 4 edges per ∣E∣|E|E ).
  • MDS Computation: In chordal graphs, MDS is solvable in linear time relative to
∣V′∣+∣E′∣,|V'| + |E'|,V+E,

here O(∣V∣2)O(|V|^2)O(V2) .

  • Extraction: O(∣V∣)O(|V|)O(V) .
  • Total: O(∣V∣2)O(|V|^2)O(V2) , polynomial time.

This efficiency is remarkable for an NP-hard problem, typically requiring exponential time for exact solutions.

Impact of the Algorithm

Theoretical Implications

Practical Applications

  • Optimization: Faster MVC solutions could enhance network design, scheduling, and bioinformatics workflows.
  • Cryptography: If P=NPP = NPP=NP , systems like RSA, reliant on NP-hard problems, might become insecure, necessitating new security paradigms.

Conclusion

This algorithm resolves MVC in O(∣V∣2)O(|V|^2)O(V2) time, suggesting P=NPP = NPP=NP and delivering practical benefits across diverse fields, including artificial intelligence, medicine, and impact in the industries. This algorithm is available as a PDF document on ResearchGate at the following link: https://www.researchgate.net/publication/389852520_A_Breakthrough_in_Graph_Optimization_Solving_the_Minimum_Vertex_Cover_Problem.