Machine-translated by Google. Questions are authored in English.
Top

Complexity Classes P and NP Questions and Answers

1.

Let G(V, E) be a simple, undirected graph. A vertex cover of G is a subset \(V' \subseteq V\) such that for every \((u, v) \in E\), \(u \in V'\) or \(v \in V'\). Let the size of the smallest vertex cover in G be k. Let S be any vertex cover of size k.

For a vertex \(v \in V\), which of the following constraints will always ensure that \(v \in S\) ?

Exam Year(s)

GATE CS - 2026,

Answer: A

The constraint that always forces v into S is The degree of v is at least k + 1.

If v were not in S, every edge at v would have to be covered by its other endpoint, so all of v's at least k + 1 neighbours would be in S. That makes S larger than k, a contradiction. So v must be in every minimum vertex cover.

The other conditions do not force it. In the path a-b-c the minimum cover is {b}, so k = 1, and a lies on a path of length 2 = k + 1 without being in the cover. In a triangle k = 2, every vertex lies on a cycle of length 3 = k + 1 and in a clique of size 2 = k, yet any one vertex can be left out of a minimum cover.

Please log in or register to report this question.

2.

For the following statements of problems :

(I) 3 COL : Given a graph G, can be painted with 3 colours.
(II) COLO : given a graph G, find the chromatic number of G.

Select the correct answer :

Exam Year(s)

MH SET - 2018, SET Exam - 2018,

Answer: C

The answer is (I) is NP-complete & (II) is NP-hard.

3 COL asks a yes/no question: can the graph be coloured with 3 colours? It is in NP, because a proposed colouring can be checked in polynomial time, and it is one of Karp's classic NP-complete problems.

COLO asks for the chromatic number itself, an optimisation problem rather than a decision problem. Solving it would also solve 3 COL, so it is NP-hard, but it is not in NP as stated. Neither problem is known to be solvable in polynomial time, so the options calling either one polynomial are wrong, and 'Only (I) is NP-complete' leaves out the classification of (II).

Please log in or register to report this question.

Loading…

Other Subjects

Tags: Complexity Classes P and NP Questions and Answers || Complexity Classes P and NP MCQ Questions and Answers || Complexity Classes P and NP GK Questions and Answers || Complexity Classes P and NP GK MCQ Questions || Complexity Classes P and NP Multiple Choice Questions and Answers || Complexity Classes P and NP GK || GK on Complexity Classes P and NP || Theory of Computation Questions and Answers || Theory of Computation MCQ Questions and Answers || Theory of Computation GK Questions and Answers || GK on Theory of Computation