Online Spanners in Metric Spaces

Authors Sujoy Bhore , Arnold Filtser , Hadi Khodabandeh , Csaba D. Tóth

Thumbnail PDF


  • Filesize: 0.93 MB
  • 20 pages

Document Identifiers

Author Details

Sujoy Bhore
  • Indian Institute of Science Education and Research, Bhopal, India
Arnold Filtser
  • Department of Computer Science, Bar-Ilan University, Ramat-Gan Israel
Hadi Khodabandeh
  • Department of Computer Science, University of California, Irvine, CA, USA
Csaba D. Tóth
  • California State University Northridge, Los Angeles, CA, USA
  • Tufts University, Medford, MA, USA

Cite AsGet BibTex

Sujoy Bhore, Arnold Filtser, Hadi Khodabandeh, and Csaba D. Tóth. Online Spanners in Metric Spaces. In 30th Annual European Symposium on Algorithms (ESA 2022). Leibniz International Proceedings in Informatics (LIPIcs), Volume 244, pp. 18:1-18:20, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2022)


Given a metric space ℳ = (X,δ), a weighted graph G over X is a metric t-spanner of ℳ if for every u,v ∈ X, δ(u,v) ≤ δ_G(u,v) ≤ t⋅ δ(u,v), where δ_G is the shortest path metric in G. In this paper, we construct spanners for finite sets in metric spaces in the online setting. Here, we are given a sequence of points (s₁, …, s_n), where the points are presented one at a time (i.e., after i steps, we have seen S_i = {s₁, … , s_i}). The algorithm is allowed to add edges to the spanner when a new point arrives, however, it is not allowed to remove any edge from the spanner. The goal is to maintain a t-spanner G_i for S_i for all i, while minimizing the number of edges, and their total weight. Under the L₂-norm in ℝ^d for arbitrary constant d ∈ ℕ, we present an online (1+ε)-spanner algorithm with competitive ratio O_d(ε^{-d} log n), improving the previous bound of O_d(ε^{-(d+1)}log n). Moreover, the spanner maintained by the algorithm has O_d(ε^{1-d}log ε^{-1})⋅ n edges, almost matching the (offline) optimal bound of O_d(ε^{1-d})⋅ n. In the plane, a tighter analysis of the same algorithm provides an almost quadratic improvement of the competitive ratio to O(ε^{-3/2}logε^{-1}log n), by comparing the online spanner with an instance-optimal spanner directly, bypassing the comparison to an MST (i.e., lightness). As a counterpart, we design a sequence of points that yields a Ω_d(ε^{-d}) lower bound for the competitive ratio for online (1+ε)-spanner algorithms in ℝ^d under the L₁-norm. Then we turn our attention to online spanners in general metrics. Note that, it is not possible to obtain a spanner with stretch less than 3 with a subquadratic number of edges, even in the offline setting, for general metrics. We analyze an online version of the celebrated greedy spanner algorithm, dubbed ordered greedy. With stretch factor t = (2k-1)(1+ε) for k ≥ 2 and ε ∈ (0,1), we show that it maintains a spanner with O(ε^{-1}logε^{-1})⋅ n^{1+1/k} edges and O(ε^{-1}n^{1/k}log² n) lightness for a sequence of n points in a metric space. We show that these bounds cannot be significantly improved, by introducing an instance that achieves an Ω(1/k⋅ n^{1/k}) competitive ratio on both sparsity and lightness. Furthermore, we establish the trade-off among stretch, number of edges and lightness for points in ultrametrics, showing that one can maintain a (2+ε)-spanner for ultrametrics with O(ε^{-1}logε^{-1})⋅ n edges and O(ε^{-2}) lightness.

Subject Classification

ACM Subject Classification
  • Mathematics of computing → Approximation algorithms
  • Mathematics of computing → Paths and connectivity problems
  • Theory of computation → Computational geometry
  • spanner
  • online algorithm
  • lightness
  • sparsity
  • minimum weight


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


  1. Noga Alon, Baruch Awerbuch, Yossi Azar, Niv Buchbinder, and Joseph Naor. A general approach to online network optimization problems. ACM Transactions on Algorithms (TALG), 2(4):640-660, 2006. URL:
  2. Noga Alon and Yossi Azar. On-line Steiner trees in the Euclidean plane. Discrete & Computational Geometry, 10:113-121, 1993. URL:
  3. Stephen Alstrup, Søren Dahlgaard, Arnold Filtser, Morten Stöckel, and Christian Wulff-Nilsen. Constructing light spanners deterministically in near-linear time. Theoretical Computer Science, 2022. URL:
  4. 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. URL:
  5. Baruch Awerbuch, Yossi Azar, and Yair Bartal. On-line generalized Steiner problem. Theoretical Computer Science, 324(2-3):313-324, 2004. URL:
  6. Surender Baswana. Streaming algorithm for graph spanners - single pass and constant processing time per edge. Inf. Process. Lett., 106(3):110-114, 2008. URL:
  7. Surender Baswana, Sumeet Khurana, and Soumojit Sarkar. Fully dynamic randomized algorithms for graph spanners. ACM Trans. Algorithms, 8(4):35:1-35:51, 2012. URL:
  8. Ruben Becker, Sebastian Forster, Andreas Karrenbauer, and Christoph Lenzen. Near-optimal approximate shortest paths and transshipment in distributed and streaming models. SIAM J. Comput., 50(3):815-856, 2021. URL:
  9. Thiago Bergamaschi, Monika Henzinger, Maximilian Probst Gutenberg, Virginia Vassilevska Williams, and Nicole Wein. New techniques and fine-grained hardness for dynamic near-additive spanners. In Proc. 32nd ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1836-1855, 2021. URL:
  10. Piotr Berman and Chris Coulston. On-line algorithms for Steiner tree problems. In Proc. 29th ACM Symposium on Theory of Computing (STOC), pages 344-353, 1997. URL:
  11. Aaron Bernstein, Sebastian Forster, and Monika Henzinger. A deamortization approach for dynamic spanner and dynamic maximal matching. In Proc. 30th ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1899-1918, 2019. URL:
  12. Sujoy Bhore and Csaba D. Tóth. Light Euclidean Steiner spanners in the plane. In Proc. 37th International Symposium on Computational Geometry (SoCG), volume 189 of LIPIcs, pages 31:1-17. Schloss Dagstuhl, 2021. URL:
  13. Sujoy Bhore and Csaba D. Tóth. On Euclidean Steiner (1+ε)-spanners. In Proc. 38th Symposium on Theoretical Aspects of Computer Science (STACS), volume 187 of LIPIcs, pages 13:1-13:16. Schloss Dagstuhl, 2021. URL:
  14. Sujoy Bhore and Csaba D. Tóth. Online Euclidean spanners. In Proc. 29th European Symposium on Algorithms (ESA), volume 204 of LIPIcs, pages 116:1-16:19. Schloss Dagstuhl, 2021. URL:
  15. Greg Bodwin, Michael Dinitz, and Yasamin Nazari. Vertex fault-tolerant emulators. In Mark Braverman, editor, 13th Innovations in Theoretical Computer Science Conference (ITCS 2022), volume 215 of LIPIcs, pages 25:1-25:22, Dagstuhl, Germany, 2022. Schloss Dagstuhl. URL:
  16. Greg Bodwin and Sebastian Krinninger. Fully dynamic spanners with worst-case update time. In Proc. 24th Annual European Symposium on Algorithms (ESA), volume 57 of LIPIcs, pages 17:1-17:18. Schloss Dagstuhl, 2016. URL:
  17. Allan Borodin and Ran El-Yaniv. Online Computation and Competitive Analysis. Cambridge University Press, 1998. See this .
  18. Glencora Borradaile, Hung Le, and Christian Wulff-Nilsen. Greedy spanners are optimal in doubling metrics. In Proc. 13th ACM-SIAM Symposium on Discrete Algorithms SODA, pages 2371-2379, 2019. URL:
  19. Prosenjit Bose, Jean-Lou De Carufel, Pat Morin, André van Renssen, and Sander Verdonschot. Towards tight bounds on theta-graphs: More is not always better. Theor. Comput. Sci., 616:70-93, 2016. URL:
  20. Prosenjit Bose, Joachim Gudmundsson, and Pat Morin. Ordered theta graphs. Computational Geometry, 28(1):11-18, 2004. URL:
  21. Paul B. Callahan and S. Rao Kosaraju. Faster algorithms for some geometric graph problems in higher dimensions. In Proc. 4th ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 291-300, 1993. URL:
  22. Shiri Chechik and Christian Wulff-Nilsen. Near-optimal light spanners. ACM Trans. Algorithms, 14(3):33:1-33:15, 2018. URL:
  23. L. Paul Chew. There are planar graphs almost as good as the complete graph. J. Comput. Syst. Sci., 39(2):205-219, 1989. URL:
  24. Kenneth L. Clarkson. Approximation algorithms for shortest path motion planning. In Proc. 19th ACM Symposium on Theory of Computing (STOC), pages 56-65, 1987. URL:
  25. Michael J. Demmer and Maurice P. Herlihy. The arrow distributed directory protocol. In Proc. 12th Symposium on Distributed Computing (DISC), volume 1499 of LNCS, pages 119-133. Springer, 1998. URL:
  26. Michael Elkin. Streaming and fully dynamic centralized algorithms for constructing and maintaining sparse spanners. ACM Trans. Algorithms, 7(2):20:1-20:17, 2011. URL:
  27. Michael Elkin and Shay Solomon. Fast constructions of lightweight spanners for general graphs. ACM Trans. Algorithms, 12(3):29:1-29:21, 2016. URL:
  28. P. Erdős. Extremal problems in graph theory. Theory of Graphs and Its Applications (Proc. Sympos. Smolenice), pages 29-36, 1964. see URL:
  29. Joan Feigenbaum, Sampath Kannan, Andrew McGregor, Siddharth Suri, and Jian Zhang. Graph distances in the data-stream model. SIAM J. Comput., 38(5):1709-1727, 2008. URL:
  30. Arnold Filtser, Michael Kapralov, and Navid Nouri. Graph spanners by sketching in dynamic streams and the simultaneous communication model. In Proc. 32nd ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1894-1913, 2021. URL:
  31. Arnold Filtser and Shay Solomon. The greedy spanner is existentially optimal. SIAM J. Comput., 49(2):429-447, 2020. URL:
  32. John Fischer and Sariel Har-Peled. Dynamic well-separated pair decomposition made easy. In Proc. 17th Canadian Conference on Computational Geometry (CCCG), pages 235-238, 2005. see URL:
  33. Jie Gao, Leonidas J. Guibas, and An Nguyen. Deformable spanners and applications. Comput. Geom., 35(1-2):2-19, 2006. URL:
  34. Lee-Ad Gottlieb, Aryeh Kontorovich, and Robert Krauthgamer. Efficient regression in metric spaces via approximate Lipschitz extension. IEEE Transactions on Information Theory, 63(8):4838-4849, 2017. URL:
  35. Lee-Ad Gottlieb and Liam Roditty. An optimal dynamic spanner for doubling metric spaces. In Proc. 16th Annual European Symposium on Algorithms (ESA), volume 5193 of LNCS, pages 478-489. Springer, 2008. URL:
  36. Elena Grigorescu, Young-San Lin, and Kent Quanrud. Online directed spanners and Steiner forests. In Proc. Approximation, Randomization, and Combinatorial Optimization Algorithms and Techniques (APPROX/RANDOM), volume 207 of LIPIcs, pages 5:1-5:25. Schloss Dagstuhl, 2021. URL:
  37. Joachim Gudmundsson and Christian Knauer. Dilation and detours in geometric networks. In Handbook of Approximation Algorithms and Metaheuristics, volume 2. Chapman and Hall/CRC, 2nd edition, 2018. see URL:
  38. Joachim Gudmundsson, Christos Levcopoulos, Giri Narasimhan, and Michiel Smid. Approximate distance oracles for geometric spanners. ACM Transactions on Algorithms (TALG), 4(1):1-34, 2008. URL:
  39. Anupam Gupta, R. Ravi, Kunal Talwar, and Seeun William Umboh. LAST but not least: Online spanners for buy-at-bulk. In Philip N. Klein, editor, Proc. 28th ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 589-599, 2017. URL:
  40. MohammadTaghi Hajiaghayi, Vahid Liaghat, and Debmalya Panigrahi. Online node-weighted steiner forest and extensions via disk paintings. SIAM J. Comput., 46(3):911-935, 2017. URL:
  41. Sariel Har-Peled. Geometric Approximation Algorithms, volume 173 of Mathematical Surveys and Monographs. AMS, Providence, RI, 2011. see URL:
  42. Sariel Har-Peled and Manor Mendel. Fast construction of nets in low-dimensional metrics and their applications. SIAM J. Comput., 35(5):1148-1184, 2006. URL:
  43. Maurice Herlihy, Srikanta Tirthapura, and Rogert Wattenhofer. Competitive concurrent distributed queuing. In Proc. 20th ACM Symposium on Principles of Distributed Computing (PODC), pages 127-133, 2001. URL:
  44. Makoto Imase and Bernard M. Waxman. Dynamic Steiner tree problem. SIAM Journal on Discrete Mathematics, 4(3):369-384, 1991. URL:
  45. J. Mark Keil. Approximating the complete Euclidean graph. In Proc. 1st Scandinavian Workshop on Algorithm Theory (SWAT), volume 318 of LNCS, pages 208-213. Springer, 1988. URL:
  46. Robert Krauthgamer and James R. Lee. Navigating nets: Simple algorithms for proximity search. In Proc 15th ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 798-807, 2004. see URL:
  47. Hung Le and Shay Solomon. Truly optimal Euclidean spanners. In Proc. 60th IEEE Symposium on Foundations of Computer Science (FOCS), pages 1078-1100, 2019. URL:
  48. Hung Le and Shay Solomon. Light Euclidean spanners with Steiner points. In Proc. 28th European Symposium on Algorithms (ESA), volume 173 of LIPIcs, pages 67:1-67:22. Schloss Dagstuhl, 2020. URL:
  49. Andrew McGregor. Graph stream algorithms: a survey. SIGMOD Rec., 43(1):9-20, 2014. URL:
  50. Joseph Naor, Debmalya Panigrahi, and Mohit Singh. Online node-weighted Steiner tree and related problems. In Proc. 52nd IEEE Symposium on Foundations of Computer Science (FOCS), pages 210-219, 2011. URL:
  51. Giri Narasimhan and Michiel Smid. Geometric Spanner Networks. Cambridge University Press, 2007. URL:
  52. David Peleg and Alejandro A. Schäffer. Graph spanners. Journal of Graph Theory, 13(1):99-116, 1989. URL:
  53. David Peleg and Jeffrey D. Ullman. An optimal synchronizer for the hypercube. SIAM J. Comput., 18(4):740-747, 1989. URL:
  54. 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. URL:
  55. Liam Roditty. Fully dynamic geometric spanners. Algorithmica, 62(3-4):1073-1087, 2012. URL:
  56. Jim Ruppert and Raimund Seidel. Approximating the d-dimensional complete Euclidean graph. In Proc. 3rd Canadian Conference on Computational Geometry (CCCG), pages 207-210, 1991. Google Scholar
  57. Christian Schindelhauer, Klaus Volbert, and Martin Ziegler. Geometric spanners with applications in wireless networks. Computational Geometry, 36(3):197-214, 2007. URL:
  58. Michiel H. M. Smid. The well-separated pair decomposition and its applications. In Handbook of Approximation Algorithms and Metaheuristics, volume 2. CRC Press, 2nd edition, 2018. URL:
  59. Seeun William Umboh. Personal communication, October 2021. Google Scholar
  60. Andrew Chi-Chih Yao. Space-time tradeoff for answering range queries (extended abstract). In Proc. 14th Annual ACM Symposium on Theory of Computing (STOC), pages 128-136, 1982. URL:
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