Skip to main content
Log in

I/O-Efficient Algorithms for Graphs of Bounded Treewidth

  • Published:
Algorithmica Aims and scope Submit manuscript

Abstract

We present an algorithm that takes \(\mathcal {O}(\mathrm {sort}(N))\) I/Os (sort(N)=Θ((N/(DB))log  M/B (N/B)) is the number of I/Os it takes to sort N data items) to compute a tree decomposition of width at most k, for any graph G of treewidth at most k and size N, where k is a constant. Given such a tree decomposition, we use a dynamic programming framework to solve a wide variety of problems on G in \(\mathcal {O}(N/(DB))\) I/Os, including the single-source shortest path problem and a number of problems that are NP-hard on general graphs. The tree decomposition can also be used to obtain an optimal separator decomposition of G. We use such a decomposition to perform depth-first search in G in  \(\mathcal {O}(N/(DB))\) I/Os.

As important tools that are used in the tree decomposition algorithm, we introduce flippable DAGs and present an algorithm that computes a perfect elimination ordering of a k-tree in \(\mathcal {O}(\mathrm {sort}(N))\) I/Os.

The second contribution of our paper, which is of independent interest, is a general and simple framework for obtaining I/O-efficient algorithms for a number of graph problems that can be solved using greedy algorithms in internal memory. We apply this framework in order to obtain an improved algorithm for finding a maximal matching and the first deterministic I/O-efficient algorithm for finding a maximal independent set of an arbitrary graph. Both algorithms take \(\mathcal {O}(\mathrm {sort}(|V|+|E|))\) I/Os. The maximal matching algorithm is used in the tree decomposition algorithm.

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.

Similar content being viewed by others

References

  1. Abello, J., Buchsbaum, A.L., Westbrook, J.: A functional approach to external graph algorithms. Algorithmica 32(3), 437–458 (2002)

    Article  MATH  MathSciNet  Google Scholar 

  2. Arge, L.: The buffer tree: a technique for designing batched external data structures. Algorithmica 37(1), 1–24 (2003)

    Article  MATH  MathSciNet  Google Scholar 

  3. Arge, L., Zeh, N.: I/O-efficient strong connectivity and depth-first search for directed planar graphs. In: Proceedings of the 44th IEEE Symposium on Foundations of Computer Science, pp. 261–270 (2003)

  4. Arge, L., Meyer, U., Toma, L., Zeh, N.: On external-memory planar depth first search. J. Graph Algorithms Appl. 7(2), 105–129 (2003)

    MATH  MathSciNet  Google Scholar 

  5. Arge, L., Toma, L., Zeh, N.: I/O-efficient algorithms for planar digraphs. In: Proceedings of the 15th ACM Symposium on Parallelism in Algorithms and Architectures, pp. 85–93 (2003)

  6. Arge, L., Brodal, G.S., Toma, L.: On external-memory MST, SSSP and multi-way planar graph separation. J. Algorithms 53(2), 186–206 (2004)

    Article  MATH  MathSciNet  Google Scholar 

  7. Arnborg, S., Proskurowski, A.: Linear time algorithms for NP-hard problems restricted to partial k-trees. Discrete Appl. Math. 23, 11–24 (1989)

    Article  MATH  MathSciNet  Google Scholar 

  8. Arnborg, S., Lagergren, J., Seese, D.: Easy problems for tree-decomposable graphs. J. Algorithms 12(2), 308–340 (1991)

    Article  MATH  MathSciNet  Google Scholar 

  9. Arnborg, S., Courcelle, B., Proskurowski, A., Seese, D.: An algebraic theory of graph reduction. J. ACM 40(5), 1134–1164 (1993), November

    Article  MATH  MathSciNet  Google Scholar 

  10. Bodlaender, H.L.: Dynamic programming on graphs with bounded treewidth. In: Proceedings of the 15th International Colloquium on Automata, Languages and Programming. Lecture Notes in Computer Science, vol. 317, pp. 105–118. Springer, New York (1988)

    Google Scholar 

  11. Bodlaender, H.L.: A linear time algorithm for finding tree-decompositions of small treewidth. SIAM J. Comput. 25, 1305–1317 (1996)

    Article  MATH  MathSciNet  Google Scholar 

  12. Bodlaender, H.L., Hagerup, T.: Parallel algorithms with optimal speedup for bounded treewidth. SIAM J. Comput. 27, 1725–1746 (1998)

    Article  MATH  MathSciNet  Google Scholar 

  13. Bodlaender, H.L., Kloks, T.: Efficient and constructive algorithms for the pathwidth and treewidth of graphs. J. Algorithms 21, 358–402 (1996)

    Article  MATH  MathSciNet  Google Scholar 

  14. Bodlaender, H.L., van Antwerpen-de Fluiter, B.: Parallel algorithms for series parallel graphs and graphs with treewidth two. Algorithmica 29, 543–559 (2001)

    Google Scholar 

  15. Broder, A.Z., Kumar, R., Maghoul, F., Raghavan, P., Rajagopalan, S., Stata, R., Tomkins, A., Wiener, J.L.: Graph structure in the web. Comput. Netw. 33(1–6), 309–320 (2000)

    Article  Google Scholar 

  16. Buchsbaum, A.L., Goldwasser, M., Venkatasubramanian, S., Westbrook, J.R.: On external memory graph traversal. In: Proceedings of the 11th ACM-SIAM Symposium on Discrete Algorithms, pp. 859–860 (2000)

  17. Chiang, Y.-J., Goodrich, M.T., Grove, E.F., Tamassia, R., Vengroff, D.E., Vitter, J.S.: External-memory graph algorithms. In: Proceedings of the 6th Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 139–149 (January 1995)

  18. Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 2nd edn. MIT Press, Cambridge (2001)

    MATH  Google Scholar 

  19. de Fluiter, B., Bodlaender, H.L.: Parallel algorithms for treewidth two. In: Proceedings of the 23rd International Workshop on Graph-Theoretic Concepts in Computer Science. Lecture Notes in Computer Science, vol. 1335, pp. 157–170. Springer, New York (1997)

    Chapter  Google Scholar 

  20. Dehne, F.K.H.A., Dittrich, W., Hutchinson, D.A.: Efficient external memory algorithms by simulating coarse-grained parallel algorithms. Algorithmica 36(2), 97–122 (2003)

    Article  MATH  MathSciNet  Google Scholar 

  21. Dirac, G.A.: On rigid circuit graphs. Abh. Math. Sem. Univ. Hamburg 25, 71–76 (1961)

    Article  MATH  MathSciNet  Google Scholar 

  22. Floyd, R.W.: Algorithm 97 (SHORTEST PATHS). Commun. ACM 5(6), 345 (1962)

    Article  Google Scholar 

  23. Harary, F.: Graph Theory. Addison-Wesley, Reading (1969)

    Google Scholar 

  24. Klein, P.N.: Efficient parallel algorithms for chordal graphs. SIAM J. Comput. 25(4), 797–827 (1996)

    Article  MATH  MathSciNet  Google Scholar 

  25. Kloks, T.: Treewidth: Computations and Approximations, Lecture Notes in Computer Science, vol. 842. Springer, New York (1994), June

    MATH  Google Scholar 

  26. Kumar, V., Schwabe, E.J.: Improved algorithms and data structures for solving graph problems in external memory. In: Proceedings of the 8th IEEE Symposium on Parallel and Distributed Processing, pp. 169–176 (October 1996)

  27. Lagergren, J.: Efficient parallel algorithms for tree-decomposition and related problems. In: Proceedings of the 30th Annual IEEE Symposium on Foundations of Computer Science, pp. 173–182 (1990)

  28. Maheshwari, A., Zeh, N.: I/O-optimal algorithms for planar graphs using separators. In: Proceedings of the 13th Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 372–381 (2002)

  29. Maheshwari, A., Zeh, N.: I/O-optimal algorithms for outerplanar graphs. J. Graph Algorithms Appl. 8(1), 47–87 (2004)

    MATH  MathSciNet  Google Scholar 

  30. Matoušek, J., Thomas, R.: Algorithms finding tree-decompositions of graphs. J. Algorithms 12, 1–22 (1991)

    Article  MATH  MathSciNet  Google Scholar 

  31. Mehlhorn, K., Meyer, U.: External-memory breadth-first search with sublinear I/O. In: Proceedings of the 10th Annual European Symposium on Algorithms. Lecture Notes in Computer Science, vol. 2461, pp. 723–735. Springer, New York (2002)

    Google Scholar 

  32. Meyer, U., Zeh, N.: I/O-efficient undirected shortest paths. In: Proceedings of the 11th Annual European Symposium on Algorithms. Lecture Notes in Computer Science, vol. 2832, pp. 434–445. Springer, New York (2003)

    Google Scholar 

  33. Meyer, U., Zeh, N.: I/o-efficient undirected shortest paths with unbounded edge lengths. In: Azar, Y., Erlebach, T. (eds.) ESA. Lecture Notes in Computer Science, vol. 4168, pp. 540–551. Springer, New York (2006)

    Google Scholar 

  34. Munagala, K., Ranade, A.: I/O-complexity of graph algorithms. In: Proceedings of the 10th Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 687–694 (January 1999)

  35. Paige, R., Tarjan, R.E.: Three partition refinement algorithms. SIAM J. Comput. 16(6), 973–989 (1987), December

    Article  MATH  MathSciNet  Google Scholar 

  36. Reed, B.: Finding approximate separators and computing treewidth quickly. In: Proceedings of the 24th Annual ACM Symposium on the Theory of Computing, pp. 221–228 (1992)

  37. Rose, D.J., Tarjan, R.E., Lueker, G.S.: Algorithmic aspects of vertex elimination on graphs. SIAM J. Comput. 5, 266–283 (1976)

    Article  MATH  MathSciNet  Google Scholar 

  38. Ruemmler, C., Wilkes, J.: An introduction to disk drive modeling. IEEE Comput. 27(3), 17–28 (1994)

    Google Scholar 

  39. Tarjan, R.E., Yannakakis, M.: Simple linear-time algorithms to test chordality of graphs, test acyclicity of hypergraphs, and selectively reduce acyclic hypergraphs. SIAM J. Comput. 13(3), 566–579 (1984), August

    Article  MATH  MathSciNet  Google Scholar 

  40. Tutte, W.T.: Graph Theory. Cambridge University Press, Cambridge (2001). First published by Addison-Wesley, 1984

    MATH  Google Scholar 

  41. Vitter, J.S.: External memory algorithms and data structures: dealing with massive data. ACM Comput. Surv. 33(2), 209–271 (2001)

    Article  Google Scholar 

  42. Vitter, J.S., Shriver, E.A.M.: Algorithms for parallel memory I: two-level memories. Algorithmica 12(2–3), 110–147 (1994)

    Article  MATH  MathSciNet  Google Scholar 

  43. Vitter, J.S., Shriver, E.A.M.: Algorithms for parallel memory II: hierarchical multilevel memories. Algorithmica 12(2–3), 148–169 (1994)

    Article  MATH  MathSciNet  Google Scholar 

  44. Warshall, S.: A theorem on boolean matrices. J. ACM 9(1), 11–12 (1962)

    MATH  MathSciNet  Google Scholar 

  45. Zeh, N.: I/O-efficient algorithms for shortest path related problems. Ph.D. thesis, School of Computer Science, Carleton University (2002)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Anil Maheshwari.

Additional information

An abstract of this paper was presented at the 12th Annual ACM-SIAM Symposium on Discrete Algorithms, Proceedings, pp. 89–90, 2001.

Research of A. Maheshwari supported by NSERC.

Part of this work was done while the second author was a Ph.D. student at the School of Computer Science of Carleton University.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Maheshwari, A., Zeh, N. I/O-Efficient Algorithms for Graphs of Bounded Treewidth. Algorithmica 54, 413–469 (2009). https://doi.org/10.1007/s00453-007-9131-5

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00453-007-9131-5

Keywords

Navigation