On the Complexity of the St-Connectivity Problem
Total Page:16
File Type:pdf, Size:1020Kb
On the Complexity of the stConnectivity Problem by Chung Keung Po on A thesis submitted in conformity with the requirements for the degree of Do ctor of Philosophy Graduate Department of Computer Science University of Toronto c Copyright by Chung Keung Po on Abstract On the complexity of the stconnectivity problem Chung Keung Po on Do ctor of Philosophy Department of Computer Science University of Toronto The directed stconnectivity problem is fundamental to computer science There are many applications which require algorithms to solve the problem in small space and preferably in small time as well Furthermore its space and timespace complex ities are related to several longstanding op en problems in complexity theory Depth and breadthrst search are well known algorithms that solve the problem in optimal ie O n m time while using O n log n space where n and m are the numb er of no des and edges in the graph resp ectively It can also b e solved in O log n O log n space and time by Savitchs algorithm For space S b etween log n and O log n log nS n log n the b est running time is T mn due to Barnes et al Establishing matching lower b ounds on the Turing machine mo del has b een one of the ma jor challenges in complexity theory In this thesis we intro duce the natural structured NNJAG No denamed JAG mo del which is a generalization of Co ok and Racko s JAG Jumping Automa ton for Graphs mo del For the space complexity Co ok and Racko prove an log n log log n lower b ound on the JAG mo del This is extended to a ran domized JAG by Berman and Simon We further extend this to the probabilis tic NNJAG mo del For the timespace tradeo we prove an upp er b ound of T O log n log nS O n on a JAG via a simulation of the Barnes et al algorithm We p log n log nS log log n also prove a lower b ound of T nS log n on an NNJAG im proving the previous b ounds of T n S on NNJAGs by Edmonds and T n S log n on JAGs by Barnes and Edmonds Our result almost matches the Barnes et al algorithm and seems to suggest that stconnectivity cannot b e de termined in p olynomial time and p olylogarithmic space simultaneously For example i when the space is S n for any constant the NNJAG lower b ound implies a sup erp olynomial running time This lower b ound on timespace tradeo is joint work with Edmonds ii acknowledgement I would like to thank my sup ervisor Allan Boro din for his guidance and supp ort esp ecially during the last year of my PhD study I would also like to thank the professors the oce clerks and the graduate students in the Department of Computer Science who together provided such an enjoyable environment during my stay Among them I am esp ecially grateful to Je Edmonds who constantly help ed me along and who is also a coauthor of the result presented in Chapter Finally but not the least I thank my parents and family for their supp ort and I dedicated this b elated thesis to the memory of my father Wah Po on iii Contents Intro duction The imp ortance of stcon Previous results on random access machines Previous results on structured computation mo dels Contributions and organization of this thesis Mo dels of Computation The branching program mo del The JAG mo del The nonuniform mo del The uniform mo del The NNJAG mo del Comparisons among the mo dels Probabilistic NNJAGs Nondeterministic NNJAGs A Space Lower Bound The deterministic case The skinny trees Blo cks of p ebbles k computations Extension to probabilistic NNJAG with sided error iv Extension to probabilistic NNJAG with sided error A Timespace Upp er Bound The Barnes et al algorithm The mo died Savitch algorithm The mo died breadthrst search Simulation on an NNJAG Simulation on a JAG A Timespace Lower Bound Layered Graphs Recursive Layered Graphs Denition of Progress Viewing NNJAGs as Branching Programs Pro of Outline Collapsing an NNJAG Pro of of Main Lemma Bounding SUM The BranchingPro cess Game The EdgeCollision Game BranchingPro cess Game vs EdgeCollision Game Bounding SUM Probabilistic NNJAGs with sided error Future Work Variations of JAGsNNJAGs Finite Mo del Theory v Chapter Intro duction The imp ortance of stcon Given a directed graph G and two distinguished no des s and t in G the directed st connectivity problem stcon is to determine whether there is a directed path from s to t in G It is a fundamental problem in computer science b ecause it is the natural abstraction of many search problems In many applications eg in game searching program verication and some database applications the underlying search graph is exp onentially large compared with a machines memory Hence we need to nd algo rithms which require working space much less than the size of the graph Very often reducing the space blows up the running time b ecause recomputation is necessary Therefore a more ambitious goal is to nd an algorithm that runs in small time and space simultaneously These considerations lead to the following two questions Q How much space is necessary for solving stcon and Q Given a certain amount of space how fast can stcon b e solved The theory of computational complexity addresses these questions in a more gen eral setting Instead of studying individual problems we study classes of problems Some commonly used notation for denoting complexity classes is listed b elow DTIMEf n the class of problems solvable in O f n time using a deterministic O Turing machine In particular the class DTIMEn is denoted by P DSPACEf n the class of problems solvable in O f n space using a determin O istic Turing machine The class DSPACElog n and DSPACElog n are denoted by L and Polylogspace resp ectively NSPACEf n the class of problems solvable in O f n space using a nondeter ministic Turing machine The class NSPACElog n is denoted by NL DTISPf n g n the class of problems solvable in O f n time and O g n space O simultaneously using a deterministic Turing machine The class DTISPn O log n is denoted by SC With a prop er notion of problem reduction the complexity of a whole class of prob lems b oils down to the complexity of a prototypical problem in that class Such a problem is said to b e complete for the class under this typ e of reductions In this resp ect stcon has an added imp ortance b ecause it is complete for the complexity class NL under logspace reduction See Jon JLL for more problems complete for NL and AHV for the relation b etween NL and relational database theory Two ma jor op en problems concerning NL are Q Is NL L and Q Is N L S C Understanding the space complexity and timespace tradeo of stcon seems to b e the key to answering the ab ove questions For example proving that there is no deterministic O log n space algorithm for stcon would separate the classes L and NL On the other hand devising such an algorithm would show that NL L By a padding argument Sav such an algorithm would in fact imply that DSPACEf n NSPACEf n for any space constructible function f n log n O Similarly showing that there is no algorithm for stcon using n time and O log n space simultaneously would separate NL and SC while demonstrating such an algorithm would put NL inside SC As is well known stcon is in P Polylogspace Therefore proving that stcon is not in SC would also prove that SC ( P Polylogspace which is another longstanding conjecture in complexity theory Joh Previous results on random access machines On a determinstic random access machine depth and breadth rst search are well known algorithms that solve stcon in O n m time using O n log n space where n and m are the numb er of no des and edges resp ectively The running time is optimal b ecause at least n m time is needed to access every edge and every no de in the graph At the other extreme Savitchs algorithm Sav requires only O log n space which is currently the smallest space achievable The main drawback is however O log n that it takes time Nevertheless these two results imply that stcon is in P Polylogspace Tompa Tom shows that a certain natural approach repeated squaring for com puting stcon has no implementation which runs in p olynomial time and sublinear space simultaneously However Barnes et al BBRS construct an algorithm which p log n uses only n space which is sublinear while keeping p olynomial running time This shows that the rep eated squaring metho d is to o restricted Futhermore O log n log nS their algorithm implies a general timespace tradeo of T mn for log n S n log n Note that when the space is n for any constant O log n the running time is which is sup erp olynomial Therefore they still have not exhibited an SC typ e