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.

3.

Which amongst the following is not an NP-complete problem ?

Exam Year(s)

MH SET - 2020, SET Exam - 2020,

Answer: D

The one that is not NP-complete is the Halting problem.

The halting problem, deciding whether an arbitrary program halts on a given input, is undecidable: no algorithm solves it at all. An NP-complete problem must lie in NP, which means it is decidable and its solutions can be checked in polynomial time.

CNF satisfiability (the first problem proved NP-complete, by Cook), the clique decision problem and the node (vertex) cover decision problem are all classic NP-complete problems.

Please log in or register to report this question.

Answer: A

The statement that is not true is Satisfiability is not reducible to halting problem.

Satisfiability is decidable, and every decidable problem reduces to the halting problem: map each yes-instance to a machine that halts and each no-instance to one that loops, which a decider for SAT can do. So SAT is reducible to the halting problem.

The other statements are true. SAT is in NP and every other NP-complete problem is NP-hard, so SAT reduces to each of them. An optimisation problem can be solved with polynomially many calls to its decision version, for example by binary search on the bound. And reducibility is transitive: if A reduces to B and B to C, then A reduces to C.

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