ࡱ > 9 R bjbj 2 l
v q
s
s
s
s
s
s
$ h D
q
q
.
c
c L /
q
0
7
, ` ^ c
Algorithm for vertex cover
student I.D. : 20023671
Name : Woong Hwangbo
This algorithm is searching Vertex Cover. I coded this with JAVA language. You may need JDK(JAVA program).
How to execute my code
1. Each vertex name must be natural number (also must be sequential).
2. First, enter the number of vertex.
3. Second, enter the number of edge.
4. Third, enter all pairs of edge. Just two numbers is O.K.
After entering one number, you must hit "space bar" once.
Then, enter another number. And hit "ENTER" key.
These two numbers comprise one edge.
5. Then, you will get elements of vertex cover.
example
When executed,