Submitted:
28 December 2025
Posted:
29 December 2025
You are already at the latest version
Abstract
The Minimum Vertex Cover (MVC) problem is NP-hard even on unit disk graphs (UDGs), which model wireless sensor networks and other geometric systems. This paper presents an experimental comparison of three greedy algorithms for MVC on UDGs: degree-based greedy, edge-based greedy, and the classical 2-approximation based on maximal matching. Our evaluation on randomly generated UDGs with up to 500 vertices shows that the degree-based heuristic achieves approximation ratios between 1.636 and 1.968 relative to the maximal matching lower bound, often outperforming the theoretical 2-approximation bound in practice. However, it provides no worst-case guarantee. In contrast, the matching-based algorithm consistently achieves the proven 2-approximation ratio while offering superior running times (under 11 ms for graphs with 500 vertices). The edge-based heuristic demonstrates nearly identical performance to the degree-based approach. These findings highlight the practical trade-off between solution quality guarantees and empirical performance in geometric graph algorithms, with the matching-based algorithm emerging as the recommended choice for applications requiring reliable worst-case bounds.
Keywords:
1. Introduction
2. Materials and Methods
2.1. Problem Definition and Graph Model
2.2. Algorithms Compared
2.2.1. Degree-Based Greedy Algorithm
| Algorithm 1: DegreeGreedy(G) |
|
2.2.2. Edge-Based Greedy Algorithm
| Algorithm 2: EdgeGreedy(G) |
|
2.2.3. Matching-Based 2-Approximation
| Algorithm 3: MatchingApprox(G) |
|
2.3. Implementation and Experimental Setup
- networkx for graph operations
- numpy for random point generation
- matplotlib for visualization
- scipy.spatial for distance computations
- Cover size
- Running time (milliseconds)
- Approximation ratio , where M is a maximal matching (providing a lower bound for OPT since [6])
3. Experimental Results
3.1. Overall Algorithm Comparison
- The degree-based and edge-based algorithms produce identical cover sizes and ratios across all configurations, suggesting structural similarities in their behavior on random UDGs.
- Both heuristics achieve ratios significantly below the theoretical 2-approximation bound [6], ranging from 1.636 to 1.968.
- The matching-based algorithm consistently achieves the theoretical ratio of 2.000, confirming its guarantee [6].
- As graph density increases (larger R or n), all algorithms produce larger covers, but the relative performance patterns remain stable.
3.2. Detailed Analysis of Matching-based Algorithm
- Perfect approximation ratio: All instances achieve exactly ratio 2.000, confirming the theoretical guarantee [6].
- Excellent scalability: Running time grows from 0.35 ms for to only 10.78 ms for , demonstrating practical efficiency.
- Consistency: Small standard deviations (not shown) indicate reliable performance across different random instances.
3.3. Visual Analysis
4. Discussion
4.1. Interpretation of Results
4.2. Practical Recommendations
4.3. Limitations and Future Work
- Graph size: Experiments were limited to . Testing on larger graphs would further validate scalability.
- Graph generation: Only uniformly random point placements were considered [5]. Real-world networks may have different spatial distributions.
- Weighted vertices: We considered only the unweighted version. Extending to weighted vertex cover would increase practical relevance.
- Theoretical analysis: The strong empirical performance of degree-based heuristic on random UDGs warrants theoretical analysis of its average-case ratio, extending the work of [5].
5. Conclusions
Supplementary Materials
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Garey, M.R.; Johnson, D.S. Computers and Intractability: A Guide to the Theory of NP-Completeness; W.H. Freeman: San Francisco, CA, USA, 1979. [Google Scholar]
- Clark, B.N.; Colbourn, C.J.; Johnson, D.S. Unit disk graphs. Discrete Math. 1990, 86, 165–177. [Google Scholar] [CrossRef]
- Cormen, T.H.; Leiserson, C.E.; Rivest, R.L.; Stein, C. Introduction to Algorithms, 3rd ed.; MIT Press: Cambridge, MA, USA, 2009. [Google Scholar]
- Hochbaum, D.S. Approximation algorithms for the set covering and vertex cover problems. SIAM J. Comput. 1983, 11(3), 555–556. [Google Scholar] [CrossRef]
- Marathe, M.V.; Breu, H.; Hunt, H.B.; Ravi, S.S.; Rosenkrantz, D.J. Simple heuristics for unit disk graphs. Networks 1995, 25(2), 59–68. [Google Scholar] [CrossRef]
- Vazirani, V.V. Approximation Algorithms; Springer: Berlin/Heidelberg, Germany, 2001. [Google Scholar]



| R | n | Degree-based | Edge-based | Matching-based | |||
|---|---|---|---|---|---|---|---|
| Cover | Ratio | Cover | Ratio | Cover | Ratio | ||
| 0.15 | 100 | 72 | 1.636 | 72 | 1.636 | 88 | 2.000 |
| 200 | 166 | 1.766 | 166 | 1.766 | 188 | 2.000 | |
| 300 | 269 | 1.868 | 269 | 1.868 | 288 | 2.000 | |
| 400 | 370 | 1.907 | 370 | 1.907 | 388 | 2.000 | |
| 500 | 466 | 1.887 | 466 | 1.887 | 494 | 2.000 | |
| 0.20 | 100 | 83 | 1.766 | 83 | 1.766 | 94 | 2.000 |
| 200 | 179 | 1.865 | 179 | 1.865 | 192 | 2.000 | |
| 300 | 282 | 1.918 | 282 | 1.918 | 294 | 2.000 | |
| 400 | 379 | 1.934 | 379 | 1.934 | 392 | 2.000 | |
| 500 | 480 | 1.959 | 480 | 1.959 | 490 | 2.000 | |
| 0.25 | 100 | 86 | 1.792 | 86 | 1.792 | 96 | 2.000 |
| 200 | 186 | 1.918 | 186 | 1.918 | 194 | 2.000 | |
| 300 | 285 | 1.939 | 285 | 1.939 | 294 | 2.000 | |
| 400 | 387 | 1.964 | 387 | 1.964 | 394 | 2.000 | |
| 500 | 486 | 1.968 | 486 | 1.968 | 494 | 2.000 | |
| n | R | Cover Size | Time (ms) | Matching Size | Ratio |
|---|---|---|---|---|---|
| 100 | 0.15 | 88.6 | 0.35 | 44.3 | 2.000 |
| 200 | 0.15 | 188.2 | 0.65 | 94.1 | 2.000 |
| 300 | 0.15 | 287.8 | 1.97 | 143.9 | 2.000 |
| 400 | 0.15 | 388.0 | 2.99 | 194.0 | 2.000 |
| 500 | 0.15 | 489.0 | 4.10 | 244.5 | 2.000 |
| 100 | 0.20 | 93.4 | 0.24 | 46.7 | 2.000 |
| 200 | 0.20 | 192.0 | 1.02 | 96.0 | 2.000 |
| 300 | 0.20 | 293.4 | 2.16 | 146.7 | 2.000 |
| 400 | 0.20 | 392.2 | 3.89 | 196.1 | 2.000 |
| 500 | 0.20 | 491.8 | 6.87 | 245.9 | 2.000 |
| 100 | 0.25 | 95.6 | 0.35 | 47.8 | 2.000 |
| 200 | 0.25 | 195.4 | 1.25 | 97.7 | 2.000 |
| 300 | 0.25 | 295.2 | 3.24 | 147.6 | 2.000 |
| 400 | 0.25 | 394.2 | 6.07 | 197.1 | 2.000 |
| 500 | 0.25 | 494.8 | 10.78 | 247.4 | 2.000 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).