skip to main content
article

Approximate distance oracles

Published:01 January 2005Publication History
Skip Abstract Section

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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Alon, N., Hoory, S., and Linial, N. 2002. The Moore bound for irregular graphs. Graphs Combinat. 18, 1, 53--57.Google ScholarGoogle ScholarCross RefCross Ref
  3. Alon, N., and Naor, M. 1996. Derandomization, witnesses for Boolean matrix multiplication, and construction of perfect hash functions. Algorithmica 16, 434--449.Google ScholarGoogle ScholarCross RefCross Ref
  4. Alon, N., and Spencer, J. 1992. The probabilistic method. Wiley, New York.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Awerbuch, B., and Peleg, D. 1992. Routing with polynomial communication-space trade-off. SIAM J. Disc. Math. 5, 2, 151--162. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Benson, C. 1966. Minimal regular graphs of girth eight and twelve. Canad. J. Math. 18, 1091--1094.Google ScholarGoogle ScholarCross RefCross Ref
  12. Bollobás, B. 1978. Extremal graph theory. Academic Press, Orlando, Fla.Google ScholarGoogle Scholar
  13. Bondy, J., and Simonovits, M. 1974. Cycles of even length in graphs. J. Combinat. Theory, Ser. B 16, 97--105.Google ScholarGoogle ScholarCross RefCross Ref
  14. Bourgain, J. 1985. On Libschitz embedding of finite metric spaces in hilbert space. Isr. J. Math. 52, 46--52.Google ScholarGoogle ScholarCross RefCross Ref
  15. Brown, W. 1966. On graphs that do not contain a Thomsen graph. Canad. Math. Bull. 9, 281--285.Google ScholarGoogle ScholarCross RefCross Ref
  16. Carter, J. L., and Wegman, M. N. 1979. Universal classes of hash functions. J. Comput. Syst. Sci. 18, 143--154.Google ScholarGoogle ScholarCross RefCross Ref
  17. Chaudhuri, S., and Zaroliagis, C. 2000. Shortest paths in digraphs of small treewidth. Part I: Sequential algorithms. Algorithmica 27, 212--226.Google ScholarGoogle ScholarCross RefCross Ref
  18. Cohen, E. 1999. Fast algorithms for constructing t-spanners and paths with stretch t. SIAM J. Comput. 28, 210--236. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Cohen, E., and Zwick, U. 2001. All-pairs small-stretch paths. J. Algor. 38, 335--353. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Cormen, T., Leiserson, C., Rivest, R., and Stein, C. 2001. Introduction to Algorithms, 2nd ed. The MIT Press, Cambridge, Mass. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Dietzfelbinger, M., and Hüne, M. 1996. A dictionary implementaion based on dynamic perfect hashing. DIMACS Implementation Challenge, unpublished paper.Google ScholarGoogle Scholar
  23. Dijkstra, E. 1959. A note on two problems in connexion with graphs. Numerische Mathematik 1, 269--271.Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Dor, D., Halperin, S., and Zwick, U. 2000. All pairs almost shortest paths. SIAM J. Comput. 29, 1740--1759. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Elkin, M., and Peleg, D. 2004. (1+ε,β)-Spanner constructions for general graphs. SIAM J. Comput. 33, 3, 608--631. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle Scholar
  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.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Fredman, M., and Tarjan, R. 1987. Fibonacci heaps and their uses in improved network optimization algorithms. J. ACM 34, 596--615. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Kruskal, J. 1956. On the shortest spanning subtree of a graph and the traveling salesman problem. Proc. AMS 7, 48--50.Google ScholarGoogle ScholarCross RefCross Ref
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle ScholarCross RefCross Ref
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. Linial, N., London, E., and Rabinovich, Y. 1995. The geometry of graphs and some of its algorithmic applications. Combinatorica 15, 215--245.Google ScholarGoogle ScholarCross RefCross Ref
  42. Lubotzky, A., Phillips, R., and Sarnak, P. 1988. Ramanujan graphs. Combinatorica 8, 261--277.Google ScholarGoogle ScholarCross RefCross Ref
  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.Google ScholarGoogle Scholar
  44. Matoušek, J. 1996. On the distortion required for embedding finite metric spaces into normed spaces. Isr. J. Math. 93, 333--344.Google ScholarGoogle ScholarCross RefCross Ref
  45. Matoušek, J. 2002. Lectures on discrete geometry. In Graduate Texts in Mathematics, vol. 212. Springer-Verlag, New York. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. McGeoch, C. 1995. All-pairs shortest paths and the essential subgraph. Algorithmica 13, 426--461.Google ScholarGoogle ScholarCross RefCross Ref
  47. Motwani, R., and Raghavan, P. 1995. Randomized Algorithms. Cambridge University Press, Cambridge, Mass, Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. Peleg, D. 2000a. Distributed computing---A locality-sensitive approach. Society for Industrial and Applied Mathematics (SIAM), Philadelphia, Pa. Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. Peleg, D. 2000b. Proximity-preserving labeling schemes. J. Graph Theory 33, 167--176. Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. Peleg, D., and Schäffer, A. 1989. Graph spanners. J. Graph Theory 13, 99--116.Google ScholarGoogle ScholarCross RefCross Ref
  51. Reiman, I. 1958. Über ein Problem von K. Zarankiewicz. Acta. Math. Acad. Sci. Hungar. 9, 269--273.Google ScholarGoogle ScholarCross RefCross Ref
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  53. Thorup, M. 1999. Undirected single-source shortest paths with positive integer weights in linear time. J. ACM 46, 362--394. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  55. Thorup, M. 2000b. Floats, integers, and single source shortest paths. J. Algorithms 35, 189--201. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  58. Tits, J. 1959. Sur la trialité et certains groupes qui s'en déduisent. Publ. Math. I.H.E.S. 2, 14--20.Google ScholarGoogle ScholarCross RefCross Ref
  59. Vitter, J. 2001. External memory algorithms and data structures: Dealing with MASSIVE DATA. ACM Comput. Surv. 33, 2, 209--271. Google ScholarGoogle ScholarDigital LibraryDigital Library
  60. Wenger, R. 1991. Extremal graphs with no C4's, C6's and C10's. J. Combinat. Theory, Ser. B 52, 113--116. Google ScholarGoogle ScholarDigital LibraryDigital Library
  61. Williams, J. 1964. Heapsort. Commun ACM 7, 5, 347--348.Google ScholarGoogle Scholar
  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.Google ScholarGoogle Scholar
  63. Zwick, U. 2002. All-pairs shortest paths using bridging sets and rectangular matrix multiplication. J. ACM 49, 289--317. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Approximate distance oracles

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      • 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

        Copyright © 2005 ACM

        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: 1 January 2005
        Published in jacm Volume 52, Issue 1

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • article

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader