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.
Similar content being viewed by others
Notes
Note that there is an ambiguity in term o(kn). We occasionally follow the convention to use o(kn) instead of ko(n).
Note that for non-constant values of k the value of nlgk is indeed ko(n).
References
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
Barbay, J., Aleardi, L.C., He, M., Munro, J.I.: Succinct representation of labeled graphs. Algorithmica 62(1–2), 224–257 (2012)
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
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
Blelloch, G.E., Farzan, A.: Succinct representations of separable graphs. In: Proceedings 21st Conference on Combinatorial Pattern Matching
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)
Bodlaender, H.L.: NC-algorithms for graphs with small treewidth. In: Proceedings of the 14th International Workshop on Graph-Theoretic Concepts in Computer Science
Bodlaender, H.L.: Treewidth: Characterizations, applications, and computations. In: Proceedings of the 32nd International Workshop on Graph-Theoretic Concepts in Computer Science
Bodlaender, H.L.: A tourist guide through treewidth. Acta Cybern. 11, 1–23 (1993)
Bodlaender, H.L.: A linear-time algorithm for finding tree-decompositions of small treewidth. SIAM J. Comput. 25(6), 1305–1317 (1996)
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
Bodlaender, H.L., Gilbert, J.R., Hafsteinsson, H., Kloks, T.: Approximating treewidth, pathwidth, frontsize, and shortest elimination tree. J. Algorithms 18, 238–255 (1995)
Bouchitté, V., Kratsch, D., Müller, H., Todinca, I.: On treewidth approximations. Discrete Appl. Math. 136, 183–196 (2004)
Castelli Aleardi, L., Devillers, O., Schaeffer, G.: Succinct representations of planar maps. Theor. Comput. Sci. 408, 174–187 (2008)
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
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
de Fluiter, B.: Algorithms for graphs of small treewidth. PhD thesis, Utrecht University (1997)
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)
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
Dujmovic, V., Wood, D.R.: Graph treewidth and geometric thickness parameters. Discrete Comput. Geom. 37, 641–670 (2007)
Erdös, P., Rényi, A.: Asymmetric graphs. Acta Math. Hung. 14, 295–315 (1963)
Farzan, A.: Succinct representation of trees and graphs. PhD thesis, School of Computer Science, University of Waterloo (2009)
Farzan, A., Munro, J.I.: A uniform approach towards succinct representation of trees. In: Proceedings of the 11th Scandinavian Workshop on Algorithm Theory
Farzan, A., Munro, J.I.: Succinct representations of arbitrary graphs. In: Proceedings of the 16th European Symposium on Algorithms (2008)
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
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)
Fredman, M.L., Willard, D.E.: Surpassing the information theoretic bound with fusion trees
Gavoille, C., Hanusse, N.: On compact encoding of pagenumber k graphs. Discrete Math. Theor. Comput. Sci. 10(3), 23–34 (2008)
Gavoille, C., Labourel, A.: Shorter implicit representation for planar graphs and bounded treewidth graphs. In: Proceedings of the 15th European Symposium on Algorithms
Grossi, R., Gupta, A., Vitter, J.S.: High-order entropy-compressed text indexes. In: Proceedings of the 14th ACM-SIAM Symposium on Discrete Algorithms
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)
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
Jacobson, G.: Space-efficient static trees and graphs
Jansson, J., Sadakane, K., Sung, W.-K.: Ultra-succinct representation of ordered trees with applications. J. Comput. Syst. Sci. 78(2), 619–631 (2012)
Kannan, S., Naor, M., Rudich, S.: Implicit representation of graphs. SIAM J. Discrete Math. 5(4), 596–603 (1992)
Keeler, K., Westbrook, J.: Short encodings of planar graphs and maps. Discrete Appl. Math. 58, 239–252 (1995)
Munro, J.I.: Succinct data structures. Electron. Notes Theor. Comput. Sci. 91, 3 (2004)
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
Otter, R.: The number of trees. Ann. Math. 49(3), 583–599 (1948)
Patrascu, M.: Succincter. In: Proceedings of the 49th Annual IEEE Symposium on Foundations of Computer Science
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)
Sadakane, K., Navarro, G.: Fully-functional succinct trees. In: Proceedings of the 21st ACM-SIAM Symposium on Discrete Algorithms
Thorup, M.: All structured programs have small tree width and good register allocation. Inf. Comput. 142, 159–181 (1998)
Thorup, M., Zwick, U.: Approximate distance oracles. J. ACM 52(1), 1–24 (2005)
Turán, G.: On the succinct representation of graphs. Discrete Appl. Math. 8, 289–294 (1984)
Zwick, U.: Exact and approximate distances in graphs—a survey. In: Proceedings of the 9th European Symposium on Algorithms
Acknowledgements
We are thankful to Magnus Wahlstrom for helpful discussions.
Author information
Authors and Affiliations
Corresponding author
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
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
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00453-012-9712-9