The vertex cover for a graph is a subset of the vertices, such that for every edge, at least one endpoint is in the cover. We are trying to find the vertex cover with the minimum size. As a specific example -- suppose we have three vertices, connected in a line, as A-B-C. The smallest cover for the graph is vertex B, which covers the edges going A-B, and B-C. There are other covers (AC, ABC, AB, BC), but the cover with B is the smallest. The sets with only A or with only C are not covers.

Your job is to find the smallest cover you can for datafile3.txt -- this is the small graph with 1000 vertices and 5000 edges. The edges are undirected, and you can ignore the length/cost. You will submit TWO files for this assignment: one will contain the vertices in your cover, and the second will contain your source code.

The problem is NP-Complete -- so I'm not expecting you to find the best answer possible. But, in the real world, you just have to do your best, so that's what you'll do. Go ahead and be creative. Be clever.

Scoring on this assignment is as follows: the five smallest covers (that are actually covers) will get 10/10 points. The next 10 will get 5/10 points. The rest get no points (yikes!) -- this is to avoid having everyone turn in a cover that contains all the vertices, and to get a little competition going.

You can use as much run time as you want.... which is why you need to send me the output of your program, which is just a list of vertices. I'll post a program that will check to see if your cover is correct shortly.