Spanning Adjacency Oracles in Sublinear Time

Authors Greg Bodwin, Henry Fleischmann

Thumbnail PDF


  • Filesize: 0.81 MB
  • 21 pages

Document Identifiers

Author Details

Greg Bodwin
  • Department of Electrical Engineering and Computer Science, University of Michigan, Ann Arbor, MI, USA
Henry Fleischmann
  • Department of Pure Mathematics and Mathematical Statistics, University of Cambridge, UK


We are grateful to Merav Parter, Nathan Wallheimer, Amir Abboud, Ron Safier, and Oded Goldreich for references and technical discussions on the paper. We are also grateful to an anonymous reviewer for exceptionally helpful and thorough comments.

Cite AsGet BibTex

Greg Bodwin and Henry Fleischmann. Spanning Adjacency Oracles in Sublinear Time. In 15th Innovations in Theoretical Computer Science Conference (ITCS 2024). Leibniz International Proceedings in Informatics (LIPIcs), Volume 287, pp. 19:1-19:21, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2024)


Suppose we are given an n-node, m-edge input graph G, and the goal is to compute a spanning subgraph H on O(n) edges. This can be achieved in linear O(m + n) time via breadth-first search. But can we hope for sublinear runtime in some range of parameters - for example, perhaps O(n^{1.9}) worst-case runtime, even when the input graph has n² edges? If the goal is to return H as an adjacency list, there are simple lower bounds showing that Ω(m + n) runtime is necessary. If the goal is to return H as an adjacency matrix, then we need Ω(n²) time just to write down the entries of the output matrix. However, we show that neither of these lower bounds still apply if instead the goal is to return H as an implicit adjacency matrix, which we call an adjacency oracle. An adjacency oracle is a data structure that gives a user the illusion that an adjacency matrix has been computed: it accepts edge queries (u, v), and it returns in near-constant time a bit indicating whether or not (u, v) ∈ E(H). Our main result is that, for any 0 < ε < 1, one can construct an adjacency oracle for a spanning subgraph on at most (1+ε)n edges, in Õ(n ε^{-1}) time (hence sublinear time on input graphs with m ≫ n edges), and that this construction time is near-optimal. Additional results include constructions of adjacency oracles for k-connectivity certificates and spanners, which are similarly sublinear on dense-enough input graphs. Our adjacency oracles are closely related to Local Computation Algorithms (LCAs) for graph sparsifiers; they can be viewed as LCAs with some computation moved to a preprocessing step, in order to speed up queries. Our oracles imply the first LCAs for computing sparse spanning subgraphs of general input graphs in Õ(n) query time, which works by constructing our adjacency oracle, querying it once, and then throwing the rest of the oracle away. This addresses an open problem of Rubinfeld [CSR '17].

Subject Classification

ACM Subject Classification
  • Theory of computation → Design and analysis of algorithms
  • Graph algorithms
  • Sublinear algorithms
  • Data structures
  • Graph theory


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. Reyan Ahmed, Greg Bodwin, Faryad Darabi Sahneh, Keaton Hamm, Mohammad Javad Latifi Jebelli, Stephen Kobourov, and Richard Spence. Graph spanners: A tutorial review. Computer Science Review, 37:100253, 2020. Google Scholar
  2. Noga Alon, Ronitt Rubinfeld, Shai Vardi, and Ning Xie. Space-efficient local computation algorithms. In Proceedings of the twenty-third annual ACM-SIAM symposium on Discrete Algorithms, pages 1132-1139. SIAM, 2012. Google Scholar
  3. Ingo Althöfer, Gautam Das, David Dobkin, Deborah Joseph, and José Soares. On sparse spanners of weighted graphs. Discrete & Computational Geometry, 9(1):81-100, 1993. Google Scholar
  4. Rubi Arviv, Lily Chung, Reut Levi, and Edward Pyne. Improved lcas for constructing spanners. arXiv preprint, 2023. URL:
  5. Surender Baswana and Sandeep Sen. A simple and linear time randomized algorithm for computing sparse spanners in weighted graphs. Random Structures & Algorithms, 30(4):532-563, 2007. Google Scholar
  6. Paul Erdős. Extremal problems in graph theory. In Proceedings of the Symposium on Theory of Graphs and its Applications, page 2936, 1963. Google Scholar
  7. Guy Even, Moti Medina, and Dana Ron. Best of two local models: Centralized local and distributed local algorithms. Information and Computation, 262:69-89, 2018. Google Scholar
  8. Torben Hagerup, Kurt Mehlhorn, and James Ian Munro. Optimal algorithms for generating discrete random variables with changing distributions. Lecture Notes in Computer Science, 700:253-264, 1993. Google Scholar
  9. Avinatan Hassidim, Jonathan A Kelner, Huy N Nguyen, and Krzysztof Onak. Local graph partitions for approximation and testing. In 2009 50th Annual IEEE Symposium on Foundations of Computer Science, pages 22-31. IEEE, 2009. Google Scholar
  10. Avinatan Hassidim, Yishay Mansour, and Shai Vardi. Local computation mechanism design. ACM Transactions on Economics and Computation (TEAC), 4(4):1-24, 2016. Google Scholar
  11. Jacob Holm, Valerie King, Mikkel Thorup, Or Zamir, and Uri Zwick. Random k-out subgraph leaves only o (n/k) inter-component edges. In 2019 IEEE 60th Annual Symposium on Foundations of Computer Science (FOCS), pages 896-909. IEEE, 2019. Google Scholar
  12. Christoph Lenzen and Reut Levi. A centralized local algorithm for the sparse spanning graph problem. In 45th International Colloquium on Automata, Languages, and Programming (ICALP 2018). Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2018. Google Scholar
  13. Reut Levi and Moti Medina. A (centralized) local guide. Bulletin of the EATCS, 122:60-92, 2017. Google Scholar
  14. Reut Levi, Guy Moshkovitz, Dana Ron, Ronitt Rubinfeld, and Asaf Shapira. Constructing near spanning trees with few local inspections. Random Structures & Algorithms, 50(2):183-200, 2017. Google Scholar
  15. Reut Levi, Dana Ron, and Ronitt Rubinfeld. A local algorithm for constructing spanners in minor-free graphs. In Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques (APPROX/RANDOM 2016), volume 60, pages 38:1-38:15, 2016. Google Scholar
  16. Reut Levi, Dana Ron, and Ronitt Rubinfeld. Local algorithms for sparse spanning graphs. Algorithmica, 82(4):747-786, 2020. Google Scholar
  17. Reut Levi, Ronitt Rubinfeld, and Anak Yodpinyanee. Local computation algorithms for graphs of non-constant degrees. In Proceedings of the 27th ACM symposium on Parallelism in Algorithms and Architectures, pages 59-61, 2015. Google Scholar
  18. Yishay Mansour, Boaz Patt-Shamir, and Shai Vardi. Constant-time local computation algorithms. Theory of Computing Systems, 62:249-267, 2018. Google Scholar
  19. Yishay Mansour, Aviad Rubinstein, Shai Vardi, and Ning Xie. Converting online algorithms to local computation algorithms. In Automata, Languages, and Programming: 39th International Colloquium, ICALP 2012, Warwick, UK, July 9-13, 2012, Proceedings, Part I 39, pages 653-664. Springer, 2012. Google Scholar
  20. Yishay Mansour and Shai Vardi. A local computation approximation scheme to maximum matching. In Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques: 16th International Workshop, APPROX 2013, and 17th International Workshop, RANDOM 2013, Berkeley, CA, USA, August 21-23, 2013. Proceedings, pages 260-273. Springer, 2013. Google Scholar
  21. Hiroshi Nagamochi and Toshihide Ibaraki. A linear-time algorithm for finding a sparse k-connected spanning subgraph of a k-connected graph. Algorithmica, 7(5&6):583-596, 1992. Google Scholar
  22. Huy N Nguyen and Krzysztof Onak. Constant-time approximation algorithms via local improvements. In 2008 49th Annual IEEE Symposium on Foundations of Computer Science, pages 327-336. IEEE, 2008. Google Scholar
  23. Merav Parter, Ronitt Rubinfeld, Ali Vakilian, and Anak Yodpinyanee. Local Computation Algorithms for Spanners. In 10th Innovations in Theoretical Computer Science Conference (ITCS 2019), volume 124, pages 58:1-58:21, 2018. Google Scholar
  24. David Peleg and Jeffrey Ullman. An optimal synchronizer for the hypercube. SIAM Journal on Computing (SICOMP), 18(4):740-747, 1989. Google Scholar
  25. David Peleg and Eli Upfal. A trade-off between space and efficiency for routing tables. Journal of the ACM (JACM), 36(3):510-530, 1989. Google Scholar
  26. Omer Reingold and Shai Vardi. New techniques and tighter bounds for local computation algorithms. Journal of Computer and System Sciences, 82(7):1180-1200, 2016. Google Scholar
  27. Ronitt Rubinfeld. Can we locally compute sparse connected subgraphs? In Computer Science-Theory and Applications: 12th International Computer Science Symposium in Russia, CSR 2017, Kazan, Russia, June 8-12, 2017, Proceedings 12, pages 38-47. Springer, 2017. Google Scholar
  28. Ronitt Rubinfeld, Gil Tamir, Shai Vardi, and Ning Xie. Fast local computation algorithms. arXiv preprint, 2011. URL:
  29. Shay Solomon. Local algorithms for bounded degree sparsifiers in sparse graphs. arXiv preprint, 2021. URL:
  30. Nithin Varma and Yuichi Yoshida. Average sensitivity of graph algorithms. In Proceedings of the 2021 ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 684-703. SIAM, 2021. Google Scholar
  31. Yuichi Yoshida, Masaki Yamamoto, and Hiro Ito. Improved constant-time approximation algorithms for maximum matchings and other optimization problems. SIAM Journal on Computing, 41(4):1074-1093, 2012. Google Scholar
Questions / Remarks / Feedback

Feedback for Dagstuhl Publishing

Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail