Skip to content
Official PYQ · 2013

GATE CS 2013 Q18 — Undecidability

Explain with AI

Which of the following statements are TRUE?

  1. The problem of determining whether there exists a cycle in an undirected graph is in PP.
  2. The problem of determining whether there exists a cycle in an undirected graph is in NPNP.
  3. If a problem A is NP−CompleteNP-Complete, there exists a non-deterministic polynomial time algorithm to solve AA
Choose one option
View worked solution

Answer: A

Let us analyze each statement individually:

  1. Statement 1: "The problem of determining whether there exists a cycle in an undirected graph is in PP."
    We can detect a cycle in an undirected graph using Depth First Search (DFS), Breadth First Search (BFS), or a Disjoint Set Union (DSU) data structure. The time complexity of these algorithms is O(V+E)O(V + E), which is polynomial in the size of the input. Thus, the problem belongs to class PP. (True)

  2. Statement 2: "The problem of determining whether there exists a cycle in an undirected graph is in NPNP."
    Since the class PP is a subset of NPNP (P⊆NPP \subseteq NP), any problem that can be solved in polynomial time on a deterministic Turing machine can also be solved in polynomial time on a non-deterministic Turing machine. Since the problem is in PP, it is also in NPNP. (True)

  3. Statement 3: "If a problem AA is NP-CompleteNP\text{-Complete}, there exists a non-deterministic polynomial time algorithm to solve AA."
    By definition, a language/problem AA is NP-CompleteNP\text{-Complete} if and only if:
    1. A∈NPA \in NP, and
    2. Every problem B∈NPB \in NP is polynomial-time reducible to AA (AA is NP-HardNP\text{-Hard}).
    Since A∈NPA \in NP, there must exist a non-deterministic polynomial-time algorithm that decides AA. (True)

Since statements 1, 2, and 3 are all true, the correct option is A.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Undecidability questions