<<

CS5110 Computational Complexity Lecturer: Karteek Sreenivasaiah Lecture: 5 Scribe: Udit Maniyar 13th Aug 2019

Recap

In the previous lecture, introduced the following language:

PATH = {hG, s, ti | G is a directed Graph that has a path from s to t} and showed the following easy theorem:

Theorem 1 PATH ∈ NL

Proof: The nondeterministic log space deciding PATH starts at node s and non-deterministically guesses the nodes of a path from s to t. This machine keeps track of only the current node at each step and the length of the path it has covered till now. We cannot store the total path because storing path would exceed logarithmic space. At each step we branch out into of its neighbours and increase the length of the path by 1. If the length of the path is more than number of nodes in the Graph we reject it. If we have found node t then we accept it. If we really have a path from s to t then we must find a valid sequence of non-deterministic choices and hence must have accepted it. If we don’t have a path from s to t then the length exceeds in all branches and hence we reject it. Thus, PATH is in NL.

NL equals coNL

In this lecture, we show the following surprising theorem by Immerman and Szelepcs´enyi:

Theorem 2 NL = coNL

Proof: We have seen in the previous class than PATH is NL-Complete. To prove NL = coNL it suffices to prove that PATH is in coNL. The NL M that we present for PATH must have an accepting computation whenever the input graph G does not contain a path from s to t. Instead of looking at the bigger problem we consider an easier version of the problem. Let c be the number of nodes in G that are reachable from s. We consider c to be given in input of M. We now use c to solve PATH. Later we will show how to compute c. Given G, s, t, and c the machine M operates as follows.

5-1 1. One by one for each Vertex v ∈ V guess whether v is reachable from s

2. Maintain a variable count which counts the number of vertices which have been verified to be reachable from s.

(a) We already know that PATH is in NL. So we can use the same non deterministic algorithm to check if there is a path from v to s. (b) If the Verification succeeds then increment count (c) If v = t then reject

3. When the branch has covered all of G0s vertices, we check if the number of vertices that it verified to be reachable from s i.e count equals c(the number of nodes that actually are reachable) and rejects if they are not equal. Otherwise, this branch accepts.

Space Complexity Analysis:

|Count| ∈ O(log |V |) PATH ∈ O(log |V |). Other than that we just store some constant number of vertices. Hence the machine M ∈ O(log |V |)

We now have to calculate c, the number of nodes reachable from s. We give a non- deterministic log space algorithm for this problem. At the end of the algorithm we will be left with atleast one accepting branch which contains correct value of c and all other branches will reject. Let Ai be the set of vertices at a distance of at most i steps from s. Let ci = |Ai| and |V | = m. By definition Ai ⊆ Ai+1. Then A0 = {s} and c0 = 1. Goal : Compute cm If we can compute |ci+1| knowing ci then repeated application of this procedure yields the desired value of c = cm. To check if a node v is in Ai+1, we go through all the nodes of G one by one and guess whether each node is in Ai. If we have guessed that a node is in Ai then we try to verify it by checking if there exists a path of length at most i from s to the selected node. If we find that a node u is in Ai, now we check if (u, v) is an edge of G. If it is an edge, this means v is in Ai+1. Along with checking if a node is in Ai or not we also count the number of nodes which we have verified in Ai in count. If we have checked all the vertices in the Graph then we compare count and ci. If count 6= ci this means all vertices in Ai have not been found, this computation branch rejects. If count = ci and v is not in Ai+1, we go to the next v. Algorithm c_{0} = 1 For i = 0 to m-1 {

5-2 Let c_{i+1} = 1 For v in V\{s} { count = 0 For u in V { Nondeterministically either perform or skip these steps: Nondeterministically Guess a path of length <= i from s to u. Verify the Guess. If Verification fails Reject. If Verification succeeds count++ If (u, v) is an Edge of G c_{i+1}++; Go to next v } If count != c_{i} reject } } At the end we will know c_m.

Space Complexity Analysis: This algorithm only stores ci, ci+1, count, u, v, i at any moment and hence it is in log space.

Hence Proved PATH ∈ coNL =⇒ NL = coNL.

Summary of Relationships between complexity classes

L ⊆ NL = coNL ⊆ P ⊆ NP ⊆ PSPACE We only know that NL ( PSPACE, but we dont know if coNL ( P or P ( PSPACE holds.

Oracles and relativization

Oracle machines An oracle is a machine which checks for a membership of a string w in a Language A in single computation step. An oracle Turing machine M A is a modified Turing machine that has access to oracle which decides A. Define PA to be the class of languages which are decidable in polynomial time by a deterministic oracle turing machine that uses oracle A. Similarly define NPA to be the class

5-3 of languages which are decidable in polynomial time by a non-deterministic oracle turing machine that uses oracle A.

Limits Of The Diagonalization Method Diagonalization is a simulation of one Turing machine by another. Any Theorem which we can prove by Turing Machine using the Diagonalization should hold even when both the Turing machines are given the same oracle. This means if we could prove P 6= NP using Diagonalization, then the same should hold when these Turing Machine’s are given an oracle A, but this is not true because we can find an oracle A using which PA = NPA Similarly we cant prove P = NP because we can find an oracle B s.t PB 6= NPB

The Baker-Gill-Solovay Theorem Theorem 3 1. An oracle A exists such that PA = NPA.

2. An oracle B exists such that PB 6= NPB.

Proof: Finding an oracle A such that PA = NPA

• Let A be oracle for TQBF. We know that TQBF is PSPACE-complete language which means we can decide any language in PSPACE using a single oracle call. =⇒ PSPACE ⊆ PT QBF

• A non deterministic polynomial time oracle Turing machine machine can be converted to Non deterministic Polynomial space turing machine because the length of non de- terministic choices is at most a polynomial and we require atmost polynomial space to solve TQBF Oracle queries. =⇒ NPT QBF ⊆ NPSPACE

• From Savitchs theorem we have NPSPACE ⊆ PSPACE

From the above 3 points we have the series of containments.

NPTQBF ⊆ NPSPACE ⊆ PSPACE ⊆ PTQBF .

Hence we conclude that PT QBF = NPT QBF

B B Now we will create a language(Oracle) B s.t LB ⊆ NP & LB ( P . Let B be any language. We define the language LB as:

LB = {w | ∃x s.t |x| = |w|&x ∈ B}

5-4 B For any B, the language LB is in NP . This is because given any input w we guess all strings of length |w| and query the oracle B. If anyone of the branches accept then we accept. Else reject. B To show LB ∈/ P , we do as follows. Let M1,M2,... be a sequence of all polynomial time i n oracle TM’s. We assume Mi runs in time n . Now we will make each machine determine 1 wrongly. Stage i: Choose n to be larger than any string whose status is already determined and n i n such that 2 > n . We run Mi on input 1 and respond to its oracle queries as follows: If Mi queries a string whose status has already been determined, we respond consistently, else i we return NO. We continue the simulation of Mi for n time units. If Mi finds a string of length n in B, it should accept. If Mi determines that all strings of length n are not in B, it should reject. But we don’t give Mi enough time to brute force on all the strings of length n. This means when Mi must decide to accept or reject it is not having enough data to give the correct answer since for all the new strings it has asked we have only given false. If the final decision of Mi is accept, then we put all strings of length n to be in B. If we n do this then 1 ∈/ LB, but since the machine accepted the string so we have a contradiction. If the final decision of Mi is reject, then we can take a string |y| of length n and which n was not queried before and set y ∈ B. If we do this then 1 ∈ LB, but since the machine rejected the string so we have a contradiction.

References

[1] Sipser, Michael. Introduction to the Theory of Computation. Vol. 2. Boston: Thomson Course Technology, 2006.

[2] Relativization Notes

5-5