Skip to content

Instantly share code, notes, and snippets.

View ahmadalashtar's full-sized avatar
🎯
Focusing

Ahmad Alashtar ahmadalashtar

🎯
Focusing
  • Turkey
  • 21:27 (UTC +03:00)
View GitHub Profile
@ZaydH
ZaydH / README_CPLEX_Vertex_Cover.md
Last active January 14, 2024 13:59
Python CPLEX: Minimum Vertex Cover

Vertex Cover Using CPLEX in Python

This program uses the Python cplex library to solve a vertex cover problem. More information on Vertex Cover is available in the Wikipedia article. The basic idea of the problem is to select the smallest set of vertices such that each edge in the graph is incident on at least one selected vertex. Solving vertex cover is NP-Hard.

For this example, I used the toy graph below.

g