Presentation is loading. Please wait.

Presentation is loading. Please wait.

STCON in Directed Unique-Path Graphs Sampath Kannan Sanjeev Khanna Sudeepa Roy University of Pennsylvania 1.

Similar presentations


Presentation on theme: "STCON in Directed Unique-Path Graphs Sampath Kannan Sanjeev Khanna Sudeepa Roy University of Pennsylvania 1."— Presentation transcript:

1 STCON in Directed Unique-Path Graphs Sampath Kannan Sanjeev Khanna Sudeepa Roy University of Pennsylvania 1

2 (Directed) st-connectivity (STCON) s t t 2 directed path from s to t in G?

3 Open Questions  O(log n) space algorithm for STCON? (L = NL!)  Time-space tradeoff analysis Known Results  NL-complete  O(n) space and O(m+n) time (BFS or DFS)  O(log 2 n) space and O(n log n ) time (Savitch)  USTCON  L (Reingold’04) Questions involving STCON 3

4 Time-Space Trade-off for STCON 4 Sublinear-space poly-time algorithm for STCON? Space (  )Time (  ) BFS/DFS Barnes et al ’98 ? Savitch O(n)O(m+n) n / 2  ( √ log n) poly-time O(n ε ), ε < 1poly-time O(log 2 n)O(n log n )

5 (Poly-time) STCON in Special Graphs s UL or Unambiguous Logspace Unique computation path from start to accepting configuration 5 Tree: O(log n)-spaceStrongUL: O(log 2 n / log log n)-space (AL’98)ReachUL: O(log 2 n / log log n)-space (AL’98) Can we allow some cycles reachable from s? Unique-Path Graphs

6 Back Edges, Forward Edges and Cross Edges s 6 Tree Edge Back Edge Forward Edge Cross Edge

7 At most one directed simple path from s to any vertex Unique-Path Graphs ss No forward edge or cross edge in DFS-tree from any vertex reachable from s v 7

8 Main Theorem In unique-path graphs, STCON is solvable in O(n ε /ε) space and n O(1/ε) time for any ε  (0, 1] Poly-time, O(n ε ) space algorithm for constant ε “Small-space implementation” of DFS 8

9 Space Requirement in Standard DFS Linear space needed to remember  where to backtrack to from a vertex  if a vertex has been already visited 9 Backtrack Step Discovery Step Goal: Implement “backtrack step” and “discovery step” in poly-time and sublinear space

10 Plan for Rest of the Talk … An O(√n)-space algorithm  Backtrack Step in O(√n) space  Discovery Step in O(√n) space Extension to O(n ε )-space algorithm Recognition of unique-path graphs 10

11 √n-bounded DFS Backtrack when length of exploration path > √n Visits all and only the vertices within √n distance O(√n)-space implementation in unique-path graphs 11

12 Landmark Vertices Vertices evenly spaced at √n distance from s along the current exploration path s = z 0 z1z1 z2z2 √n x 12 Can be stored in O(√n) space

13 Backtrack Step Backtrack(v) Z = last landmark vertex u = parent(v) iff v is not reachable from z in G – (u, v) by a √n-bounded DFS. IN(v) y x u y v x z u ≤ √n O(√n)-space implementation 13 s

14 Discovery Step discovery (u, v) ≡ (u, v) is a back edge do a √n-bounded DFS from v z i = highest indexed landmark vertex reached do a √n-bounded DFS from z i-1 (u, v) is a back edge iff v is reached before z i v u √n v O(√n)-space implementation z i-1 zizi 14 s

15 O(√n)-space O( n ε )-space No. of Landmark vertices Spacing between landmark vertices Backtrack and discovery steps O(n ε )-space Poly-time Algorithm 15 √n O(√n) nεnε n 1- ε Backtrack and discovery steps use reachability queries O(n ε )

16 O(n ε )-space Poly-time Algorithm Backtrack(x)  suppose z is the last landmark vertex on the exploration path to v.  for any u  IN(v), v is not reachable from z in G – (u, v) by a √n-bounded DFS iff u is parent of x y v x z u n 1- ε -bounded DFS (recursively) Example √n n 1- ε Reach(z, v, G–(u, v), n 1- ε )?Reach(s, t, G, n-1)? 16

17 O(n ε )-space Poly-time Algorithm O(m) calls to n 1- ε -bounded reachability queries T(n) ≤ cm T(n 1- ε ) + O(m+n) T(n) = n O(1/ε) O(n ε /ε) space 17

18 Other Results 18 Recognize unique-path graphs in poly-time and O(n ε ) space

19 Recognize Unique-Path Graphs Simpler Problem:  Either solve STCON correctly or report that the graph is not a unique-path graph 19 DFS from any vertex reachable from s does not produce any forward or cross edge

20 Solve STCON or Detect Violation Should be correct as long as it runs Should be poly-time  Ideally: should not revisit vertices  Even if revisits vertices poly-time should be enforced 20 Run previous algorithm as long as no forward or cross edge is detected √n-bounded DFS can be modified to work correctly

21 Detect Forward/Cross Edges 21 √n v u v z i-1 zizi ≤ √n Forward edges are easy to detect ‘Some’ cross edges are also easy to detect Other cross edges we cannot detect  They do not affect correctness  Run a clock to ensure poly-time > √n Can be extended further to recognize Unique-Path Graphs

22 22 Poly-log space poly-time algorithm for unique-path graphs? Poly-log space poly-time algorithm for other directed graphs?  O(log n)-space algorithm for regular directed graphs – RTV’06  O(log n)-space algorithm for single source multiple sink planar directed graphs – Allender et. al.’06 O(n ε )-space poly-time algorithm for general directed graphs? Open Problems

23 Thank You 23


Download ppt "STCON in Directed Unique-Path Graphs Sampath Kannan Sanjeev Khanna Sudeepa Roy University of Pennsylvania 1."

Similar presentations


Ads by Google