Skip to main content

Depth-First Search Using \(O(n)\) Bits

  • Conference paper
  • First Online:
Algorithms and Computation (ISAAC 2014)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 8889))

Included in the following conference series:

Abstract

We provide algorithms performing Depth-First Search (DFS) on a directed or undirected graph with \(n\) vertices and \(m\) edges using only \(O(n)\) bits. One algorithm uses \(O(n)\) bits and runs in \(O(m \log n)\) time. Another algorithm uses \(n+o(n)\) bits and runs in polynomial time. Furthermore, we show that DFS on a directed acyclic graph can be done in space \(n/2^{\varOmega (\sqrt{\log n})}\) and in polynomial time, and we also give a simple linear-time \(O(\log n)\)-space algorithm for the depth-first traversal of an undirected tree. Finally, we also show that for a graph having an \(O(1)\)-size feedback set, DFS can be done in \(O(\log n)\) space. Our algorithms are based on the analysis of properties of DFS and applications of the \(s\)-\(t\) connectivity algorithms due to Reingold and Barnes et al., both of which run in sublinear space.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

  1. Aggarwal, A., Anderson, R.: A Random NC Algorithm for Depth-First Search. Combinatorica 8(1), 1–12 (1988)

    Article  MATH  MathSciNet  Google Scholar 

  2. Anderson, R., Mayr, E.: Parallelism and the Maximal Path Problem. Information Processing Letters 24(2), 121–126 (1987)

    Article  MATH  MathSciNet  Google Scholar 

  3. Asano, T., Elmasry, A., Katajainen, J.: Priority Queues and Sorting for Read-Only Data. In: Chan, T.-H.H., Lau, L.C., Trevisan, L. (eds.) TAMC 2013. LNCS, vol. 7876, pp. 32–41. Springer, Heidelberg (2013)

    Chapter  Google Scholar 

  4. Asano, T., Kirkpatrick, D.: Time-Space Tradeoffs for All-Nearest-Larger-Neighbors Problems. In: Dehne, F., Solis-Oba, R., Sack, J.-R. (eds.) WADS 2013. LNCS, vol. 8037, pp. 61–72. Springer, Heidelberg (2013)

    Chapter  Google Scholar 

  5. Asano, T., Kirkpatrick, D., Nakagawa, K., Watanabe, O.: \(\tilde{O}(\sqrt{n})\)-Space and Polynomial-time Algorithm for the Planar Directed Graph Reachability Problem. ECCC Report 71 (2014); also. In: Ésik, Z., Csuhaj-Varjú, E., Dietzfelbinger, M. (eds.) MFCS 2014, Part II. LNCS, vol. 8635, pp. 45–56. Springer, Heidelberg (2014)

    Google Scholar 

  6. Barnes, G., Buss, J., Ruzzo, W., Schieber, B.: A Sublinear Space, Polynomial Time Algorithm for Directed \(s\)-\(t\) Connectivity. SIAM Journal of Computing 27(5), 1273–1282 (1998)

    Article  MATH  MathSciNet  Google Scholar 

  7. Elberfeld, M. Jakoby, A., Tantau, T.: Logspace Versions of the Theorems of Bodlaender and Courcelle. In: Proceedings of the 51st Annual IEEE Symposium on Foundations of Computer Science (FOCS 2010), pp. 143–152 (2010)

    Google Scholar 

  8. Elberfeld, M., Kawarabayashi, K.: Embedding and Canonizing Graphs of Bounded Genus in Logspace. In: Proceedings of the 46th Annual ACM Symposium on the Theory of Computing (STOC 2014), pp. 383–392 (2014)

    Google Scholar 

  9. Imai, T.: Polynomial-Time Memory Constrained Shortest Path Algorithms for Directed Graphs. In: Proceedings of the 12th Forum on Information Technology, vol. 1, pp. 9–16 (2013) (in Japanese)

    Google Scholar 

  10. Imai, T., Nakagawa, K., Pavan, A., Vinodchandran, N., Watanabe, O.: An \(O(n^{1/2+\epsilon })\)-Space and Polynomial-Time Algorithm for Directed Planar Reachability. In: Proceedings of 2013 IEEE Conference on Computational Complexity, pp. 277–286 (2013)

    Google Scholar 

  11. Konagaya, M., Asano, T.: Reporting All Segment Intersections Using an Arbitrary Sized Work Space. IEICE Transactions 96-A(6), 1066–1071 (2013)

    Google Scholar 

  12. Papadimitriou, C.: Computational complexity. Addison-Wesley (1994)

    Google Scholar 

  13. Reif, J.: Depth-First Search Is Inherently Sequential. Information Processing Letters 20(5), 229–234 (1985)

    Article  MATH  MathSciNet  Google Scholar 

  14. Reingold, O.: Undirected Connectivity in Log-Space. Journal of the ACM 55(4), 17:1–17:24 (2008)

    Google Scholar 

  15. Tarjan, R.: Depth-First Search and Linear Graph Algorithms. SIAM Journal on Computing 1(2), 146–160 (1972)

    Article  MATH  MathSciNet  Google Scholar 

  16. de la Tore, P., Kruskal, C.: Fast Parallel Algorithms for Lexicographic Search and Path-Algebra Problems. Journal of Algorithms 19, 1–24 (1995)

    Article  MathSciNet  Google Scholar 

  17. de la Tore, P., Kruskal, C.: Polynomially Improved Efficiency for Fast Parallel Single-Source Lexicographic Depth-First Search, Breadth-First Search, and Topological-First Search. Theory of Computing Systems 34, 275–298 (2001)

    Article  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Masashi Kiyomi .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer International Publishing Switzerland

About this paper

Cite this paper

Asano, T. et al. (2014). Depth-First Search Using \(O(n)\) Bits. In: Ahn, HK., Shin, CS. (eds) Algorithms and Computation. ISAAC 2014. Lecture Notes in Computer Science(), vol 8889. Springer, Cham. https://doi.org/10.1007/978-3-319-13075-0_44

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-13075-0_44

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-13074-3

  • Online ISBN: 978-3-319-13075-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics