Skip to main content
Log in

Depth-first search in directed planar graphs, revisited

  • Original Article
  • Published:
Acta Informatica Aims and scope Submit manuscript

Abstract

We present an algorithm for constructing a depth-first search tree in planar digraphs; the algorithm can be implemented in the complexity class \(\text{ AC}^1(\text{ UL }\cap \text{ co-UL})\), which is contained in \(\text{ AC}^2\). Prior to this (for more than a quarter-century), the fastest uniform deterministic parallel algorithm for this problem had a runtime of \(O(\log ^{10}n)\) (corresponding to the complexity class \(\text{ AC}^{10}\subseteq \text{ NC}^{11}\)). We also consider the problem of computing depth-first search trees in other classes of graphs and obtain additional new upper bounds.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14

Similar content being viewed by others

Notes

  1. An earlier version of this work claimed a stronger upper bound, but there was an error in one of the lemmas in that version [3].

  2. Let us give additional motivation for having a dynamically computed ordering on the neighbors of v. We will be considering a DAG whose vertices consist of strongly connected components (SCCs) of the original graph G. We will have already pre-computed several DFS trees of each SCC: one rooted at each node in the SCC. Our final DFS tree will consist of (a) one DFS tree for each SCC (where the root of the DFS tree for SCC C is some node \(r_C \in C\)) along with (b) a selected edge \((v_D,r_C)\) connecting any two SCCs D and C that are adjacent in the DFS tree of the DAG. But of course, to fully specify the DFS tree, we also need to have an ordering on the neighbors of each vertex. In practice, we will be using the (precomputed) DFS tree of D (rooted at \(r_D\)) to determine the order of neighbors of vertex D in the DAG (whose vertices are SCCs). The “lexicographically least” property of our DFS tree of the DAG depends only on the ordering of the neighbors (and not on the selection of the specific edge between vertices in the directed acyclic multigraph).

  3. In case a more detailed definition is necessary, here is what is meant by “the lexicographically least path from s to v.” Let p and \(p'\) be two paths from s to v. If p is shorter than \(p'\), then p precedes \(p'\) in the lexicographic ordering. If p and \(p'\) have the same length and are not equal, then they each start with s and agree up through some vertex x, and first differ at the next vertex. Let us say that p has the edge (xw) and \(p'\) has the edge \((x,w')\) The vertex x is entered via some edge e (where if \(x=s\), then e is the null edge). The neighbors of x are ordered according to f(xe). If w precedes \(w'\) in the ordering f(xe), then p precedes \(p'\) in the lexicographic ordering.

  4. This may seem counterintuitive. If \(C_v\) is not entirely red, then v participates in some red cycle containing edges not in \(C_v\). Whereas if \(C_v\) is all red, then v is not connected to other red parts of G, and thus we color it white.

  5. The interior of a cycle is the subgraph of G induced on the vertices that are embedded inside C, but not on C.

  6. Notice that here we explicitly allow \(k = 1\) so that \(v_1 = v_k\).

References

  1. Aggarwal, A., Anderson, R.J., Kao, M.-Y.: Parallel depth-first search in general directed graphs. SIAM J. Comput. 19(2), 397–409 (1990). https://doi.org/10.1137/0219025

    Article  MathSciNet  MATH  Google Scholar 

  2. Allender, E., Barrington, D.A.M., Chakraborty, T., Datta, S., Roy, S.: Planar and grid graph reachability problems. Theory Comput. Syst. 45(4), 675–723 (2009). https://doi.org/10.1007/s00224-009-9172-z

    Article  MathSciNet  MATH  Google Scholar 

  3. Allender, E., Chauhan, A., Datta, S.: Depth-first search in directed graphs, revisited. Technical report TR20-074, Electronic Colloquium on Computational Complexity (ECCC) (2020)

  4. Allender, E., Chauhan, A., Datta, S., Mukherjee, A.: Planarity, exclusivity, and unambiguity. Electron. Colloq. Comput. Complex. ECCC 26, 39 (2019)

    Google Scholar 

  5. Allender, E., Lange, K.-J.: \( RUSPACE(\log n) \subseteq DSPACE (\log ^2 n/\log \log n)\). Theory Comput. Syst. 31(5), 539–550 (1998). https://doi.org/10.1007/s002240000102

    Article  MathSciNet  MATH  Google Scholar 

  6. Allender, E., Mahajan, M.: The complexity of planarity testing. Inf. Comput. 189, 117–134 (2004)

    Article  MathSciNet  Google Scholar 

  7. Allender, E., Reinhardt, K., Zhou, S.: Isolation, matching, and counting: uniform and nonuniform upper bounds. J. Comput. Syst. Sci. 59(2), 164–181 (1999)

    Article  MathSciNet  Google Scholar 

  8. Arora, S., Barak, B.: Computational Complexity, a Modern Approach. Cambridge University Press, Cambridge (2009)

    Book  Google Scholar 

  9. Asano, T., Izumi, T., Kiyomi, M., Konagaya, M., Ono, H., Otachi, Y., Schweitzer, P., Tarui, J., Uehara, R.: Depth-first search using \({O}(n)\) bits. In: Ahn, H.-K., Shin, C.-S. (eds.) Proceedings of the 25th International Symposium on Algorithms and Computation (ISAAC), volume 8889 of Lecture Notes in Computer Science, pp. 553–564. Springer, New York (2014). https://doi.org/10.1007/978-3-319-13075-0_44

    Chapter  Google Scholar 

  10. Di Battista, G., Eades, P., Tamassiao, R., Tollis, I.G.: Graph Drawing: Algorithms for the Visualization of Graphs. Prentice Hall, Hoboken (1998)

    Google Scholar 

  11. Borradaile, G., Klein, P.N.: An O(n log n) algorithm for maximum st-flow in a directed planar graph. J. ACM 56(2), 9:1-9:30 (2009). https://doi.org/10.1145/1502793.1502798

    Article  MATH  Google Scholar 

  12. Bourke, C., Tewari, R., Vinodchandran, N.V.: Directed planar reachability is in unambiguous log-space. TOCT 1(1), 4:1-4:17 (2009). https://doi.org/10.1145/1490270.1490274

    Article  MATH  Google Scholar 

  13. Buntrock, G., Jenner, B., Lange, K.-J., Rossmanith, P.: Unambiguity and fewness for logarithmic space. In: Budach, L. (ed.) Proceedings 8th Symposium on Fundamentals of Computation Theory (FCT), volume 529 of Lecture Notes in Computer Science, pp. 168–179. Springer, New York (1991). https://doi.org/10.1007/3-540-54458-5_61

    Chapter  Google Scholar 

  14. Cygan, M., Fomin, F.V., Kowalik, L., Lokshtanov, D., Marx, D., Pilipczuk, M., Pilipczuk, M., Saurabh, S.: Parameterized Algorithms, 1st edn. Springer, New York (2015)

    Book  Google Scholar 

  15. Datta, S., Limaye, N., Nimbhorkar, P., Thierauf, T., Wagner, F.: Planar graph isomorphism is in log-space. In: Proceedings of the 24th Annual IEEE Conference on Computational Complexity (CCC), pp. 203–214 (2009). https://doi.org/10.1109/CCC.2009.16

  16. de la Torre, P., Kruskal, C.P.: Fast parallel algorithms for all-sources lexicographic search and path-algebra problems. J. Algorithms 19(1), 1–24 (1995). https://doi.org/10.1006/jagm.1995.1025

    Article  MathSciNet  MATH  Google Scholar 

  17. de la Torre, P., Kruskal, C.P.: Polynomially improved efficiency for fast parallel single-source lexicographic depth-first search, breadth-first search, and topological-first search. Theory Comput. Syst. 34(4), 275–298 (2001). https://doi.org/10.1007/s00224-001-1008-4

    Article  MathSciNet  MATH  Google Scholar 

  18. Diestel, R.: Graph Theory, Volume 173 of Graduate Texts in Mathematics. Springer, New York (2016)

    Google Scholar 

  19. Elmasry, A., Hagerup, T., Kammer, F.: Space-efficient basic graph algorithms. In: Proceedings of the 32nd International Symposium on Theoretical Aspects of Computer Science (STACS), volume 30 of LIPIcs, pp. 288–301. Schloss Dagstuhl - Leibniz-Zentrum fur Informatik (2015). https://doi.org/10.4230/LIPIcs.STACS.2015.288

  20. Fernau, H., Lange, K.-J., Reinhardt, K.: Advocating ownership. In: Chandru, V., Vinay, V. (eds.) 16th Foundations of Software Technology and Theoretical Computer Science (FSTTCS), volume 1180 of Lecture Notes in Computer Science, pp. 286–297. Springer, New York (1996). https://doi.org/10.1007/3-540-62034-6_57

    Chapter  Google Scholar 

  21. Hagerup, T.: Planar depth-first search in O(log \(n\)) parallel time. SIAM J. Comput. 19(4), 678–704 (1990). https://doi.org/10.1137/0219047

    Article  MathSciNet  MATH  Google Scholar 

  22. Hagerup, T.: Space-efficient DFS and applications to connectivity problems: simpler, leaner, faster. Algorithmica 82(4), 1033–1056 (2020). https://doi.org/10.1007/s00453-019-00629-x

    Article  MathSciNet  MATH  Google Scholar 

  23. Izumi, T., Otachi, Y.: Sublinear-space lexicographic depth-first search for bounded treewidth graphs and planar graphs. In Czumaj, A., Dawar, A., Merelli, E. (eds.), Proceedings of the 47th International Colloquium on Automata, Languages and Programming (ICALP), volume 168 of LIPIcs, pp. 67:1–67:17. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2020). https://doi.org/10.4230/LIPIcs.ICALP.2020.67

  24. Jenner, B., Kirsig, B.: Alternierung und Logarithmischer Platz. Dissertation, Universität Hamburg (1989)

  25. Jenner, B., Kirsig, B., Lange, K.-J.: The logarithmic alternation hierarchy collapses: a \(2^l\) = a\(\pi _2^l\). Inf. Comput. 80(3), 269–287 (1989). https://doi.org/10.1016/0890-5401(89)90012-6

    Article  MATH  Google Scholar 

  26. Kao, M.-Y.: Linear-processor NC algorithms for planar directed graphs I: strongly connected components. SIAM J. Comput. 22(3), 431–459 (1993). https://doi.org/10.1137/0222032

    Article  MathSciNet  MATH  Google Scholar 

  27. Kao, M.-Y.: Planar strong connectivity helps in parallel depth-first search. SIAM J. Comput. 24(1), 46–62 (1995). https://doi.org/10.1137/S0097539792227077

    Article  MathSciNet  MATH  Google Scholar 

  28. Kao, M.-Y., Klein, P.N.: Towards overcoming the transitive-closure bottleneck: efficient parallel algorithms for planar digraphs. J. Comput. Syst. Sci. 47(3), 459–500 (1993). https://doi.org/10.1016/0022-0000(93)90042-U

    Article  MathSciNet  MATH  Google Scholar 

  29. Kaplan, H., Nussbaum, Y.: Maximum flow in directed planar graphs with vertex capacities. Algorithmica 61(1), 174–189 (2011). https://doi.org/10.1007/s00453-010-9436-7

    Article  MathSciNet  MATH  Google Scholar 

  30. Lange, K.-J.: Unambiguity of circuits. Theor. Comput. Sci. 107(1), 77–94 (1993). https://doi.org/10.1016/0304-3975(93)90255-R

    Article  MathSciNet  MATH  Google Scholar 

  31. Lange, K.-J.: An unambiguous class possessing a complete set. In: Reischuk, R., Morvan, M. (eds.) 14th Annual Symposium on Theoretical Aspects of Computer (STACS), volume 1200 of Lecture Notes in Computer Science, pp. 339–350. Springer, New York (1997). https://doi.org/10.1007/BFb0023471

    Chapter  Google Scholar 

  32. Lange, K.-J., Rossmanith, P.: Characterizing unambiguous augmented pushdown automata by circuits. In: Rovan, B. (ed.), Proceedings of the Mathematical Foundations of Computer Science (MFCS), volume 452 of Lecture Notes in Computer Science, pp. 399–406. Springer (1990). https://doi.org/10.1007/BFb0029635

  33. Naumov, M., Vrielink, A., Garland, M.: Parallel depth-first search for directed acyclic graphs. In: Proceedings of the 7th Workshop on Irregular Applications: Architectures and Algorithms, pp. 4:1–4:8 (2017). https://doi.org/10.1145/3149704.3149764

  34. John, H.R.: Depth-first search is inherently sequential. Inf. Process. Lett. 20(5), 229–234 (1985). https://doi.org/10.1016/0020-0190(85)90024-9

    Article  MathSciNet  MATH  Google Scholar 

  35. Reingold, O.: Undirected connectivity in log-space. J. ACM 55(4), 45 (2008)

    Article  MathSciNet  Google Scholar 

  36. Reinhardt, K., Allender, E.: Making nondeterminism unambiguous. SIAM J. Comput. 29(4), 1118–1131 (2000). https://doi.org/10.1137/S0097539798339041

    Article  MathSciNet  MATH  Google Scholar 

  37. Tantau, T.: Logspace optimization problems and their approximability properties. Theory Comput. Syst. 41(2), 327–350 (2007). https://doi.org/10.1007/s00224-007-2011-1

    Article  MathSciNet  MATH  Google Scholar 

  38. Tewari, R., Vinodchandran, N.V.: Green’s theorem and isolation in planar graphs. Inf. Comput. 215, 1–7 (2012). https://doi.org/10.1016/j.ic.2012.03.002

    Article  MathSciNet  MATH  Google Scholar 

  39. Thierauf, T., Wagner, F.: The isomorphism problem for planar 3-connected graphs is in unambiguous logspace. Theory Comput. Syst. 47(3), 655–673 (2010). https://doi.org/10.1007/s00224-009-9188-4

    Article  MathSciNet  MATH  Google Scholar 

  40. Tutte, W.T.: Separation of vertices by a circuit. Discrete Math. 12(2), 173–184 (1975)

    Article  MathSciNet  Google Scholar 

  41. Vollmer, H.: Introduction to Circuit Complexity: A Uniform Approach. Springer, New York (1999). https://doi.org/10.1007/978-3-662-03927-4

    Book  MATH  Google Scholar 

Download references

Acknowledgements

We thank the anonymous referees for their helpful and insightful suggestions, which improved the presentation.

Funding

This study was supported in part by NSF Grants CCF-1909216 and CCF-1909683, partially supported by a grant from Infosys foundation and TCS PhD fellowship and partially supported by a grant from Infosys foundation and SERB-MATRICS Grant MTR/2017/000480.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Eric Allender.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Allender, E., Chauhan, A. & Datta, S. Depth-first search in directed planar graphs, revisited. Acta Informatica 59, 289–319 (2022). https://doi.org/10.1007/s00236-022-00425-1

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00236-022-00425-1

Navigation