A problem is said to be in NP if:

2025

A problem is said to be in NP if:

  1. A.

    Its solution can be verified in polynomial time

  2. B.

    It can be solved using a non-deterministic algorithm

  3. C.

    It is not solvable

  4. D.

    It has exponential complexity

Attempted by 55 students.

Show answer & explanation

Correct answer: A

NP (Nondeterministic Polynomial time) is the complexity class of decision problems for which, whenever the answer is "yes", there exists a certificate (a proposed solution or witness) that a deterministic algorithm can check for correctness in a number of steps bounded by a polynomial function of the input size. This "a proposed solution can be checked quickly" property is the defining feature of the class, independent of how hard that certificate is to find in the first place.

Applying this defining property to the given options: only the statement that a solution can be verified in polynomial time matches it exactly, so that is the correct characterization of a problem belonging to NP.

  • "It can be solved using a non-deterministic algorithm" names a related but distinct idea: a non-deterministic algorithm becomes the NP-defining statement only once its running time is ALSO restricted to a polynomial in the input size; without stating that bound, the same guess-and-check pattern is not confined to NP, so this phrasing alone omits the polynomial-time restriction that makes the class NP specific rather than a much broader, less precise notion.

  • "It is not solvable" describes undecidable problems (such as the Halting Problem), which fall under computability/decidability theory and ask whether an algorithm exists that always halts with a correct yes/no answer on every input -- a different question from how efficiently a proposed solution can be checked.

  • "It has exponential complexity" describes the running time of a particular solving algorithm; since P is itself a subset of NP, many problems in NP already have polynomial-time solving algorithms, so exponential running time is not what places a problem in the class.

As an independent check: P is a subset of NP precisely because a problem solvable in polynomial time trivially has a polynomial-time-verifiable solution (simply re-run that same polynomial-time algorithm as the verifier) -- confirming that polynomial-time verifiability, not solvability or running-time complexity, is the property that defines NP.

Explore the full course: Bpsc

Loading lesson…