betaFeedback

WorksComputer Science

On Euclidean Diameter in Dynamic Streams

Abstract

We give a streaming algorithm for maintaining the diameter of a high-dimensional Euclidean point set under arbitrary insertions and deletions that achieves update time polylogarithmic in the number of points and polynomial in the dimension. For every fixed c>3c>\sqrt3, there is an εc>0ε_c > 0 such that our one-pass algorithm uses \tilde O(N^{1-ε_c}\poly(d)) space, has worst-case update time \poly(d,\log N), and maintains a factor-cc pair witness. On the hardness side, we prove that every constant-factor approximation requires polynomial memory even on short dynamic streams: a factor-cc approximation needs NΩ(1/(c2log⁡(c+1)))N^{Ω(1/(c^2\log(c+1)))} space on streams of at most 2N−12N-1 updates. Our upper bound combines a geometric hull, Gaussian hashing through successively smaller caps, and local and global rebuilding schedules. Every update changes only one leaf of the hash hierarchy, while the answer is maintained through small variance certificates. The lower bound is based on a communication complexity argument. Together, these results separate the polynomial memory regime from the time needed to process an update.

Introduction

The diameter of a point set is determined by two points, yet maintaining even a rough estimate can require information about many points that are far from the current extremes. A deletion can remove a witness, and a sequence of deletions can expose a point that the algorithm discarded long ago. In this work, we study Euclidean diameter in the fully dynamic streaming model, where an update inserts or deletes a point. Our goal is to maintain an estimate and an actual witness pair, while minimizing the information that the algorithm must retain and the time it takes to process each update, with a focus on achieving update time polynomial in dimension and polylogarithmic in the number of points.

For insertion-only Euclidean streams, Agarwal and Sharathkumar [AS15] obtained a (2+ε)(\sqrt{2}+\varepsilon)-approximation and showed that a factor below 2\sqrt{2} can require linear space in high dimension. Halldórsson, Matsakis, and Veselý [9] achieve the same upper bound while storing only O(ε−2log⁡(1/ε))O(\varepsilon^{-2}\log(1/\varepsilon)) points. To handle deletions, Indyk’s asymmetric embedding [11], in the dynamic-streaming formulation of Padaki, Singal, and Waingarten [PSW26], gives space O~(n2/(c2−1))\widetilde{O}(n^{2/(c^2-1)}) for approximation cc. Its direct implementation updates every projection coordinate. At factor two this yields an n2/3n^{2/3} dependence in both memory and update time, up to polynomial factors in dimension and logarithmic parameters. In view of the lower bounds of Khanna, Padaki, Singal, and Waingarten [KPSW25] for general metrics and of Padaki, Singal, and Waingarten [PSW26] for Euclidean space, Ω~(1/c2)\widetilde{\Omega}(1/c^2) space usage is required by any algorithm that is correct on streams of unrestricted length and frequency (a fixed horizon otherwise would limit the deletion histories the algorithm has to handle). Padaki et al. explicitly ask whether polynomial space is still necessary with a polynomial horizon [PSW26, Section 1.2].

Fully dynamic data structures offer another way to handle deletions. Chan and Pathak [6] used enclosing balls in high dimension, and Banihashem et al. [3] maintain a factor-two diameter with polynomial worst-case update time against adaptive updates. These fully dynamic data structures retain the input. This leaves open the question whether a streaming algorithm can maintain an approximate farthest pair using sublinear space and update time polynomial in the dimension and polylogarithmic in the stream parameters.

Our contribution

Let PtP_t denote the current support and Dt=diam⁡(Pt)D_t=\operatorname{diam}(P_t), with Dt=0D_t=0 when ∣Pt∣≤1|P_t|\le1. Write

L=(d,log⁡(N+2),log⁡(Δ+2),log⁡((T+2)/δ)).\mathcal{L}=(d,\log(N+2),\log(\Delta+2),\log((T+2)/\delta)).

Here N≥2N\ge2 is a supplied upper bound on the maximum number of simultaneously active distinct points, and TT is a supplied update horizon. The approximation convention is Dt/c≤Lt≤DtD_t/c\le L_t\le D_t. Space is measured in ordinary machine words; the model and the treatment of arithmetic are specified below.

Theorem 1.1 (Polynomial update time). For every fixed c>3c>\sqrt{3}, there is a constant εc>0\varepsilon_c>0 and a randomized one-pass algorithm with

space N1−εcpoly⁡c(L),worst-case update time poly⁡c(L).\text{space } N^{1-\varepsilon_c}\operatorname{poly}_c(\mathcal{L}),\qquad\text{worst-case update time }\operatorname{poly}_c(\mathcal{L}).

For every oblivious strict-turnstile stream of at most TT updates, with probability at least 1−δ1-\delta the algorithm maintains Dt/c≤Lt≤DtD_t/c\le L_t\le D_t simultaneously at all times. The answer is cached. Every nonzero answer is the distance between two current original points, on every random outcome. The resource bounds also hold on every random outcome.

The theorem includes factor two. Section A.1 gives a complete numerical choice with ϵ2=10−10\epsilon_2 = 10^{-10}. The small exponent is a conservative existence bound; the contribution is the absence of a positive power of NN in the update time. We do not optimize this exponent or claim that the resulting algorithm is practical. A query returns a pointer to the stored score and witness records in constant time. Writing the exact score, point keys, or coordinates takes the corresponding polynomial output time.

Theorem 1.2 (A short-stream space lower bound). For every fixed c≥1c \ge1, any randomized streaming algorithm that returns a factor-cc estimate with error at most 1/101/10 requires

NΩ(1/(c2log⁡(c+1)))N^{\Omega(1/(c^2 \log(c+1)))}

memory words in the worst case. The bound holds for streams with peak cardinality at most NN and at most 2N−12N-1 updates, with all insertions before all deletions and frequencies in {0,1}\{0,1\} at every prefix. The points have dimension Oc(log⁡N)O_c(\log N) and integer coordinates of absolute value Oc(log⁡N)O_c(\sqrt{\log N}). Only a final query is required, and the algorithm may be nonlinear, history dependent, and computationally unbounded.

The word size in the second theorem is polylogarithmic in NN, as it is for the standard RAM model on these instances. The proof first bounds the information in the state; dividing by the word length preserves the stated exponent. In particular, the theorem excludes poly⁡(d,log⁡N,log⁡Δ,log⁡T)\operatorname{poly}(d,\log N,\log\Delta,\log T) memory for every fixed approximation factor. It is a space lower bound, and gives no positive-power lower bound on update time.

What is new relative to the space lower bound. The lower-bound contribution is its model and proof, rather than an improved dependence on cc over [PSW26]. We use a single insertion prefix and a single deletion suffix, with no multiplicities or long history. An arbitrary streaming state becomes a message in a finite communication problem. Its conditional entropies give the required submodular function directly, so there is no reduction to linear sketches. The upper-bound contribution is complementary: a constant-factor approximation can use polynomial memory without spending polynomial time in NN on an update. The factor-two space exponents in Table 1 and the lower bound do not match; an optimal factor-two time–space tradeoff remains open.

Factor-two guaranteeMemoryUpdate timeOutput
Gaussian-embedding baselineN2/3poly⁡(L)N^{2/3}\operatorname{poly}(\mathcal{L})N2/3poly⁡(L)N^{2/3}\operatorname{poly}(\mathcal{L})Cached scalar
Theorem 1.1N1−ϵ2poly⁡(L)N^{1-\epsilon_2}\operatorname{poly}(\mathcal{L})poly⁡(L)\operatorname{poly}(\mathcal{L})Current witness pair

Table 1. The two upper bounds address different time–space tradeoffs. Both use the peak bound NN and an oblivious finite horizon in this comparison. Appendix § 12.§ 3 gives the implementation of the established embedding baseline. Theorem 1.2 rules out polylogarithmic memory, but does not distinguish these update times.

Technical overview

A small sample may miss an endpoint of the farthest pair. It can still tell us where to look for such a point. We use the sample to bound distances in a region of space, recover the points outside that region, and maintain a current pair from the sample and the recovered points. The lower bound uses a tight cluster and one distant point to show how much the algorithm must remember about earlier insertions.

A sample and its hull

Take a small random sample SS of the current distinct points. A ball that omits many points is unlikely to contain the whole sample. A sampling bound for Euclidean balls makes this statement simultaneous over all centers and radii, so it applies even to a ball chosen after seeing SS.

Fix an expansion factor a>1a > 1. Expand every ball containing SS about its own center by aa and intersect the expanded balls. Call the intersection Ha(S)\mathcal{H}_a(S). If a point lies outside this hull, some ball contains SS while the point is farther than aa times the ball’s radius from its center. The sampling bound says that this ball contains most of the input. The other useful property is the diameter bound from Lemma 5.1.

diam⁡(Ha(S))≤2a2−1diam⁡(S).\operatorname{diam}(\mathcal{H}_a(S)) \le\sqrt{2a^2-1}\operatorname{diam}(S).

A hull point lies within (a2−1)V\sqrt{(a^2-1)V} of the mean of a distribution on SS with variance VV. For two such distributions, the squared distance between their means plus their variances equals the expected squared distance between independent draws from them, at most diam⁡(S)2\operatorname{diam}(S)^2. Cauchy–Schwarz then gives the hull diameter bound.

The sample diameter accounts for pairs inside the hull. We recover every exterior point into a candidate set, which accounts for pairs outside the hull. For a mixed pair, viewing the hull from the exterior endpoint bounds the distance to the interior endpoint using a farthest point in SS. To find the exterior points we use fixed filters drawn independently of the sample, so we can analyze them for a witnessing ball chosen after seeing SS.

Recovering the points outside the hull

Consider one of the witnessing balls and one target outside it. The filters should place that target in a bucket shared by few other points. We use several independent Gaussian projections. Each projection has a randomly shifted grid, and a hash maps its cells to buckets. The tuple of bucket identifiers determines a single leaf with a sparse-recovery sketch. This assignment depends only on the point and the preselected maps, so an insertion or deletion changes one leaf per scale and repetition.

The analysis studies which points of the witnessing ball can follow the target into the same projected cell. Normalize the ball to unit radius and consider a target at distance at least λ>2\lambda> \sqrt{2} from its center. If a point in the ball has coordinate tt along the target axis, its squared perpendicular component is at most 1−t21-t^2. Conditional on the projection of the axis, that perpendicular component supplies independent Gaussian noise. The squared axial separation exceeds its variance scale by a positive margin, since (λ−t)2−(1−t2)≥λ2/2−1>0(\lambda-t)^2-(1-t^2) \ge\lambda^2/2-1 > 0. The collision analysis uses this margin to enclose points with weaker same-cell bounds in a cap facing the target. This cap fits in a smaller ball (Figure 1). The bound on the squared radius drops by a fixed amount at each stage, so after a constant number of stages the difficult region is empty. The analysis chooses a covering center on the target axis at each stage while the algorithm uses the same maps for all targets.

A cross-section for the two-stage construction

Figure 1. A cross-section for the two-stage construction. The first grid’s difficult points lie in the shaded cap t≥0.6t \ge0.6 of the unit ball. The dashed ball contains this entire cap and determines the smaller radius of the second grid. Its center and the target direction uu are used only in the analysis.

To bound the load at a target’s leaf, separate bulk points by the first stage at which they leave the nested difficult regions. At that stage, a point lies in the covering ball and has a small chance of sharing the target’s grid cell. With constant probability the hash isolates the target’s bucket from the other cells in the projected core. Together these give an inverse bucket-count factor and an extra saving exponential in the projection dimension. At later stages the same-cell probability stays small, and distinct cells can share a bucket only through a hash collision. Thus the inverse bucket-count factors from the exit stage onward cancel the corresponding factors when we sum capacity over all leaves. We increase the projection dimensions geometrically so that the extra saving at the exit stage pays for the bucket counts of earlier stages with a power of NN to spare.

The leaf capacity must also allow every point outside the original ball to collide. With sampling probability of order Ns−1N^{s-1} for a small constant s>0s > 0, the number of exceptions is at most N1−sN^{1-s} times polynomial factors in the dimension and the logarithmic parameters. Using O(Ns/2)O(N^{s/2}) leaves keeps the space for these exceptions sublinear as well. § 6 gives the load and space calculations.

Our recovery argument uses separation above 2\sqrt{2} in units of the witness radius. Taking aa just above 2\sqrt{2} gives a hull diameter factor 2a2−1\sqrt{2a^2-1} just above 3\sqrt{3}.

Maintaining a current witness

A sparse leaf can contain too many points to decode in one update. We measure the age of a snapshot by updates to its own leaf. A leaf with capacity KK takes a snapshot every KK local updates and spends the next block decoding and replaying changes. Its serving snapshot is at most 2K2K local updates old. If the leaf has at most KK points now, that snapshot had at most 3K3K points, within the decoder’s budget. A leaf that receives no updates needs no further work to keep its serving dictionary current.

The decoder certifies the identities and the completeness of its snapshot from exact moments and total mass. A signed change log converts each recovered multiplicity to its current value. When a point appears in several leaves, its entries share a single current count. Original deletions update this count before background work runs, so even an unsuccessful decoding attempt can only affect which current points are available as candidates. § 7 gives the reconstruction and its schedule.

Write CC for the resulting set of current candidates. Scanning CC after every update would lose the time bound. A dynamic hierarchy on CC maintains a pair that approximates diam⁡(C)\operatorname{diam}(C) and exposes a small family of covering balls. Each ball is described by a few current points, its anchors, with convex weights. Its center qq is their weighted mean, and its radius is close to the square root of their variance VV. For a candidate xx covered by this ball and a hull point yy, the triangle inequality bounds ∥x−y∥\lVert x-y\rVert by the ball’s radius plus aa times the farthest sample distance from qq.

We can approximate that farthest distance by querying the sample for a point zz. To turn the reply into a pair of input points, take the anchor pp farthest from zz. The weighted average of the squared anchor-to-zz distances gives

∥p−z∥2≥V+∥q−z∥2.\lVert p-z\rVert^2 \ge V+\lVert q-z\rVert^2.

The same pair thus accounts for both the radius and the distance from the center to the sample. Cauchy–Schwarz gives a mixed-pair factor arbitrarily close to 1+a2\sqrt{1+a^2} as the ball and lookup accuracies improve. The hierarchy’s factor for pairs in CC can be made arbitrarily close to 2\sqrt{2}. Both fit within the hull factor when a>2a>\sqrt{2}.

Fast farthest-point lookup uses a second schedule, measured in stream updates. At the start of a block we freeze the live sample. We compute its diameter and build a farthest-point lookup table on a projected grid during that block, then use them in the next block. The sample has size on the order of NsN^s up to polynomial factors. Taking ss small lets us spread its polynomial preprocessing over a block of length on the order of N1−sN^{1-s}. A deletion of a sampled identity invalidates the corresponding frozen generation immediately. On an oblivious stream, the identities deleted during its two blocks are fixed in advance. The probability that any is sampled is at most their number times the sampling rate. With a small constant in the block length, the sample survives with constant probability. Repeating the whole construction independently gives the approximation throughout the stream. The algorithm caches the longest of the sample diameter pair, the candidate hierarchy’s witness, and the mixed pairs found by lookup (§ 4).

A direct lower bound on short set streams

A deletion suffix can make a final diameter query reveal one bit of the insertion prefix. Alice has one independent bit for each point on a fine net of the unit sphere and inserts the points whose bits are one. She sends the memory state to Bob. Bob is given a small cap and its antipodal target. He knows which points were inserted outside the cap and the target. He first puts a fresh anchor near the cap center, then deletes the points he knows were inserted. The remaining set has small diameter if the target is absent and large diameter if it is present. A cap of radius proportional to 1/c1/c separates the two cases by more than a factor cc.

Bob’s knowledge of other bits matters because one message can encode several bits together. Let MM be the message after fixing Alice’s randomness, and let f(A)f(A) be the conditional entropy of MM when Bob knows the bits outside AA. This set function is monotone and submodular, with total value at most the message length ss. For a cap BB and a target zz, the gain f(B∪{z})−f(B)f(B\cup\{z\})-f(B) measures the information the message gives about the target bit after Bob learns the bits outside the cap and the target. This gain is zero if zz is already in BB. Bob decodes an antipodal target with bounded error, so those queries have a constant average gain.

We relate these gains across chord lengths. Given several cap–target pairs, form a table whose entry for cap ii and target jj is their gain. A submodular inequality bounds the square of the sum along the diagonal by 2s2s times the sum of the entire table. Its proof charges the diagonal gains along a random chain of targets, with cross entries accounting for the reduction in a gain when earlier targets have already been added.

To use the inequality, place the paired cap centers and targets at opposite ends of diameters of a randomly oriented affine subsphere of diameter tt. Every paired chord then has length tt, while the cross chords typically have length near t/2t/\sqrt{2} (Figure 3). If a(t)a(t) denotes the average gain at chord length tt, rotational averaging yields a(t)2≤2s E[a(tZ0)]a(t)^2\le2s\,\mathbb{E}[a(t\sqrt{Z_0})], where Z0Z_0 is the squared ratio of a random cross chord to tt and concentrates near 1/21/2. The proof allows repeated targets in the table, including those created by rounding to the finite net.

A two-dimensional cross-section of the affine subsphere

Figure 3. A two-dimensional cross-section of the affine subsphere, with center o=1−R2 uo=\sqrt{1-R^2}\,u and radius R=t/2R=t/2. Each pair (xi,zi)(x_i,z_i) is antipodal within this subsphere, so its distance is exactly tt. For independent directions, an off-diagonal distance is tZ0t\sqrt{Z_0}, where Z0Z_0 is concentrated near 1/21/2. This is the geometric step that propagates an entropy marginal from distance tt toward distance t/2t/\sqrt{2}.

Starting with the positive gain at the antipodes, the recurrence forces positive gain at shorter chords if ss is small. Each step squares the gain, so the proof adjusts the tail cutoff for Z0Z_0 as the gains become smaller. This reaches the band where the target already lies in the cap and the gain is zero, unless the message has exp⁡(Ω(d/c2))\exp(\Omega(d/c^2)) bits. The finite sphere net has exp⁡(O(dlog⁡(c+1)))\exp(O(d\log(c+1))) points. Each site can be inserted once and deleted once, so converting the bit bound to a space bound uses only a linear-length set stream (§ 10).

Further related work

Geometric sketches. Jiang, Krauthgamer, and Sapir [12] use moderate dimension reduction for dynamic-streaming kk-center. On polynomial-length streams they obtain an O(α)O(\alpha) approximation in n1/α2poly⁡(kdlog⁡n)n^{1/\alpha^2}\operatorname{poly}(kd\log n) bits. The one-center radius and diameter are within a factor of two, so their result also gives an O(α)O(\alpha) diameter estimate. Their two-level sampler can also return original input identities. Our filters isolate exterior points at a prescribed separation and require one leaf update per hierarchy. The hull then gives an explicit diameter factor arbitrarily close to 3\sqrt{3} from above. Geometric hashing has also been used for dynamic-streaming facility location [5], and streaming coresets address kk-center with outliers [8].

Deletions and representatives. Banihashem et al. [3] maintain a robust representative for a fully stored dynamic set. Here a representative of the small sample can disappear on a single deletion. We invalidate its generation and bound the probability of this event on an oblivious stream. Blank et al. [2] obtain a (1+3+ε)(1+\sqrt{3}+\varepsilon) approximation to Euclidean diameter in the expiration model, where an item’s deletion time is given on arrival. In our lower bound the choice of which items expire encodes the decoder’s question.

From a streaming state to a message. The general-metric and Euclidean lower bounds of Khanna et al. [KPSW25] and Padaki et al. [PSW26] connect streaming to linear sketches and index coding. Li, Nguyen, and Woodruff [LNW14], Kallaugher and Price [KP20], and Jiang, Liu, and Yu [13] study when streaming algorithms admit linear-sketch simulations. The last work covers polynomial-length strict-turnstile streams and allows intermediate multiplicities above one. We use the state itself as a message on a stream that stays binary. Conditional entropy is a familiar tool for nonlinear index coding [4]. The geometric step here relates its marginals at two chord lengths and survives rounding to a finite input universe.

Model and preliminaries

An update is (x,σ)(x,\sigma) with x∈[−Δ,Δ]d∩Zdx\in[-\Delta,\Delta]^d\cap\mathbb{Z}^d and σ∈{−1,1}\sigma\in\{-1,1\}. The stream starts empty and all frequencies remain nonnegative. The support PP consists of locations of positive frequency. Each update supplies its point’s coordinates. The algorithm has no external copy of the support. An oblivious stream is fixed independently of all random choices and answers. We assume N≥2N\ge2, T,Δ,d≥1T,\Delta,d\ge1 and 0<δ<1/100<\delta<1/10. A bounded range of NN depending only on the fixed approximation parameters is handled by storing the set with its counts and computing its diameter directly.

Arithmetic and scheduling. In the technical sections we abbreviate the parameters by

L=(d,log⁡(N+2),log⁡(Δ+2),log⁡((T+2)/δ)).\mathcal{L}=(d,\log(N+2),\log(\Delta+2),\log((T+2)/\delta)).

References

  1. [2]Lotte Blank, Sergio Cabello, Mohammad Taghi Hajiaghayi, Robert Krauthgamer, Sepideh Mahabadi, André Nusser, Jeff M. Phillips, and Jonas Sauer. The expiration streaming model: Diameter, k-center, counting, sampling, and friends. In 53rd International Colloquium on Automata, Languages, and Programming (ICALP), volume 374 of Leibniz International Proceedings in Informatics, pages 37:1–37:24, 2026.arxiv.org/abs/2509.07587
  2. [3]Kiarash Banihashem, Jeff Giliberti, Samira Goudarzi, MohammadTaghi Hajiaghayi, Peyman Jabbarzade, and Morteza Monemizadeh. Dynamic diameter in high-dimensions against adaptive adversary and beyond. In Advances in Neural Information Processing Systems (NeurIPS), volume 38, 2025. Full version arXiv:2511.01065.arxiv.org/abs/2511.01065
  3. [4]Anna Blasiak, Robert Kleinberg, and Eyal Lubetzky. Broadcasting with side information: Bounding and approximating the broadcast rate. IEEE Transactions on Information Theory, 59(9):5811–5823, 2013.DOI
  4. [5]Artur Czumaj, Arnold Filtser, Shaofeng H.-C. Jiang, Robert Krauthgamer, Pavel Veselý, and Mingwei Yang. Streaming facility location in high dimension via geometric hashing, 2023. arXiv:2204.02095v5. Preliminary version in FOCS 2022.arxiv.org/abs/2204.02095
  5. [6]Timothy M. Chan and Vinayak Pathak. Streaming and dynamic algorithms for minimum enclosing balls in high dimensions. Computational Geometry, 47:240–247, 2014. Preliminary version in WADS 2011.
  6. [7]Thomas M. Cover and Joy A. Thomas. Elements of Information Theory. John Wiley & Sons, second edition, 2006.
  7. [8]Mark de Berg, Leyla Biabani, and Morteza Monemizadeh. k-center clustering with outliers in the MPC and streaming model. In 37th IEEE International Parallel and Distributed Processing Symposium (IPDPS), pages 853–863, 2023.arxiv.org/abs/2302.12811
  8. [9]Magnús M. Halldórsson, Nicolaos Matsakis, and Pavel Veselý. Streaming diameter of high-dimensional points. In 33rd Annual European Symposium on Algorithms (ESA), volume 351 of Leibniz International Proceedings in Informatics, pages 58:1–58:10, 2025.arxiv.org/abs/2505.16720
  9. [10]David Haussler and Emo Welzl. ε-nets and simplex range queries. Discrete & Computational Geometry, 2:127–151, 1987.
  10. [11]Piotr Indyk. Better algorithms for high-dimensional proximity problems via asymmetric embeddings. In Proceedings of the Fourteenth Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 539–545, 2003.
  11. [12]Shaofeng H.-C. Jiang, Robert Krauthgamer, and Shay Sapir. Moderate dimension reduction for k-center clustering. In 40th International Symposium on Computational Geometry (SoCG), volume 293 of Leibniz International Proceedings in Informatics, pages 64:1–64:16, 2024.DOI
  12. [13]Cheng Jiang, Yinchen Liu, and Huacheng Yu. Turnstile streaming algorithms might (still) as well be linear sketches, for polynomial-length streams, 2026. arXiv:2604.22052v2.arxiv.org/abs/2604.22052

Paper details

vlnc:W_z3ujnth7
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 4

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

OpenAI Astra, Gemini 4 Argon (bare)

View statement
Looking for related papers…
Contents