Vertex Cover

An interactive application showing the Vertex Cover algorithm.

In graph theory, a vertex cover of a graph is a set of vertices that includes at least one endpoint of every edge of the graph.

Three algorithms were made:

  • Brute force – brute force to check if the entered value k is or not the minimum vertex cover
  • Smart search – make use of tops (vertices with more than k edges) and pendants (leaves) to enhance the time complexity
  • Approximate search – much faster but is not guaranteed to generate the minimum cover

Demo

The following video shows some examples. In the console the output of elapsed time can be seen: