View
218
Download
2
Category
Tags:
Preview:
Citation preview
Undirected ST-Connectivity In Log Space
Omer ReingoldSlides by Sharon Bruckner
Today
bull Some history
bull What are we adding to the mixndash Connectivity in expandersndash Making expanders powering it up and
cutting it downndash Putting it together in Log-Space
bull In conclusion
What is ST-Connectivity
bull For an instance (Gst)ndash YES if there is a s-t path in graph Gndash NO otherwise
bull Two flavors ndash STCON G is directedndash USTCON G is undirected
bull Today wersquoll talk about USTCON
What do we know about itbull Solved easily with BFS
ndash But ndash polynomial space
bull USTCON is in NL (=NSPACE(log))ndash Just guess the path
bull USTCON is in DSPACE(log2n) (Savitch)ndash Guess a vertex on the path recurse
bull USTCON is complete for SLbull USTCON is in RL
ndash Random walkndash Randomness is a resource
What are we trying to accomplish
We would like an algorithm for USTCON which is
deterministic and works in space logarithmic in the size
of the graph
What are we adding to the mix
Bits Nrsquo Pieces
bull The adjacency matrix of a graph G
bull Wersquoll use D regular graphs and the normalized adjancecy matrix (1D)M
1 i j EM i j
0 otherwise
Bits Nrsquo Pieces
bull M is a stochastic matrix the ldquorandom walkrdquo matrix
bull Largest eigenvalue of M is 1 with eigenvector (11hellip1)єRn 2nd largest eigenvalue is λ(G)
bull Define (NDλ) a D regular graph over N vertices with λ(G) le λ
Expanders ndash a Reminder
Two equivalent definitions of expanderbull (ND λ) is an expander iff the
spectral gap 1- λ gt 0
bull (ND λ) is an expander if εgt0 st for at least (1+ ε)|S| vertices of G are connected to some vertex in S
S V S V 2
Expanders ndash a Reminder
2
22
GD G
D
2
min
V
S V S
E S SEdge Expansion G
S
2
| min
VS V S
v u u v SVertex Expansion G
S
CS vertices w neighbor in S c 1 S
D
If there are c|S| edges out of S
Connectivity in Expanders
What would happen if each connected component of our graph was an expander
We could decide USTCON in logspace
Every expander has a O(log(N)) diameter
TheoremFor any s and t in an expander therersquos
a path from s to t of length O(log(N))
Proof
i
i
n(1 )
2n
log 1 log2
log n 1ilog 1
Logspace Algorithm for paths in an expander
For (ND λ) there is a a space O(logDlogN) algorithm which decides USTCONIdeabullFrom any vertex s there are Dl=O(logN) different paths bullenumerate and check if any of them reach t
t
How much does it cost
bullAt each vertex we have a choice of D vertices log(D) to represent 1hellipD
bullEach path is log(N) long
bull Need log(D) at each stage of a log(N) path altogether O(logDlogN)
So far
We now know that if our graph G was an expander graph USTCON can be solved in Log-Space
How can we turn G into a graph of expanders
Making expanders powering it up and cutting it down
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander with constant expansion
3 Construction in Log-Space
The Plan
bull New tools for our toolboxndash Rotation Mapsndash Poweringndash Zig Zag products
bull The actual constructionbull Why we got what we wantedbull Why we got it in Log-Space
Overviewbull Series of powering by 8 and zig zag
products one increases the spectral gap and the other one decreases it but not by much
8
O(Log(N))
Zig Zag Powering
Rotation Maps
bull Graph representation wersquoll use
GRot N D N D
G is D regular undirected The rotation map
GRot vi w j
If the edge (vw) exists and is the ith edge coming out of v and the jth edge coming out of w
Rotation Map Example
1 23
4
17
hellip
hellip54
55
4
3 21
28
5554
hellip
hellipu
v
G
G
Rot u17 v28
Rot v28 u17
PoweringNo limitations on the degree rarr can expenderize with powering
The k-th power of the D-regular graph G is Gk where there is an edge (uv) iff there is a path of length k between u and v in G
=k
Powering
What is it good forbull GN is an N-clique an expanderbull If G = (ND λ) then Gk is a (NDk λk) λ(G)
The spectral gapbull Why is this not enough
Zig Zag Product
If G is a D-regular graph with N vertices and H is a d-regular graph with D vertices replace each v in G with a copy of H Hv Our new graph has [N]x[D] vertices
H
Part of G
v is now Hv
v
Zig-Zag ProductThe resulting graph is a d2 regular
graph with edges as follows
G
v
w
arsquo
brsquo
Hv
Hw
a
brsquo
G Z H
a
b
i
j
arsquoiirsquo
bj
jrsquo
Zig-Zag Product
Lemma
If G is an (NDλ) graph and H is a (Dd) graph
211 (G z H ) 1 1
2
The zig-zag product doesnrsquot hurt the spectral gap too badly
22 2 2 21 1last week we saw (G z H ) 1 1 4
2 2
Question Is a connected component in G a connected component in G z H
Technicalities
Rotation Map for Powering
u w
v
G
3
12 5
8
G
G
Rot u3 v12
Rot v5 w8
u w
G2
2GRot u 35 w 812
35812
u whellipa1 a2 ak
b1b(k-1)bk
G
G 1 1
G k k
Rot ua vb
Rot v a wb
u wa1ak
bkb1
Gk
k 1 2 k k k 1 1GRot u a a a w b b b
Rotation Map for ig ag
Hw
(wbrsquo) (wb)
G
v
w
arsquo
brsquo
Hv
(va) (varsquo)i irsquo
j jrsquo
Rot ((va) (ij)) = zG H
H
G
H
wb j i where
a i Rot a i
wb Rot va
b j Rot b j
The Actual Construction
Show a transformation that turns every connected component of a graph into an expander
ButNot any graph but a D16 regular graph
How to construct such a graph - later
Main Transformation
0
8
i i 1
G G
G G z H
Gi is a D16 regular graph with N(D16)i vertices
On input G and H where G is a D16 regular graph on N vertices and H is a D-regular graph on D16 vertices
define GH G where O log N
Technical Lemma
For D-reg connected non-bipartite G on [N]
Proof
2 GD
2D
2
1G 1
DN
2
1 2
2
min
N
S V S
E
N
S
SG
SG
N
2
4not normalized D
N 2 O 1
2 2
O 1 O 1normalized 1 G G 1
N N
Details
bullSet l to be the smallest integer st If D is constant then this number is O(logN)
bullTransforming the entire graph is equivalent to transforming each connected component separately
2
2
1 11DN 2
More Details
S1
S2
S3
S1
S2
S3
Why
Show that this is true for a single iteration
1
m
S
S
0
0
Adjacency matrix sorted by connected components
Both powering and zig zag maintain the block structure
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
Today
bull Some history
bull What are we adding to the mixndash Connectivity in expandersndash Making expanders powering it up and
cutting it downndash Putting it together in Log-Space
bull In conclusion
What is ST-Connectivity
bull For an instance (Gst)ndash YES if there is a s-t path in graph Gndash NO otherwise
bull Two flavors ndash STCON G is directedndash USTCON G is undirected
bull Today wersquoll talk about USTCON
What do we know about itbull Solved easily with BFS
ndash But ndash polynomial space
bull USTCON is in NL (=NSPACE(log))ndash Just guess the path
bull USTCON is in DSPACE(log2n) (Savitch)ndash Guess a vertex on the path recurse
bull USTCON is complete for SLbull USTCON is in RL
ndash Random walkndash Randomness is a resource
What are we trying to accomplish
We would like an algorithm for USTCON which is
deterministic and works in space logarithmic in the size
of the graph
What are we adding to the mix
Bits Nrsquo Pieces
bull The adjacency matrix of a graph G
bull Wersquoll use D regular graphs and the normalized adjancecy matrix (1D)M
1 i j EM i j
0 otherwise
Bits Nrsquo Pieces
bull M is a stochastic matrix the ldquorandom walkrdquo matrix
bull Largest eigenvalue of M is 1 with eigenvector (11hellip1)єRn 2nd largest eigenvalue is λ(G)
bull Define (NDλ) a D regular graph over N vertices with λ(G) le λ
Expanders ndash a Reminder
Two equivalent definitions of expanderbull (ND λ) is an expander iff the
spectral gap 1- λ gt 0
bull (ND λ) is an expander if εgt0 st for at least (1+ ε)|S| vertices of G are connected to some vertex in S
S V S V 2
Expanders ndash a Reminder
2
22
GD G
D
2
min
V
S V S
E S SEdge Expansion G
S
2
| min
VS V S
v u u v SVertex Expansion G
S
CS vertices w neighbor in S c 1 S
D
If there are c|S| edges out of S
Connectivity in Expanders
What would happen if each connected component of our graph was an expander
We could decide USTCON in logspace
Every expander has a O(log(N)) diameter
TheoremFor any s and t in an expander therersquos
a path from s to t of length O(log(N))
Proof
i
i
n(1 )
2n
log 1 log2
log n 1ilog 1
Logspace Algorithm for paths in an expander
For (ND λ) there is a a space O(logDlogN) algorithm which decides USTCONIdeabullFrom any vertex s there are Dl=O(logN) different paths bullenumerate and check if any of them reach t
t
How much does it cost
bullAt each vertex we have a choice of D vertices log(D) to represent 1hellipD
bullEach path is log(N) long
bull Need log(D) at each stage of a log(N) path altogether O(logDlogN)
So far
We now know that if our graph G was an expander graph USTCON can be solved in Log-Space
How can we turn G into a graph of expanders
Making expanders powering it up and cutting it down
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander with constant expansion
3 Construction in Log-Space
The Plan
bull New tools for our toolboxndash Rotation Mapsndash Poweringndash Zig Zag products
bull The actual constructionbull Why we got what we wantedbull Why we got it in Log-Space
Overviewbull Series of powering by 8 and zig zag
products one increases the spectral gap and the other one decreases it but not by much
8
O(Log(N))
Zig Zag Powering
Rotation Maps
bull Graph representation wersquoll use
GRot N D N D
G is D regular undirected The rotation map
GRot vi w j
If the edge (vw) exists and is the ith edge coming out of v and the jth edge coming out of w
Rotation Map Example
1 23
4
17
hellip
hellip54
55
4
3 21
28
5554
hellip
hellipu
v
G
G
Rot u17 v28
Rot v28 u17
PoweringNo limitations on the degree rarr can expenderize with powering
The k-th power of the D-regular graph G is Gk where there is an edge (uv) iff there is a path of length k between u and v in G
=k
Powering
What is it good forbull GN is an N-clique an expanderbull If G = (ND λ) then Gk is a (NDk λk) λ(G)
The spectral gapbull Why is this not enough
Zig Zag Product
If G is a D-regular graph with N vertices and H is a d-regular graph with D vertices replace each v in G with a copy of H Hv Our new graph has [N]x[D] vertices
H
Part of G
v is now Hv
v
Zig-Zag ProductThe resulting graph is a d2 regular
graph with edges as follows
G
v
w
arsquo
brsquo
Hv
Hw
a
brsquo
G Z H
a
b
i
j
arsquoiirsquo
bj
jrsquo
Zig-Zag Product
Lemma
If G is an (NDλ) graph and H is a (Dd) graph
211 (G z H ) 1 1
2
The zig-zag product doesnrsquot hurt the spectral gap too badly
22 2 2 21 1last week we saw (G z H ) 1 1 4
2 2
Question Is a connected component in G a connected component in G z H
Technicalities
Rotation Map for Powering
u w
v
G
3
12 5
8
G
G
Rot u3 v12
Rot v5 w8
u w
G2
2GRot u 35 w 812
35812
u whellipa1 a2 ak
b1b(k-1)bk
G
G 1 1
G k k
Rot ua vb
Rot v a wb
u wa1ak
bkb1
Gk
k 1 2 k k k 1 1GRot u a a a w b b b
Rotation Map for ig ag
Hw
(wbrsquo) (wb)
G
v
w
arsquo
brsquo
Hv
(va) (varsquo)i irsquo
j jrsquo
Rot ((va) (ij)) = zG H
H
G
H
wb j i where
a i Rot a i
wb Rot va
b j Rot b j
The Actual Construction
Show a transformation that turns every connected component of a graph into an expander
ButNot any graph but a D16 regular graph
How to construct such a graph - later
Main Transformation
0
8
i i 1
G G
G G z H
Gi is a D16 regular graph with N(D16)i vertices
On input G and H where G is a D16 regular graph on N vertices and H is a D-regular graph on D16 vertices
define GH G where O log N
Technical Lemma
For D-reg connected non-bipartite G on [N]
Proof
2 GD
2D
2
1G 1
DN
2
1 2
2
min
N
S V S
E
N
S
SG
SG
N
2
4not normalized D
N 2 O 1
2 2
O 1 O 1normalized 1 G G 1
N N
Details
bullSet l to be the smallest integer st If D is constant then this number is O(logN)
bullTransforming the entire graph is equivalent to transforming each connected component separately
2
2
1 11DN 2
More Details
S1
S2
S3
S1
S2
S3
Why
Show that this is true for a single iteration
1
m
S
S
0
0
Adjacency matrix sorted by connected components
Both powering and zig zag maintain the block structure
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
What is ST-Connectivity
bull For an instance (Gst)ndash YES if there is a s-t path in graph Gndash NO otherwise
bull Two flavors ndash STCON G is directedndash USTCON G is undirected
bull Today wersquoll talk about USTCON
What do we know about itbull Solved easily with BFS
ndash But ndash polynomial space
bull USTCON is in NL (=NSPACE(log))ndash Just guess the path
bull USTCON is in DSPACE(log2n) (Savitch)ndash Guess a vertex on the path recurse
bull USTCON is complete for SLbull USTCON is in RL
ndash Random walkndash Randomness is a resource
What are we trying to accomplish
We would like an algorithm for USTCON which is
deterministic and works in space logarithmic in the size
of the graph
What are we adding to the mix
Bits Nrsquo Pieces
bull The adjacency matrix of a graph G
bull Wersquoll use D regular graphs and the normalized adjancecy matrix (1D)M
1 i j EM i j
0 otherwise
Bits Nrsquo Pieces
bull M is a stochastic matrix the ldquorandom walkrdquo matrix
bull Largest eigenvalue of M is 1 with eigenvector (11hellip1)єRn 2nd largest eigenvalue is λ(G)
bull Define (NDλ) a D regular graph over N vertices with λ(G) le λ
Expanders ndash a Reminder
Two equivalent definitions of expanderbull (ND λ) is an expander iff the
spectral gap 1- λ gt 0
bull (ND λ) is an expander if εgt0 st for at least (1+ ε)|S| vertices of G are connected to some vertex in S
S V S V 2
Expanders ndash a Reminder
2
22
GD G
D
2
min
V
S V S
E S SEdge Expansion G
S
2
| min
VS V S
v u u v SVertex Expansion G
S
CS vertices w neighbor in S c 1 S
D
If there are c|S| edges out of S
Connectivity in Expanders
What would happen if each connected component of our graph was an expander
We could decide USTCON in logspace
Every expander has a O(log(N)) diameter
TheoremFor any s and t in an expander therersquos
a path from s to t of length O(log(N))
Proof
i
i
n(1 )
2n
log 1 log2
log n 1ilog 1
Logspace Algorithm for paths in an expander
For (ND λ) there is a a space O(logDlogN) algorithm which decides USTCONIdeabullFrom any vertex s there are Dl=O(logN) different paths bullenumerate and check if any of them reach t
t
How much does it cost
bullAt each vertex we have a choice of D vertices log(D) to represent 1hellipD
bullEach path is log(N) long
bull Need log(D) at each stage of a log(N) path altogether O(logDlogN)
So far
We now know that if our graph G was an expander graph USTCON can be solved in Log-Space
How can we turn G into a graph of expanders
Making expanders powering it up and cutting it down
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander with constant expansion
3 Construction in Log-Space
The Plan
bull New tools for our toolboxndash Rotation Mapsndash Poweringndash Zig Zag products
bull The actual constructionbull Why we got what we wantedbull Why we got it in Log-Space
Overviewbull Series of powering by 8 and zig zag
products one increases the spectral gap and the other one decreases it but not by much
8
O(Log(N))
Zig Zag Powering
Rotation Maps
bull Graph representation wersquoll use
GRot N D N D
G is D regular undirected The rotation map
GRot vi w j
If the edge (vw) exists and is the ith edge coming out of v and the jth edge coming out of w
Rotation Map Example
1 23
4
17
hellip
hellip54
55
4
3 21
28
5554
hellip
hellipu
v
G
G
Rot u17 v28
Rot v28 u17
PoweringNo limitations on the degree rarr can expenderize with powering
The k-th power of the D-regular graph G is Gk where there is an edge (uv) iff there is a path of length k between u and v in G
=k
Powering
What is it good forbull GN is an N-clique an expanderbull If G = (ND λ) then Gk is a (NDk λk) λ(G)
The spectral gapbull Why is this not enough
Zig Zag Product
If G is a D-regular graph with N vertices and H is a d-regular graph with D vertices replace each v in G with a copy of H Hv Our new graph has [N]x[D] vertices
H
Part of G
v is now Hv
v
Zig-Zag ProductThe resulting graph is a d2 regular
graph with edges as follows
G
v
w
arsquo
brsquo
Hv
Hw
a
brsquo
G Z H
a
b
i
j
arsquoiirsquo
bj
jrsquo
Zig-Zag Product
Lemma
If G is an (NDλ) graph and H is a (Dd) graph
211 (G z H ) 1 1
2
The zig-zag product doesnrsquot hurt the spectral gap too badly
22 2 2 21 1last week we saw (G z H ) 1 1 4
2 2
Question Is a connected component in G a connected component in G z H
Technicalities
Rotation Map for Powering
u w
v
G
3
12 5
8
G
G
Rot u3 v12
Rot v5 w8
u w
G2
2GRot u 35 w 812
35812
u whellipa1 a2 ak
b1b(k-1)bk
G
G 1 1
G k k
Rot ua vb
Rot v a wb
u wa1ak
bkb1
Gk
k 1 2 k k k 1 1GRot u a a a w b b b
Rotation Map for ig ag
Hw
(wbrsquo) (wb)
G
v
w
arsquo
brsquo
Hv
(va) (varsquo)i irsquo
j jrsquo
Rot ((va) (ij)) = zG H
H
G
H
wb j i where
a i Rot a i
wb Rot va
b j Rot b j
The Actual Construction
Show a transformation that turns every connected component of a graph into an expander
ButNot any graph but a D16 regular graph
How to construct such a graph - later
Main Transformation
0
8
i i 1
G G
G G z H
Gi is a D16 regular graph with N(D16)i vertices
On input G and H where G is a D16 regular graph on N vertices and H is a D-regular graph on D16 vertices
define GH G where O log N
Technical Lemma
For D-reg connected non-bipartite G on [N]
Proof
2 GD
2D
2
1G 1
DN
2
1 2
2
min
N
S V S
E
N
S
SG
SG
N
2
4not normalized D
N 2 O 1
2 2
O 1 O 1normalized 1 G G 1
N N
Details
bullSet l to be the smallest integer st If D is constant then this number is O(logN)
bullTransforming the entire graph is equivalent to transforming each connected component separately
2
2
1 11DN 2
More Details
S1
S2
S3
S1
S2
S3
Why
Show that this is true for a single iteration
1
m
S
S
0
0
Adjacency matrix sorted by connected components
Both powering and zig zag maintain the block structure
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
What do we know about itbull Solved easily with BFS
ndash But ndash polynomial space
bull USTCON is in NL (=NSPACE(log))ndash Just guess the path
bull USTCON is in DSPACE(log2n) (Savitch)ndash Guess a vertex on the path recurse
bull USTCON is complete for SLbull USTCON is in RL
ndash Random walkndash Randomness is a resource
What are we trying to accomplish
We would like an algorithm for USTCON which is
deterministic and works in space logarithmic in the size
of the graph
What are we adding to the mix
Bits Nrsquo Pieces
bull The adjacency matrix of a graph G
bull Wersquoll use D regular graphs and the normalized adjancecy matrix (1D)M
1 i j EM i j
0 otherwise
Bits Nrsquo Pieces
bull M is a stochastic matrix the ldquorandom walkrdquo matrix
bull Largest eigenvalue of M is 1 with eigenvector (11hellip1)єRn 2nd largest eigenvalue is λ(G)
bull Define (NDλ) a D regular graph over N vertices with λ(G) le λ
Expanders ndash a Reminder
Two equivalent definitions of expanderbull (ND λ) is an expander iff the
spectral gap 1- λ gt 0
bull (ND λ) is an expander if εgt0 st for at least (1+ ε)|S| vertices of G are connected to some vertex in S
S V S V 2
Expanders ndash a Reminder
2
22
GD G
D
2
min
V
S V S
E S SEdge Expansion G
S
2
| min
VS V S
v u u v SVertex Expansion G
S
CS vertices w neighbor in S c 1 S
D
If there are c|S| edges out of S
Connectivity in Expanders
What would happen if each connected component of our graph was an expander
We could decide USTCON in logspace
Every expander has a O(log(N)) diameter
TheoremFor any s and t in an expander therersquos
a path from s to t of length O(log(N))
Proof
i
i
n(1 )
2n
log 1 log2
log n 1ilog 1
Logspace Algorithm for paths in an expander
For (ND λ) there is a a space O(logDlogN) algorithm which decides USTCONIdeabullFrom any vertex s there are Dl=O(logN) different paths bullenumerate and check if any of them reach t
t
How much does it cost
bullAt each vertex we have a choice of D vertices log(D) to represent 1hellipD
bullEach path is log(N) long
bull Need log(D) at each stage of a log(N) path altogether O(logDlogN)
So far
We now know that if our graph G was an expander graph USTCON can be solved in Log-Space
How can we turn G into a graph of expanders
Making expanders powering it up and cutting it down
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander with constant expansion
3 Construction in Log-Space
The Plan
bull New tools for our toolboxndash Rotation Mapsndash Poweringndash Zig Zag products
bull The actual constructionbull Why we got what we wantedbull Why we got it in Log-Space
Overviewbull Series of powering by 8 and zig zag
products one increases the spectral gap and the other one decreases it but not by much
8
O(Log(N))
Zig Zag Powering
Rotation Maps
bull Graph representation wersquoll use
GRot N D N D
G is D regular undirected The rotation map
GRot vi w j
If the edge (vw) exists and is the ith edge coming out of v and the jth edge coming out of w
Rotation Map Example
1 23
4
17
hellip
hellip54
55
4
3 21
28
5554
hellip
hellipu
v
G
G
Rot u17 v28
Rot v28 u17
PoweringNo limitations on the degree rarr can expenderize with powering
The k-th power of the D-regular graph G is Gk where there is an edge (uv) iff there is a path of length k between u and v in G
=k
Powering
What is it good forbull GN is an N-clique an expanderbull If G = (ND λ) then Gk is a (NDk λk) λ(G)
The spectral gapbull Why is this not enough
Zig Zag Product
If G is a D-regular graph with N vertices and H is a d-regular graph with D vertices replace each v in G with a copy of H Hv Our new graph has [N]x[D] vertices
H
Part of G
v is now Hv
v
Zig-Zag ProductThe resulting graph is a d2 regular
graph with edges as follows
G
v
w
arsquo
brsquo
Hv
Hw
a
brsquo
G Z H
a
b
i
j
arsquoiirsquo
bj
jrsquo
Zig-Zag Product
Lemma
If G is an (NDλ) graph and H is a (Dd) graph
211 (G z H ) 1 1
2
The zig-zag product doesnrsquot hurt the spectral gap too badly
22 2 2 21 1last week we saw (G z H ) 1 1 4
2 2
Question Is a connected component in G a connected component in G z H
Technicalities
Rotation Map for Powering
u w
v
G
3
12 5
8
G
G
Rot u3 v12
Rot v5 w8
u w
G2
2GRot u 35 w 812
35812
u whellipa1 a2 ak
b1b(k-1)bk
G
G 1 1
G k k
Rot ua vb
Rot v a wb
u wa1ak
bkb1
Gk
k 1 2 k k k 1 1GRot u a a a w b b b
Rotation Map for ig ag
Hw
(wbrsquo) (wb)
G
v
w
arsquo
brsquo
Hv
(va) (varsquo)i irsquo
j jrsquo
Rot ((va) (ij)) = zG H
H
G
H
wb j i where
a i Rot a i
wb Rot va
b j Rot b j
The Actual Construction
Show a transformation that turns every connected component of a graph into an expander
ButNot any graph but a D16 regular graph
How to construct such a graph - later
Main Transformation
0
8
i i 1
G G
G G z H
Gi is a D16 regular graph with N(D16)i vertices
On input G and H where G is a D16 regular graph on N vertices and H is a D-regular graph on D16 vertices
define GH G where O log N
Technical Lemma
For D-reg connected non-bipartite G on [N]
Proof
2 GD
2D
2
1G 1
DN
2
1 2
2
min
N
S V S
E
N
S
SG
SG
N
2
4not normalized D
N 2 O 1
2 2
O 1 O 1normalized 1 G G 1
N N
Details
bullSet l to be the smallest integer st If D is constant then this number is O(logN)
bullTransforming the entire graph is equivalent to transforming each connected component separately
2
2
1 11DN 2
More Details
S1
S2
S3
S1
S2
S3
Why
Show that this is true for a single iteration
1
m
S
S
0
0
Adjacency matrix sorted by connected components
Both powering and zig zag maintain the block structure
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
What are we trying to accomplish
We would like an algorithm for USTCON which is
deterministic and works in space logarithmic in the size
of the graph
What are we adding to the mix
Bits Nrsquo Pieces
bull The adjacency matrix of a graph G
bull Wersquoll use D regular graphs and the normalized adjancecy matrix (1D)M
1 i j EM i j
0 otherwise
Bits Nrsquo Pieces
bull M is a stochastic matrix the ldquorandom walkrdquo matrix
bull Largest eigenvalue of M is 1 with eigenvector (11hellip1)єRn 2nd largest eigenvalue is λ(G)
bull Define (NDλ) a D regular graph over N vertices with λ(G) le λ
Expanders ndash a Reminder
Two equivalent definitions of expanderbull (ND λ) is an expander iff the
spectral gap 1- λ gt 0
bull (ND λ) is an expander if εgt0 st for at least (1+ ε)|S| vertices of G are connected to some vertex in S
S V S V 2
Expanders ndash a Reminder
2
22
GD G
D
2
min
V
S V S
E S SEdge Expansion G
S
2
| min
VS V S
v u u v SVertex Expansion G
S
CS vertices w neighbor in S c 1 S
D
If there are c|S| edges out of S
Connectivity in Expanders
What would happen if each connected component of our graph was an expander
We could decide USTCON in logspace
Every expander has a O(log(N)) diameter
TheoremFor any s and t in an expander therersquos
a path from s to t of length O(log(N))
Proof
i
i
n(1 )
2n
log 1 log2
log n 1ilog 1
Logspace Algorithm for paths in an expander
For (ND λ) there is a a space O(logDlogN) algorithm which decides USTCONIdeabullFrom any vertex s there are Dl=O(logN) different paths bullenumerate and check if any of them reach t
t
How much does it cost
bullAt each vertex we have a choice of D vertices log(D) to represent 1hellipD
bullEach path is log(N) long
bull Need log(D) at each stage of a log(N) path altogether O(logDlogN)
So far
We now know that if our graph G was an expander graph USTCON can be solved in Log-Space
How can we turn G into a graph of expanders
Making expanders powering it up and cutting it down
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander with constant expansion
3 Construction in Log-Space
The Plan
bull New tools for our toolboxndash Rotation Mapsndash Poweringndash Zig Zag products
bull The actual constructionbull Why we got what we wantedbull Why we got it in Log-Space
Overviewbull Series of powering by 8 and zig zag
products one increases the spectral gap and the other one decreases it but not by much
8
O(Log(N))
Zig Zag Powering
Rotation Maps
bull Graph representation wersquoll use
GRot N D N D
G is D regular undirected The rotation map
GRot vi w j
If the edge (vw) exists and is the ith edge coming out of v and the jth edge coming out of w
Rotation Map Example
1 23
4
17
hellip
hellip54
55
4
3 21
28
5554
hellip
hellipu
v
G
G
Rot u17 v28
Rot v28 u17
PoweringNo limitations on the degree rarr can expenderize with powering
The k-th power of the D-regular graph G is Gk where there is an edge (uv) iff there is a path of length k between u and v in G
=k
Powering
What is it good forbull GN is an N-clique an expanderbull If G = (ND λ) then Gk is a (NDk λk) λ(G)
The spectral gapbull Why is this not enough
Zig Zag Product
If G is a D-regular graph with N vertices and H is a d-regular graph with D vertices replace each v in G with a copy of H Hv Our new graph has [N]x[D] vertices
H
Part of G
v is now Hv
v
Zig-Zag ProductThe resulting graph is a d2 regular
graph with edges as follows
G
v
w
arsquo
brsquo
Hv
Hw
a
brsquo
G Z H
a
b
i
j
arsquoiirsquo
bj
jrsquo
Zig-Zag Product
Lemma
If G is an (NDλ) graph and H is a (Dd) graph
211 (G z H ) 1 1
2
The zig-zag product doesnrsquot hurt the spectral gap too badly
22 2 2 21 1last week we saw (G z H ) 1 1 4
2 2
Question Is a connected component in G a connected component in G z H
Technicalities
Rotation Map for Powering
u w
v
G
3
12 5
8
G
G
Rot u3 v12
Rot v5 w8
u w
G2
2GRot u 35 w 812
35812
u whellipa1 a2 ak
b1b(k-1)bk
G
G 1 1
G k k
Rot ua vb
Rot v a wb
u wa1ak
bkb1
Gk
k 1 2 k k k 1 1GRot u a a a w b b b
Rotation Map for ig ag
Hw
(wbrsquo) (wb)
G
v
w
arsquo
brsquo
Hv
(va) (varsquo)i irsquo
j jrsquo
Rot ((va) (ij)) = zG H
H
G
H
wb j i where
a i Rot a i
wb Rot va
b j Rot b j
The Actual Construction
Show a transformation that turns every connected component of a graph into an expander
ButNot any graph but a D16 regular graph
How to construct such a graph - later
Main Transformation
0
8
i i 1
G G
G G z H
Gi is a D16 regular graph with N(D16)i vertices
On input G and H where G is a D16 regular graph on N vertices and H is a D-regular graph on D16 vertices
define GH G where O log N
Technical Lemma
For D-reg connected non-bipartite G on [N]
Proof
2 GD
2D
2
1G 1
DN
2
1 2
2
min
N
S V S
E
N
S
SG
SG
N
2
4not normalized D
N 2 O 1
2 2
O 1 O 1normalized 1 G G 1
N N
Details
bullSet l to be the smallest integer st If D is constant then this number is O(logN)
bullTransforming the entire graph is equivalent to transforming each connected component separately
2
2
1 11DN 2
More Details
S1
S2
S3
S1
S2
S3
Why
Show that this is true for a single iteration
1
m
S
S
0
0
Adjacency matrix sorted by connected components
Both powering and zig zag maintain the block structure
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
What are we adding to the mix
Bits Nrsquo Pieces
bull The adjacency matrix of a graph G
bull Wersquoll use D regular graphs and the normalized adjancecy matrix (1D)M
1 i j EM i j
0 otherwise
Bits Nrsquo Pieces
bull M is a stochastic matrix the ldquorandom walkrdquo matrix
bull Largest eigenvalue of M is 1 with eigenvector (11hellip1)єRn 2nd largest eigenvalue is λ(G)
bull Define (NDλ) a D regular graph over N vertices with λ(G) le λ
Expanders ndash a Reminder
Two equivalent definitions of expanderbull (ND λ) is an expander iff the
spectral gap 1- λ gt 0
bull (ND λ) is an expander if εgt0 st for at least (1+ ε)|S| vertices of G are connected to some vertex in S
S V S V 2
Expanders ndash a Reminder
2
22
GD G
D
2
min
V
S V S
E S SEdge Expansion G
S
2
| min
VS V S
v u u v SVertex Expansion G
S
CS vertices w neighbor in S c 1 S
D
If there are c|S| edges out of S
Connectivity in Expanders
What would happen if each connected component of our graph was an expander
We could decide USTCON in logspace
Every expander has a O(log(N)) diameter
TheoremFor any s and t in an expander therersquos
a path from s to t of length O(log(N))
Proof
i
i
n(1 )
2n
log 1 log2
log n 1ilog 1
Logspace Algorithm for paths in an expander
For (ND λ) there is a a space O(logDlogN) algorithm which decides USTCONIdeabullFrom any vertex s there are Dl=O(logN) different paths bullenumerate and check if any of them reach t
t
How much does it cost
bullAt each vertex we have a choice of D vertices log(D) to represent 1hellipD
bullEach path is log(N) long
bull Need log(D) at each stage of a log(N) path altogether O(logDlogN)
So far
We now know that if our graph G was an expander graph USTCON can be solved in Log-Space
How can we turn G into a graph of expanders
Making expanders powering it up and cutting it down
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander with constant expansion
3 Construction in Log-Space
The Plan
bull New tools for our toolboxndash Rotation Mapsndash Poweringndash Zig Zag products
bull The actual constructionbull Why we got what we wantedbull Why we got it in Log-Space
Overviewbull Series of powering by 8 and zig zag
products one increases the spectral gap and the other one decreases it but not by much
8
O(Log(N))
Zig Zag Powering
Rotation Maps
bull Graph representation wersquoll use
GRot N D N D
G is D regular undirected The rotation map
GRot vi w j
If the edge (vw) exists and is the ith edge coming out of v and the jth edge coming out of w
Rotation Map Example
1 23
4
17
hellip
hellip54
55
4
3 21
28
5554
hellip
hellipu
v
G
G
Rot u17 v28
Rot v28 u17
PoweringNo limitations on the degree rarr can expenderize with powering
The k-th power of the D-regular graph G is Gk where there is an edge (uv) iff there is a path of length k between u and v in G
=k
Powering
What is it good forbull GN is an N-clique an expanderbull If G = (ND λ) then Gk is a (NDk λk) λ(G)
The spectral gapbull Why is this not enough
Zig Zag Product
If G is a D-regular graph with N vertices and H is a d-regular graph with D vertices replace each v in G with a copy of H Hv Our new graph has [N]x[D] vertices
H
Part of G
v is now Hv
v
Zig-Zag ProductThe resulting graph is a d2 regular
graph with edges as follows
G
v
w
arsquo
brsquo
Hv
Hw
a
brsquo
G Z H
a
b
i
j
arsquoiirsquo
bj
jrsquo
Zig-Zag Product
Lemma
If G is an (NDλ) graph and H is a (Dd) graph
211 (G z H ) 1 1
2
The zig-zag product doesnrsquot hurt the spectral gap too badly
22 2 2 21 1last week we saw (G z H ) 1 1 4
2 2
Question Is a connected component in G a connected component in G z H
Technicalities
Rotation Map for Powering
u w
v
G
3
12 5
8
G
G
Rot u3 v12
Rot v5 w8
u w
G2
2GRot u 35 w 812
35812
u whellipa1 a2 ak
b1b(k-1)bk
G
G 1 1
G k k
Rot ua vb
Rot v a wb
u wa1ak
bkb1
Gk
k 1 2 k k k 1 1GRot u a a a w b b b
Rotation Map for ig ag
Hw
(wbrsquo) (wb)
G
v
w
arsquo
brsquo
Hv
(va) (varsquo)i irsquo
j jrsquo
Rot ((va) (ij)) = zG H
H
G
H
wb j i where
a i Rot a i
wb Rot va
b j Rot b j
The Actual Construction
Show a transformation that turns every connected component of a graph into an expander
ButNot any graph but a D16 regular graph
How to construct such a graph - later
Main Transformation
0
8
i i 1
G G
G G z H
Gi is a D16 regular graph with N(D16)i vertices
On input G and H where G is a D16 regular graph on N vertices and H is a D-regular graph on D16 vertices
define GH G where O log N
Technical Lemma
For D-reg connected non-bipartite G on [N]
Proof
2 GD
2D
2
1G 1
DN
2
1 2
2
min
N
S V S
E
N
S
SG
SG
N
2
4not normalized D
N 2 O 1
2 2
O 1 O 1normalized 1 G G 1
N N
Details
bullSet l to be the smallest integer st If D is constant then this number is O(logN)
bullTransforming the entire graph is equivalent to transforming each connected component separately
2
2
1 11DN 2
More Details
S1
S2
S3
S1
S2
S3
Why
Show that this is true for a single iteration
1
m
S
S
0
0
Adjacency matrix sorted by connected components
Both powering and zig zag maintain the block structure
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
Bits Nrsquo Pieces
bull The adjacency matrix of a graph G
bull Wersquoll use D regular graphs and the normalized adjancecy matrix (1D)M
1 i j EM i j
0 otherwise
Bits Nrsquo Pieces
bull M is a stochastic matrix the ldquorandom walkrdquo matrix
bull Largest eigenvalue of M is 1 with eigenvector (11hellip1)єRn 2nd largest eigenvalue is λ(G)
bull Define (NDλ) a D regular graph over N vertices with λ(G) le λ
Expanders ndash a Reminder
Two equivalent definitions of expanderbull (ND λ) is an expander iff the
spectral gap 1- λ gt 0
bull (ND λ) is an expander if εgt0 st for at least (1+ ε)|S| vertices of G are connected to some vertex in S
S V S V 2
Expanders ndash a Reminder
2
22
GD G
D
2
min
V
S V S
E S SEdge Expansion G
S
2
| min
VS V S
v u u v SVertex Expansion G
S
CS vertices w neighbor in S c 1 S
D
If there are c|S| edges out of S
Connectivity in Expanders
What would happen if each connected component of our graph was an expander
We could decide USTCON in logspace
Every expander has a O(log(N)) diameter
TheoremFor any s and t in an expander therersquos
a path from s to t of length O(log(N))
Proof
i
i
n(1 )
2n
log 1 log2
log n 1ilog 1
Logspace Algorithm for paths in an expander
For (ND λ) there is a a space O(logDlogN) algorithm which decides USTCONIdeabullFrom any vertex s there are Dl=O(logN) different paths bullenumerate and check if any of them reach t
t
How much does it cost
bullAt each vertex we have a choice of D vertices log(D) to represent 1hellipD
bullEach path is log(N) long
bull Need log(D) at each stage of a log(N) path altogether O(logDlogN)
So far
We now know that if our graph G was an expander graph USTCON can be solved in Log-Space
How can we turn G into a graph of expanders
Making expanders powering it up and cutting it down
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander with constant expansion
3 Construction in Log-Space
The Plan
bull New tools for our toolboxndash Rotation Mapsndash Poweringndash Zig Zag products
bull The actual constructionbull Why we got what we wantedbull Why we got it in Log-Space
Overviewbull Series of powering by 8 and zig zag
products one increases the spectral gap and the other one decreases it but not by much
8
O(Log(N))
Zig Zag Powering
Rotation Maps
bull Graph representation wersquoll use
GRot N D N D
G is D regular undirected The rotation map
GRot vi w j
If the edge (vw) exists and is the ith edge coming out of v and the jth edge coming out of w
Rotation Map Example
1 23
4
17
hellip
hellip54
55
4
3 21
28
5554
hellip
hellipu
v
G
G
Rot u17 v28
Rot v28 u17
PoweringNo limitations on the degree rarr can expenderize with powering
The k-th power of the D-regular graph G is Gk where there is an edge (uv) iff there is a path of length k between u and v in G
=k
Powering
What is it good forbull GN is an N-clique an expanderbull If G = (ND λ) then Gk is a (NDk λk) λ(G)
The spectral gapbull Why is this not enough
Zig Zag Product
If G is a D-regular graph with N vertices and H is a d-regular graph with D vertices replace each v in G with a copy of H Hv Our new graph has [N]x[D] vertices
H
Part of G
v is now Hv
v
Zig-Zag ProductThe resulting graph is a d2 regular
graph with edges as follows
G
v
w
arsquo
brsquo
Hv
Hw
a
brsquo
G Z H
a
b
i
j
arsquoiirsquo
bj
jrsquo
Zig-Zag Product
Lemma
If G is an (NDλ) graph and H is a (Dd) graph
211 (G z H ) 1 1
2
The zig-zag product doesnrsquot hurt the spectral gap too badly
22 2 2 21 1last week we saw (G z H ) 1 1 4
2 2
Question Is a connected component in G a connected component in G z H
Technicalities
Rotation Map for Powering
u w
v
G
3
12 5
8
G
G
Rot u3 v12
Rot v5 w8
u w
G2
2GRot u 35 w 812
35812
u whellipa1 a2 ak
b1b(k-1)bk
G
G 1 1
G k k
Rot ua vb
Rot v a wb
u wa1ak
bkb1
Gk
k 1 2 k k k 1 1GRot u a a a w b b b
Rotation Map for ig ag
Hw
(wbrsquo) (wb)
G
v
w
arsquo
brsquo
Hv
(va) (varsquo)i irsquo
j jrsquo
Rot ((va) (ij)) = zG H
H
G
H
wb j i where
a i Rot a i
wb Rot va
b j Rot b j
The Actual Construction
Show a transformation that turns every connected component of a graph into an expander
ButNot any graph but a D16 regular graph
How to construct such a graph - later
Main Transformation
0
8
i i 1
G G
G G z H
Gi is a D16 regular graph with N(D16)i vertices
On input G and H where G is a D16 regular graph on N vertices and H is a D-regular graph on D16 vertices
define GH G where O log N
Technical Lemma
For D-reg connected non-bipartite G on [N]
Proof
2 GD
2D
2
1G 1
DN
2
1 2
2
min
N
S V S
E
N
S
SG
SG
N
2
4not normalized D
N 2 O 1
2 2
O 1 O 1normalized 1 G G 1
N N
Details
bullSet l to be the smallest integer st If D is constant then this number is O(logN)
bullTransforming the entire graph is equivalent to transforming each connected component separately
2
2
1 11DN 2
More Details
S1
S2
S3
S1
S2
S3
Why
Show that this is true for a single iteration
1
m
S
S
0
0
Adjacency matrix sorted by connected components
Both powering and zig zag maintain the block structure
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
Bits Nrsquo Pieces
bull M is a stochastic matrix the ldquorandom walkrdquo matrix
bull Largest eigenvalue of M is 1 with eigenvector (11hellip1)єRn 2nd largest eigenvalue is λ(G)
bull Define (NDλ) a D regular graph over N vertices with λ(G) le λ
Expanders ndash a Reminder
Two equivalent definitions of expanderbull (ND λ) is an expander iff the
spectral gap 1- λ gt 0
bull (ND λ) is an expander if εgt0 st for at least (1+ ε)|S| vertices of G are connected to some vertex in S
S V S V 2
Expanders ndash a Reminder
2
22
GD G
D
2
min
V
S V S
E S SEdge Expansion G
S
2
| min
VS V S
v u u v SVertex Expansion G
S
CS vertices w neighbor in S c 1 S
D
If there are c|S| edges out of S
Connectivity in Expanders
What would happen if each connected component of our graph was an expander
We could decide USTCON in logspace
Every expander has a O(log(N)) diameter
TheoremFor any s and t in an expander therersquos
a path from s to t of length O(log(N))
Proof
i
i
n(1 )
2n
log 1 log2
log n 1ilog 1
Logspace Algorithm for paths in an expander
For (ND λ) there is a a space O(logDlogN) algorithm which decides USTCONIdeabullFrom any vertex s there are Dl=O(logN) different paths bullenumerate and check if any of them reach t
t
How much does it cost
bullAt each vertex we have a choice of D vertices log(D) to represent 1hellipD
bullEach path is log(N) long
bull Need log(D) at each stage of a log(N) path altogether O(logDlogN)
So far
We now know that if our graph G was an expander graph USTCON can be solved in Log-Space
How can we turn G into a graph of expanders
Making expanders powering it up and cutting it down
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander with constant expansion
3 Construction in Log-Space
The Plan
bull New tools for our toolboxndash Rotation Mapsndash Poweringndash Zig Zag products
bull The actual constructionbull Why we got what we wantedbull Why we got it in Log-Space
Overviewbull Series of powering by 8 and zig zag
products one increases the spectral gap and the other one decreases it but not by much
8
O(Log(N))
Zig Zag Powering
Rotation Maps
bull Graph representation wersquoll use
GRot N D N D
G is D regular undirected The rotation map
GRot vi w j
If the edge (vw) exists and is the ith edge coming out of v and the jth edge coming out of w
Rotation Map Example
1 23
4
17
hellip
hellip54
55
4
3 21
28
5554
hellip
hellipu
v
G
G
Rot u17 v28
Rot v28 u17
PoweringNo limitations on the degree rarr can expenderize with powering
The k-th power of the D-regular graph G is Gk where there is an edge (uv) iff there is a path of length k between u and v in G
=k
Powering
What is it good forbull GN is an N-clique an expanderbull If G = (ND λ) then Gk is a (NDk λk) λ(G)
The spectral gapbull Why is this not enough
Zig Zag Product
If G is a D-regular graph with N vertices and H is a d-regular graph with D vertices replace each v in G with a copy of H Hv Our new graph has [N]x[D] vertices
H
Part of G
v is now Hv
v
Zig-Zag ProductThe resulting graph is a d2 regular
graph with edges as follows
G
v
w
arsquo
brsquo
Hv
Hw
a
brsquo
G Z H
a
b
i
j
arsquoiirsquo
bj
jrsquo
Zig-Zag Product
Lemma
If G is an (NDλ) graph and H is a (Dd) graph
211 (G z H ) 1 1
2
The zig-zag product doesnrsquot hurt the spectral gap too badly
22 2 2 21 1last week we saw (G z H ) 1 1 4
2 2
Question Is a connected component in G a connected component in G z H
Technicalities
Rotation Map for Powering
u w
v
G
3
12 5
8
G
G
Rot u3 v12
Rot v5 w8
u w
G2
2GRot u 35 w 812
35812
u whellipa1 a2 ak
b1b(k-1)bk
G
G 1 1
G k k
Rot ua vb
Rot v a wb
u wa1ak
bkb1
Gk
k 1 2 k k k 1 1GRot u a a a w b b b
Rotation Map for ig ag
Hw
(wbrsquo) (wb)
G
v
w
arsquo
brsquo
Hv
(va) (varsquo)i irsquo
j jrsquo
Rot ((va) (ij)) = zG H
H
G
H
wb j i where
a i Rot a i
wb Rot va
b j Rot b j
The Actual Construction
Show a transformation that turns every connected component of a graph into an expander
ButNot any graph but a D16 regular graph
How to construct such a graph - later
Main Transformation
0
8
i i 1
G G
G G z H
Gi is a D16 regular graph with N(D16)i vertices
On input G and H where G is a D16 regular graph on N vertices and H is a D-regular graph on D16 vertices
define GH G where O log N
Technical Lemma
For D-reg connected non-bipartite G on [N]
Proof
2 GD
2D
2
1G 1
DN
2
1 2
2
min
N
S V S
E
N
S
SG
SG
N
2
4not normalized D
N 2 O 1
2 2
O 1 O 1normalized 1 G G 1
N N
Details
bullSet l to be the smallest integer st If D is constant then this number is O(logN)
bullTransforming the entire graph is equivalent to transforming each connected component separately
2
2
1 11DN 2
More Details
S1
S2
S3
S1
S2
S3
Why
Show that this is true for a single iteration
1
m
S
S
0
0
Adjacency matrix sorted by connected components
Both powering and zig zag maintain the block structure
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
Expanders ndash a Reminder
Two equivalent definitions of expanderbull (ND λ) is an expander iff the
spectral gap 1- λ gt 0
bull (ND λ) is an expander if εgt0 st for at least (1+ ε)|S| vertices of G are connected to some vertex in S
S V S V 2
Expanders ndash a Reminder
2
22
GD G
D
2
min
V
S V S
E S SEdge Expansion G
S
2
| min
VS V S
v u u v SVertex Expansion G
S
CS vertices w neighbor in S c 1 S
D
If there are c|S| edges out of S
Connectivity in Expanders
What would happen if each connected component of our graph was an expander
We could decide USTCON in logspace
Every expander has a O(log(N)) diameter
TheoremFor any s and t in an expander therersquos
a path from s to t of length O(log(N))
Proof
i
i
n(1 )
2n
log 1 log2
log n 1ilog 1
Logspace Algorithm for paths in an expander
For (ND λ) there is a a space O(logDlogN) algorithm which decides USTCONIdeabullFrom any vertex s there are Dl=O(logN) different paths bullenumerate and check if any of them reach t
t
How much does it cost
bullAt each vertex we have a choice of D vertices log(D) to represent 1hellipD
bullEach path is log(N) long
bull Need log(D) at each stage of a log(N) path altogether O(logDlogN)
So far
We now know that if our graph G was an expander graph USTCON can be solved in Log-Space
How can we turn G into a graph of expanders
Making expanders powering it up and cutting it down
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander with constant expansion
3 Construction in Log-Space
The Plan
bull New tools for our toolboxndash Rotation Mapsndash Poweringndash Zig Zag products
bull The actual constructionbull Why we got what we wantedbull Why we got it in Log-Space
Overviewbull Series of powering by 8 and zig zag
products one increases the spectral gap and the other one decreases it but not by much
8
O(Log(N))
Zig Zag Powering
Rotation Maps
bull Graph representation wersquoll use
GRot N D N D
G is D regular undirected The rotation map
GRot vi w j
If the edge (vw) exists and is the ith edge coming out of v and the jth edge coming out of w
Rotation Map Example
1 23
4
17
hellip
hellip54
55
4
3 21
28
5554
hellip
hellipu
v
G
G
Rot u17 v28
Rot v28 u17
PoweringNo limitations on the degree rarr can expenderize with powering
The k-th power of the D-regular graph G is Gk where there is an edge (uv) iff there is a path of length k between u and v in G
=k
Powering
What is it good forbull GN is an N-clique an expanderbull If G = (ND λ) then Gk is a (NDk λk) λ(G)
The spectral gapbull Why is this not enough
Zig Zag Product
If G is a D-regular graph with N vertices and H is a d-regular graph with D vertices replace each v in G with a copy of H Hv Our new graph has [N]x[D] vertices
H
Part of G
v is now Hv
v
Zig-Zag ProductThe resulting graph is a d2 regular
graph with edges as follows
G
v
w
arsquo
brsquo
Hv
Hw
a
brsquo
G Z H
a
b
i
j
arsquoiirsquo
bj
jrsquo
Zig-Zag Product
Lemma
If G is an (NDλ) graph and H is a (Dd) graph
211 (G z H ) 1 1
2
The zig-zag product doesnrsquot hurt the spectral gap too badly
22 2 2 21 1last week we saw (G z H ) 1 1 4
2 2
Question Is a connected component in G a connected component in G z H
Technicalities
Rotation Map for Powering
u w
v
G
3
12 5
8
G
G
Rot u3 v12
Rot v5 w8
u w
G2
2GRot u 35 w 812
35812
u whellipa1 a2 ak
b1b(k-1)bk
G
G 1 1
G k k
Rot ua vb
Rot v a wb
u wa1ak
bkb1
Gk
k 1 2 k k k 1 1GRot u a a a w b b b
Rotation Map for ig ag
Hw
(wbrsquo) (wb)
G
v
w
arsquo
brsquo
Hv
(va) (varsquo)i irsquo
j jrsquo
Rot ((va) (ij)) = zG H
H
G
H
wb j i where
a i Rot a i
wb Rot va
b j Rot b j
The Actual Construction
Show a transformation that turns every connected component of a graph into an expander
ButNot any graph but a D16 regular graph
How to construct such a graph - later
Main Transformation
0
8
i i 1
G G
G G z H
Gi is a D16 regular graph with N(D16)i vertices
On input G and H where G is a D16 regular graph on N vertices and H is a D-regular graph on D16 vertices
define GH G where O log N
Technical Lemma
For D-reg connected non-bipartite G on [N]
Proof
2 GD
2D
2
1G 1
DN
2
1 2
2
min
N
S V S
E
N
S
SG
SG
N
2
4not normalized D
N 2 O 1
2 2
O 1 O 1normalized 1 G G 1
N N
Details
bullSet l to be the smallest integer st If D is constant then this number is O(logN)
bullTransforming the entire graph is equivalent to transforming each connected component separately
2
2
1 11DN 2
More Details
S1
S2
S3
S1
S2
S3
Why
Show that this is true for a single iteration
1
m
S
S
0
0
Adjacency matrix sorted by connected components
Both powering and zig zag maintain the block structure
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
Expanders ndash a Reminder
2
22
GD G
D
2
min
V
S V S
E S SEdge Expansion G
S
2
| min
VS V S
v u u v SVertex Expansion G
S
CS vertices w neighbor in S c 1 S
D
If there are c|S| edges out of S
Connectivity in Expanders
What would happen if each connected component of our graph was an expander
We could decide USTCON in logspace
Every expander has a O(log(N)) diameter
TheoremFor any s and t in an expander therersquos
a path from s to t of length O(log(N))
Proof
i
i
n(1 )
2n
log 1 log2
log n 1ilog 1
Logspace Algorithm for paths in an expander
For (ND λ) there is a a space O(logDlogN) algorithm which decides USTCONIdeabullFrom any vertex s there are Dl=O(logN) different paths bullenumerate and check if any of them reach t
t
How much does it cost
bullAt each vertex we have a choice of D vertices log(D) to represent 1hellipD
bullEach path is log(N) long
bull Need log(D) at each stage of a log(N) path altogether O(logDlogN)
So far
We now know that if our graph G was an expander graph USTCON can be solved in Log-Space
How can we turn G into a graph of expanders
Making expanders powering it up and cutting it down
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander with constant expansion
3 Construction in Log-Space
The Plan
bull New tools for our toolboxndash Rotation Mapsndash Poweringndash Zig Zag products
bull The actual constructionbull Why we got what we wantedbull Why we got it in Log-Space
Overviewbull Series of powering by 8 and zig zag
products one increases the spectral gap and the other one decreases it but not by much
8
O(Log(N))
Zig Zag Powering
Rotation Maps
bull Graph representation wersquoll use
GRot N D N D
G is D regular undirected The rotation map
GRot vi w j
If the edge (vw) exists and is the ith edge coming out of v and the jth edge coming out of w
Rotation Map Example
1 23
4
17
hellip
hellip54
55
4
3 21
28
5554
hellip
hellipu
v
G
G
Rot u17 v28
Rot v28 u17
PoweringNo limitations on the degree rarr can expenderize with powering
The k-th power of the D-regular graph G is Gk where there is an edge (uv) iff there is a path of length k between u and v in G
=k
Powering
What is it good forbull GN is an N-clique an expanderbull If G = (ND λ) then Gk is a (NDk λk) λ(G)
The spectral gapbull Why is this not enough
Zig Zag Product
If G is a D-regular graph with N vertices and H is a d-regular graph with D vertices replace each v in G with a copy of H Hv Our new graph has [N]x[D] vertices
H
Part of G
v is now Hv
v
Zig-Zag ProductThe resulting graph is a d2 regular
graph with edges as follows
G
v
w
arsquo
brsquo
Hv
Hw
a
brsquo
G Z H
a
b
i
j
arsquoiirsquo
bj
jrsquo
Zig-Zag Product
Lemma
If G is an (NDλ) graph and H is a (Dd) graph
211 (G z H ) 1 1
2
The zig-zag product doesnrsquot hurt the spectral gap too badly
22 2 2 21 1last week we saw (G z H ) 1 1 4
2 2
Question Is a connected component in G a connected component in G z H
Technicalities
Rotation Map for Powering
u w
v
G
3
12 5
8
G
G
Rot u3 v12
Rot v5 w8
u w
G2
2GRot u 35 w 812
35812
u whellipa1 a2 ak
b1b(k-1)bk
G
G 1 1
G k k
Rot ua vb
Rot v a wb
u wa1ak
bkb1
Gk
k 1 2 k k k 1 1GRot u a a a w b b b
Rotation Map for ig ag
Hw
(wbrsquo) (wb)
G
v
w
arsquo
brsquo
Hv
(va) (varsquo)i irsquo
j jrsquo
Rot ((va) (ij)) = zG H
H
G
H
wb j i where
a i Rot a i
wb Rot va
b j Rot b j
The Actual Construction
Show a transformation that turns every connected component of a graph into an expander
ButNot any graph but a D16 regular graph
How to construct such a graph - later
Main Transformation
0
8
i i 1
G G
G G z H
Gi is a D16 regular graph with N(D16)i vertices
On input G and H where G is a D16 regular graph on N vertices and H is a D-regular graph on D16 vertices
define GH G where O log N
Technical Lemma
For D-reg connected non-bipartite G on [N]
Proof
2 GD
2D
2
1G 1
DN
2
1 2
2
min
N
S V S
E
N
S
SG
SG
N
2
4not normalized D
N 2 O 1
2 2
O 1 O 1normalized 1 G G 1
N N
Details
bullSet l to be the smallest integer st If D is constant then this number is O(logN)
bullTransforming the entire graph is equivalent to transforming each connected component separately
2
2
1 11DN 2
More Details
S1
S2
S3
S1
S2
S3
Why
Show that this is true for a single iteration
1
m
S
S
0
0
Adjacency matrix sorted by connected components
Both powering and zig zag maintain the block structure
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
Connectivity in Expanders
What would happen if each connected component of our graph was an expander
We could decide USTCON in logspace
Every expander has a O(log(N)) diameter
TheoremFor any s and t in an expander therersquos
a path from s to t of length O(log(N))
Proof
i
i
n(1 )
2n
log 1 log2
log n 1ilog 1
Logspace Algorithm for paths in an expander
For (ND λ) there is a a space O(logDlogN) algorithm which decides USTCONIdeabullFrom any vertex s there are Dl=O(logN) different paths bullenumerate and check if any of them reach t
t
How much does it cost
bullAt each vertex we have a choice of D vertices log(D) to represent 1hellipD
bullEach path is log(N) long
bull Need log(D) at each stage of a log(N) path altogether O(logDlogN)
So far
We now know that if our graph G was an expander graph USTCON can be solved in Log-Space
How can we turn G into a graph of expanders
Making expanders powering it up and cutting it down
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander with constant expansion
3 Construction in Log-Space
The Plan
bull New tools for our toolboxndash Rotation Mapsndash Poweringndash Zig Zag products
bull The actual constructionbull Why we got what we wantedbull Why we got it in Log-Space
Overviewbull Series of powering by 8 and zig zag
products one increases the spectral gap and the other one decreases it but not by much
8
O(Log(N))
Zig Zag Powering
Rotation Maps
bull Graph representation wersquoll use
GRot N D N D
G is D regular undirected The rotation map
GRot vi w j
If the edge (vw) exists and is the ith edge coming out of v and the jth edge coming out of w
Rotation Map Example
1 23
4
17
hellip
hellip54
55
4
3 21
28
5554
hellip
hellipu
v
G
G
Rot u17 v28
Rot v28 u17
PoweringNo limitations on the degree rarr can expenderize with powering
The k-th power of the D-regular graph G is Gk where there is an edge (uv) iff there is a path of length k between u and v in G
=k
Powering
What is it good forbull GN is an N-clique an expanderbull If G = (ND λ) then Gk is a (NDk λk) λ(G)
The spectral gapbull Why is this not enough
Zig Zag Product
If G is a D-regular graph with N vertices and H is a d-regular graph with D vertices replace each v in G with a copy of H Hv Our new graph has [N]x[D] vertices
H
Part of G
v is now Hv
v
Zig-Zag ProductThe resulting graph is a d2 regular
graph with edges as follows
G
v
w
arsquo
brsquo
Hv
Hw
a
brsquo
G Z H
a
b
i
j
arsquoiirsquo
bj
jrsquo
Zig-Zag Product
Lemma
If G is an (NDλ) graph and H is a (Dd) graph
211 (G z H ) 1 1
2
The zig-zag product doesnrsquot hurt the spectral gap too badly
22 2 2 21 1last week we saw (G z H ) 1 1 4
2 2
Question Is a connected component in G a connected component in G z H
Technicalities
Rotation Map for Powering
u w
v
G
3
12 5
8
G
G
Rot u3 v12
Rot v5 w8
u w
G2
2GRot u 35 w 812
35812
u whellipa1 a2 ak
b1b(k-1)bk
G
G 1 1
G k k
Rot ua vb
Rot v a wb
u wa1ak
bkb1
Gk
k 1 2 k k k 1 1GRot u a a a w b b b
Rotation Map for ig ag
Hw
(wbrsquo) (wb)
G
v
w
arsquo
brsquo
Hv
(va) (varsquo)i irsquo
j jrsquo
Rot ((va) (ij)) = zG H
H
G
H
wb j i where
a i Rot a i
wb Rot va
b j Rot b j
The Actual Construction
Show a transformation that turns every connected component of a graph into an expander
ButNot any graph but a D16 regular graph
How to construct such a graph - later
Main Transformation
0
8
i i 1
G G
G G z H
Gi is a D16 regular graph with N(D16)i vertices
On input G and H where G is a D16 regular graph on N vertices and H is a D-regular graph on D16 vertices
define GH G where O log N
Technical Lemma
For D-reg connected non-bipartite G on [N]
Proof
2 GD
2D
2
1G 1
DN
2
1 2
2
min
N
S V S
E
N
S
SG
SG
N
2
4not normalized D
N 2 O 1
2 2
O 1 O 1normalized 1 G G 1
N N
Details
bullSet l to be the smallest integer st If D is constant then this number is O(logN)
bullTransforming the entire graph is equivalent to transforming each connected component separately
2
2
1 11DN 2
More Details
S1
S2
S3
S1
S2
S3
Why
Show that this is true for a single iteration
1
m
S
S
0
0
Adjacency matrix sorted by connected components
Both powering and zig zag maintain the block structure
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
Every expander has a O(log(N)) diameter
TheoremFor any s and t in an expander therersquos
a path from s to t of length O(log(N))
Proof
i
i
n(1 )
2n
log 1 log2
log n 1ilog 1
Logspace Algorithm for paths in an expander
For (ND λ) there is a a space O(logDlogN) algorithm which decides USTCONIdeabullFrom any vertex s there are Dl=O(logN) different paths bullenumerate and check if any of them reach t
t
How much does it cost
bullAt each vertex we have a choice of D vertices log(D) to represent 1hellipD
bullEach path is log(N) long
bull Need log(D) at each stage of a log(N) path altogether O(logDlogN)
So far
We now know that if our graph G was an expander graph USTCON can be solved in Log-Space
How can we turn G into a graph of expanders
Making expanders powering it up and cutting it down
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander with constant expansion
3 Construction in Log-Space
The Plan
bull New tools for our toolboxndash Rotation Mapsndash Poweringndash Zig Zag products
bull The actual constructionbull Why we got what we wantedbull Why we got it in Log-Space
Overviewbull Series of powering by 8 and zig zag
products one increases the spectral gap and the other one decreases it but not by much
8
O(Log(N))
Zig Zag Powering
Rotation Maps
bull Graph representation wersquoll use
GRot N D N D
G is D regular undirected The rotation map
GRot vi w j
If the edge (vw) exists and is the ith edge coming out of v and the jth edge coming out of w
Rotation Map Example
1 23
4
17
hellip
hellip54
55
4
3 21
28
5554
hellip
hellipu
v
G
G
Rot u17 v28
Rot v28 u17
PoweringNo limitations on the degree rarr can expenderize with powering
The k-th power of the D-regular graph G is Gk where there is an edge (uv) iff there is a path of length k between u and v in G
=k
Powering
What is it good forbull GN is an N-clique an expanderbull If G = (ND λ) then Gk is a (NDk λk) λ(G)
The spectral gapbull Why is this not enough
Zig Zag Product
If G is a D-regular graph with N vertices and H is a d-regular graph with D vertices replace each v in G with a copy of H Hv Our new graph has [N]x[D] vertices
H
Part of G
v is now Hv
v
Zig-Zag ProductThe resulting graph is a d2 regular
graph with edges as follows
G
v
w
arsquo
brsquo
Hv
Hw
a
brsquo
G Z H
a
b
i
j
arsquoiirsquo
bj
jrsquo
Zig-Zag Product
Lemma
If G is an (NDλ) graph and H is a (Dd) graph
211 (G z H ) 1 1
2
The zig-zag product doesnrsquot hurt the spectral gap too badly
22 2 2 21 1last week we saw (G z H ) 1 1 4
2 2
Question Is a connected component in G a connected component in G z H
Technicalities
Rotation Map for Powering
u w
v
G
3
12 5
8
G
G
Rot u3 v12
Rot v5 w8
u w
G2
2GRot u 35 w 812
35812
u whellipa1 a2 ak
b1b(k-1)bk
G
G 1 1
G k k
Rot ua vb
Rot v a wb
u wa1ak
bkb1
Gk
k 1 2 k k k 1 1GRot u a a a w b b b
Rotation Map for ig ag
Hw
(wbrsquo) (wb)
G
v
w
arsquo
brsquo
Hv
(va) (varsquo)i irsquo
j jrsquo
Rot ((va) (ij)) = zG H
H
G
H
wb j i where
a i Rot a i
wb Rot va
b j Rot b j
The Actual Construction
Show a transformation that turns every connected component of a graph into an expander
ButNot any graph but a D16 regular graph
How to construct such a graph - later
Main Transformation
0
8
i i 1
G G
G G z H
Gi is a D16 regular graph with N(D16)i vertices
On input G and H where G is a D16 regular graph on N vertices and H is a D-regular graph on D16 vertices
define GH G where O log N
Technical Lemma
For D-reg connected non-bipartite G on [N]
Proof
2 GD
2D
2
1G 1
DN
2
1 2
2
min
N
S V S
E
N
S
SG
SG
N
2
4not normalized D
N 2 O 1
2 2
O 1 O 1normalized 1 G G 1
N N
Details
bullSet l to be the smallest integer st If D is constant then this number is O(logN)
bullTransforming the entire graph is equivalent to transforming each connected component separately
2
2
1 11DN 2
More Details
S1
S2
S3
S1
S2
S3
Why
Show that this is true for a single iteration
1
m
S
S
0
0
Adjacency matrix sorted by connected components
Both powering and zig zag maintain the block structure
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
Proof
i
i
n(1 )
2n
log 1 log2
log n 1ilog 1
Logspace Algorithm for paths in an expander
For (ND λ) there is a a space O(logDlogN) algorithm which decides USTCONIdeabullFrom any vertex s there are Dl=O(logN) different paths bullenumerate and check if any of them reach t
t
How much does it cost
bullAt each vertex we have a choice of D vertices log(D) to represent 1hellipD
bullEach path is log(N) long
bull Need log(D) at each stage of a log(N) path altogether O(logDlogN)
So far
We now know that if our graph G was an expander graph USTCON can be solved in Log-Space
How can we turn G into a graph of expanders
Making expanders powering it up and cutting it down
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander with constant expansion
3 Construction in Log-Space
The Plan
bull New tools for our toolboxndash Rotation Mapsndash Poweringndash Zig Zag products
bull The actual constructionbull Why we got what we wantedbull Why we got it in Log-Space
Overviewbull Series of powering by 8 and zig zag
products one increases the spectral gap and the other one decreases it but not by much
8
O(Log(N))
Zig Zag Powering
Rotation Maps
bull Graph representation wersquoll use
GRot N D N D
G is D regular undirected The rotation map
GRot vi w j
If the edge (vw) exists and is the ith edge coming out of v and the jth edge coming out of w
Rotation Map Example
1 23
4
17
hellip
hellip54
55
4
3 21
28
5554
hellip
hellipu
v
G
G
Rot u17 v28
Rot v28 u17
PoweringNo limitations on the degree rarr can expenderize with powering
The k-th power of the D-regular graph G is Gk where there is an edge (uv) iff there is a path of length k between u and v in G
=k
Powering
What is it good forbull GN is an N-clique an expanderbull If G = (ND λ) then Gk is a (NDk λk) λ(G)
The spectral gapbull Why is this not enough
Zig Zag Product
If G is a D-regular graph with N vertices and H is a d-regular graph with D vertices replace each v in G with a copy of H Hv Our new graph has [N]x[D] vertices
H
Part of G
v is now Hv
v
Zig-Zag ProductThe resulting graph is a d2 regular
graph with edges as follows
G
v
w
arsquo
brsquo
Hv
Hw
a
brsquo
G Z H
a
b
i
j
arsquoiirsquo
bj
jrsquo
Zig-Zag Product
Lemma
If G is an (NDλ) graph and H is a (Dd) graph
211 (G z H ) 1 1
2
The zig-zag product doesnrsquot hurt the spectral gap too badly
22 2 2 21 1last week we saw (G z H ) 1 1 4
2 2
Question Is a connected component in G a connected component in G z H
Technicalities
Rotation Map for Powering
u w
v
G
3
12 5
8
G
G
Rot u3 v12
Rot v5 w8
u w
G2
2GRot u 35 w 812
35812
u whellipa1 a2 ak
b1b(k-1)bk
G
G 1 1
G k k
Rot ua vb
Rot v a wb
u wa1ak
bkb1
Gk
k 1 2 k k k 1 1GRot u a a a w b b b
Rotation Map for ig ag
Hw
(wbrsquo) (wb)
G
v
w
arsquo
brsquo
Hv
(va) (varsquo)i irsquo
j jrsquo
Rot ((va) (ij)) = zG H
H
G
H
wb j i where
a i Rot a i
wb Rot va
b j Rot b j
The Actual Construction
Show a transformation that turns every connected component of a graph into an expander
ButNot any graph but a D16 regular graph
How to construct such a graph - later
Main Transformation
0
8
i i 1
G G
G G z H
Gi is a D16 regular graph with N(D16)i vertices
On input G and H where G is a D16 regular graph on N vertices and H is a D-regular graph on D16 vertices
define GH G where O log N
Technical Lemma
For D-reg connected non-bipartite G on [N]
Proof
2 GD
2D
2
1G 1
DN
2
1 2
2
min
N
S V S
E
N
S
SG
SG
N
2
4not normalized D
N 2 O 1
2 2
O 1 O 1normalized 1 G G 1
N N
Details
bullSet l to be the smallest integer st If D is constant then this number is O(logN)
bullTransforming the entire graph is equivalent to transforming each connected component separately
2
2
1 11DN 2
More Details
S1
S2
S3
S1
S2
S3
Why
Show that this is true for a single iteration
1
m
S
S
0
0
Adjacency matrix sorted by connected components
Both powering and zig zag maintain the block structure
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
Logspace Algorithm for paths in an expander
For (ND λ) there is a a space O(logDlogN) algorithm which decides USTCONIdeabullFrom any vertex s there are Dl=O(logN) different paths bullenumerate and check if any of them reach t
t
How much does it cost
bullAt each vertex we have a choice of D vertices log(D) to represent 1hellipD
bullEach path is log(N) long
bull Need log(D) at each stage of a log(N) path altogether O(logDlogN)
So far
We now know that if our graph G was an expander graph USTCON can be solved in Log-Space
How can we turn G into a graph of expanders
Making expanders powering it up and cutting it down
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander with constant expansion
3 Construction in Log-Space
The Plan
bull New tools for our toolboxndash Rotation Mapsndash Poweringndash Zig Zag products
bull The actual constructionbull Why we got what we wantedbull Why we got it in Log-Space
Overviewbull Series of powering by 8 and zig zag
products one increases the spectral gap and the other one decreases it but not by much
8
O(Log(N))
Zig Zag Powering
Rotation Maps
bull Graph representation wersquoll use
GRot N D N D
G is D regular undirected The rotation map
GRot vi w j
If the edge (vw) exists and is the ith edge coming out of v and the jth edge coming out of w
Rotation Map Example
1 23
4
17
hellip
hellip54
55
4
3 21
28
5554
hellip
hellipu
v
G
G
Rot u17 v28
Rot v28 u17
PoweringNo limitations on the degree rarr can expenderize with powering
The k-th power of the D-regular graph G is Gk where there is an edge (uv) iff there is a path of length k between u and v in G
=k
Powering
What is it good forbull GN is an N-clique an expanderbull If G = (ND λ) then Gk is a (NDk λk) λ(G)
The spectral gapbull Why is this not enough
Zig Zag Product
If G is a D-regular graph with N vertices and H is a d-regular graph with D vertices replace each v in G with a copy of H Hv Our new graph has [N]x[D] vertices
H
Part of G
v is now Hv
v
Zig-Zag ProductThe resulting graph is a d2 regular
graph with edges as follows
G
v
w
arsquo
brsquo
Hv
Hw
a
brsquo
G Z H
a
b
i
j
arsquoiirsquo
bj
jrsquo
Zig-Zag Product
Lemma
If G is an (NDλ) graph and H is a (Dd) graph
211 (G z H ) 1 1
2
The zig-zag product doesnrsquot hurt the spectral gap too badly
22 2 2 21 1last week we saw (G z H ) 1 1 4
2 2
Question Is a connected component in G a connected component in G z H
Technicalities
Rotation Map for Powering
u w
v
G
3
12 5
8
G
G
Rot u3 v12
Rot v5 w8
u w
G2
2GRot u 35 w 812
35812
u whellipa1 a2 ak
b1b(k-1)bk
G
G 1 1
G k k
Rot ua vb
Rot v a wb
u wa1ak
bkb1
Gk
k 1 2 k k k 1 1GRot u a a a w b b b
Rotation Map for ig ag
Hw
(wbrsquo) (wb)
G
v
w
arsquo
brsquo
Hv
(va) (varsquo)i irsquo
j jrsquo
Rot ((va) (ij)) = zG H
H
G
H
wb j i where
a i Rot a i
wb Rot va
b j Rot b j
The Actual Construction
Show a transformation that turns every connected component of a graph into an expander
ButNot any graph but a D16 regular graph
How to construct such a graph - later
Main Transformation
0
8
i i 1
G G
G G z H
Gi is a D16 regular graph with N(D16)i vertices
On input G and H where G is a D16 regular graph on N vertices and H is a D-regular graph on D16 vertices
define GH G where O log N
Technical Lemma
For D-reg connected non-bipartite G on [N]
Proof
2 GD
2D
2
1G 1
DN
2
1 2
2
min
N
S V S
E
N
S
SG
SG
N
2
4not normalized D
N 2 O 1
2 2
O 1 O 1normalized 1 G G 1
N N
Details
bullSet l to be the smallest integer st If D is constant then this number is O(logN)
bullTransforming the entire graph is equivalent to transforming each connected component separately
2
2
1 11DN 2
More Details
S1
S2
S3
S1
S2
S3
Why
Show that this is true for a single iteration
1
m
S
S
0
0
Adjacency matrix sorted by connected components
Both powering and zig zag maintain the block structure
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
How much does it cost
bullAt each vertex we have a choice of D vertices log(D) to represent 1hellipD
bullEach path is log(N) long
bull Need log(D) at each stage of a log(N) path altogether O(logDlogN)
So far
We now know that if our graph G was an expander graph USTCON can be solved in Log-Space
How can we turn G into a graph of expanders
Making expanders powering it up and cutting it down
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander with constant expansion
3 Construction in Log-Space
The Plan
bull New tools for our toolboxndash Rotation Mapsndash Poweringndash Zig Zag products
bull The actual constructionbull Why we got what we wantedbull Why we got it in Log-Space
Overviewbull Series of powering by 8 and zig zag
products one increases the spectral gap and the other one decreases it but not by much
8
O(Log(N))
Zig Zag Powering
Rotation Maps
bull Graph representation wersquoll use
GRot N D N D
G is D regular undirected The rotation map
GRot vi w j
If the edge (vw) exists and is the ith edge coming out of v and the jth edge coming out of w
Rotation Map Example
1 23
4
17
hellip
hellip54
55
4
3 21
28
5554
hellip
hellipu
v
G
G
Rot u17 v28
Rot v28 u17
PoweringNo limitations on the degree rarr can expenderize with powering
The k-th power of the D-regular graph G is Gk where there is an edge (uv) iff there is a path of length k between u and v in G
=k
Powering
What is it good forbull GN is an N-clique an expanderbull If G = (ND λ) then Gk is a (NDk λk) λ(G)
The spectral gapbull Why is this not enough
Zig Zag Product
If G is a D-regular graph with N vertices and H is a d-regular graph with D vertices replace each v in G with a copy of H Hv Our new graph has [N]x[D] vertices
H
Part of G
v is now Hv
v
Zig-Zag ProductThe resulting graph is a d2 regular
graph with edges as follows
G
v
w
arsquo
brsquo
Hv
Hw
a
brsquo
G Z H
a
b
i
j
arsquoiirsquo
bj
jrsquo
Zig-Zag Product
Lemma
If G is an (NDλ) graph and H is a (Dd) graph
211 (G z H ) 1 1
2
The zig-zag product doesnrsquot hurt the spectral gap too badly
22 2 2 21 1last week we saw (G z H ) 1 1 4
2 2
Question Is a connected component in G a connected component in G z H
Technicalities
Rotation Map for Powering
u w
v
G
3
12 5
8
G
G
Rot u3 v12
Rot v5 w8
u w
G2
2GRot u 35 w 812
35812
u whellipa1 a2 ak
b1b(k-1)bk
G
G 1 1
G k k
Rot ua vb
Rot v a wb
u wa1ak
bkb1
Gk
k 1 2 k k k 1 1GRot u a a a w b b b
Rotation Map for ig ag
Hw
(wbrsquo) (wb)
G
v
w
arsquo
brsquo
Hv
(va) (varsquo)i irsquo
j jrsquo
Rot ((va) (ij)) = zG H
H
G
H
wb j i where
a i Rot a i
wb Rot va
b j Rot b j
The Actual Construction
Show a transformation that turns every connected component of a graph into an expander
ButNot any graph but a D16 regular graph
How to construct such a graph - later
Main Transformation
0
8
i i 1
G G
G G z H
Gi is a D16 regular graph with N(D16)i vertices
On input G and H where G is a D16 regular graph on N vertices and H is a D-regular graph on D16 vertices
define GH G where O log N
Technical Lemma
For D-reg connected non-bipartite G on [N]
Proof
2 GD
2D
2
1G 1
DN
2
1 2
2
min
N
S V S
E
N
S
SG
SG
N
2
4not normalized D
N 2 O 1
2 2
O 1 O 1normalized 1 G G 1
N N
Details
bullSet l to be the smallest integer st If D is constant then this number is O(logN)
bullTransforming the entire graph is equivalent to transforming each connected component separately
2
2
1 11DN 2
More Details
S1
S2
S3
S1
S2
S3
Why
Show that this is true for a single iteration
1
m
S
S
0
0
Adjacency matrix sorted by connected components
Both powering and zig zag maintain the block structure
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
So far
We now know that if our graph G was an expander graph USTCON can be solved in Log-Space
How can we turn G into a graph of expanders
Making expanders powering it up and cutting it down
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander with constant expansion
3 Construction in Log-Space
The Plan
bull New tools for our toolboxndash Rotation Mapsndash Poweringndash Zig Zag products
bull The actual constructionbull Why we got what we wantedbull Why we got it in Log-Space
Overviewbull Series of powering by 8 and zig zag
products one increases the spectral gap and the other one decreases it but not by much
8
O(Log(N))
Zig Zag Powering
Rotation Maps
bull Graph representation wersquoll use
GRot N D N D
G is D regular undirected The rotation map
GRot vi w j
If the edge (vw) exists and is the ith edge coming out of v and the jth edge coming out of w
Rotation Map Example
1 23
4
17
hellip
hellip54
55
4
3 21
28
5554
hellip
hellipu
v
G
G
Rot u17 v28
Rot v28 u17
PoweringNo limitations on the degree rarr can expenderize with powering
The k-th power of the D-regular graph G is Gk where there is an edge (uv) iff there is a path of length k between u and v in G
=k
Powering
What is it good forbull GN is an N-clique an expanderbull If G = (ND λ) then Gk is a (NDk λk) λ(G)
The spectral gapbull Why is this not enough
Zig Zag Product
If G is a D-regular graph with N vertices and H is a d-regular graph with D vertices replace each v in G with a copy of H Hv Our new graph has [N]x[D] vertices
H
Part of G
v is now Hv
v
Zig-Zag ProductThe resulting graph is a d2 regular
graph with edges as follows
G
v
w
arsquo
brsquo
Hv
Hw
a
brsquo
G Z H
a
b
i
j
arsquoiirsquo
bj
jrsquo
Zig-Zag Product
Lemma
If G is an (NDλ) graph and H is a (Dd) graph
211 (G z H ) 1 1
2
The zig-zag product doesnrsquot hurt the spectral gap too badly
22 2 2 21 1last week we saw (G z H ) 1 1 4
2 2
Question Is a connected component in G a connected component in G z H
Technicalities
Rotation Map for Powering
u w
v
G
3
12 5
8
G
G
Rot u3 v12
Rot v5 w8
u w
G2
2GRot u 35 w 812
35812
u whellipa1 a2 ak
b1b(k-1)bk
G
G 1 1
G k k
Rot ua vb
Rot v a wb
u wa1ak
bkb1
Gk
k 1 2 k k k 1 1GRot u a a a w b b b
Rotation Map for ig ag
Hw
(wbrsquo) (wb)
G
v
w
arsquo
brsquo
Hv
(va) (varsquo)i irsquo
j jrsquo
Rot ((va) (ij)) = zG H
H
G
H
wb j i where
a i Rot a i
wb Rot va
b j Rot b j
The Actual Construction
Show a transformation that turns every connected component of a graph into an expander
ButNot any graph but a D16 regular graph
How to construct such a graph - later
Main Transformation
0
8
i i 1
G G
G G z H
Gi is a D16 regular graph with N(D16)i vertices
On input G and H where G is a D16 regular graph on N vertices and H is a D-regular graph on D16 vertices
define GH G where O log N
Technical Lemma
For D-reg connected non-bipartite G on [N]
Proof
2 GD
2D
2
1G 1
DN
2
1 2
2
min
N
S V S
E
N
S
SG
SG
N
2
4not normalized D
N 2 O 1
2 2
O 1 O 1normalized 1 G G 1
N N
Details
bullSet l to be the smallest integer st If D is constant then this number is O(logN)
bullTransforming the entire graph is equivalent to transforming each connected component separately
2
2
1 11DN 2
More Details
S1
S2
S3
S1
S2
S3
Why
Show that this is true for a single iteration
1
m
S
S
0
0
Adjacency matrix sorted by connected components
Both powering and zig zag maintain the block structure
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
Making expanders powering it up and cutting it down
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander with constant expansion
3 Construction in Log-Space
The Plan
bull New tools for our toolboxndash Rotation Mapsndash Poweringndash Zig Zag products
bull The actual constructionbull Why we got what we wantedbull Why we got it in Log-Space
Overviewbull Series of powering by 8 and zig zag
products one increases the spectral gap and the other one decreases it but not by much
8
O(Log(N))
Zig Zag Powering
Rotation Maps
bull Graph representation wersquoll use
GRot N D N D
G is D regular undirected The rotation map
GRot vi w j
If the edge (vw) exists and is the ith edge coming out of v and the jth edge coming out of w
Rotation Map Example
1 23
4
17
hellip
hellip54
55
4
3 21
28
5554
hellip
hellipu
v
G
G
Rot u17 v28
Rot v28 u17
PoweringNo limitations on the degree rarr can expenderize with powering
The k-th power of the D-regular graph G is Gk where there is an edge (uv) iff there is a path of length k between u and v in G
=k
Powering
What is it good forbull GN is an N-clique an expanderbull If G = (ND λ) then Gk is a (NDk λk) λ(G)
The spectral gapbull Why is this not enough
Zig Zag Product
If G is a D-regular graph with N vertices and H is a d-regular graph with D vertices replace each v in G with a copy of H Hv Our new graph has [N]x[D] vertices
H
Part of G
v is now Hv
v
Zig-Zag ProductThe resulting graph is a d2 regular
graph with edges as follows
G
v
w
arsquo
brsquo
Hv
Hw
a
brsquo
G Z H
a
b
i
j
arsquoiirsquo
bj
jrsquo
Zig-Zag Product
Lemma
If G is an (NDλ) graph and H is a (Dd) graph
211 (G z H ) 1 1
2
The zig-zag product doesnrsquot hurt the spectral gap too badly
22 2 2 21 1last week we saw (G z H ) 1 1 4
2 2
Question Is a connected component in G a connected component in G z H
Technicalities
Rotation Map for Powering
u w
v
G
3
12 5
8
G
G
Rot u3 v12
Rot v5 w8
u w
G2
2GRot u 35 w 812
35812
u whellipa1 a2 ak
b1b(k-1)bk
G
G 1 1
G k k
Rot ua vb
Rot v a wb
u wa1ak
bkb1
Gk
k 1 2 k k k 1 1GRot u a a a w b b b
Rotation Map for ig ag
Hw
(wbrsquo) (wb)
G
v
w
arsquo
brsquo
Hv
(va) (varsquo)i irsquo
j jrsquo
Rot ((va) (ij)) = zG H
H
G
H
wb j i where
a i Rot a i
wb Rot va
b j Rot b j
The Actual Construction
Show a transformation that turns every connected component of a graph into an expander
ButNot any graph but a D16 regular graph
How to construct such a graph - later
Main Transformation
0
8
i i 1
G G
G G z H
Gi is a D16 regular graph with N(D16)i vertices
On input G and H where G is a D16 regular graph on N vertices and H is a D-regular graph on D16 vertices
define GH G where O log N
Technical Lemma
For D-reg connected non-bipartite G on [N]
Proof
2 GD
2D
2
1G 1
DN
2
1 2
2
min
N
S V S
E
N
S
SG
SG
N
2
4not normalized D
N 2 O 1
2 2
O 1 O 1normalized 1 G G 1
N N
Details
bullSet l to be the smallest integer st If D is constant then this number is O(logN)
bullTransforming the entire graph is equivalent to transforming each connected component separately
2
2
1 11DN 2
More Details
S1
S2
S3
S1
S2
S3
Why
Show that this is true for a single iteration
1
m
S
S
0
0
Adjacency matrix sorted by connected components
Both powering and zig zag maintain the block structure
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander with constant expansion
3 Construction in Log-Space
The Plan
bull New tools for our toolboxndash Rotation Mapsndash Poweringndash Zig Zag products
bull The actual constructionbull Why we got what we wantedbull Why we got it in Log-Space
Overviewbull Series of powering by 8 and zig zag
products one increases the spectral gap and the other one decreases it but not by much
8
O(Log(N))
Zig Zag Powering
Rotation Maps
bull Graph representation wersquoll use
GRot N D N D
G is D regular undirected The rotation map
GRot vi w j
If the edge (vw) exists and is the ith edge coming out of v and the jth edge coming out of w
Rotation Map Example
1 23
4
17
hellip
hellip54
55
4
3 21
28
5554
hellip
hellipu
v
G
G
Rot u17 v28
Rot v28 u17
PoweringNo limitations on the degree rarr can expenderize with powering
The k-th power of the D-regular graph G is Gk where there is an edge (uv) iff there is a path of length k between u and v in G
=k
Powering
What is it good forbull GN is an N-clique an expanderbull If G = (ND λ) then Gk is a (NDk λk) λ(G)
The spectral gapbull Why is this not enough
Zig Zag Product
If G is a D-regular graph with N vertices and H is a d-regular graph with D vertices replace each v in G with a copy of H Hv Our new graph has [N]x[D] vertices
H
Part of G
v is now Hv
v
Zig-Zag ProductThe resulting graph is a d2 regular
graph with edges as follows
G
v
w
arsquo
brsquo
Hv
Hw
a
brsquo
G Z H
a
b
i
j
arsquoiirsquo
bj
jrsquo
Zig-Zag Product
Lemma
If G is an (NDλ) graph and H is a (Dd) graph
211 (G z H ) 1 1
2
The zig-zag product doesnrsquot hurt the spectral gap too badly
22 2 2 21 1last week we saw (G z H ) 1 1 4
2 2
Question Is a connected component in G a connected component in G z H
Technicalities
Rotation Map for Powering
u w
v
G
3
12 5
8
G
G
Rot u3 v12
Rot v5 w8
u w
G2
2GRot u 35 w 812
35812
u whellipa1 a2 ak
b1b(k-1)bk
G
G 1 1
G k k
Rot ua vb
Rot v a wb
u wa1ak
bkb1
Gk
k 1 2 k k k 1 1GRot u a a a w b b b
Rotation Map for ig ag
Hw
(wbrsquo) (wb)
G
v
w
arsquo
brsquo
Hv
(va) (varsquo)i irsquo
j jrsquo
Rot ((va) (ij)) = zG H
H
G
H
wb j i where
a i Rot a i
wb Rot va
b j Rot b j
The Actual Construction
Show a transformation that turns every connected component of a graph into an expander
ButNot any graph but a D16 regular graph
How to construct such a graph - later
Main Transformation
0
8
i i 1
G G
G G z H
Gi is a D16 regular graph with N(D16)i vertices
On input G and H where G is a D16 regular graph on N vertices and H is a D-regular graph on D16 vertices
define GH G where O log N
Technical Lemma
For D-reg connected non-bipartite G on [N]
Proof
2 GD
2D
2
1G 1
DN
2
1 2
2
min
N
S V S
E
N
S
SG
SG
N
2
4not normalized D
N 2 O 1
2 2
O 1 O 1normalized 1 G G 1
N N
Details
bullSet l to be the smallest integer st If D is constant then this number is O(logN)
bullTransforming the entire graph is equivalent to transforming each connected component separately
2
2
1 11DN 2
More Details
S1
S2
S3
S1
S2
S3
Why
Show that this is true for a single iteration
1
m
S
S
0
0
Adjacency matrix sorted by connected components
Both powering and zig zag maintain the block structure
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
The Plan
bull New tools for our toolboxndash Rotation Mapsndash Poweringndash Zig Zag products
bull The actual constructionbull Why we got what we wantedbull Why we got it in Log-Space
Overviewbull Series of powering by 8 and zig zag
products one increases the spectral gap and the other one decreases it but not by much
8
O(Log(N))
Zig Zag Powering
Rotation Maps
bull Graph representation wersquoll use
GRot N D N D
G is D regular undirected The rotation map
GRot vi w j
If the edge (vw) exists and is the ith edge coming out of v and the jth edge coming out of w
Rotation Map Example
1 23
4
17
hellip
hellip54
55
4
3 21
28
5554
hellip
hellipu
v
G
G
Rot u17 v28
Rot v28 u17
PoweringNo limitations on the degree rarr can expenderize with powering
The k-th power of the D-regular graph G is Gk where there is an edge (uv) iff there is a path of length k between u and v in G
=k
Powering
What is it good forbull GN is an N-clique an expanderbull If G = (ND λ) then Gk is a (NDk λk) λ(G)
The spectral gapbull Why is this not enough
Zig Zag Product
If G is a D-regular graph with N vertices and H is a d-regular graph with D vertices replace each v in G with a copy of H Hv Our new graph has [N]x[D] vertices
H
Part of G
v is now Hv
v
Zig-Zag ProductThe resulting graph is a d2 regular
graph with edges as follows
G
v
w
arsquo
brsquo
Hv
Hw
a
brsquo
G Z H
a
b
i
j
arsquoiirsquo
bj
jrsquo
Zig-Zag Product
Lemma
If G is an (NDλ) graph and H is a (Dd) graph
211 (G z H ) 1 1
2
The zig-zag product doesnrsquot hurt the spectral gap too badly
22 2 2 21 1last week we saw (G z H ) 1 1 4
2 2
Question Is a connected component in G a connected component in G z H
Technicalities
Rotation Map for Powering
u w
v
G
3
12 5
8
G
G
Rot u3 v12
Rot v5 w8
u w
G2
2GRot u 35 w 812
35812
u whellipa1 a2 ak
b1b(k-1)bk
G
G 1 1
G k k
Rot ua vb
Rot v a wb
u wa1ak
bkb1
Gk
k 1 2 k k k 1 1GRot u a a a w b b b
Rotation Map for ig ag
Hw
(wbrsquo) (wb)
G
v
w
arsquo
brsquo
Hv
(va) (varsquo)i irsquo
j jrsquo
Rot ((va) (ij)) = zG H
H
G
H
wb j i where
a i Rot a i
wb Rot va
b j Rot b j
The Actual Construction
Show a transformation that turns every connected component of a graph into an expander
ButNot any graph but a D16 regular graph
How to construct such a graph - later
Main Transformation
0
8
i i 1
G G
G G z H
Gi is a D16 regular graph with N(D16)i vertices
On input G and H where G is a D16 regular graph on N vertices and H is a D-regular graph on D16 vertices
define GH G where O log N
Technical Lemma
For D-reg connected non-bipartite G on [N]
Proof
2 GD
2D
2
1G 1
DN
2
1 2
2
min
N
S V S
E
N
S
SG
SG
N
2
4not normalized D
N 2 O 1
2 2
O 1 O 1normalized 1 G G 1
N N
Details
bullSet l to be the smallest integer st If D is constant then this number is O(logN)
bullTransforming the entire graph is equivalent to transforming each connected component separately
2
2
1 11DN 2
More Details
S1
S2
S3
S1
S2
S3
Why
Show that this is true for a single iteration
1
m
S
S
0
0
Adjacency matrix sorted by connected components
Both powering and zig zag maintain the block structure
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
Overviewbull Series of powering by 8 and zig zag
products one increases the spectral gap and the other one decreases it but not by much
8
O(Log(N))
Zig Zag Powering
Rotation Maps
bull Graph representation wersquoll use
GRot N D N D
G is D regular undirected The rotation map
GRot vi w j
If the edge (vw) exists and is the ith edge coming out of v and the jth edge coming out of w
Rotation Map Example
1 23
4
17
hellip
hellip54
55
4
3 21
28
5554
hellip
hellipu
v
G
G
Rot u17 v28
Rot v28 u17
PoweringNo limitations on the degree rarr can expenderize with powering
The k-th power of the D-regular graph G is Gk where there is an edge (uv) iff there is a path of length k between u and v in G
=k
Powering
What is it good forbull GN is an N-clique an expanderbull If G = (ND λ) then Gk is a (NDk λk) λ(G)
The spectral gapbull Why is this not enough
Zig Zag Product
If G is a D-regular graph with N vertices and H is a d-regular graph with D vertices replace each v in G with a copy of H Hv Our new graph has [N]x[D] vertices
H
Part of G
v is now Hv
v
Zig-Zag ProductThe resulting graph is a d2 regular
graph with edges as follows
G
v
w
arsquo
brsquo
Hv
Hw
a
brsquo
G Z H
a
b
i
j
arsquoiirsquo
bj
jrsquo
Zig-Zag Product
Lemma
If G is an (NDλ) graph and H is a (Dd) graph
211 (G z H ) 1 1
2
The zig-zag product doesnrsquot hurt the spectral gap too badly
22 2 2 21 1last week we saw (G z H ) 1 1 4
2 2
Question Is a connected component in G a connected component in G z H
Technicalities
Rotation Map for Powering
u w
v
G
3
12 5
8
G
G
Rot u3 v12
Rot v5 w8
u w
G2
2GRot u 35 w 812
35812
u whellipa1 a2 ak
b1b(k-1)bk
G
G 1 1
G k k
Rot ua vb
Rot v a wb
u wa1ak
bkb1
Gk
k 1 2 k k k 1 1GRot u a a a w b b b
Rotation Map for ig ag
Hw
(wbrsquo) (wb)
G
v
w
arsquo
brsquo
Hv
(va) (varsquo)i irsquo
j jrsquo
Rot ((va) (ij)) = zG H
H
G
H
wb j i where
a i Rot a i
wb Rot va
b j Rot b j
The Actual Construction
Show a transformation that turns every connected component of a graph into an expander
ButNot any graph but a D16 regular graph
How to construct such a graph - later
Main Transformation
0
8
i i 1
G G
G G z H
Gi is a D16 regular graph with N(D16)i vertices
On input G and H where G is a D16 regular graph on N vertices and H is a D-regular graph on D16 vertices
define GH G where O log N
Technical Lemma
For D-reg connected non-bipartite G on [N]
Proof
2 GD
2D
2
1G 1
DN
2
1 2
2
min
N
S V S
E
N
S
SG
SG
N
2
4not normalized D
N 2 O 1
2 2
O 1 O 1normalized 1 G G 1
N N
Details
bullSet l to be the smallest integer st If D is constant then this number is O(logN)
bullTransforming the entire graph is equivalent to transforming each connected component separately
2
2
1 11DN 2
More Details
S1
S2
S3
S1
S2
S3
Why
Show that this is true for a single iteration
1
m
S
S
0
0
Adjacency matrix sorted by connected components
Both powering and zig zag maintain the block structure
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
Rotation Maps
bull Graph representation wersquoll use
GRot N D N D
G is D regular undirected The rotation map
GRot vi w j
If the edge (vw) exists and is the ith edge coming out of v and the jth edge coming out of w
Rotation Map Example
1 23
4
17
hellip
hellip54
55
4
3 21
28
5554
hellip
hellipu
v
G
G
Rot u17 v28
Rot v28 u17
PoweringNo limitations on the degree rarr can expenderize with powering
The k-th power of the D-regular graph G is Gk where there is an edge (uv) iff there is a path of length k between u and v in G
=k
Powering
What is it good forbull GN is an N-clique an expanderbull If G = (ND λ) then Gk is a (NDk λk) λ(G)
The spectral gapbull Why is this not enough
Zig Zag Product
If G is a D-regular graph with N vertices and H is a d-regular graph with D vertices replace each v in G with a copy of H Hv Our new graph has [N]x[D] vertices
H
Part of G
v is now Hv
v
Zig-Zag ProductThe resulting graph is a d2 regular
graph with edges as follows
G
v
w
arsquo
brsquo
Hv
Hw
a
brsquo
G Z H
a
b
i
j
arsquoiirsquo
bj
jrsquo
Zig-Zag Product
Lemma
If G is an (NDλ) graph and H is a (Dd) graph
211 (G z H ) 1 1
2
The zig-zag product doesnrsquot hurt the spectral gap too badly
22 2 2 21 1last week we saw (G z H ) 1 1 4
2 2
Question Is a connected component in G a connected component in G z H
Technicalities
Rotation Map for Powering
u w
v
G
3
12 5
8
G
G
Rot u3 v12
Rot v5 w8
u w
G2
2GRot u 35 w 812
35812
u whellipa1 a2 ak
b1b(k-1)bk
G
G 1 1
G k k
Rot ua vb
Rot v a wb
u wa1ak
bkb1
Gk
k 1 2 k k k 1 1GRot u a a a w b b b
Rotation Map for ig ag
Hw
(wbrsquo) (wb)
G
v
w
arsquo
brsquo
Hv
(va) (varsquo)i irsquo
j jrsquo
Rot ((va) (ij)) = zG H
H
G
H
wb j i where
a i Rot a i
wb Rot va
b j Rot b j
The Actual Construction
Show a transformation that turns every connected component of a graph into an expander
ButNot any graph but a D16 regular graph
How to construct such a graph - later
Main Transformation
0
8
i i 1
G G
G G z H
Gi is a D16 regular graph with N(D16)i vertices
On input G and H where G is a D16 regular graph on N vertices and H is a D-regular graph on D16 vertices
define GH G where O log N
Technical Lemma
For D-reg connected non-bipartite G on [N]
Proof
2 GD
2D
2
1G 1
DN
2
1 2
2
min
N
S V S
E
N
S
SG
SG
N
2
4not normalized D
N 2 O 1
2 2
O 1 O 1normalized 1 G G 1
N N
Details
bullSet l to be the smallest integer st If D is constant then this number is O(logN)
bullTransforming the entire graph is equivalent to transforming each connected component separately
2
2
1 11DN 2
More Details
S1
S2
S3
S1
S2
S3
Why
Show that this is true for a single iteration
1
m
S
S
0
0
Adjacency matrix sorted by connected components
Both powering and zig zag maintain the block structure
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
Rotation Map Example
1 23
4
17
hellip
hellip54
55
4
3 21
28
5554
hellip
hellipu
v
G
G
Rot u17 v28
Rot v28 u17
PoweringNo limitations on the degree rarr can expenderize with powering
The k-th power of the D-regular graph G is Gk where there is an edge (uv) iff there is a path of length k between u and v in G
=k
Powering
What is it good forbull GN is an N-clique an expanderbull If G = (ND λ) then Gk is a (NDk λk) λ(G)
The spectral gapbull Why is this not enough
Zig Zag Product
If G is a D-regular graph with N vertices and H is a d-regular graph with D vertices replace each v in G with a copy of H Hv Our new graph has [N]x[D] vertices
H
Part of G
v is now Hv
v
Zig-Zag ProductThe resulting graph is a d2 regular
graph with edges as follows
G
v
w
arsquo
brsquo
Hv
Hw
a
brsquo
G Z H
a
b
i
j
arsquoiirsquo
bj
jrsquo
Zig-Zag Product
Lemma
If G is an (NDλ) graph and H is a (Dd) graph
211 (G z H ) 1 1
2
The zig-zag product doesnrsquot hurt the spectral gap too badly
22 2 2 21 1last week we saw (G z H ) 1 1 4
2 2
Question Is a connected component in G a connected component in G z H
Technicalities
Rotation Map for Powering
u w
v
G
3
12 5
8
G
G
Rot u3 v12
Rot v5 w8
u w
G2
2GRot u 35 w 812
35812
u whellipa1 a2 ak
b1b(k-1)bk
G
G 1 1
G k k
Rot ua vb
Rot v a wb
u wa1ak
bkb1
Gk
k 1 2 k k k 1 1GRot u a a a w b b b
Rotation Map for ig ag
Hw
(wbrsquo) (wb)
G
v
w
arsquo
brsquo
Hv
(va) (varsquo)i irsquo
j jrsquo
Rot ((va) (ij)) = zG H
H
G
H
wb j i where
a i Rot a i
wb Rot va
b j Rot b j
The Actual Construction
Show a transformation that turns every connected component of a graph into an expander
ButNot any graph but a D16 regular graph
How to construct such a graph - later
Main Transformation
0
8
i i 1
G G
G G z H
Gi is a D16 regular graph with N(D16)i vertices
On input G and H where G is a D16 regular graph on N vertices and H is a D-regular graph on D16 vertices
define GH G where O log N
Technical Lemma
For D-reg connected non-bipartite G on [N]
Proof
2 GD
2D
2
1G 1
DN
2
1 2
2
min
N
S V S
E
N
S
SG
SG
N
2
4not normalized D
N 2 O 1
2 2
O 1 O 1normalized 1 G G 1
N N
Details
bullSet l to be the smallest integer st If D is constant then this number is O(logN)
bullTransforming the entire graph is equivalent to transforming each connected component separately
2
2
1 11DN 2
More Details
S1
S2
S3
S1
S2
S3
Why
Show that this is true for a single iteration
1
m
S
S
0
0
Adjacency matrix sorted by connected components
Both powering and zig zag maintain the block structure
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
PoweringNo limitations on the degree rarr can expenderize with powering
The k-th power of the D-regular graph G is Gk where there is an edge (uv) iff there is a path of length k between u and v in G
=k
Powering
What is it good forbull GN is an N-clique an expanderbull If G = (ND λ) then Gk is a (NDk λk) λ(G)
The spectral gapbull Why is this not enough
Zig Zag Product
If G is a D-regular graph with N vertices and H is a d-regular graph with D vertices replace each v in G with a copy of H Hv Our new graph has [N]x[D] vertices
H
Part of G
v is now Hv
v
Zig-Zag ProductThe resulting graph is a d2 regular
graph with edges as follows
G
v
w
arsquo
brsquo
Hv
Hw
a
brsquo
G Z H
a
b
i
j
arsquoiirsquo
bj
jrsquo
Zig-Zag Product
Lemma
If G is an (NDλ) graph and H is a (Dd) graph
211 (G z H ) 1 1
2
The zig-zag product doesnrsquot hurt the spectral gap too badly
22 2 2 21 1last week we saw (G z H ) 1 1 4
2 2
Question Is a connected component in G a connected component in G z H
Technicalities
Rotation Map for Powering
u w
v
G
3
12 5
8
G
G
Rot u3 v12
Rot v5 w8
u w
G2
2GRot u 35 w 812
35812
u whellipa1 a2 ak
b1b(k-1)bk
G
G 1 1
G k k
Rot ua vb
Rot v a wb
u wa1ak
bkb1
Gk
k 1 2 k k k 1 1GRot u a a a w b b b
Rotation Map for ig ag
Hw
(wbrsquo) (wb)
G
v
w
arsquo
brsquo
Hv
(va) (varsquo)i irsquo
j jrsquo
Rot ((va) (ij)) = zG H
H
G
H
wb j i where
a i Rot a i
wb Rot va
b j Rot b j
The Actual Construction
Show a transformation that turns every connected component of a graph into an expander
ButNot any graph but a D16 regular graph
How to construct such a graph - later
Main Transformation
0
8
i i 1
G G
G G z H
Gi is a D16 regular graph with N(D16)i vertices
On input G and H where G is a D16 regular graph on N vertices and H is a D-regular graph on D16 vertices
define GH G where O log N
Technical Lemma
For D-reg connected non-bipartite G on [N]
Proof
2 GD
2D
2
1G 1
DN
2
1 2
2
min
N
S V S
E
N
S
SG
SG
N
2
4not normalized D
N 2 O 1
2 2
O 1 O 1normalized 1 G G 1
N N
Details
bullSet l to be the smallest integer st If D is constant then this number is O(logN)
bullTransforming the entire graph is equivalent to transforming each connected component separately
2
2
1 11DN 2
More Details
S1
S2
S3
S1
S2
S3
Why
Show that this is true for a single iteration
1
m
S
S
0
0
Adjacency matrix sorted by connected components
Both powering and zig zag maintain the block structure
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
Powering
What is it good forbull GN is an N-clique an expanderbull If G = (ND λ) then Gk is a (NDk λk) λ(G)
The spectral gapbull Why is this not enough
Zig Zag Product
If G is a D-regular graph with N vertices and H is a d-regular graph with D vertices replace each v in G with a copy of H Hv Our new graph has [N]x[D] vertices
H
Part of G
v is now Hv
v
Zig-Zag ProductThe resulting graph is a d2 regular
graph with edges as follows
G
v
w
arsquo
brsquo
Hv
Hw
a
brsquo
G Z H
a
b
i
j
arsquoiirsquo
bj
jrsquo
Zig-Zag Product
Lemma
If G is an (NDλ) graph and H is a (Dd) graph
211 (G z H ) 1 1
2
The zig-zag product doesnrsquot hurt the spectral gap too badly
22 2 2 21 1last week we saw (G z H ) 1 1 4
2 2
Question Is a connected component in G a connected component in G z H
Technicalities
Rotation Map for Powering
u w
v
G
3
12 5
8
G
G
Rot u3 v12
Rot v5 w8
u w
G2
2GRot u 35 w 812
35812
u whellipa1 a2 ak
b1b(k-1)bk
G
G 1 1
G k k
Rot ua vb
Rot v a wb
u wa1ak
bkb1
Gk
k 1 2 k k k 1 1GRot u a a a w b b b
Rotation Map for ig ag
Hw
(wbrsquo) (wb)
G
v
w
arsquo
brsquo
Hv
(va) (varsquo)i irsquo
j jrsquo
Rot ((va) (ij)) = zG H
H
G
H
wb j i where
a i Rot a i
wb Rot va
b j Rot b j
The Actual Construction
Show a transformation that turns every connected component of a graph into an expander
ButNot any graph but a D16 regular graph
How to construct such a graph - later
Main Transformation
0
8
i i 1
G G
G G z H
Gi is a D16 regular graph with N(D16)i vertices
On input G and H where G is a D16 regular graph on N vertices and H is a D-regular graph on D16 vertices
define GH G where O log N
Technical Lemma
For D-reg connected non-bipartite G on [N]
Proof
2 GD
2D
2
1G 1
DN
2
1 2
2
min
N
S V S
E
N
S
SG
SG
N
2
4not normalized D
N 2 O 1
2 2
O 1 O 1normalized 1 G G 1
N N
Details
bullSet l to be the smallest integer st If D is constant then this number is O(logN)
bullTransforming the entire graph is equivalent to transforming each connected component separately
2
2
1 11DN 2
More Details
S1
S2
S3
S1
S2
S3
Why
Show that this is true for a single iteration
1
m
S
S
0
0
Adjacency matrix sorted by connected components
Both powering and zig zag maintain the block structure
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
Zig Zag Product
If G is a D-regular graph with N vertices and H is a d-regular graph with D vertices replace each v in G with a copy of H Hv Our new graph has [N]x[D] vertices
H
Part of G
v is now Hv
v
Zig-Zag ProductThe resulting graph is a d2 regular
graph with edges as follows
G
v
w
arsquo
brsquo
Hv
Hw
a
brsquo
G Z H
a
b
i
j
arsquoiirsquo
bj
jrsquo
Zig-Zag Product
Lemma
If G is an (NDλ) graph and H is a (Dd) graph
211 (G z H ) 1 1
2
The zig-zag product doesnrsquot hurt the spectral gap too badly
22 2 2 21 1last week we saw (G z H ) 1 1 4
2 2
Question Is a connected component in G a connected component in G z H
Technicalities
Rotation Map for Powering
u w
v
G
3
12 5
8
G
G
Rot u3 v12
Rot v5 w8
u w
G2
2GRot u 35 w 812
35812
u whellipa1 a2 ak
b1b(k-1)bk
G
G 1 1
G k k
Rot ua vb
Rot v a wb
u wa1ak
bkb1
Gk
k 1 2 k k k 1 1GRot u a a a w b b b
Rotation Map for ig ag
Hw
(wbrsquo) (wb)
G
v
w
arsquo
brsquo
Hv
(va) (varsquo)i irsquo
j jrsquo
Rot ((va) (ij)) = zG H
H
G
H
wb j i where
a i Rot a i
wb Rot va
b j Rot b j
The Actual Construction
Show a transformation that turns every connected component of a graph into an expander
ButNot any graph but a D16 regular graph
How to construct such a graph - later
Main Transformation
0
8
i i 1
G G
G G z H
Gi is a D16 regular graph with N(D16)i vertices
On input G and H where G is a D16 regular graph on N vertices and H is a D-regular graph on D16 vertices
define GH G where O log N
Technical Lemma
For D-reg connected non-bipartite G on [N]
Proof
2 GD
2D
2
1G 1
DN
2
1 2
2
min
N
S V S
E
N
S
SG
SG
N
2
4not normalized D
N 2 O 1
2 2
O 1 O 1normalized 1 G G 1
N N
Details
bullSet l to be the smallest integer st If D is constant then this number is O(logN)
bullTransforming the entire graph is equivalent to transforming each connected component separately
2
2
1 11DN 2
More Details
S1
S2
S3
S1
S2
S3
Why
Show that this is true for a single iteration
1
m
S
S
0
0
Adjacency matrix sorted by connected components
Both powering and zig zag maintain the block structure
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
Zig-Zag ProductThe resulting graph is a d2 regular
graph with edges as follows
G
v
w
arsquo
brsquo
Hv
Hw
a
brsquo
G Z H
a
b
i
j
arsquoiirsquo
bj
jrsquo
Zig-Zag Product
Lemma
If G is an (NDλ) graph and H is a (Dd) graph
211 (G z H ) 1 1
2
The zig-zag product doesnrsquot hurt the spectral gap too badly
22 2 2 21 1last week we saw (G z H ) 1 1 4
2 2
Question Is a connected component in G a connected component in G z H
Technicalities
Rotation Map for Powering
u w
v
G
3
12 5
8
G
G
Rot u3 v12
Rot v5 w8
u w
G2
2GRot u 35 w 812
35812
u whellipa1 a2 ak
b1b(k-1)bk
G
G 1 1
G k k
Rot ua vb
Rot v a wb
u wa1ak
bkb1
Gk
k 1 2 k k k 1 1GRot u a a a w b b b
Rotation Map for ig ag
Hw
(wbrsquo) (wb)
G
v
w
arsquo
brsquo
Hv
(va) (varsquo)i irsquo
j jrsquo
Rot ((va) (ij)) = zG H
H
G
H
wb j i where
a i Rot a i
wb Rot va
b j Rot b j
The Actual Construction
Show a transformation that turns every connected component of a graph into an expander
ButNot any graph but a D16 regular graph
How to construct such a graph - later
Main Transformation
0
8
i i 1
G G
G G z H
Gi is a D16 regular graph with N(D16)i vertices
On input G and H where G is a D16 regular graph on N vertices and H is a D-regular graph on D16 vertices
define GH G where O log N
Technical Lemma
For D-reg connected non-bipartite G on [N]
Proof
2 GD
2D
2
1G 1
DN
2
1 2
2
min
N
S V S
E
N
S
SG
SG
N
2
4not normalized D
N 2 O 1
2 2
O 1 O 1normalized 1 G G 1
N N
Details
bullSet l to be the smallest integer st If D is constant then this number is O(logN)
bullTransforming the entire graph is equivalent to transforming each connected component separately
2
2
1 11DN 2
More Details
S1
S2
S3
S1
S2
S3
Why
Show that this is true for a single iteration
1
m
S
S
0
0
Adjacency matrix sorted by connected components
Both powering and zig zag maintain the block structure
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
Zig-Zag Product
Lemma
If G is an (NDλ) graph and H is a (Dd) graph
211 (G z H ) 1 1
2
The zig-zag product doesnrsquot hurt the spectral gap too badly
22 2 2 21 1last week we saw (G z H ) 1 1 4
2 2
Question Is a connected component in G a connected component in G z H
Technicalities
Rotation Map for Powering
u w
v
G
3
12 5
8
G
G
Rot u3 v12
Rot v5 w8
u w
G2
2GRot u 35 w 812
35812
u whellipa1 a2 ak
b1b(k-1)bk
G
G 1 1
G k k
Rot ua vb
Rot v a wb
u wa1ak
bkb1
Gk
k 1 2 k k k 1 1GRot u a a a w b b b
Rotation Map for ig ag
Hw
(wbrsquo) (wb)
G
v
w
arsquo
brsquo
Hv
(va) (varsquo)i irsquo
j jrsquo
Rot ((va) (ij)) = zG H
H
G
H
wb j i where
a i Rot a i
wb Rot va
b j Rot b j
The Actual Construction
Show a transformation that turns every connected component of a graph into an expander
ButNot any graph but a D16 regular graph
How to construct such a graph - later
Main Transformation
0
8
i i 1
G G
G G z H
Gi is a D16 regular graph with N(D16)i vertices
On input G and H where G is a D16 regular graph on N vertices and H is a D-regular graph on D16 vertices
define GH G where O log N
Technical Lemma
For D-reg connected non-bipartite G on [N]
Proof
2 GD
2D
2
1G 1
DN
2
1 2
2
min
N
S V S
E
N
S
SG
SG
N
2
4not normalized D
N 2 O 1
2 2
O 1 O 1normalized 1 G G 1
N N
Details
bullSet l to be the smallest integer st If D is constant then this number is O(logN)
bullTransforming the entire graph is equivalent to transforming each connected component separately
2
2
1 11DN 2
More Details
S1
S2
S3
S1
S2
S3
Why
Show that this is true for a single iteration
1
m
S
S
0
0
Adjacency matrix sorted by connected components
Both powering and zig zag maintain the block structure
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
Question Is a connected component in G a connected component in G z H
Technicalities
Rotation Map for Powering
u w
v
G
3
12 5
8
G
G
Rot u3 v12
Rot v5 w8
u w
G2
2GRot u 35 w 812
35812
u whellipa1 a2 ak
b1b(k-1)bk
G
G 1 1
G k k
Rot ua vb
Rot v a wb
u wa1ak
bkb1
Gk
k 1 2 k k k 1 1GRot u a a a w b b b
Rotation Map for ig ag
Hw
(wbrsquo) (wb)
G
v
w
arsquo
brsquo
Hv
(va) (varsquo)i irsquo
j jrsquo
Rot ((va) (ij)) = zG H
H
G
H
wb j i where
a i Rot a i
wb Rot va
b j Rot b j
The Actual Construction
Show a transformation that turns every connected component of a graph into an expander
ButNot any graph but a D16 regular graph
How to construct such a graph - later
Main Transformation
0
8
i i 1
G G
G G z H
Gi is a D16 regular graph with N(D16)i vertices
On input G and H where G is a D16 regular graph on N vertices and H is a D-regular graph on D16 vertices
define GH G where O log N
Technical Lemma
For D-reg connected non-bipartite G on [N]
Proof
2 GD
2D
2
1G 1
DN
2
1 2
2
min
N
S V S
E
N
S
SG
SG
N
2
4not normalized D
N 2 O 1
2 2
O 1 O 1normalized 1 G G 1
N N
Details
bullSet l to be the smallest integer st If D is constant then this number is O(logN)
bullTransforming the entire graph is equivalent to transforming each connected component separately
2
2
1 11DN 2
More Details
S1
S2
S3
S1
S2
S3
Why
Show that this is true for a single iteration
1
m
S
S
0
0
Adjacency matrix sorted by connected components
Both powering and zig zag maintain the block structure
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
Technicalities
Rotation Map for Powering
u w
v
G
3
12 5
8
G
G
Rot u3 v12
Rot v5 w8
u w
G2
2GRot u 35 w 812
35812
u whellipa1 a2 ak
b1b(k-1)bk
G
G 1 1
G k k
Rot ua vb
Rot v a wb
u wa1ak
bkb1
Gk
k 1 2 k k k 1 1GRot u a a a w b b b
Rotation Map for ig ag
Hw
(wbrsquo) (wb)
G
v
w
arsquo
brsquo
Hv
(va) (varsquo)i irsquo
j jrsquo
Rot ((va) (ij)) = zG H
H
G
H
wb j i where
a i Rot a i
wb Rot va
b j Rot b j
The Actual Construction
Show a transformation that turns every connected component of a graph into an expander
ButNot any graph but a D16 regular graph
How to construct such a graph - later
Main Transformation
0
8
i i 1
G G
G G z H
Gi is a D16 regular graph with N(D16)i vertices
On input G and H where G is a D16 regular graph on N vertices and H is a D-regular graph on D16 vertices
define GH G where O log N
Technical Lemma
For D-reg connected non-bipartite G on [N]
Proof
2 GD
2D
2
1G 1
DN
2
1 2
2
min
N
S V S
E
N
S
SG
SG
N
2
4not normalized D
N 2 O 1
2 2
O 1 O 1normalized 1 G G 1
N N
Details
bullSet l to be the smallest integer st If D is constant then this number is O(logN)
bullTransforming the entire graph is equivalent to transforming each connected component separately
2
2
1 11DN 2
More Details
S1
S2
S3
S1
S2
S3
Why
Show that this is true for a single iteration
1
m
S
S
0
0
Adjacency matrix sorted by connected components
Both powering and zig zag maintain the block structure
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
Rotation Map for Powering
u w
v
G
3
12 5
8
G
G
Rot u3 v12
Rot v5 w8
u w
G2
2GRot u 35 w 812
35812
u whellipa1 a2 ak
b1b(k-1)bk
G
G 1 1
G k k
Rot ua vb
Rot v a wb
u wa1ak
bkb1
Gk
k 1 2 k k k 1 1GRot u a a a w b b b
Rotation Map for ig ag
Hw
(wbrsquo) (wb)
G
v
w
arsquo
brsquo
Hv
(va) (varsquo)i irsquo
j jrsquo
Rot ((va) (ij)) = zG H
H
G
H
wb j i where
a i Rot a i
wb Rot va
b j Rot b j
The Actual Construction
Show a transformation that turns every connected component of a graph into an expander
ButNot any graph but a D16 regular graph
How to construct such a graph - later
Main Transformation
0
8
i i 1
G G
G G z H
Gi is a D16 regular graph with N(D16)i vertices
On input G and H where G is a D16 regular graph on N vertices and H is a D-regular graph on D16 vertices
define GH G where O log N
Technical Lemma
For D-reg connected non-bipartite G on [N]
Proof
2 GD
2D
2
1G 1
DN
2
1 2
2
min
N
S V S
E
N
S
SG
SG
N
2
4not normalized D
N 2 O 1
2 2
O 1 O 1normalized 1 G G 1
N N
Details
bullSet l to be the smallest integer st If D is constant then this number is O(logN)
bullTransforming the entire graph is equivalent to transforming each connected component separately
2
2
1 11DN 2
More Details
S1
S2
S3
S1
S2
S3
Why
Show that this is true for a single iteration
1
m
S
S
0
0
Adjacency matrix sorted by connected components
Both powering and zig zag maintain the block structure
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
Rotation Map for ig ag
Hw
(wbrsquo) (wb)
G
v
w
arsquo
brsquo
Hv
(va) (varsquo)i irsquo
j jrsquo
Rot ((va) (ij)) = zG H
H
G
H
wb j i where
a i Rot a i
wb Rot va
b j Rot b j
The Actual Construction
Show a transformation that turns every connected component of a graph into an expander
ButNot any graph but a D16 regular graph
How to construct such a graph - later
Main Transformation
0
8
i i 1
G G
G G z H
Gi is a D16 regular graph with N(D16)i vertices
On input G and H where G is a D16 regular graph on N vertices and H is a D-regular graph on D16 vertices
define GH G where O log N
Technical Lemma
For D-reg connected non-bipartite G on [N]
Proof
2 GD
2D
2
1G 1
DN
2
1 2
2
min
N
S V S
E
N
S
SG
SG
N
2
4not normalized D
N 2 O 1
2 2
O 1 O 1normalized 1 G G 1
N N
Details
bullSet l to be the smallest integer st If D is constant then this number is O(logN)
bullTransforming the entire graph is equivalent to transforming each connected component separately
2
2
1 11DN 2
More Details
S1
S2
S3
S1
S2
S3
Why
Show that this is true for a single iteration
1
m
S
S
0
0
Adjacency matrix sorted by connected components
Both powering and zig zag maintain the block structure
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
The Actual Construction
Show a transformation that turns every connected component of a graph into an expander
ButNot any graph but a D16 regular graph
How to construct such a graph - later
Main Transformation
0
8
i i 1
G G
G G z H
Gi is a D16 regular graph with N(D16)i vertices
On input G and H where G is a D16 regular graph on N vertices and H is a D-regular graph on D16 vertices
define GH G where O log N
Technical Lemma
For D-reg connected non-bipartite G on [N]
Proof
2 GD
2D
2
1G 1
DN
2
1 2
2
min
N
S V S
E
N
S
SG
SG
N
2
4not normalized D
N 2 O 1
2 2
O 1 O 1normalized 1 G G 1
N N
Details
bullSet l to be the smallest integer st If D is constant then this number is O(logN)
bullTransforming the entire graph is equivalent to transforming each connected component separately
2
2
1 11DN 2
More Details
S1
S2
S3
S1
S2
S3
Why
Show that this is true for a single iteration
1
m
S
S
0
0
Adjacency matrix sorted by connected components
Both powering and zig zag maintain the block structure
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
Main Transformation
0
8
i i 1
G G
G G z H
Gi is a D16 regular graph with N(D16)i vertices
On input G and H where G is a D16 regular graph on N vertices and H is a D-regular graph on D16 vertices
define GH G where O log N
Technical Lemma
For D-reg connected non-bipartite G on [N]
Proof
2 GD
2D
2
1G 1
DN
2
1 2
2
min
N
S V S
E
N
S
SG
SG
N
2
4not normalized D
N 2 O 1
2 2
O 1 O 1normalized 1 G G 1
N N
Details
bullSet l to be the smallest integer st If D is constant then this number is O(logN)
bullTransforming the entire graph is equivalent to transforming each connected component separately
2
2
1 11DN 2
More Details
S1
S2
S3
S1
S2
S3
Why
Show that this is true for a single iteration
1
m
S
S
0
0
Adjacency matrix sorted by connected components
Both powering and zig zag maintain the block structure
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
Technical Lemma
For D-reg connected non-bipartite G on [N]
Proof
2 GD
2D
2
1G 1
DN
2
1 2
2
min
N
S V S
E
N
S
SG
SG
N
2
4not normalized D
N 2 O 1
2 2
O 1 O 1normalized 1 G G 1
N N
Details
bullSet l to be the smallest integer st If D is constant then this number is O(logN)
bullTransforming the entire graph is equivalent to transforming each connected component separately
2
2
1 11DN 2
More Details
S1
S2
S3
S1
S2
S3
Why
Show that this is true for a single iteration
1
m
S
S
0
0
Adjacency matrix sorted by connected components
Both powering and zig zag maintain the block structure
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
Details
bullSet l to be the smallest integer st If D is constant then this number is O(logN)
bullTransforming the entire graph is equivalent to transforming each connected component separately
2
2
1 11DN 2
More Details
S1
S2
S3
S1
S2
S3
Why
Show that this is true for a single iteration
1
m
S
S
0
0
Adjacency matrix sorted by connected components
Both powering and zig zag maintain the block structure
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
More Details
S1
S2
S3
S1
S2
S3
Why
Show that this is true for a single iteration
1
m
S
S
0
0
Adjacency matrix sorted by connected components
Both powering and zig zag maintain the block structure
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
Why
Show that this is true for a single iteration
1
m
S
S
0
0
Adjacency matrix sorted by connected components
Both powering and zig zag maintain the block structure
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
Why is this an expander
G and H are inputs of above If and G is connected and non-bipartite then
Which means that the output of is indeed an expander
H 1 2
GH 1 2
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
Proof
G0=G connected and non-bipartite
Itrsquos enough to show and from the lemma we get
l2 N2 21 1 DN 1 1 DN 1 2
2
i i 1i 0 G max G 1 2
H 1 2
i 1 i 1 i 1G z H 1 38 1 G 1 1 3 1 G
20G 1 1 DN
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
Proof Continued
Recall if G = (NDλ) then Gt = (NDtλt) =We can bound λ(Gi) by
For each i one of two cases occurs
Otherwise itrsquos always true that
8
i 11 1 3 1 G
8
i 1 i
1 5 1G G
2 6 2
41 1 3 1 x x
4 2
i 1 i 1 i i 11 1 3 1 G G G G
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
What do we want from the expander graph Grsquo
1 There is an s-t path in G iff there is an srsquo-trsquo path in Grsquo
2 Each connected component is an expander
3 Construction in Log-Space
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
Log Space Construction
Prove that for any D can be calculated in space O(log(N))
RotG RotHInput Tape
Output Tape 16 16G
edge numbervertex in G
v a Rot v a | v N D a D
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
The Work Tape
8i i 1G G z H
16 16 16
1
2
1 2 1Vertex in G vertex in H vertex in H vertex in H edge in G
D D D
Vertex in G
Vertx in G
Vertex in G
v a a a a
v a 1 2 16k k k
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
A step in H
1 H 1 1a k Rot a k a k
Use the last vertex of H and the first instruction
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Vertex in G
New vertex in HD
v a a a aa
This is the direction
61 2 1 k kk
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
A step in Gl-1
bull Use the same variables for the recursion
11 2 1 G 1 2 1va a a Rot va a a a
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
New Vertex in G
1edge in Gnew vertex in H
Vertex n
G
D
i
v a a a a a
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
Another Step in H
2 H 2a k Rot a k
16 16
1
16
1 2 1Vertex in G vertex in H vertex in H
D D
Vertex in G
1edge in G
Ve
New vertex i
rtex i
n H
n
D
G
v a a a aa
The next instruction
21 6 1k kk
Use the next instruction and the new vertex to finish the zig zag
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
All Together
1 2 3
Repeat 8 times to get powering
1 H 1 1a k Rot a k a k
11 2 1 G 1 2 1va a a Rot va a a a
2 H 2a k Rot a k
8
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
Why is this LogSpace
IdeaAll evaluations are done in placeWe use the same l+1 variablesv O(logN)ai O(log(D16)) = constcounters O(logN)
O log N log N const O log O ogN l N
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
Piecing it together
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
Convert G into a
D16 regular graph
Transform into an expander graph with
Check for path between
(s1hellip1) and (t1hellip1)
Vertex v cycle length N Add self loops as needed
Vertex v cycle length N Add self loops as needed
8i i 1G G z H
Enumerate all Dl paths
Enumerate all Dl paths
O(logN)
O(logN)
O(logN)
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
To Conclude
Composition of a Constant number of logspace
machines is in logspaceWe decide USTCON in logspace
Recommended