U.C. Berkeley CS278: Computatonal Complexty Handout N8 Professor Luca Trevsan 2/21/2008 Notes for Lecture 8 1 Undrected Connectvty In the undrected s t connectvty problem (abbrevated ST-UCONN) we are gven an undrected graph G = (V, E) and two vertces s, t V, and the queston s whether that s a path between s and t n G. ST-UCONN s complete for the class SL of decson problems that are solvable by symmetrc non-determnstc machnes that use O(log n) space. A non-determnstc machne s symmetrc f whenever t can make a transton from a global state s to a global state s then the transton from s to s s also possble. The proof of SL-completeness of ST- UCONN s dentcal to the proof of NL-completeness of ST-CONN except for the addtonal observaton that the transton graph of a symmetrc machne s undrected. Rengold [Re05] has gven a log-space algorthm for ST-UCONN, thus showng that SL = L. Ths was a great breakthrough, and we wll spend a good amount of tme studyng t and ts context. 2 Randomzed Log-space We now wsh to ntroduce randomzed space-bounded Turng machne. For smplcty, we wll only ntroduce randomzed machnes for solvng decson problems. In addton to a read-only nput tape and a read/wrte work tape, such machnes also have a read-only random tape to whch they have one-way access, meanng that the head on that tape can only more, say, left-to-rght. For every fxed nput and fxed content of the random tape, the machne s completely determnstc, and ether accepts or rejects. For a Turng machne M, an nput x and a content r of the random tape, we denote by M(r, x) the outcome of the computaton. We say that a decson problem L belongs to the class RL (for randomzed log-space) f there s a probablstc Turng machne M that uses O(log n) space on nputs of length n and such that For every content of the random tape and for every nput x, M halts. For every x L, Pr r [M(r, x) accepts ] 1/2 For every x L, Pr r [M(r, x) accepts ] = 0. Notce that the frst property mples that M always runs n polynomal tme. It s easy to observe that any constant bgger than 0 and smaller than 1 could be equvalently used nstead of 1/2 n the defnton above. It also follows from the defnton that L RL NL. The followng result shows that, ndeed, L SL RL NL. Theorem 1 The problem ST-UCONN s n RL. 1
The algorthm s very smple. Gven an undrected graph G = (V, E) and two vertces s, t, t performs a random walk of length 100 n 3 startng from s. If t s never reached, the algorthm rejects. nput: G = (V, E), s, t v s for 1 to 100 E V pck at random a neghbor w of v f w = t then halt and accept v w reject The analyss of the algorthm s based on the fact that f we start a random walk from a vertex s of an undrected vertex G, then each vertex n the connected component of s s lkely to be vsted at least once after O( V E ) steps. As we develop spectral graph theory n the next few lectures, we wll see the proof of the weaker bound O( E 2 ). 3 Egenvalues and expanders We now embark on the study of graph expanson and algebrac graph theory. Wthn the next lecture or two we wll: () know about the equvalence of edge expanson and egenvalue gap, () understand spectral parttonng, () know how to effcently construct a famly of bounded-degree expanders. We wll then return to the queston of the space complexty of ST-UCONN and see how Rengold s algorthm works by reducng ST-UCONN n arbtrary graphs to ST-UCONN n bounded-degree expanders, the latter problem havng an easy log-space solutons. We begn wth the defnton of (normalzed) edge expanson. All graphs that we wll talk about from now on wll be regular. Defnton 1 (Edge-expanson of a graph) Let G = (V, E) be a d-regular, then we defne the normalzed edge expanson of G as h(g) := edges(s, V S) mn S V /2 d S In what follows, we consder G = (V, E) to be a gven d-regular graph and A R V V ts adjacency matrx, that s A(u, v) := number of edges between u and v (1) We denote by M := 1 da the random walk transton matrx of G. The ntuton for ths defnton s that f we take a one-step random walk startng at vertex u, then M(u, v) s the probablty that we reach vertex v. Defnton 2 (Egenvalues and egenvectors) If M C n n, λ C, x C n and xm = λx then λ s an egenvalue of M and x s an egenvector of M for the egenvalue λ. 2
Example 1 Let M be the transton matrx of a regular graph. Then (1, 1,, 1) M = (1, 1,, 1). Therefore, the vector (1, 1,, 1) s an egenvector of M wth correspondng egenvalue 1. Generally, xm = λx x(m λi) = 0 det(m λi) = 0. det(m λi) s a polynomal n λ over C of degree n, and t has n roots (countng multplctes). Therefore, λ s an egenvalue of M ff t s a root of det(m λi) and so, countng multplctes, M has n egenvalues. Theorem 2 If M R n n s symmetrc then the followng propertes hold: 1. all n egenvalues λ 1,, λ n are real 2. one can fnd an orthogonal set of egenvectors x 1,, x n such that x has correspondng egenvalue λ and x x j for j. We note that a multple of an egenvector s also an egenvector and therefore we can assume w.l.o.g. that all the x have length one. From now on we fx the conventon that f we denote by λ 1,..., λ n the egenvalues of M, then λ 1 λ 2 λ n. There are several equvalent characterzatons of the egenvalues of M; the followng one wll be useful. Lemma 3 Let M R n n be symmetrc. Then Proof: λ 1 = max x R n, x =1 xmxt = max x R n xx T (2) (a) Assume λ 1 λ 2, λ n. Then x 1 Mx T 1 = λ 1x 1 x T 1 = λ 1 therefore, max x R n, x =1{ } λ 1. (b) Conversely, let x be any vector of length one, x R n, x = 1. Let x = a 1 x 1 + a 2 x 2 + + a n x n. =,j x()x(j)m(, j) = ( a x )M( a x ) T = ( λ a x )( a x j ) T = j Therefore max x R n, x =1{ } λ 1. λ a 2 max λ a 2 = λ 1 3
We can also prove that λ 2 = For (a) use x = x 2, and conclude max x R n,x x 1 λ xx T 2. For (b) take any x R n, x x 1. Let x = a 2 x 2 + + a n x n. Then max x R n,x x 1 xx T (3) xx T = n =2 λ a 2 n =2 a2 λ 2. A smlar argument shows that max{ λ 2,..., λ n } = max x x 1 xx T (4) We now know enough to characterze the largest egenvalue of the adjacency matrx of a regular graph. Theorem 4 Let G be a regular graph and M ts adjacency matrx. Let λ 1 λ n be ts egenvalues. Then λ 1 = 1. Proof: Trvally, λ 1 1 because 1 s an egenvalue. Let x R n, x = 1, xm = λ 1 x 0 u,v M(u, v)(x(u) x(v)) 2 = 2 v x(v) 2 2 u,v x(u)x(v)m(u, v) Snce d λ 1 and d λ 1 t follows d = λ 1. = 2xx T 2 = 2 2λ 1 1 λ 1 What about λ 2? An mportant theme n ths theory s that the dfference 1 λ 2 characterzes the expanson of the graph. The followng s a smple specal case whch s a good warm-up example. Clam 5 Let G be a regular graph and M ts adjacency matrx. egenvalues. Then λ 2 = 1 f and only f the graph s dsconnected. Let λ 1 λ n ts Proof: Choose x 1 = 1 n (1, 1, 1) and x 2 another egenvector orthogonal to x 1. x 2 should be (x 2 (1),, x 2 (n)) wth x 2() = 0. Therefore, some entres should be postve and some others should be negatve; n partcular, the entres of x 2 are not all equal. 0 u,v M(u, v)(x 2 (u) x 2 (v)) 2 = 2 2λ 2 = 0 Therefore, for x 2 any two adjacent vertces must have dentcal labels and, snce the labels are not all equal, the graph has to be dsconnected. 4
Conversely, f the graph s dsconnected then let S and V S be a partton of the graph that s crossed by no edge. Let p = S V S V, q = V. Assgn { q f v S x(v) = p f v / S Frst, observe that x (1, 1,, 1) snce v x(v) = q S p V S = qpn pqn = 0. Second, look at xm = (dq, dq,, dq, pd, pd,, pd) = dx. }{{}}{{} S V S Therefore, f the graph s dsconnected we have λ 2 = 1. References The defnton of SL s due to Lews and Papadmtrou [LP82]. Pror to Rengold s algorthm [Re05], an algorthm for ST-UCONN was known runnng n polynomal tme and O(log 2 n) space (but the polynomal had very hgh degree), due to Nsan [Ns94]. There was also an algorthm that has O(log 4/3 n) space complexty and superpolynomal tme complexty, due to Armon, Ta-Shma, Nsan and Wgderson [ATSWZ00], mprovng on a prevous algorthm by Nsan, Szemeredy and Wgderson [NSW92]. The best known determnstc smulaton of RL uses O((log n) 3/2 ) space, and s due to Saks and Zhou [SZ95]. References [ATSWZ00] Roy Armon, Amnon Ta-Shma, Av Wgderson, and Shyu Zhou. An o(log(n) 4/3 ) space algorthm for (s, t) connectvty n undrected graphs. Journal of the ACM, 47(2):294 311, 2000. 5 [LP82] Harry R. Lews and Chrstos H. Papadmtrou. Symmetrc space-bounded computaton. Theoretcal Computer Scence, 19:161 187, 1982. 5 [Ns94] N. Nsan. RL SC. Computatonal Complexty, 4(1), 1994. 5 [NSW92] N. Nsan, E. Szemered, and A. Wgderson. Undrected connectvty n O(log 1.5 n) space. In Proceedngs of the 33rd IEEE Symposum on Foundatons of Computer Scence, pages 24 29, 1992. 5 [Re05] [SZ95] Omer Rengold. Undrected ST-connectvty n log-space. In Proceedngs of the 37th ACM Symposum on Theory of Computng, pages 376 385, 2005. 1, 5 M. Saks and S. Zhou. RSPACE(S) DSPACE(S 3/2 ). In Proceedngs of the 36th IEEE Symposum on Foundatons of Computer Scence, pages 344 353, 1995. 5 5