• Aucun résultat trouvé

NP Sets That Are Neither in P nor NP-Complete

Dans le document This page intentionally left blank (Page 107-111)

Introduction and Preliminaries

CHAPTER TWO

P, N and NP-Completeness

2.2. Polynomial-Time Reductions

2.3.4. NP Sets That Are Neither in P nor NP-Complete

3

x

y M

T1

T2 T3

Figure 2.3: The clause gadget and its sub-gadget. In a generic 3-coloring of the sub-gadget it must hold that ifx=ythenx=y=1. Thus, if the three terminals of the gadget are assigned the same color, χ, then M is also assigned the colorχ.

Proposition 2.27: Graph 3-Colorabilityis NP-complete.

Proof Sketch:We reduce3SATtoG3Cby mapping a 3CNF formulaφto the graph Gφ, which consists of two special (“designated”) vertices, a gadget per each variable ofφ, a gadget per each clause ofφ, and edges connecting some of these components.

The two designated vertices are calledgroundandfalse, and are connected by an edge that ensures that they must be given different colors in any 3-coloring ofGφ. We will refer to the color assigned to the vertexground(resp.,false) by the nameground(resp.,false). The third color will be calledtrue.

The gadget associated with variable x is a pair of vertices, associated with the two literals ofx (i.e.,x and¬x). These vertices are connected by an edge, and each of them is also connected to the vertexground. Thus, in a 3-coloring of Gφone of the vertices associated with the variable is coloredtrueand the other is coloredfalse.

The gadget associated with a clauseC is depicted in Figure2.3. It contains a mastervertex, denotedM, and threeterminalvertices, denotedT1,T2, andT3.

The master vertex is connected by edges to the verticesgroundandfalse, and thus in a 3-coloring ofGφ the master vertex must be coloredtrue. The gadget has the property that it is possible to color the terminals with any combination of the colorstrueandfalse, except for coloring all terminals withfalse. The terminals of the gadget associated with clauseC will beidentified with the vertices that are associated with the corresponding literals appearing inC. This means that the various clause gadgets are not vertex-disjoint but may rather share some terminals (with the variable gadgets as well as among themselves).19See Figure2.4.

Verifying the validity of the reduction is left as an exercise.

2.3.4. NP Sets That Are Neither in P nor NP-Complete

As stated in Section2.3.3, thousands of problems have been shown to be NP-complete (cf., [85, Apdx.], which contains a list of more than three hundreds main entries).

Things have reached a situation in which people seem to expect any NP-set to be either NP-complete or in P. This naive view is wrong:Assuming N P =P, there exist, sets

19Alternatively, we may use disjoint gadgets and “connect” each terminal with the corresponding literal (in the corresponding vertex gadget). Such a connection (i.e., an auxiliary gadget) should force the two endpoints to have the same color in any 3-coloring of the graph.

variable gadgets

clause gadgets

GROUND FALSE

the two designated verices

Figure 2.4:A single clause gadget and the relevant variables gadgets.

in N P that are neither NP-complete nor in P, where here NP-hardness allows also Cook-reductions.

Theorem 2.28: AssumingN P =P, there exists a set T inN P\Psuch that some sets inN Pare not Cook-reducible to T .

Theorem2.28asserts that ifN P =PthenN Pis partitioned into three non-empty classes:

the classP, the class of problems to whichN P is Cook-reducible, and the rest, denoted N PI. We already know that the first two classes are not empty, and Theorem 2.28 establishes the non-emptiness of N PI under the condition that N P =P, which is actually a necessary condition (because if N P =P then every set in N P is Cook-reducible to any other set inN P).

The following proof of Theorem2.28presents an unnatural decision problem inN PI. We mention that some natural decision problems (e.g., some that are computationally equivalent to factoring) are conjectured to be inN PI. We also mention that ifN P = coN P, where coN P = {{0,1}\S: SN P}, then def= N P∩coN PPN PI holds (as a corollary to Theorem2.35). Thus, ifN P=coN P then\P is a (natural) subset ofN PI, and the non-emptiness ofN PI follows provided that=P. Recall that Theorem2.28 establishes the non-emptiness ofN PI under the seemingly weaker assumption thatN P =P.

Teaching note:We recommend either stating Theorem2.28without a proof or merely pre-senting the proof idea.

Proof Sketch:The basic idea is modifying an arbitrary set inN P\Pso as to fail all possible reductions (fromN Pto the modified set) as well as all possible polynomial-time decision procedures (for the modified set). Specifically, starting with SN P\P, we deriveSSsuch that on the one hand there is no polynomial-time

reduction of Sto Swhile on the other hand SN P\P. The process of modi-fyingSintoSproceeds in iterations, alternatively failing a potential reduction (by dropping sufficiently many strings from the rest ofS) and failing a potential decision procedure (by including sufficiently many strings from the rest ofS). Specifically, each potential reduction ofStoScan be failed by dropping finitely many elements from the current S, whereas each potential decision procedure can be failed by keeping finitely many elements of the currentS. These two assertions are based on the following two corresponding facts:

1. Any polynomial-time reduction (of any set not inP) to any finite set (e.g., a finite subset ofS) must fail, because only sets inP are Cook-reducible to a finite set.

Thus, for any finite set F1 and any potential reduction (i.e., a polynomial-time oracle machine), there exists an inputx on which this reduction toF1fails.

We stress that the aforementioned reduction fails while the only queries that are answered positively are those residing in F1. Furthermore, the aforementioned failure is due to a finite set of queries (i.e., the set of all queries made by the reduction when invoked on an input that is smaller or equal tox). Thus, for every finite setF1SS, any reduction ofStoScan be failed by dropping a finite number of elements fromSand without dropping elements ofF1.

2. For every finite setF2, any polynomial-time decision procedure forS\F2must fail, because S is Cook-reducible to S\F2. Thus, for any potential decision procedure (i.e., a polynomial-time algorithm), there exists an inputx on which this procedure fails.

We stress that this failure is due to a finite “prefix” of S\F2 (i.e., the set{zS\F2:zx}). Thus, for every finite set F2, any polynomial-time decision procedure forS\F2can be failed by keeping a finite subset ofS\F2.

As stated, the process of modifying S into S proceeds in iterations, alternatively failing a potential reduction (by dropping finitely many strings from the rest ofS) and failing a potential decision procedure (by including finitely many strings from the rest ofS). This can be done efficiently becauseit is inessential to determine the first possible points of alternation(in which sufficiently many strings were dropped (resp., included) to fail the next potential reduction (resp., decision procedure)). It suffices to guarantee that adequate points of alternation (albeit highly non-optimal ones) can be efficiently determined. Thus,Sis the intersection ofSand some set in P, which implies that SN P. Following are some comments regarding the implementation of the foregoing idea.

The first issue is that the foregoing plan calls for an (“effective”) enumeration of all polynomial-time oracle machines (resp., polynomial-time algorithms). However, none of these sets can be enumerated (by an algorithm). Instead, we enumerate all corresponding machines along with all possible polynomials, and for each pair (M,p) we consider executions of machine M with time bound specified by the polynomial p. That is, we use the machine Mp obtained from the pair (M,p) by suspending the execution of M on inputx after p(|x|) steps. We stress that we do not know whether machineMruns in polynomial time, but the computations of any polynomial-time machine is “covered” by some pair (M,p).

Next, let us clarify the process in which reductions and decision procedures are ruled out. We present a construction of a “filter” setFinPsuch that the final setS

will equal SF. Recall that we need to selectF such that each polynomial-time reduction of S to SF fails, and each polynomial-time procedure for deciding SF fails. The key observation is that for every finite F each polynomial-time reduction ofStoSFfails, whereas for every co-finiteF(i.e., finite{0,1}\F) each polynomial-time procedure for deciding SF fails. Furthermore, each of these failures occurs on some input, and such an input can be determined by finite portions of S and F. Thus, we alternate between failing possible reductions and decision procedures on some inputs, while not trying to determine the “optimal”

points of alternation but rather determining points of alternation in an efficient manner (which in turn allows for efficiently deciding membership inF). Specifically, we let F= {x : f(|x|)≡1 mod 2}, where f :N→ {0} ∪Nwill be defined such that (i) each of the first f(n)−1 machines is failed by some input of length at most n, and (ii) the value f(n) can be computed in time poly(n).

The value of f(n) is defined by the following process that performs exactly n3 computation steps (where cubic time is a rather arbitrary choice). The process proceeds in (ana prioriunknown number of) iterations, where in thei+1stiteration we try to find an input on which thei+1st(modified) machine fails. Specifically, in thei+1st iteration we scan all inputs, in lexicographic order, until we find an input on which thei +1st(modified) machine fails, where this machine is an oracle machine ifi+1 is odd and a standard machine otherwise. If we detect a failure of thei+1st machine, then we incrementi and proceed to the next iteration. When we reach the allowed number of steps (i.e.,n3steps), we halt outputting the current value ofi (i.e., the currenti is output as the value of f(n)). Needless to say, this description is heavily based on determining whether or not thei +1stmachine fails on specific inputs. Intuitively, these inputs will be much shorter than n, and so performing these decisions in timen3 (or so) is not out of the question – see next paragraph.

In order to determine whether or not a failure (of the i+1st machine) occurs on a particular input x, we need to emulate the computation of this machine on inputx as well as determine whetherx is in the relevant set (which is eitherS or S= SF). Recall that ifi+1 is even then we need to fail a standard machine (which attempts to decide S) and otherwise we need to fail an oracle machine (which attempts to reduce S to S). Thus, for eveni +1 we need to determine whetherx is inS= SF, whereas for oddi+1 we need to determine whether x is inSas well as whether some other strings (which appear as queries) are inS. Deciding membership in SN P can be done in exponential time (by using the exhaustive search algorithm that tries all possible NP-witnesses). Indeed, this means that when computing f(n) we may only complete the treatment of inputs that are of logarithmic (inn) length, but anyhow inn3 steps we cannot hope to reach (in our lexicographic scanning) strings of length greater than 3 log2n. As for deciding membership inF, this requires the ability to compute f on adequate integers. That is, we may need to compute the value of f(n) for various integersn, but as noted nwill be much smaller thann(sincen≤poly(|x|)≤poly(logn)). Thus, the value of f(n) is just computed recursively (while counting the recursive steps in our total number of steps).20The point is that, when considering an inputx, we may need the

20We do not bother to present a more efficient implementation of this process. That is, we may afford to recompute f(n) every time we need it (rather than store it for later use).

values of f only on{1, . . . ,pi+1(|x|)}, where pi+1 is the polynomial bounding the running time of thei+1st (modified) machine, and obtaining such a value takes at most pi+1(|x|)3 steps. We conclude that the number of steps performed toward determining whether or not a failure (of thei +1st machine) occurs on the inputx is upper-bounded by an (exponential) function of|x|.

As hinted in the foregoing, the procedure will complete n3 steps long before examining inputs of length greater than 3 log2n, but this does not matter. What matters is that f is unbounded (see Exercise2.34). Furthermore, by construction,

f(n) is computed in poly(n) time.

Comment. The proof of Theorem 2.28actually establishes that for every SP there exists SPsuch that Sis Karp-reducible to S but S is not Cook-reducible to S.21Thus, ifP=N Pthen there exists an infinite sequence of setsS1,S2, . . .inN P\Psuch that Si+1is Karp-reducible to Si butSi is not Cook-reducible toSi+1. That is, there exists an infinite hierarchy of problems (albeit unnatural ones), all inN P, such that each problem is “easier” than the previous ones (in the sense that it can be reduced to the previous problems while these problems cannot be reduced to it).

Dans le document This page intentionally left blank (Page 107-111)