Find unmatched vertex, mark it as not included in minimum vertex cover.
Mark all matched neighbours of this vertex as included in minimum vertex cover.
Treat all mates of vertexes from previous step as unmatched vertexes and repeat step 1.
If recursion ended, repeat from step 1 (that is case of several connected components of graph).
If there is no unmatched vertexes, take all remaining pairs and mark them any way you like (remember that one vertex in pair has to
be included in minimum vertex cover, and other one has to be not
included).
Has anyone had good experiences with any Java libraries for Graph algorithms. I've tried JGraph and found it ok, and there are a lot of different ones in google. Are there any that people are actually using successfully in production …
How do you trace the path of a Breadth-First Search, such that in the following example:
If searching for key 11, return the shortest list connecting 1 to 11.
[1, 4, 7, 11]