8

this is my first stackoverflow question, so be gentle. I apologize in advance if this has been beaten to death already... I read a few threads on NP but I haven't found a tantalizing answer to my question (if anything, I came up with some new ones). Briefly:

  1. Are there decision problems which are decidable but not in NP?
  2. If so, are problems which ask for a solution harder than the equivalent decision problem?

My suspicion is that the answer to the first question is a resounding 'yes' and that the answer to the second is a resounding 'no'.

In the first case, an example problem might be "given a set S, a subset T of S and a function f with domain 2^S, determine whether T maximizes f". For generic S, T and f, you can't even verify this without checking f(X) for all subsets X of S, right?

In the second case... well, I'll admit this is more of a hunch. For some reason, it doesn't seem like it should matter whether an answer contains one bit (for decision problems) or any (finite) number of bits... or, in other words, why you shouldn't be able to consider the symbols left on the tape after the TM halts as part of the "answer".

EDIT: Actually, I have a question... how precisely does your construction show that function problems are "no harder" than decision problems? If anything, you've shown that it's no easier to answer a function problem than a decision problem... which is trivial. Perhaps this is my fault for asking the question in a sloppy fashion.

Given a TM T1 in NP which solves the problem "Is X a solution to problem P" for variable X and (for the sake of argument) fixed P, is it guaranteed that there will be a TM T2 in NP which halts everywhere T1 halts, which ends in the "halt accept" state everywhere it halts, and leaves e.g. a binary representation of X on the tape?

aegrisomnia
  • 1,306
  • 1
  • 9
  • 6

1 Answers1

15

(1) Yes, there are decision problems that are decidable but not in NP. It is a consequence of the time hierarchy theorem that NP ⊊ NEXP, so any NEXP-hard problem is not in NP. The canonical example is this problem:

Given a non-deterministic Turing machine M and an integer n written in binary, does M accept the empty string in at most n steps?

This problem is certainly decidable (just simulate all computation paths for M of length n and if see any accepts).

See this question on cstheory.stackexchange.com for many more NEXP-complete problems. And of course, there are decision problems outside NEXP: indeed, a whole exponential hierarchy of them...

(2) The answer to your second question is no: function problems are no harder than decision problems. (In a particular technical sense of "no harder than".) Suppose we have a function problem which asks for output N. Then there's a decision problem which takes an input k and asks whether the kth bit of N is 1. Solve this decision problem for every bit in the answer, and you're done!

For example, FSAT (the problem of finding a satisfying assignment to a Boolean formula) can be polynomial-time reduced to SAT (the problem of determining whether a Boolean formula has a satisfying assignment). Suppose you can solve SAT, and you are asked to find a satisfying assignment for the formula φ. Consider the first variable x in your formula φ, and ask SAT whether x∧φ is satisfiable. If it is, there must be a satisfying assignment for φ in which x is true; if not, and φ is satisfiable, then there must be a satisfying assignment for φ in which x is false. Continue with the second variable y, asking whether xy∧φ (or ¬xy∧φ, according to the answer to your first question) is satisfiable. And so on for each variable in the formula.

[I ought to add an important caveat about this example. Here SAT and FSAT are "naturally" related: they are both concerned with the same kind of thing, namely satisfying assignments to formulae. But in my argument that search in general can be reduced to decision, I used a highly artificial decision problem about the kth bit of the output. So although search reduces to decision, it doesn't necessarily reduce to the natural corresponding decision problem. In particular, Bellare and Goldwasser showed that sometimes search can't be so reduced.]

Community
  • 1
  • 1
Gareth Rees
  • 60,601
  • 9
  • 119
  • 155
  • Hey, thanks Gareth! So if I'm interpreting you correctly, we agree on (1) and we also agree on (2) (although my answer to (2) is "no", I'm asking the opposite question... whether "solution" problems are harder than "decision" problems, which they are not, as illustrated by your SAT/FSAT example). Thanks! – aegrisomnia Jul 15 '11 at 20:38
  • Oh yes, I see which way round you are asking it now. I will fix. – Gareth Rees Jul 15 '11 at 20:41
  • Cool, just making sure! Thanks again for the great info. – aegrisomnia Jul 15 '11 at 20:43
  • Actually, Gareth, I have a question about your example... see my edited post. Sorry if I'm being a dunce. – aegrisomnia Jul 15 '11 at 21:00
  • It's easy to get confused about reductions between problems! Think about it carefully, and you'll see which end is which. – Gareth Rees Jul 15 '11 at 21:08
  • Thanks, Gareth. You're right, my thinking on this was very confused. You have definitely clarified things for me a lot. – aegrisomnia Jul 15 '11 at 21:13
  • Your new question is a bit confused: a Turing machine can't be in NP, (only a language or a problem can). But suitably fixed up, I believe that Bellare and Goldwasser showed that the answer is "no". See my edited answer. – Gareth Rees Jul 15 '11 at 21:43
  • I don't like the answer to question 2. For example travelling salesman, "is bit #i in the length of the shortest tour 1"? It's not at all obvious that there is a proof that can be verified in polynomial time. However, if the sum of all tours is K then the shortest tour obviously has a length <= K, so we can use binary search to decide "is there a tour of length <= K/2", then either "is there a tour of length <= 3/4 K" or "... <= 1/4 K" and so on; each has an obvious proof (a tour of that length) that can be verified in polynomial time. – gnasher729 Mar 28 '14 at 15:28
  • @gnasher729 You are comparing unequal problems. The TSP function problem "find the optimal path" (FTSP) is harder than the "naturally associated" decision problem "is there a path <= K" (FTSP is NP-hard, TSP is NP-complete). Note that his argument is showing that function problems are *not harder than* decision problems, because if you could solve the "bit #i in TSP" decision problem you could also solve the TSP function problem, which is why the bit #i problem is also NP-hard. – Mario Carneiro Oct 21 '15 at 00:39
  • Can elaborate on 1)? Intuitively I think the issue is that the NTM that one could propose to solve the problem has a constant upper bound on the "branching factor" of its nondeterminism, but the NTM that it needs to simulate may grow its branching factor linearly in wrt its description length. So the number of simulated branches per simulator branches is multiplied after each step by a factor that is linear in simulator input. – isarandi Jan 30 '18 at 10:29
  • But it seems like it only results in a linear increase in required depth for the simulator. My second thought is it's probably about storage. To simulate all the different branches, the head needs to jump around too much? – isarandi Jan 30 '18 at 10:37