Question
I have to verify that a certificate to the Max-Clique problem. The Max-Clique: Given a graph G , find the largest clique (set of nodes
I have to verify that a certificate to the Max-Clique problem. The Max-Clique: Given a graph G, find the largest clique (set of nodes such that all pairs in the set are neighbors).
The decision version of the Problem is: Does G have a clique of size K? Write a python program that takes a graph G, a number k and a possible certificate C to this problem.
Your program returns yes, if C is a clique of size k in the graph G and no otherwise. The graph is given in a file testGraph.txt. A file named cliqueList.txt is also given which contains group of possible cliques of vertices which you will need to check.
As part of this, you should request a k value from the user.
For example: program might do the following:
Enter the filename for graph: testGraph.txt
Please enter a value for k: 4
Enter the filename for possible cliques: cliqueList.txt
[2,3,4,5] : Yes
[1,2,3,6] : No
[1,2,3] : No
[1,3,6] : No
[0,1,5,6] : No
[1,2,3,4] : No
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started