Sunday, January 20, 2008

Why decision and search are different for approximation problems

We don't usually think too much about the distinction between decision and search problems for exact NP-optimization problems. But the distinction is relevant when approximation is involved. Here is a problem & solution excised from Homework 1, illustrated the distinction:

1. Decision to search.

a) Suppose the exact decision version of Max-3Sat is in P i.e., for any c, the c vs. c decision problem is in P. Show that the exact search version of Max-3Sat is also in P; i.e., there is a polynomial time algorithm which, given a 3Sat formula φ, finds an assignment satisfying a maximal number of clauses.

b) Explain the difficulty in showing an analogous reduction from a .9-factor decision algorithm (i.e., c vs. .9c decision, for any c) to a .9-factor search algorithm.

Solution.

a) If φ has m clauses, it's easy to use binary search to identify the value of the optimum using log2m calls to the decision algorithm. (Or, one could be naive and simply use m calls.) Having found Opt, we now find an optimum solution as follows: Run the decision algorithm on (φ0,Opt) and (φ1,Opt), where φb denotes the 3Sat formula gotten by fixing x1 to b (b=0,1) and simplifying. At least one of these must answer `yes'; say b1. Fix x1=b1, replace φ by φb1, and now repeat the process with x2, x3, etc. After 2n calls to the decision algorithm we get an assignment (b1,...,bn) satisfying an Opt fraction of the constraints.

b) When you call the .9-factor decision algorithm with α, a `yes' answer implies the optimum is between .9α and α, while a `no' answer implies the optimum is less than α. By searching, you can find a value β such that .9βOptβ. The hope would be to use the same reduction as before to find an assignment with value in this range. Let's assume we decide to fix the variables in some order with no backtracking -- if we were to use backtracking, there's no way we could guarantee polynomial time. For notational simplicity, assume that as before we first try fixing x1. We now might as well try running the .9-factor decision algorithm on (φ0,α) and (φ1,α) for all possible α.

It is perfectly possible that Opt=.9β, every assignment achieving .9β requires x1=0, but there exists an assignment with x1=1 satisfying .9βm-1 clauses. Further, in this case, it might hold that the decision algorithm says `no' to (φ0,α) for all α>.9β whereas it says `yes' to (φ1,α) for all α<.99β. Now how could we fail to make the wrong choice, x1=1?

No comments: