You are on page 1of 2

Step 1 of 5

A graph is a data structure used to solve various problems. It is a set of vertices or nodes
and the set of edges. A set C is a clique of the graph G if and only if C is a subset of the
vertex set of the graph G and every pair of distinct vertices in C is adjacent in G .

Step 2 of 5
(a)

The problem is called NP if its solution to the problem can be obtained and verified in
polynomial time. The objective is to prove that a CLIQUE-3 problem in which every vertex
has a degree at most 3 is in NP.

The solution to the CLIQUE-3 problem requires identifying that if there is an edge between
every pair of vertices. Verify each node in the clique by visiting them and count the number
of times the nodes the connected via edges. This verification can be done in polynomial time
and the numbers of cliques are also polynomial due to the restriction of at most 3 edges. So,
the verifier runs in polynomial time.

Hence, the CLIQUE-3 problem is in NP.

Step 3 of 5

(b)

If a problem is a polynomial-time reducible to an NP problem, then it is called an NP-


complete problem.

The given proof of the CLIQUE-3 problem of being NP-complete tells that the problem
CLIQUE is at least as hard as the CLIQUE-3 problem. It says that the reduction of problem
CLIQUE-3 to CLIQUE leaves the graph and the parameter unchanged, which is wrong.
Therefore, the solution to both the problems is not the same. The reduction done in the proof
is incorrect.

Thus, the given proof of CLIQUE-3 being an NP-complete problem does not prove anything.

Step 4 of 5

(c)

The vertex cover problem is the NP-complete problem. It contains a set of vertices such that
all the edges in the graph are covered. In other words, it is a subset of the vertices of the
graph such that for every edge 
u,v 
in the graph, either u or v is in the vertex cover.

The given reduction of VC-3 to CLIQUE-3 leaves the graph unchanged. But this does not
prove that the subset C  V is a vertex cover if and only if the complementary set V  C is
a clique in a graph. Due to this, the correctness of the reduction cannot be proved. Because,
the problem CLIQUE-3 can be in NP-completeness only if the reduction is true, so it is not
NP-complete.

Hence, the proof using the vertex cover is incorrect.

Step 5 of 5
(d)

An algorithm is the steps used to solve the problem. The time taken by the algorithm to solve
the problem depending upon the input size determines the time complexity of the algorithm.
The objective is to give an algorithm for the problem CLIQUE-3.

In the CLIQUE-3 problem, every vertex has a degree at most 3. This means that all the
vertices have at most 3 edges. It can be concluded that the largest of the clique is in 4
vertices. Therefore, brute force can be applied to all the possible solutions of the size 4. The
algorithm recursively checks all the connected nodes via an edge for each node in the
O V 
graph. Each search in the algorithm is and the maximum possible connected nodes
are 3.

O V .
Hence, an algorithm for the CLIQUE-3 runs in

You might also like