Skip to main content
Log in

Compact Navigation and Distance Oracles for Graphs with Small Treewidth

  • Published:
Algorithmica Aims and scope Submit manuscript

Abstract

Given an unlabeled, unweighted, and undirected graph with n vertices and small (but not necessarily constant) treewidth k, we consider the problem of preprocessing the graph to build space-efficient encodings (oracles) to perform various queries efficiently. We assume the word RAM model where the size of a word is Ω(logn) bits.

The first oracle, we present, is the navigation oracle which facilitates primitive navigation operations of adjacency, neighborhood, and degree queries. By way of an enumeration argument, which is of interest in its own right, we show the space requirement of the oracle is optimal to within lower order terms for all graphs with n vertices and treewidth k. The oracle supports the mentioned queries all in constant worst-case time. The second oracle, we present, is an exact distance oracle which facilitates distance queries between any pair of vertices (i.e., an all-pairs shortest-path oracle). The space requirement of the oracle is also optimal to within lower order terms. Moreover, the distance queries perform in O(k 3log3 k) time. Particularly, for the class of graphs of popular interest, graphs of bounded treewidth (where k is constant), the distances are reported in constant worst-case time.

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

Similar content being viewed by others

Notes

  1. Note that there is an ambiguity in term o(kn). We occasionally follow the convention to use o(kn) instead of ko(n).

  2. Note that for non-constant values of k the value of nlgk is indeed ko(n).

References

  1. Aleardi, L.C., Devillers, O., Schaeffer, G.: Succinct representation of triangulations with a boundary. In: Proceedings of the 9th Workshop on Algorithms and Data Structures

  2. Barbay, J., Aleardi, L.C., He, M., Munro, J.I.: Succinct representation of labeled graphs. Algorithmica 62(1–2), 224–257 (2012)

    Article  MATH  MathSciNet  Google Scholar 

  3. Baswana, S., Gaur, A., Sen, S., Upadhyay, J.: Distance oracles for unweighted graphs: Breaking the quadratic barrier with constant additive error. In: Proceedings of the 35th International Colloquium on Automata, Languages and Programming, Part I

  4. Blandford, D.K., Blelloch, G.E., Kash, I.A.: Compact representations of separable graphs. In: Proceedings of the 14th ACM-SIAM Symposium on Discrete Algorithms

  5. Blelloch, G.E., Farzan, A.: Succinct representations of separable graphs. In: Proceedings 21st Conference on Combinatorial Pattern Matching

  6. Bodirsky, M., Giménez, O., Kang, M., Noy, M.: Enumeration and limit laws for series-parallel graphs. Eur. J. Comb. 28(8), 2091–2105 (2007)

    Article  MATH  Google Scholar 

  7. Bodlaender, H.L.: NC-algorithms for graphs with small treewidth. In: Proceedings of the 14th International Workshop on Graph-Theoretic Concepts in Computer Science

  8. Bodlaender, H.L.: Treewidth: Characterizations, applications, and computations. In: Proceedings of the 32nd International Workshop on Graph-Theoretic Concepts in Computer Science

  9. Bodlaender, H.L.: A tourist guide through treewidth. Acta Cybern. 11, 1–23 (1993)

    MATH  MathSciNet  Google Scholar 

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

    Article  MATH  MathSciNet  Google Scholar 

  11. Bodlaender, H.L., Fellows, M.R., Warnow, T.: Two strikes against perfect phylogeny. In: Proceedings of the 19th International Colloquium on Automata, Languages and Programming

  12. Bodlaender, H.L., Gilbert, J.R., Hafsteinsson, H., Kloks, T.: Approximating treewidth, pathwidth, frontsize, and shortest elimination tree. J. Algorithms 18, 238–255 (1995)

    Article  MATH  MathSciNet  Google Scholar 

  13. Bouchitté, V., Kratsch, D., Müller, H., Todinca, I.: On treewidth approximations. Discrete Appl. Math. 136, 183–196 (2004)

    Article  MATH  MathSciNet  Google Scholar 

  14. Castelli Aleardi, L., Devillers, O., Schaeffer, G.: Succinct representations of planar maps. Theor. Comput. Sci. 408, 174–187 (2008)

    Article  MathSciNet  Google Scholar 

  15. Chan, T.M.: All-pairs shortest paths for unweighted undirected graphs in o(mn) time. In: Proceedings of the 17th ACM-SIAM Symposium on Discrete Algorithm

  16. Chuang, R.C.-N., Garg, A., He, X., Kao, M.-Y., Lu, H.-I.: Compact encodings of planar graphs via canonical orderings and multiple parentheses. In: Proceedings of the 25th International Colloquium on Automata, Languages and Programming

  17. de Fluiter, B.: Algorithms for graphs of small treewidth. PhD thesis, Utrecht University (1997)

  18. Deo, N., Krishnamoorthy, M.S., Langston, M.A.: Exact and approximate solutions for the gate matrix layout problem. IEEE Trans. Comput.-Aided Des. Integr. Circuits Syst. 6(1), 79–84 (1987)

    Article  Google Scholar 

  19. Dorn, B., Hüffner, F., Krüger, D., Niedermeier, R., Uhlmann, J.: Exploiting bounded signal flow for graph orientation based on cause-effect pairs. In: Proceedings of the First International ICST Conference on Theory and Practice of Algorithms in Computer Systems

  20. Dujmovic, V., Wood, D.R.: Graph treewidth and geometric thickness parameters. Discrete Comput. Geom. 37, 641–670 (2007)

    Article  MATH  MathSciNet  Google Scholar 

  21. Erdös, P., Rényi, A.: Asymmetric graphs. Acta Math. Hung. 14, 295–315 (1963)

    MATH  Google Scholar 

  22. Farzan, A.: Succinct representation of trees and graphs. PhD thesis, School of Computer Science, University of Waterloo (2009)

  23. Farzan, A., Munro, J.I.: A uniform approach towards succinct representation of trees. In: Proceedings of the 11th Scandinavian Workshop on Algorithm Theory

  24. Farzan, A., Munro, J.I.: Succinct representations of arbitrary graphs. In: Proceedings of the 16th European Symposium on Algorithms (2008)

    Google Scholar 

  25. Farzan, A., Raman, R., Rao, S.S.: Universal succinct representations of trees? In: Proceedings of the 36th International Colloquium on Automata, Languages and Programming, Part I

  26. Ferragina, P., Nitto, I., Venturini, R.: On compact representations of all-pairs-shortest-path-distance matrices. Theor. Comput. Sci. 411(34–36), 3293–3300 (2010)

    Article  MATH  MathSciNet  Google Scholar 

  27. Fredman, M.L., Willard, D.E.: Surpassing the information theoretic bound with fusion trees

  28. Gavoille, C., Hanusse, N.: On compact encoding of pagenumber k graphs. Discrete Math. Theor. Comput. Sci. 10(3), 23–34 (2008)

    MathSciNet  Google Scholar 

  29. Gavoille, C., Labourel, A.: Shorter implicit representation for planar graphs and bounded treewidth graphs. In: Proceedings of the 15th European Symposium on Algorithms

  30. Grossi, R., Gupta, A., Vitter, J.S.: High-order entropy-compressed text indexes. In: Proceedings of the 14th ACM-SIAM Symposium on Discrete Algorithms

  31. Harary, F., Robinson, R.W., Schwenk, A.J.: Twenty-step algorithm for determining the asymptotic number of trees of various species: corrigenda. J. Aust. Math. Soc. 41(A), 325 (1986)

    Article  MATH  MathSciNet  Google Scholar 

  32. He, M., Munro, J.I., Rao, S.S.: Succinct ordinal trees based on tree covering. In: Proceedings of the 34th International Colloquium on Automata, Languages and Programming, Part I

  33. Jacobson, G.: Space-efficient static trees and graphs

  34. Jansson, J., Sadakane, K., Sung, W.-K.: Ultra-succinct representation of ordered trees with applications. J. Comput. Syst. Sci. 78(2), 619–631 (2012)

    Article  MATH  MathSciNet  Google Scholar 

  35. Kannan, S., Naor, M., Rudich, S.: Implicit representation of graphs. SIAM J. Discrete Math. 5(4), 596–603 (1992)

    Article  MATH  MathSciNet  Google Scholar 

  36. Keeler, K., Westbrook, J.: Short encodings of planar graphs and maps. Discrete Appl. Math. 58, 239–252 (1995)

    Article  MATH  MathSciNet  Google Scholar 

  37. Munro, J.I.: Succinct data structures. Electron. Notes Theor. Comput. Sci. 91, 3 (2004)

    Article  Google Scholar 

  38. Munro, J.I., Raman, V.: Succinct representation of balanced parentheses, static trees and planar graphs. In: Proceedings of the 38th Symposium on Foundations of Computer Science

  39. Otter, R.: The number of trees. Ann. Math. 49(3), 583–599 (1948)

    Article  MATH  MathSciNet  Google Scholar 

  40. Patrascu, M.: Succincter. In: Proceedings of the 49th Annual IEEE Symposium on Foundations of Computer Science

  41. Raman, R., Raman, V., Satti, S.R.: Succinct indexable dictionaries with applications to encoding k-ary trees, prefix sums and multisets. ACM Trans. Algorithms 3(4), 43 (2007)

    Article  MathSciNet  Google Scholar 

  42. Sadakane, K., Navarro, G.: Fully-functional succinct trees. In: Proceedings of the 21st ACM-SIAM Symposium on Discrete Algorithms

  43. Thorup, M.: All structured programs have small tree width and good register allocation. Inf. Comput. 142, 159–181 (1998)

    Article  MATH  MathSciNet  Google Scholar 

  44. Thorup, M., Zwick, U.: Approximate distance oracles. J. ACM 52(1), 1–24 (2005)

    Article  MATH  MathSciNet  Google Scholar 

  45. Turán, G.: On the succinct representation of graphs. Discrete Appl. Math. 8, 289–294 (1984)

    Article  MATH  MathSciNet  Google Scholar 

  46. Zwick, U.: Exact and approximate distances in graphs—a survey. In: Proceedings of the 9th European Symposium on Algorithms

Download references

Acknowledgements

We are thankful to Magnus Wahlstrom for helpful discussions.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Shahin Kamali.

Additional information

A preliminary version of this paper appeared in proceedings of the 38th International Colloquium on Automata, Languages and Programming (ICALP 2011).

Rights and permissions

Reprints and permissions

About this article

Cite this article

Farzan, A., Kamali, S. Compact Navigation and Distance Oracles for Graphs with Small Treewidth. Algorithmica 69, 92–116 (2014). https://doi.org/10.1007/s00453-012-9712-9

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00453-012-9712-9

Keywords

Navigation