• Aucun résultat trouvé

Certificate definition of NL: Read-once certificates

Dans le document This page intentionally left blank (Page 115-118)

PART ONE BASIC COMPLEXITY CLASSES

Exercises 77 A subfieldof complexity theory calledstructural complexity has carriedout a detailed

4.3.1 Certificate definition of NL: Read-once certificates

In Chapter2, we saw an alternative definition ofNPthat replacednondeterminism with the notion of acertificateof membership. Now try to define the classNLusing

Read only head Read once head

Read/write head

Read/write head Certificate

tape Input tape Work tape Output tape

Register

Figure 4.4.Certificate view ofNL. The certificate for inputxis placed on a special read-once tape on which the machine’s head can never move to the left.

certificatesinstead of nondeterministic TMs. We need to address one tricky issue: A certificate may be polynomially long, so a logspace machine may not have the space to store it. Thus the certificate-baseddefinition ofNLassumes that the certificate is provided to the logspace machine on a separate tape that is “read once,” meaning that the machine’s headon the tape can only sweep the tape from left to right once, andthus never readthe same bit of the certificate twice. Specifically, at each step, the machine’s headon that tape can either stay in place or move to the right. It is easily seen that the following is an alternative definition ofNL(see also Figure4.4), since read-once access to bits in a certificate is just an alternative way to view nondeterministic choices during a computation.

Definition 4.19(NL-alternative definition) A languageLis inNLif there exists a deter-ministic TMM(calledtheverifier) with an additional special read-once input tape, and a polynomialp:N→Nsuch that for everyx∈ {0, 1},

xL⇔ ∃u∈ {0, 1}p(|x|) s.t.M(x,u)=1

where byM(x,u)we denote the output ofM wherexis placedon its input tape and uis placedon its special read-once tape, andM uses at mostO(log|x|)space on its

read-write tapes for every inputx. #

In the above scenario, what if we remove the read-once restriction and allow the TM’s headto move back andforth on the certificate, andreadeach bit multiple times?

Surprisingly, this changes the class fromNLtoNP; see Exercise4.7.

4.3.2 NL=coNL

Analogously tocoNP, we definecoNLas the set of languages that arecomplements ofNLlanguages. A simple example for acoNLlanguage is PATH, the complement of thePATHlanguage. A decision procedure for this language must accept the tuple

4.3. Completeness 91 G,s,twhen there is no path fromstotin the graph. It is easy see thatPATHis not only incoNLbut is in factcoNL-complete, which means that everycoNLlanguage is logspace reducible to it. Unlike in the case ofPATH, there is no natural certificate for the nonexistenceof a path from sto t; thus it seemed“obvious” to researchers that PATH∈NL. The discovery of the following theorem in the 1980s proved them wrong.

Theorem 4.20 (Immerman-Szelepcsényi Theorem[Imm88,Sze87]) PATH∈NL.

Proof: By the certificate-baseddefinition ofNLfrom Section4.3.1, it suffices to show anO(logn)-space verification algorithm (or “verifier” for short)Asuch that for every n-vertex graphGandverticessandt, there exists a polynomial certificateusuch that A(G,s,t,u)=1 if andonly iftis not reachable fromsinG. HereAhas only read-once access tou. Below, for simplicity, we identifyG’s vertices with the numbers{1,. . .,n}. It is best to approach the rest of the proof from the mindset of the person trying to design the certificate. Once we describe the certificate, it will be easy to see that it can be checkedby a logspace verifier with read-once access.

LetCibe the set of vertices that are reachable fromsinGwithin at mostisteps. We will use the simple fact that membership inCiis easily certified. For everyi ∈ [n]and vertexv, the following is a certificate thatvis inCi: the sequence of verticesv0,v1,. . .,vk along the path fromstov, whereki. Note that the certificate is indeed of size at most polynomial inn. The algorithm can check the certificate using read-once access by verifying that (1)v0=s; (2) forj>0, there is an edge fromvj−1tovj; (3)vk =v;

and(4) (using simple counting) that the path ends within at mostisteps.

Now we use the fact that membership in Ci is certifiable to design two more sophisticatedtypes of certificates.

1. A certificate that a vertexvis not inCi, assuming the verifier has already been told (i.e., convincedabout) the size ofCi.

2. A certificate that|Ci| =cfor some numberc, assuming the algorithm has already been convincedabout the size ofCi1.

SinceC0 = {s}(andthe verifier knows this), we can provide the secondkindof certificate to the verifier iteratively to convince it of the sizes of the setsC1,. . .,Cn. Finally, sinceCnis just the set of all vertices reachable froms, andthe verifier has been convincedof|Cn|, we can use the first kindof certificate to convince the verifiertCn. Certifying that v is not in Ci, given|Ci|.The certificate is simply the list of certificates to the effect thatuis inCi for everyuCisorted in ascending order of vertices (recall that the vertices are numbers in[n]). The verifier checks that (1) each certificate is valid, (2) the vertexufor which a certificate is given is indeed larger than the previous vertex, (3) no certificate is provided forv, and(4) the total number of certificates providedis exactly|Ci|. IfvCi, then the verifier will accept the above certificate, but ifvCi there will not exist|Ci|certificates that verticesu1 <u2 <· · ·<u|Ci|are inCiwhere uj=vfor everyj.

Certifying that v is not in Ci, given|Ci−1|.Before showing how we certify that|Ci| =c given|Ci1|, we show how to certify thatvCiwith this information. This is very similar

to the above procedure: the certificate is the list of|Ci1|certificates to the effect that uCi−1for everyuCi−1in ascending order. The algorithm checks everything as before except that in step (3) it verifies that no certificate is given forv or for a neighbor of v. SincevCiif andonly if there existsuCi1such thatu=voruis a neighbor ofvinG, the procedure will not accept a false certificate by the same reasons as above.

Certifying that|Ci| = c given|Ci1|.We have already described how to give, for any vertexv, certificates to the effect thatvCiorvCi(whichever is true). The certificate that|Ci| =cwill consist ofncertificates for each of the vertices 1 tonin ascending order.

For every vertexu, there will be an appropriate certificate depending on whetheruCi

or not. The verifier will verify all the certificates andcount the vertices that have been certifiedto be inCi. If this count is equal toc, the verifier accepts.

Using the notion of the configuration graph we can modify the proof of Theo-rem4.20to prove the following (see Exercise4.11).

Corollary 4.21 For every space constructible S(n) > logn, NSPACE(S(n)) =

coNSPACE(S(n)). #

Our understanding of space-bounded complexity

The following is our understanding of the relations between the various space-bounded andtime-boundedcomplexity classes:

Dans le document This page intentionally left blank (Page 115-118)