Is there an undecidable problem which is not NP-hard?

  • 1
    $\begingroup$ The title implies a very different kind of question from the actual post. $\endgroup$ – Vijay D Jan 1 '13 at 9:32
  • $\begingroup$ How so? I think they are identical. Perhaps you are referring to a previous title? $\endgroup$ – Yuval Filmus Jan 2 '13 at 1:27
  • $\begingroup$ @Yuval, I think Vijay refers to the title before it was edited. $\endgroup$ – Kaveh Jan 3 '13 at 7:46

If P=NP then any non-trivial set is NP-hard (other than the empty set and the complete set), so assume P$\neq$NP. If $A$ is a set and $f_i$ reduces SAT to $A$ in polytime, then $f_i$ must have infinite range. Otherwise, we can hardcode the relevant values of $f_i$ to get a polytime algorithm for SAT.

We can construct an undecidable problem which is not NP-hard using diagonalization. Let $f_i$ be an enumeration of all polytime reductions whose range is infinite. We construct an undecidable problem $A$ such that no $f_i$ reduces SAT to $A$. We will use $K$ to denote the undecidable set corresponding to the halting problem.

The set $A$ will be defined in stages, starting with a completely undefined set. In stage $i$, we find a string $s$ such that $f_i(s)$ is longer than any string on which $A$ is defined (here we use the fact that the range of $f_i$ is infinite). We define $A$ on $f_i(s)$ so that $s \in SAT$ iff $f_i(s) \notin A$. After all finite stages, we complete the definition of $A$ for each undefined string $s$ by letting $s \in A$ iff $|s| \in K$.

By construction, no polytime $f_i$ reduces SAT to $A$, and so $A$ is not NP-hard. On the other hand, $A$ is not decidable since $K$ reduces to $A$: we can decide whether $n \in K$ (for $n \geq 2$) by taking a majority of three strings of length $n$.

  • $\begingroup$ Hmm. I don't get the first statement. Why is any problem NP-hard? $\endgroup$ – cineel Jan 1 '13 at 10:57
  • 3
    $\begingroup$ If P=NP then a polytime reduction can solve any NP problem. $\endgroup$ – Yuval Filmus Jan 1 '13 at 13:36
  • $\begingroup$ Could you precise what you mean with "infinite range"? I don't find any mentions of range regarding reductions. $\endgroup$ – J. Schmidt Jun 29 '20 at 16:11
  • 1
    $\begingroup$ The set $\{ f_i(\phi) \}$ is infinite, where $\phi$ ranges over all SAT instances. $\endgroup$ – Yuval Filmus Jun 29 '20 at 16:28

One example of an undecidable language that is not NP-hard, unless P = NP, is $$ L = \{ 1^n : n \text{ is the natural number for a TM which halts on input } \epsilon\}. $$ I have explained this answer through a more general theorem in this answer on mathSE.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy