Question: Task 2: This task will have you verifying a certificate to the Vertex Cover problem. A Vertex Cover is a subset of vertices, cina graph,



Task 2: This task will have you verifying a certificate to the Vertex Cover problem. A Vertex Cover is a subset of vertices, cina graph, such that every edge in the graph has at least one of its end points in c. The decision version of the Problem is: Dees G have a vertex cover of size K? Write a python program that takes a graph G. a number and a possible certificate to this problem / Your program returns True, if I is a vertex cover of size k in the graph G and False otherwise, The graph is given in a file textGraph.txt. A file named vertexcover.txt is also given which contains a group of possible vertex cover sets. For this question you can assume k = 4. Figure 2: Graph G For example: Your program might do the following: Enter the filename for graph: textGraph.txt Enter the filename for clique vertexcover.txt 11,3,4,5) Yes 2.4.5.6: No 3.4 : No 13.4.2) : No (3,4,5,2 No PAL A File named vertexcover.txt is also given which X.COM For this out. Cum cliqueListFile - Notepad File Edit Format View Help 12,3,4,5 1, 2, 3,6 1,3,6 0,1,5,6 1, 2, 3,4 testGraph File - Notepad File Edit Format View Help bi 112 1 3 1 2 3 12 4 25 13 4 35 4.5 46 5 6 I vertexcover - Notepad File Edit Format View Help 1,3,4,5 (2,4,5,6 3,4 3,4,2 13,4,5,2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
