recategorized by
3,711 views
20 votes
20 votes

Let $L$ be a language over $\Sigma$ i.e., $L\subseteq \Sigma^*$. Suppose $L$ satisfies the two conditions given below.

  1. $L$ is in NP and

  2. For every $n$, there is exactly one string of length $n$ that belongs to $L$.

      Let $L^c$ be the complement of $L$ over $\Sigma^*$. Show that $L^c$ is also in NP.

recategorized by

2 Answers

Best answer
25 votes
25 votes

Since $L$ is in NP it is decidable (recursive) and so is its complement $L^c$. Now, $L^c$ may or may not be in NP. But we are given that for any string length $n$, exactly one string belong to $L$, which means for any string length all but one string belong to $L^c$. 

Now, definition of NP says that all instances of the problem can be solved in polynomial time using a nondeterministic TM. So, given an instance of $\langle L^c, x\rangle$, we non-deterministically take all words of length $n$, where $n$ is the length of $w$, and see if it is in $L$. As soon as we get the word (such a word is sure to exist as exactly one word of length $n$ belong to $L$), we see if this word is same as $x$. If it is not same (and only if it is not same), $x \in L^c$ and we get this answer in polynomial time making $L^c$ an NP problem. 

edited by
0 votes
0 votes
If L is a language in NP then L is Turing decidable. So, complement of L is also Turing decidable but not necessarily in NP. To prove it is NP use (ii).
edited by

Related questions

27 votes
27 votes
5 answers
1
Kathleen asked Oct 8, 2014
6,554 views
Let $G_1$ and $G_2$ be subgroups of a group $G$.Show that $G_1 \cap G_2$ is also a subgroup of $G$.Is $G_1 \cup G_2$ always a subgroup of $G$?.
19 votes
19 votes
3 answers
2
Kathleen asked Oct 8, 2014
5,739 views
Prove that in finite graph, the number of vertices of odd degree is always even.
11 votes
11 votes
3 answers
3
Kathleen asked Oct 8, 2014
1,577 views
Prove using mathematical induction for $n \geq 5, 2^n n^2$
7 votes
7 votes
1 answer
4
go_editor asked Feb 12, 2018
2,566 views
What is the equivalent minimal Boolean expression (in sum of products form) for the Karnaugh map given below?