<p>Here is an argument that if you could solve Max 3SAT on an m-clause instance given a constant number of bits of advice, then the polynomial hierarchy would collapse.</p>

<p>Fix an NP-complete problem L. From Cook's theorem, we know a transformation f() of inputs x for L into 3SAT formulas f(x), so that</p>

<p>1) if $x\in L$ then $M(f(x)) = m$</p>

<p>2) if $x\in L$ then $M(f(x)) = m-1$</p>

<p>where $m$ is the number of clauses in $f(x)$.</p>

<p>We also have a theorem of Kadin, that says that, if given $k$ inputs $x_1,\ldots,x_k$ of an NP-complete problem, you have a polynomial time algorithm that makes $\leq k-1$ queries to an NP oracle and determines the correct answer to the $k$ NP problems $x_i \in ? L$, then the polynomial hierarchy collapses.</p>

<p>Suppose we have an algorithm that solves Max SAT on m-clause inputs given k bits of advice. We will use Hastad's result to construct an algorithm as in the premise of Kadin's theorem.</p>

<p>Start from the $K=2^k+1$ inputs $x_1,\ldots,x_K$ to problem $L$. Apply Cook's theorem to each of them. After some normalization (which can be done by assigning weights to the clauses, or duplicating them if we do not want to use weights), we construct $K$ formulas $F_1,\ldots,F_K$ where, for a certain $m$:</p>

<p>1) $M(F_1)= m-1$ if $x_1 \in L$ and $M(F_1) = m-2$ otherwise</p>

<p>2) $M(F_2) = m\cdot (m-1)$ if $x_2 \in L$ and $M(F_2) = m\cdot (m-2)$ otherwise</p>

<p>...</p>

<p>k) $M(F_K) = m^{K-1} \cdot (m-1)$ if $x_K\in L$ and $M(F_K) = m^{K-1} \cdot (m-2)$ otherwise</p>

<p>Now take the union of the formulas, which were constructed over disjoint variables sets, and call it $F$. So we have $M(F) = M(F_1) + \cdots + M(F_k)$, and we can "read off" the answer to the $K$ problems $x_i \in? L$ by looking at the base-$m$ representation of $M(F)$. If we can compute $M(F)$ given $k$ bits of advice, it means that we can find $2^k$ values such that one of them is $M(F)$. We can then ask non-adaptively an NP oracle whether $M(F) \geq n_i$ for each of the candidate values $n_1,\ldots,n_{2^k}$ we generated. So we have been able to solve $2^k+1$ instances of NP-complete problems by making $2^k$ non-adaptive queries to an NP oracle, which implies that the polynomial hierarchy collapses.</p>

<p>Using Hastad's theorem instead of Cook's theorem, it's possible to push  the size of $F$ to $O(1)^k \cdot m$ instead of $m^k$, so it's possible to push $k$ to $\log m$, and the number of advice bits to $\log\log m$. Understanding what happens when you are given  $\log m  - O(1)$ advice bits seems really difficult.</p>

<hr>

<p>Edited to add: Krentel (<a href="http://scholar.google.com/scholar?q=The+Complexity+of+Optimization+Problems.&amp;hl=en&amp;as_sdt=0&amp;as_vis=1&amp;oi=scholart" rel="nofollow">The Complexity of Optimization Problems</a>. <em>J. Comput. Syst. Sci. 36(3): 490-509 (1988)</em>) proved that computing the value of the optimum of the maximum clique problem is complete for $FP^{NP[O(log n)]}$, the class of functions computable in polynomial time with $O(log n)$ queries to an NP oracle. The completeness is under "one query reductions," in which function f is reducible to function g if one can write $f(x) = r_1(g(r_2(x))$ for polynomial time computable $r_1$ and $r_2$. Presumably the same is true for Max Clique. Now, if Max Clique had a polynomial time algorithm that produces a list of $m^{o(1)}$ possible values, it would be in $FP^{NP[o(logn)]}$, because you could use binary search to find the optimum with a number of queries that is log of the list size. </p>

<p>Now, if we have $FP^{NP[O(log n)]} = FP^{NP[o(log n)]}$ we would definitely have $P^{NP[O(log n)]} = P^{NP[o(log n)]}$, which is the special case for decision problems, and that is known, by results of Wagner (improving a result of Kadin that applies to a constant number of queries), to collapse the polynomial hierarchy. But I think that it might be known that $FP^{NP[O(log n)]} = FP^{NP[o(log n)]}$  would actually imply P=NP. But in any case the results of Krentel and Kadin-Wagner should be enough to give another proof of Andy Drucker's result. Now I wonder if it is actually the same proof, that is, if the Fortnow-Van Melkebeek result works, explicitly or implicitly, via a "simulating NP queries with fewer NP queries" argument.</p>

<p>A good survey paper that explains what is going on with optimization problems and bounded query classes:</p>

<p><a href="http://www.csee.umbc.edu/~chang/papers/bqabh/npfsat.pdf" rel="nofollow">http://www.csee.umbc.edu/~chang/papers/bqabh/npfsat.pdf</a></p>

CC BY-SA 2.5
2011-02-03T05:27:15.370Z
2011-02-05T21:52:57.000Z
2011-02-05T21:52:57.000Z
Luca Trevisan
<p>I believe that we can show:</p>

<p><strong>Claim.</strong> There's a value $0 &lt; c &lt; 1$ such that the following is true.  Suppose there's a deterministic poly-time algorithm that, given an $m$-clause 3-SAT instance $\phi$, outputs a list $S$ of at most $m^c$ values, such that $M(\phi) \in S$;
then the polynomial hierarchy collapses.</p>

<p>The proof uses Fortnow and Santhanam's results on <em>infeasibility of instance compression</em> from their paper
<a href="http://www.cs.uchicago.edu/~fortnow/papers/compress.pdf" rel="nofollow">http://www.cs.uchicago.edu/~fortnow/papers/compress.pdf</a></p>

<p>Specifically, by looking at their proof of Thm 3.1, I believe one can extract the following (I will re-check this soon):</p>

<p><strong>"Theorem" [FS].</strong>  There are integers $0 &lt; d&#39; &lt; d$ such that the following is true.  Suppose in deterministic poly-time, one can transform an OR of $n^d$ Boolean formulas (each of length $\leq n$, and on disjoint variable-sets) into an OR of $n^{d&#39;}$ formulas (again variable-disjoint and of length $\leq n$), preserving satisfiability/unsatisfiability of the OR.  Then $\mathsf{NP} \subseteq \mathsf{coNP/poly}$ and the polynomial hierarchy collapses.</p>

<p>The proof of our claim will be a reduction from the OR-compression task mentioned in the above theorem[FS], to the problem of list-computing $M(\phi)$.  Suppose $\psi_1, \ldots, \psi_{n^d}$ is a list of formulas whose OR we want to compress.</p>

<p><strong>First step:</strong> define a polynomial-size circuit $\Gamma$ on input strings $(v, y_1, \ldots, y_{n^d})$.  Here the string $y_i$ encodes an assignment to $\psi_i$, and $v \in \{0, 1\}^{d \log n + 1}$ encodes a number between $0$ and $n^d$.</p>

<p>We have $\Gamma$ accept iff either $v = 0$, or $\psi_v(y_v) = 1$.</p>

<p>Now let $M^*(\Gamma)$ denote the maximum value $v$, such that the restricted circuit $\Gamma(v, \cdot, \ldots, \cdot)$ is satisfiable.  (This quantity is always at least 0).</p>

<p>Suppose we can efficiently produce a list $S$ of possible values for $M^*(\Gamma)$.  Then the claim is that in our list $\psi_1, \ldots, \psi_{n^d}$, we can throw away all $\psi_i$ for which $i \notin S$; the resulting list contains a satisfiable formula iff the original one did.  I hope this is clear by inspection.</p>

<p>Conclusion: we can't reliably produce a list $S$ of $\leq n^{d&#39;}$ possible values for $M^*(\Gamma)$, unless the poly hierarchy collapses.</p>

<p><strong>Second Step:</strong> We reduce from the problem of list-computing $M^*(\Gamma)$ to that of list-computing $M(\phi)$ for 3-SAT instances $\phi$.</p>

<p>To do this, we first run Cook's reduction on $\Gamma$ to get a 3-SAT instance $\phi_1$ of size $m = poly(n^d)$.  $\phi_1$ has the same variable-set as $\Gamma$, along with some auxiliary variables.  Most important for our purposes, $\phi_1(v, \cdot)$ is satisfiable iff $\Gamma(v, \cdot)$ is satisfiable.</p>

<p>We call $\phi_1$ the `strong constraints'.  We give each of these constraints weight $2m$ (by adding duplicate constraints).</p>

<p>Then we add a set of `weak constraints' $\phi_2$ which add a preference for the index $v$ (defined in step 1) to be as high as possible.  There is one constraint for each bit $v_t$ of $v$, namely $[v_t = 1]$.  We let the $t$-th most significant bit of $v$ have a constraint of weight $m/2^{t-1}$.  Since $v$ is of length $d \log n + 1$, these weights can be made integral (we just need to pad to let $m$ be a power of 2).</p>

<p>Finally, let $\phi = \phi_1 \wedge \phi_2$ be the output of our reduction.</p>

<p>To analyze $\phi$, let $(v,z)$ be the variable-set of $\phi$, with $v$ as before.
First note that given any assignment to $(v, z)$, one can infer the value of $v$ from the quantity 
$N(v, z) =$ (total weight of $\phi$-constraints satisfied by $v, z$).<br>
This follows from the hierarchical design of the constraint-weights (similarly to a technique from Luca's answer).
Similarly, the maximum achievable value $M(\phi)$ is achieved by a setting $(v, z)$ that satisfies all strong constraints, and where (subject to this) $v$ is as large as possible.
This $v$ is the largest index for which $\Gamma(v, \cdot)$ is satisfiable, namely $M^*(\Gamma)$.
(Note, it is always possible, by setting $v =$ all-0, to satisfy all strong constraints, since in that case $\Gamma(v, \cdot)$ is satisfiable.)</p>

<p>It follows that, if we are given a list $S$ of possible values of $M(\phi)$, we can derive a list of $|S|$ possible values of $M^*(\Gamma)$.  Thus we can't have $|S| \leq n^{d&#39;}$ unless the poly hierarchy collapses.  This gives the Claim, since $n^{d&#39;} = m^{\Omega(1)}$.</p>

CC BY-SA 2.5
2011-02-05T19:23:48.773Z
2011-02-06T20:55:52.163Z
2011-02-06T20:55:52.163Z
Andy Drucker
<p>I would like to state one reason why proving the NP-hardness of this problem is difficult.</p>

<p>In a comment on the question, Luca Trevisan gave a nice way to restate the problem: Is the following problem solvable in polynomial time for every constant <i>k</i>?  Given a CNF formula <i>C</i> with <i>m</i> clauses, output at most <i>m</i>/<i>k</i> integers so that one of them is equal to <i>M</i>(<i>C</i>).  Here <i>k</i> is related to <i>B</i> by <i>k</i>=2<sup><i>B</i></sup>.</p>

<p>However, let’s demand more.  Namely, we consider the following problem: given a CNF formula <i>C</i>, output two integers so that one of them is equal to <i>M</i>(<i>C</i>).  We denote this problem by Π.  The problem Π is at least as difficult as the original problem, so if the original problem is NP-hard, Π must also be NP-hard.</p>

<p>Note that Π is a relation problem.  One of the simplest kinds of reductions that can be used to reduce some problem <i>L</i> to a relation problem Π is a polynomial-time Levin reduction, which is a special case of a polynomial-time Turing reduction where the reduction calls the oracle for Π only once.</p>

<p>We claim that P<sup>Π[1]</sup>=P.  This obviously implies that NP⊈P<sup>Π[1]</sup> unless P=NP, that is, Π is not NP-hard under polynomial-time Levin reducibility unless P=NP.</p>

<p><strong>Proof</strong>.  Let <i>L</i>∈P<sup>Π[1]</sup>, or in other words, there exists a Levin reduction from <i>L</i> to Π.  This means that there exists a pair (<i>f</i>, <i>g</i>) of a polynomial-time computable function <i>f</i>: {0,1}<sup>*</sup>→{0,1}<sup>*</sup> which maps each instance <i>x</i> of the problem <i>L</i> to some CNF formula <i>f</i>(<i>x</i>) and a polynomial-time computable predicate <i>g</i>: {0,1}<sup>*</sup>×ℕ×ℕ→{0,1} such that <i>g</i>(<i>x</i>, <i>i</i>, <i>j</i>) = <i>L</i>(<i>x</i>) if either <i>i</i> or <i>j</i> is equal to <i>M</i>(<i>f</i>(<i>x</i>)).  (Here <i>L</i>(<i>x</i>)=1 if <i>x</i> is a yes-instance of <i>L</i> and <i>L</i>(<i>x</i>)=0 if <i>x</i> is a no-instance.)</p>

<p>We construct a polynomial-time algorithm for <i>L</i> from this as follows.  Let <i>x</i> be an input.</p>

<ol>
<li>Let <i>C</i>=<i>f</i>(<i>x</i>), and let <i>m</i> be the number of clauses in <i>C</i>.</li>
<li>Find one <i>i</i> ∈ {0,…,<i>m</i>} such that the value <i>g</i>(<i>x</i>, <i>i</i>, <i>j</i>) is constant independent of <i>j</i> ∈ {0,…,<i>m</i>}.</li>
<li>Output this constant <i>g</i>(<i>x</i>, <i>i</i>, 0).</li>
</ol>

<p>In the step 2, such <i>i</i> always exists because <i>i</i>=<i>M</i>(<i>f</i>(<i>x</i>)) satisfies the condition.  Moreover, this algorithm cannot output a wrong answer because <i>g</i>(<i>x</i>, <i>i</i>, <i>M</i>(<i>f</i>(<i>x</i>))) must be the correct answer.  Therefore, this algorithm solves <i>L</i> correctly.  <strong>QED</strong>.</p>

<p>If I am not mistaken, the same idea can be used to prove that P<sup>Π[<i>k</i>(<i>n</i>)]</sup>⊆DTIME[<i>n</i><sup>O(<i>k</i>(<i>n</i>))</sup>].  This implies that NP⊈P<sup>Π[<i>k</i>]</sup> for any constant <i>k</i> unless P=NP and that NP⊈P<sup>Π[polylog]</sup> unless NP⊆DTIME[2<sup>polylog</sup>].  However, this idea alone does not seem to rule out the possibility that Π is NP-hard under polynomial-time Turing reducibility.</p>

CC BY-SA 2.5
2011-02-04T12:53:25.890Z
Could you provide a link to Dana's answer?
Mohammad Al-Turkistany
CC BY-SA 2.5
2011-02-04T20:02:00.707Z
@turkistany: She had deleted her answer after I posted the first revision of this answer.  I have just removed a reference to it from this answer.
Tsuyoshi Ito
CC BY-SA 2.5
2011-02-03T05:13:28.530Z
2011-02-04T20:01:20.410Z
2011-02-04T20:01:20.410Z
Tsuyoshi Ito
<p>For a 3CNF formula $C$ let $M(C)$ be the maximal number of satisfied clauses in any assignment to $C$. It is known that Max-3SAT is hard to approximate (subject to P≠NP), i.e. there is no polytime algorithm whose input is a 3CNF formula $C$, and whose output is the number $M&#39;$ such that $M(C)$ is within a multiplicative factor $1+c$ from $M&#39;$, where $c&gt;0$ is an absolute positive constant.</p>

<p>I believe that it is also NP-hard to compute $M(C) \bmod p$ for any constant modulus $p$. I wonder if the following common generalization of these two facts is true: There is no polytime algorithm whose input is a 3CNF formula $C$ with $N$ clauses, and a string of $\log_2 N-B$ advice bits, and whose output is $M(C)$. Here $B$ is an absolute constant. In plain words, there is no algorithm that computes $B$ bits of information of $M(C)$. </p>

<p>I apologize if the question has a well-known answer, for I am not a complexity theorist by the way of background.</p>

CC BY-SA 2.5
2011-02-02T19:03:14.843Z
Usually an “advice” can only depend on the length of the input.  I believe that your intent is that an “advice” here can depend on the input itself.  I do not know a standard terminology for this notion.
Tsuyoshi Ito
CC BY-SA 2.5
2011-02-02T19:18:16.667Z
“I believe that it is also NP-hard to compute M(C) mod p for any constant modulus p.”  Is this a known result?
Tsuyoshi Ito
CC BY-SA 2.5
2011-02-02T20:05:31.643Z
It's a very interesting question. To confirm that $M(C)\bmod p$ is indeed hard to compute, one can note that the proof of Cook's theorem produces an $m$-variable formula $F$ that is either satisfiable or such that $M(F) = m-1$.
Luca Trevisan
CC BY-SA 2.5
2011-02-02T20:07:16.840Z
The question can be restated in the following way: can there be a polynomial time algorithm that, given a 3CNF formula $F$ with $m$ variables, outputs a list of $m/2^B$ numbers such that one of those number is $M(F)$?
Luca Trevisan
CC BY-SA 2.5
2011-02-02T20:55:05.703Z
@Luca: (1) Thanks for the explanation why M(C) mod p is hard to compute.  (2) I think that you meant m clauses instead of m variables.  Nice reformulation!  Although I am not sure if the two problems are really equivalent or not, I actually prefer your version because it is easier to imagine what an algorithm should achieve.
Tsuyoshi Ito
CC BY-SA 2.5
2011-02-02T21:55:54.670Z
yes, $m$ should have been the number of clauses in the above comment.
Luca Trevisan
CC BY-SA 2.5
2011-02-02T21:57:32.687Z
it's equivalent because if you have an algorithm as described in the post, then you can run the algorithm on each of the $2^{\log_2 m - B} = m/2^B$ possible advice string, get as many (or fewer if there are collisions) answers, and one of them is correct. If you have an algorithm as in my comment above, $\log_2 m - B$ advice bits are sufficient to specify that the correct answer is the $i$-th largest of the outputs of the algorithm, for some $i$.
Luca Trevisan
CC BY-SA 2.5
2011-02-02T22:51:41.113Z
@Luca: Uh-oh, I had overlooked the fact that there are only polynomially many possible advice strings.  Thank you for your patience.
Tsuyoshi Ito
CC BY-SA 2.5
2011-02-03T00:52:00.837Z
I somehow keep confusing _the maximum number of clauses satisfied by a truth assignment_ (the topic of this question) with _the number of satisfying assignments_ (completely unrelated to the question unless there is a surprising connection) ….
Tsuyoshi Ito
<cc.complexity-theory><sat>
Computing any information about Max-3SAT
Boris Bukh
# Computing any information about Max-3SAT

(Asked by: username_0 on 2011-02-02)

For a 3CNF formula $C$ let $M(C)$ be the maximal number of satisfied clauses in any assignment to $C$. It is known that Max-3SAT is hard to approximate (subject to P≠NP), i.e. there is no polytime algorithm whose input is a 3CNF formula $C$, and whose output is the number $M'$ such that $M(C)$ is within a multiplicative factor $1+c$ from $M'$, where $c>0$ is an absolute positive constant.

I believe that it is also NP-hard to compute $M(C) \bmod p$ for any constant modulus $p$. I wonder if the following common generalization of these two facts is true: There is no polytime algorithm whose input is a 3CNF formula $C$ with $N$ clauses, and a string of $\log\_2 N-B$ advice bits, and whose output is $M(C)$. Here $B$ is an absolute constant. In plain words, there is no algorithm that computes $B$ bits of information of $M(C)$.

I apologize if the question has a well-known answer, for I am not a complexity theorist by the way of background.

**Tags:** cc.complexity-theory, sat
> **Comments:**
> **username_1**: Usually an “advice” can only depend on the length of the input.  I believe that your intent is that an “advice” here can depend on the input itself.  I do not know a standard terminology for this notion.  
> **username_1**: “I believe that it is also NP-hard to compute M(C) mod p for any constant modulus p.”  Is this a known result?  
> **username_2**: It's a very interesting question. To confirm that $M(C)\bmod p$ is indeed hard to compute, one can note that the proof of Cook's theorem produces an $m$-variable formula $F$ that is either satisfiable or such that $M(F) = m-1$.  
> **username_2**: The question can be restated in the following way: can there be a polynomial time algorithm that, given a 3CNF formula $F$ with $m$ variables, outputs a list of $m/2^B$ numbers such that one of those number is $M(F)$?  
> **username_1**: @Luca: (1) Thanks for the explanation why M(C) mod p is hard to compute.  (2) I think that you meant m clauses instead of m variables.  Nice reformulation!  Although I am not sure if the two problems are really equivalent or not, I actually prefer your version because it is easier to imagine what an algorithm should achieve.  
> **username_2**: yes, $m$ should have been the number of clauses in the above comment.  
> **username_2**: it's equivalent because if you have an algorithm as described in the post, then you can run the algorithm on each of the $2^{\log_2 m - B} = m/2^B$ possible advice string, get as many (or fewer if there are collisions) answers, and one of them is correct. If you have an algorithm as in my comment above, $\log_2 m - B$ advice bits are sufficient to specify that the correct answer is the $i$-th largest of the outputs of the algorithm, for some $i$.  
> **username_1**: @Luca: Uh-oh, I had overlooked the fact that there are only polynomially many possible advice strings.  Thank you for your patience.  
> **username_1**: I somehow keep confusing _the maximum number of clauses satisfied by a truth assignment_ (the topic of this question) with _the number of satisfying assignments_ (completely unrelated to the question unless there is a surprising connection) ….  

---

## 3 answers

### Answer by username_2 on 2011-02-03. Score: 14

Here is an argument that if you could solve Max 3SAT on an m-clause instance given a constant number of bits of advice, then the polynomial hierarchy would collapse.

Fix an NP-complete problem L. From Cook's theorem, we know a transformation f() of inputs x for L into 3SAT formulas f(x), so that

1) if $x\in L$ then $M(f(x)) = m$

2) if $x\in L$ then $M(f(x)) = m-1$

where $m$ is the number of clauses in $f(x)$.

We also have a theorem of Kadin, that says that, if given $k$ inputs $x\_1,\ldots,x\_k$ of an NP-complete problem, you have a polynomial time algorithm that makes $\leq k-1$ queries to an NP oracle and determines the correct answer to the $k$ NP problems $x\_i \in ? L$, then the polynomial hierarchy collapses.

Suppose we have an algorithm that solves Max SAT on m-clause inputs given k bits of advice. We will use Hastad's result to construct an algorithm as in the premise of Kadin's theorem.

Start from the $K=2^k+1$ inputs $x\_1,\ldots,x\_K$ to problem $L$. Apply Cook's theorem to each of them. After some normalization (which can be done by assigning weights to the clauses, or duplicating them if we do not want to use weights), we construct $K$ formulas $F\_1,\ldots,F\_K$ where, for a certain $m$:

1) $M(F\_1)= m-1$ if $x\_1 \in L$ and $M(F\_1) = m-2$ otherwise

2) $M(F\_2) = m\cdot (m-1)$ if $x\_2 \in L$ and $M(F\_2) = m\cdot (m-2)$ otherwise

...

k) $M(F\_K) = m^{K-1} \cdot (m-1)$ if $x\_K\in L$ and $M(F\_K) = m^{K-1} \cdot (m-2)$ otherwise

Now take the union of the formulas, which were constructed over disjoint variables sets, and call it $F$. So we have $M(F) = M(F\_1) + \cdots + M(F\_k)$, and we can "read off" the answer to the $K$ problems $x\_i \in? L$ by looking at the base-$m$ representation of $M(F)$. If we can compute $M(F)$ given $k$ bits of advice, it means that we can find $2^k$ values such that one of them is $M(F)$. We can then ask non-adaptively an NP oracle whether $M(F) \geq n\_i$ for each of the candidate values $n\_1,\ldots,n\_{2^k}$ we generated. So we have been able to solve $2^k+1$ instances of NP-complete problems by making $2^k$ non-adaptive queries to an NP oracle, which implies that the polynomial hierarchy collapses.

Using Hastad's theorem instead of Cook's theorem, it's possible to push the size of $F$ to $O(1)^k \cdot m$ instead of $m^k$, so it's possible to push $k$ to $\log m$, and the number of advice bits to $\log\log m$. Understanding what happens when you are given $\log m - O(1)$ advice bits seems really difficult.

---

Edited to add: Krentel ([The Complexity of Optimization Problems](http://scholar.google.com/scholar?q=The+Complexity+of+Optimization+Problems.&hl=en&as_sdt=0&as_vis=1&oi=scholart). *J. Comput. Syst. Sci. 36(3): 490-509 (1988)*) proved that computing the value of the optimum of the maximum clique problem is complete for $FP^{NP[O(log n)]}$, the class of functions computable in polynomial time with $O(log n)$ queries to an NP oracle. The completeness is under "one query reductions," in which function f is reducible to function g if one can write $f(x) = r\_1(g(r\_2(x))$ for polynomial time computable $r\_1$ and $r\_2$. Presumably the same is true for Max Clique. Now, if Max Clique had a polynomial time algorithm that produces a list of $m^{o(1)}$ possible values, it would be in $FP^{NP[o(logn)]}$, because you could use binary search to find the optimum with a number of queries that is log of the list size.

Now, if we have $FP^{NP[O(log n)]} = FP^{NP[o(log n)]}$ we would definitely have $P^{NP[O(log n)]} = P^{NP[o(log n)]}$, which is the special case for decision problems, and that is known, by results of Wagner (improving a result of Kadin that applies to a constant number of queries), to collapse the polynomial hierarchy. But I think that it might be known that $FP^{NP[O(log n)]} = FP^{NP[o(log n)]}$ would actually imply P=NP. But in any case the results of Krentel and Kadin-Wagner should be enough to give another proof of Andy Drucker's result. Now I wonder if it is actually the same proof, that is, if the Fortnow-Van Melkebeek result works, explicitly or implicitly, via a "simulating NP queries with fewer NP queries" argument.

A good survey paper that explains what is going on with optimization problems and bounded query classes:

<http://www.csee.umbc.edu/~chang/papers/bqabh/npfsat.pdf>


---

### Answer by username_3 on 2011-02-05. Score: 8

I believe that we can show:

**Claim.** There's a value $0 < c < 1$ such that the following is true. Suppose there's a deterministic poly-time algorithm that, given an $m$-clause 3-SAT instance $\phi$, outputs a list $S$ of at most $m^c$ values, such that $M(\phi) \in S$;
then the polynomial hierarchy collapses.

The proof uses Fortnow and Santhanam's results on *infeasibility of instance compression* from their paper
<http://www.cs.uchicago.edu/~fortnow/papers/compress.pdf>

Specifically, by looking at their proof of Thm 3.1, I believe one can extract the following (I will re-check this soon):

**"Theorem" [FS].** There are integers $0 < d' < d$ such that the following is true. Suppose in deterministic poly-time, one can transform an OR of $n^d$ Boolean formulas (each of length $\leq n$, and on disjoint variable-sets) into an OR of $n^{d'}$ formulas (again variable-disjoint and of length $\leq n$), preserving satisfiability/unsatisfiability of the OR. Then $\mathsf{NP} \subseteq \mathsf{coNP/poly}$ and the polynomial hierarchy collapses.

The proof of our claim will be a reduction from the OR-compression task mentioned in the above theorem[FS], to the problem of list-computing $M(\phi)$. Suppose $\psi\_1, \ldots, \psi\_{n^d}$ is a list of formulas whose OR we want to compress.

**First step:** define a polynomial-size circuit $\Gamma$ on input strings $(v, y\_1, \ldots, y\_{n^d})$. Here the string $y\_i$ encodes an assignment to $\psi\_i$, and $v \in \{0, 1\}^{d \log n + 1}$ encodes a number between $0$ and $n^d$.

We have $\Gamma$ accept iff either $v = 0$, or $\psi\_v(y\_v) = 1$.

Now let $M^\*(\Gamma)$ denote the maximum value $v$, such that the restricted circuit $\Gamma(v, \cdot, \ldots, \cdot)$ is satisfiable. (This quantity is always at least 0).

Suppose we can efficiently produce a list $S$ of possible values for $M^\*(\Gamma)$. Then the claim is that in our list $\psi\_1, \ldots, \psi\_{n^d}$, we can throw away all $\psi\_i$ for which $i \notin S$; the resulting list contains a satisfiable formula iff the original one did. I hope this is clear by inspection.

Conclusion: we can't reliably produce a list $S$ of $\leq n^{d'}$ possible values for $M^\*(\Gamma)$, unless the poly hierarchy collapses.

**Second Step:** We reduce from the problem of list-computing $M^\*(\Gamma)$ to that of list-computing $M(\phi)$ for 3-SAT instances $\phi$.

To do this, we first run Cook's reduction on $\Gamma$ to get a 3-SAT instance $\phi\_1$ of size $m = poly(n^d)$. $\phi\_1$ has the same variable-set as $\Gamma$, along with some auxiliary variables. Most important for our purposes, $\phi\_1(v, \cdot)$ is satisfiable iff $\Gamma(v, \cdot)$ is satisfiable.

We call $\phi\_1$ the `strong constraints'. We give each of these constraints weight $2m$ (by adding duplicate constraints).

Then we add a set of `weak constraints' $\phi\_2$ which add a preference for the index $v$ (defined in step 1) to be as high as possible. There is one constraint for each bit $v\_t$ of $v$, namely $[v\_t = 1]$. We let the $t$-th most significant bit of $v$ have a constraint of weight $m/2^{t-1}$. Since $v$ is of length $d \log n + 1$, these weights can be made integral (we just need to pad to let $m$ be a power of 2).

Finally, let $\phi = \phi\_1 \wedge \phi\_2$ be the output of our reduction.

To analyze $\phi$, let $(v,z)$ be the variable-set of $\phi$, with $v$ as before.
First note that given any assignment to $(v, z)$, one can infer the value of $v$ from the quantity
$N(v, z) =$ (total weight of $\phi$-constraints satisfied by $v, z$).  
This follows from the hierarchical design of the constraint-weights (similarly to a technique from Luca's answer).
Similarly, the maximum achievable value $M(\phi)$ is achieved by a setting $(v, z)$ that satisfies all strong constraints, and where (subject to this) $v$ is as large as possible.
This $v$ is the largest index for which $\Gamma(v, \cdot)$ is satisfiable, namely $M^\*(\Gamma)$.
(Note, it is always possible, by setting $v =$ all-0, to satisfy all strong constraints, since in that case $\Gamma(v, \cdot)$ is satisfiable.)

It follows that, if we are given a list $S$ of possible values of $M(\phi)$, we can derive a list of $|S|$ possible values of $M^\*(\Gamma)$. Thus we can't have $|S| \leq n^{d'}$ unless the poly hierarchy collapses. This gives the Claim, since $n^{d'} = m^{\Omega(1)}$.


---

### Answer by username_1 on 2011-02-03. Score: 8

I would like to state one reason why proving the NP-hardness of this problem is difficult.

In a comment on the question, Luca Trevisan gave a nice way to restate the problem: Is the following problem solvable in polynomial time for every constant *k*? Given a CNF formula *C* with *m* clauses, output at most *m*/*k* integers so that one of them is equal to *M*(*C*). Here *k* is related to *B* by *k*=2*B*.

However, let’s demand more. Namely, we consider the following problem: given a CNF formula *C*, output two integers so that one of them is equal to *M*(*C*). We denote this problem by Π. The problem Π is at least as difficult as the original problem, so if the original problem is NP-hard, Π must also be NP-hard.

Note that Π is a relation problem. One of the simplest kinds of reductions that can be used to reduce some problem *L* to a relation problem Π is a polynomial-time Levin reduction, which is a special case of a polynomial-time Turing reduction where the reduction calls the oracle for Π only once.

We claim that PΠ[1]=P. This obviously implies that NP⊈PΠ[1] unless P=NP, that is, Π is not NP-hard under polynomial-time Levin reducibility unless P=NP.

**Proof**. Let *L*∈PΠ[1], or in other words, there exists a Levin reduction from *L* to Π. This means that there exists a pair (*f*, *g*) of a polynomial-time computable function *f*: {0,1}\*→{0,1}\* which maps each instance *x* of the problem *L* to some CNF formula *f*(*x*) and a polynomial-time computable predicate *g*: {0,1}\*×ℕ×ℕ→{0,1} such that *g*(*x*, *i*, *j*) = *L*(*x*) if either *i* or *j* is equal to *M*(*f*(*x*)). (Here *L*(*x*)=1 if *x* is a yes-instance of *L* and *L*(*x*)=0 if *x* is a no-instance.)

We construct a polynomial-time algorithm for *L* from this as follows. Let *x* be an input.

1. Let *C*=*f*(*x*), and let *m* be the number of clauses in *C*.
2. Find one *i* ∈ {0,…,*m*} such that the value *g*(*x*, *i*, *j*) is constant independent of *j* ∈ {0,…,*m*}.
3. Output this constant *g*(*x*, *i*, 0).

In the step 2, such *i* always exists because *i*=*M*(*f*(*x*)) satisfies the condition. Moreover, this algorithm cannot output a wrong answer because *g*(*x*, *i*, *M*(*f*(*x*))) must be the correct answer. Therefore, this algorithm solves *L* correctly. **QED**.

If I am not mistaken, the same idea can be used to prove that PΠ[*k*(*n*)]⊆DTIME[*n*O(*k*(*n*))]. This implies that NP⊈PΠ[*k*] for any constant *k* unless P=NP and that NP⊈PΠ[polylog] unless NP⊆DTIME[2polylog]. However, this idea alone does not seem to rule out the possibility that Π is NP-hard under polynomial-time Turing reducibility.

> **Comments:**
> **username_4**: Could you provide a link to Dana's answer?  
> **username_1**: @turkistany: She had deleted her answer after I posted the first revision of this answer.  I have just removed a reference to it from this answer.  

---

