GATE / CS ARCHIVE

GATE CSE 1995 / QUESTION 11

Certify the complement of a thin NP language

Theory of Computation · Complexity & Reductions · Full GATE CSE 1995 paper

GATE 1995, Q11 5 marks · Descriptive
Not in GATE 2027 syllabusReport issue

Complexity & Reductions

Question 11, GATE 1995: L⊆Σ* is in NP and contains exactly one string of each length n. Prove its complement is in NP.
Tap to enlarge
Answer & solution

Answer: For x, certify a different same-length y∈L using its NP witness. (no official key was published)

Since L is in NP, there is a polynomial-time verifier V(y,c) and a polynomial bound on certificates c such that y∈L exactly when some c makes V accept. To verify that x is in the complement, guess a pair (y,c), require |y|=|x| and y≠x, and run V(y,c). Accept precisely when all checks pass.

Completeness: if x∉L, the hypothesis guarantees a string y∈L of length |x|. It cannot equal x, and it has an accepting NP certificate, so the new verifier has an accepting guess. Soundness: if x∈L, uniqueness says no different same-length y lies in L. Therefore no proposed pair can pass all checks.

The guessed y has length n, its certificate has polynomial length in n, and both comparison and verification take polynomial time. This proves the complement is in NP without assuming NP=coNP. Both parts of “exactly one” matter: existence supplies a witness on complement instances, while uniqueness prevents false acceptance on member instances. At length zero the only word is ε, which is in L, and no different same-length word exists, so rejection is correct.

Original paper, page 7