[Paper Review] A Hybrid Graph Representation for Exact Graph Algorithms
This paper proposes a hybrid graph representation combining adjacency lists and adjacency matrices to accelerate exact graph algorithms by enabling efficient undo operations during recursive backtracking. By leveraging the control stack for implicit undo and combining fast adjacency queries with efficient neighborhood traversal, the method reduces running times by at least a factor of two across Vertex Cover, Dominating Set, and Cluster Editing, with some cases improving from days to minutes.
Many exact search algorithms for NP-hard graph problems adopt the old Davis-Putman branch-and-reduce paradigm. The performance of these algorithms often suffers from the increasing number of graph modifications, such as vertex/edge deletions, that reduce the problem instance and have to be "taken back" frequently during the search process. We investigate practical implementation-based aspects of exact graph algorithms by providing a simple hybrid graph representation that trades space for time to address the said take-back challenge. Experiments on three well studied problems show consistent significant improvements over classical methods.
Motivation & Objective
- To address the performance bottleneck in exact graph algorithms caused by frequent graph modifications and their costly undo operations during recursive backtracking.
- To reduce the implementation overhead of maintaining and reversing graph state changes in branch-and-reduce algorithms.
- To design a practical data structure that combines the efficiency of adjacency matrices (constant-time adjacency checks) and adjacency lists (efficient neighborhood traversal).
- To evaluate the impact of the hybrid representation on the running time of exact algorithms for NP-hard graph problems.
- To demonstrate consistent and significant performance improvements across multiple well-known graph problems.
Proposed method
- The hybrid representation maintains both an adjacency list and an adjacency matrix for the same graph, enabling O(1) adjacency queries and O(Δ(G)) neighborhood traversal.
- Graph modifications such as vertex and edge deletions are performed on both representations simultaneously, with the operation details stored on a stack for explicit undo.
- The key innovation is the use of the processor’s control stack to implicitly manage undo operations, eliminating the need for explicit bookkeeping in the algorithm logic.
- The method supports efficient permanent edge addition and common neighbor computation by leveraging the adjacency matrix for fast lookup and the list for traversal.
- The hybrid structure is applied to recursive backtracking algorithms, where modifications are frequently undone, by enabling fast reversal via stack-based recovery.
- The implementation uses standard C and is evaluated on three NP-hard problems: Vertex Cover, Dominating Set, and Cluster Editing.
Experimental results
Research questions
- RQ1Can a hybrid data structure combining adjacency lists and matrices significantly reduce the running time of exact graph algorithms?
- RQ2To what extent does the hybrid representation improve the efficiency of undo operations in recursive backtracking algorithms?
- RQ3How does the hybrid representation compare to classical adjacency list implementations in terms of performance on NP-hard graph problems?
- RQ4Does the implicit undo mechanism via the control stack outperform explicit stack-based undo in practice?
- RQ5Can the hybrid representation be effectively applied to diverse graph problems such as Vertex Cover, Dominating Set, and Cluster Editing?
Key findings
- The hybrid graph representation reduced running times by at least a factor of two across all tested algorithms and problem instances.
- For the Vertex Cover problem on a 300-vertex 4-regular graph, the running time was reduced from over 4 days to under 7 minutes when folding was applied.
- On a 1000-vertex random graph with a dominating set of size 3, the hybrid version completed in 6 minutes 36 seconds, compared to 28 minutes 37 seconds with the adjacency list version.
- For Cluster Editing, the hybrid implementation reduced the time from 21 days to 4 days for a 500-vertex graph with k=30, demonstrating a dramatic performance gain.
- The hybrid method enabled the solution of previously intractable instances, such as a 300-vertex graph with k=8, which took over 7 days with adjacency lists but only 8 hours 14 minutes with the hybrid representation.
- The performance improvement was consistent across all problem types and graph densities, with the largest gains observed in high-density and large-scale instances.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.