skip to main content
article

Approximate distance oracles

Published: 01 January 2005 Publication History

Abstract

Let G = (V,E) be an undirected weighted graph with |V| = n and |E| = m. Let k ≥ 1 be an integer. We show that G = (V,E) can be preprocessed in O(kmn1/k) expected time, constructing a data structure of size O(kn1+1/k), such that any subsequent distance query can be answered, approximately, in O(k) time. The approximate distance returned is of stretch at most 2k−1, that is, the quotient obtained by dividing the estimated distance by the actual distance lies between 1 and 2k−1. A 1963 girth conjecture of Erdós, implies that Ω(n1+1/k) space is needed in the worst case for any real stretch strictly smaller than 2k+1. The space requirement of our algorithm is, therefore, essentially optimal. The most impressive feature of our data structure is its constant query time, hence the name "oracle". Previously, data structures that used only O(n1+1/k) space had a query time of Ω(n1/k).Our algorithms are extremely simple and easy to implement efficiently. They also provide faster constructions of sparse spanners of weighted graphs, and improved tree covers and distance labelings of weighted or unweighted graphs.

References

[1]
Aingworth, D., Chekuri, C., Indyk, P., and Motwani, R. 1999. Fast estimation of diameter and shortest paths (without matrix multiplication). SIAM J. Comput. 28, 1167--1181.
[2]
Alon, N., Hoory, S., and Linial, N. 2002. The Moore bound for irregular graphs. Graphs Combinat. 18, 1, 53--57.
[3]
Alon, N., and Naor, M. 1996. Derandomization, witnesses for Boolean matrix multiplication, and construction of perfect hash functions. Algorithmica 16, 434--449.
[4]
Alon, N., and Spencer, J. 1992. The probabilistic method. Wiley, New York.
[5]
Althöfer, I., Das, G., Dobkin, D., Joseph, D., and Soares, J. 1993. On sparse spanners of weighted graphs. Disc. Computat. Geom. 9, 81--100.
[6]
Awerbuch, B., Berger, B., Cowen, L., and Peleg, D. 1999. Near-linear time construction of sparse neighborhood covers. SIAM J. Comput. 28, 263--277.
[7]
Awerbuch, B., and Peleg, D. 1992. Routing with polynomial communication-space trade-off. SIAM J. Disc. Math. 5, 2, 151--162.
[8]
Bartal, Y. 1999. On approximating arbitrary metrices by tree metrics. In Proceedings of the 30th Annual ACM Symposium on Theory of Computing (Dallas, Tex.), ACM, New York, 161--168.
[9]
Baswana, S., and Sen, S. 2003. A simple linear time algorithm for computing a (2k−1)-spanner of O(n1+1/k) size in weighted graphs. In Proceedings of the 30th International Colloquium on Automata, Languages and Programming, Eindhoven, The Netherlands. 384--396.
[10]
Baswana, S., and Sen, S. 2004. Approximate distance oracles for unweighted graphs in O(n2 log n) time. In Proceedings of the 15th Annual ACM-SIAM Symposium on Discrete Algorithms (New Orleans La.). ACM, New York, 264--273.
[11]
Benson, C. 1966. Minimal regular graphs of girth eight and twelve. Canad. J. Math. 18, 1091--1094.
[12]
Bollobás, B. 1978. Extremal graph theory. Academic Press, Orlando, Fla.
[13]
Bondy, J., and Simonovits, M. 1974. Cycles of even length in graphs. J. Combinat. Theory, Ser. B 16, 97--105.
[14]
Bourgain, J. 1985. On Libschitz embedding of finite metric spaces in hilbert space. Isr. J. Math. 52, 46--52.
[15]
Brown, W. 1966. On graphs that do not contain a Thomsen graph. Canad. Math. Bull. 9, 281--285.
[16]
Carter, J. L., and Wegman, M. N. 1979. Universal classes of hash functions. J. Comput. Syst. Sci. 18, 143--154.
[17]
Chaudhuri, S., and Zaroliagis, C. 2000. Shortest paths in digraphs of small treewidth. Part I: Sequential algorithms. Algorithmica 27, 212--226.
[18]
Cohen, E. 1999. Fast algorithms for constructing t-spanners and paths with stretch t. SIAM J. Comput. 28, 210--236.
[19]
Cohen, E., and Zwick, U. 2001. All-pairs small-stretch paths. J. Algor. 38, 335--353.
[20]
Cormen, T., Leiserson, C., Rivest, R., and Stein, C. 2001. Introduction to Algorithms, 2nd ed. The MIT Press, Cambridge, Mass.
[21]
Dietzfelbinger, M., Hagerup, T., Katajainen, J., and Penttonen, M. 1997. A reliable randomized algorithm for the closest-pair problem. J. Algorithms 25, 19--51.
[22]
Dietzfelbinger, M., and Hüne, M. 1996. A dictionary implementaion based on dynamic perfect hashing. DIMACS Implementation Challenge, unpublished paper.
[23]
Dijkstra, E. 1959. A note on two problems in connexion with graphs. Numerische Mathematik 1, 269--271.
[24]
Dor, D., Halperin, S., and Zwick, U. 2000. All pairs almost shortest paths. SIAM J. Comput. 29, 1740--1759.
[25]
Elkin, M. 2001. Computing almost shortest paths. In Proceedings of the 20th Annual ACM Symposium on Principles of Distributed Computing (Newport, R. I). ACM, New York, 53--62.
[26]
Elkin, M., and Peleg, D. 2004. (1+ε,β)-Spanner constructions for general graphs. SIAM J. Comput. 33, 3, 608--631.
[27]
Erdós, P. 1964. Extremal problems in graph theory. In Theory of Graphs and ITs Applications (Proc. Sympos. Smolenice, 1963). Publ. House Czechoslovak Acad. Sci., Prague, 29--36.
[28]
Erdós, P., Rényi, A., and Sós, V. 1966. On a problem of graph theory. Studia Sci. Math. Hungar. 1, 215--235.
[29]
Fakcharoenphol, J., Rao, S., and Talwar, K. 2003. A tight bound on approximating arbitrary metrics by tree metrics. In Proceedings of the 35th Annual ACM Symposium on Theory of Computing (San Diego, Calif.). ACM, New York, 448--455.
[30]
Fredman, M., Komlós, J., and Szemerédi, E. 1984. Storing a sparse table with O(1) worst case access time. J. ACM 31, 538--544.
[31]
Fredman, M., and Tarjan, R. 1987. Fibonacci heaps and their uses in improved network optimization algorithms. J. ACM 34, 596--615.
[32]
Gavoille, C., Peleg, D., Pérennes, S., and Raz, R. 2001. Distance labeling in graphs. In Proceedings of the 12th Annual ACM-SIAM Symposium on Discrete Algorithms (Washington, D.C.). ACM, New York, 210--219.
[33]
Gudmundson, J., Levcopoulos, C., Narasimhan, G., and Smid, M. 2002. Approximate distance oracles revisited. In Proceedings of the 13th Annual International Symposium on Algorithms and Computation. 357--368.
[34]
Indyk, P. 1999. Sublinear time algorithms for metric space problems. In Proceedings of the 31th Annual ACM Symposium on Theory of Computing (Atlanta, Ga). ACM, New York, 428--434.
[35]
Karger, D., Koller, D., and Phillips, S. 1993. Finding the hidden path: Time bounds for all-pairs shortest paths. SIAM J. Comput. 22, 1199--1217.
[36]
Klein, P. 2002. Preprocessing an undirected planar network to enable fast approximate distance queries. In Proceedings of the 13th Annual ACM-SIAM Symposium on Discrete Algorithms (San Francisco, Calif.). ACM, New York, 820--827.
[37]
Kruskal, J. 1956. On the shortest spanning subtree of a graph and the traveling salesman problem. Proc. AMS 7, 48--50.
[38]
Lazebnik, F., and Ustimenko, V. 1993. New examples of graphs without small cycles and of large size. Europ. J. Combinat. 14, 5, 445--460.
[39]
Lazebnik, F., Ustimenko, V., and Woldar, A. 1995. A new series of dense graphs of high girth. Bull. AMS (New Series) 32, 1, 73--79.
[40]
Lazebnik, F., Ustimenko, V., and Woldar, A. 1996. A characterization of the components of the graphs D(k, q). Disc. Math. 157, 1--3, 271--283.
[41]
Linial, N., London, E., and Rabinovich, Y. 1995. The geometry of graphs and some of its algorithmic applications. Combinatorica 15, 215--245.
[42]
Lubotzky, A., Phillips, R., and Sarnak, P. 1988. Ramanujan graphs. Combinatorica 8, 261--277.
[43]
Margulis, G. 1988. Explicit group--theoretical construction of combinatorial schemes and their application to the design of expanders and concentrators. Probl. Inf. Transmis. 24, 39--46.
[44]
Matoušek, J. 1996. On the distortion required for embedding finite metric spaces into normed spaces. Isr. J. Math. 93, 333--344.
[45]
Matoušek, J. 2002. Lectures on discrete geometry. In Graduate Texts in Mathematics, vol. 212. Springer-Verlag, New York.
[46]
McGeoch, C. 1995. All-pairs shortest paths and the essential subgraph. Algorithmica 13, 426--461.
[47]
Motwani, R., and Raghavan, P. 1995. Randomized Algorithms. Cambridge University Press, Cambridge, Mass,
[48]
Peleg, D. 2000a. Distributed computing---A locality-sensitive approach. Society for Industrial and Applied Mathematics (SIAM), Philadelphia, Pa.
[49]
Peleg, D. 2000b. Proximity-preserving labeling schemes. J. Graph Theory 33, 167--176.
[50]
Peleg, D., and Schäffer, A. 1989. Graph spanners. J. Graph Theory 13, 99--116.
[51]
Reiman, I. 1958. Über ein Problem von K. Zarankiewicz. Acta. Math. Acad. Sci. Hungar. 9, 269--273.
[52]
Shoshan, A., and Zwick, U. 1999. All pairs shortest paths in undirected graphs with integer weights. In Proceedings of the 40th Annual IEEE Symposium on Foundations of Computer Science (New York, N.Y.). IEEE Computer Society Press, Los Alamitos, Calif., 605--614.
[53]
Thorup, M. 1999. Undirected single-source shortest paths with positive integer weights in linear time. J. ACM 46, 362--394.
[54]
Thorup, M. 2000a. Even strongly universal hashing is pretty fast. In Proceedings of the 11th Annual ACM-SIAM Symposium on Discrete Algorithms (San Francisco, Calif.). ACM, New York, 496--497.
[55]
Thorup, M. 2000b. Floats, integers, and single source shortest paths. J. Algorithms 35, 189--201.
[56]
Thorup, M. 2001. Compact oracles for reachability and approximate distances in planar digraphs. In Proceedings of the 42nd Annual IEEE Symposium on Foundations of Computer Science (Las Vegas, Nev). IEEE Computer Society Press, Los Alamitos, Calif., 242--251.
[57]
Thorup, M., and Zwick, U. 2001. Compact routing schemes. In Porceedings of the 13th Annual ACM Symposium on Parallel Algorithms and Architectures (Crete, Greece). ACM, New York, 1--10.
[58]
Tits, J. 1959. Sur la trialité et certains groupes qui s'en déduisent. Publ. Math. I.H.E.S. 2, 14--20.
[59]
Vitter, J. 2001. External memory algorithms and data structures: Dealing with MASSIVE DATA. ACM Comput. Surv. 33, 2, 209--271.
[60]
Wenger, R. 1991. Extremal graphs with no C4's, C6's and C10's. J. Combinat. Theory, Ser. B 52, 113--116.
[61]
Williams, J. 1964. Heapsort. Commun ACM 7, 5, 347--348.
[62]
Woldar, A., and Ustimenko, V. 1993. An application of group theory to extremal graph theory. In Group theory, Proceedings of the Ohio State-Denison Conference. World Sci. Publishing, River Edge, N.J. 293--298.
[63]
Zwick, U. 2002. All-pairs shortest paths using bridging sets and rectangular matrix multiplication. J. ACM 49, 289--317.

Cited By

View all
  • (2024)Approximate distance oracle for fault-tolerant geometric spannersProceedings of the Thirty-Eighth AAAI Conference on Artificial Intelligence and Thirty-Sixth Conference on Innovative Applications of Artificial Intelligence and Fourteenth Symposium on Educational Advances in Artificial Intelligence10.1609/aaai.v38i18.29987(20087-20095)Online publication date: 20-Feb-2024
  • (2024)Fast Landmark-Based Optimal Routing for BGP-ORR ProtocolProceedings of the 2024 5th International Conference on Computing, Networks and Internet of Things10.1145/3670105.3670118(74-80)Online publication date: 24-May-2024
  • (2024)Massively Parallel Algorithms for Approximate Shortest PathsProceedings of the 36th ACM Symposium on Parallelism in Algorithms and Architectures10.1145/3626183.3659978(415-426)Online publication date: 17-Jun-2024
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Journal of the ACM
Journal of the ACM  Volume 52, Issue 1
January 2005
146 pages
ISSN:0004-5411
EISSN:1557-735X
DOI:10.1145/1044731
Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 January 2005
Published in JACM Volume 52, Issue 1

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Approximate distance oracles
  2. distance labelings
  3. distance queries
  4. distances
  5. shortest paths
  6. spanners

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)277
  • Downloads (Last 6 weeks)35
Reflects downloads up to 19 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2024)Approximate distance oracle for fault-tolerant geometric spannersProceedings of the Thirty-Eighth AAAI Conference on Artificial Intelligence and Thirty-Sixth Conference on Innovative Applications of Artificial Intelligence and Fourteenth Symposium on Educational Advances in Artificial Intelligence10.1609/aaai.v38i18.29987(20087-20095)Online publication date: 20-Feb-2024
  • (2024)Fast Landmark-Based Optimal Routing for BGP-ORR ProtocolProceedings of the 2024 5th International Conference on Computing, Networks and Internet of Things10.1145/3670105.3670118(74-80)Online publication date: 24-May-2024
  • (2024)Massively Parallel Algorithms for Approximate Shortest PathsProceedings of the 36th ACM Symposium on Parallelism in Algorithms and Architectures10.1145/3626183.3659978(415-426)Online publication date: 17-Jun-2024
  • (2024)A Dynamic Shortest Paths Toolbox: Low-Congestion Vertex Sparsifiers and Their ApplicationsProceedings of the 56th Annual ACM Symposium on Theory of Computing10.1145/3618260.3649767(1174-1183)Online publication date: 10-Jun-2024
  • (2024)Stronger 3-SUM Lower Bounds for Approximate Distance Oracles via Additive CombinatoricsSIAM Journal on Computing10.1137/23M1611348(STOC23-68-STOC23-117)Online publication date: 13-Sep-2024
  • (2024)A Pruned Pendant Vertex Based Index for Shortest Distance Query Under Structured Encrypted GraphIEEE Transactions on Information Forensics and Security10.1109/TIFS.2024.341415619(6351-6363)Online publication date: 1-Jan-2024
  • (2024)Integrating Local & Global Features for Estimating Shortest-path Distance in Large-scale Graphs2024 International Joint Conference on Neural Networks (IJCNN)10.1109/IJCNN60899.2024.10650344(1-8)Online publication date: 30-Jun-2024
  • (2024)Fast Query Answering by Labeling Index on Uncertain Graphs2024 IEEE 40th International Conference on Data Engineering (ICDE)10.1109/ICDE60146.2024.00311(4058-4071)Online publication date: 13-May-2024
  • (2024)Improved Distance (Sensitivity) Oracles with Subquadratic Space2024 IEEE 65th Annual Symposium on Foundations of Computer Science (FOCS)10.1109/FOCS61266.2024.00097(1550-1558)Online publication date: 27-Oct-2024
  • (2024)Extracting multi-objective multigraph features for the shortest path cost prediction: Statistics-based or learning-based?Green Energy and Intelligent Transportation10.1016/j.geits.2023.1001293:1(100129)Online publication date: Feb-2024
  • Show More Cited By

View Options

Login options

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media