 # The well-separated pair decomposition for balls

Given a real number t>1, a geometric t-spanner is a geometric graph for a point set in R^d with straight lines between vertices such that the ratio of the shortest-path distance between every pair of vertices in the graph (with Euclidean edge lengths) to their actual Euclidean distance is at most t. An imprecise point set is modeled by a set R of regions in R^d. If one chooses a point in each region of R, then the resulting point set is called a precise instance of R. An imprecise t-spanner for an imprecise point set R is a graph G=(R,E) such that for each precise instance S of R, graph G_S=(S,E_S), where E_S is the set of edges corresponding to E, is a t-spanner. In this paper, we show that, given a real number t>1, there is an imprecise point set R of n straight-line segments in the plane such that any imprecise t-spanner for R has Ω(n^2) edges. Then, we propose an algorithm that computes a Well-Separated Pair Decomposition (WSPD) of size O(n) for a set of n pairwise disjoint d-dimensional balls with arbitrary sizes. Given a real number t>1 and given a set of n pairwise disjoint d-balls with arbitrary sizes, we use this WSPD to compute in O(n n+n/(t-1)^d) time an imprecise t-spanner with O(n/(t-1)^d) edges for balls.

## Authors

##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## 1 Introduction

We use a geometric algorithm to solve a geometric problem. The input of geometric problems is some spatial objects, for example, a set of points in the plane. In many problems of computational geometry, there exists an assumption that the input data is precise and known exactly. However, there are many aspects of uncertainty in data, such as input data have been collected using measuring equipment that is not precise enough, or may have been stored as floating point with a limited number of decimals. There are many work in computational geometry that consider geometric algorithms for imprecise inputs [1, 2, 3, 4, 5, 6]. In these work, each point is modeled by a region in , and then for these regions constructing a geometric structure such as the convex hull, the Voronoi diagram, or the (Delaunay) triangulation is considered.

A geometric network is a weighted undirected graph whose vertices are points in , and in which each edge is a straight-line segment with weight equal to the Euclidean distance between its endpoints. In a geometric network on a set of points, the graph distance of is the length of the shortest path between and in . Then, denotes the dilation between and in . We say that there exists a -path () between two vertices in if and a network is called a -spanner if  for any pair of distinct points .

We call any set of regions in an imprecise point set. For a given imprecise point set , any set , where , for all , is called a precise instance of . For a given imprecise point set , a graph , where is a set of unordered pairs of regions in , is called an imprecise geometric graph.

Given an imprecise geometric graph , and for each precise instance of , we call the geometric graph , where , a precise instance of corresponding to . Also, we call an imprecise -spanner (), if , for any precise instance of , is a -spanner. It is easy to see that if there are two overlapping regions in , then there must be an edge between the overlapping regions in any -spanner for . Therefore, the number of edges of a -spanner for depends on the number of overlapping regions. Hence, in the rest of the paper, we assume that contains only pairwise disjoint regions.

Abam et al.  considered the problem of constructing a spanner for pairwise disjoint balls in . For a given , they showed that there exists an imprecise -spanner with edges that can be computed in time when all balls have similar sizes. Their spanner construction was based on the Well-Separated Pair Decomposition (WSPD)  approach, see also Chapter 9 of the book by Narasimhan and Smid . They obtained a WSPD of imprecise points, i.e., balls, using a WSPD of the center points. A Well-Separated Pair Decomposition (WSPD) for a point set with respect to a real number is a set of pairs where (i) , (ii) and are -well-separated, i.e., there are -dimensional balls and containing and , respectively, such that , and (iii) for any two points there is exactly one index such that and or vice versa. When the sizes of the balls vary greatly, i.e. there is a set of pairwise disjoint balls in  with arbitrary sizes, they used a Semi-Separated Pair Decomposition (SSPD) [10, 11] to solve the problem. They proved that there is an imprecise -spanner with edges that can be computed in time. They constructed an SSPD of imprecise points using an SSPD of the center points. An SSPD is defined as a WSPD, except that, instead of and are -well-separated in the condition (ii) we have and are -semi-separated, i.e., there are balls and containing and , respectively, such that .

Zeng and Gaoy  considered the construction of a Euclidean spanner for balls in  with radius in two phases. In the first phase, they preprocessed balls in time , where is the ratio between the farthest and the closest pair of centers of the balls. In the second phase, they could compute (or update) a -spanner for any precise instance of the balls with edges in time .

In this paper, we consider the problem of computing an imprecise -spanner for pairwise disjoint balls in , given a real number . These balls have arbitrary sizes. We present an algorithm that computes an imprecise -spanner with edges in time, when and are constants. The algorithm uses the WSPD to compute this imprecise spanner. Also, we give a set of pairwise disjoint regions in the plane such that any imprecise -spanner for the regions is the complete graph.

The organization of the paper is as follows. In Section 2, we prove that there is a set of pairwise disjoint straight-line segments in the plane such that any imprecise -spanner for the segments has edges. Then, given pairwise disjoint balls in  with arbitrary sizes, and given a real number , we consider the problem of computing an imprecise -spanner for the balls. In Section 3, we use the WSPD to compute an imprecise -spanner for the balls with edges in time.

## 2 An imprecise spanner with quadratic size

In this section, we present a set of pairwise disjoint convex regions in the plane such that any imprecise -spanner for the regions, for any given , must be the complete graph. This shows that it is not interesting to study imprecise spanners for any set of regions.

Let be an integer, and define . If we rotate the positive -axis by angles , for each with , then we get rays. We number the rays starting from the positive -axis and in counter-clockwise order. We denote the set of all these rays by .

Let us model an imprecise point as a line segment, and let be a set of pairwise disjoint line segments in the plane that is constructed as follows. Let and be two disks centered at the origin that have radii and , respectively. Let and , for , be the intersections of -th ray in with the boundaries of and , respectively. The line segment joining and , denoted by , is an element of , see Figure 1. It is easy to see that .

###### Lemma 1

The complete graph is the only imprecise spanner of , for any .

###### Proof

Assume that and are two distinct line segments in , where . Let be an imprecise -spanner for with no edge between and . Consider the precise instance of , that is, choose and on and , respectively, and on other line segments, for with . It is clear that . Since there is no edge between and in , the shortest path between and in passes through some , for some with . The Euclidean distance between and and the Euclidean distance between and are greater than and, hence, it follows that . Therefore, we get , which is a contradiction, because we assume that is an imprecise -spanner for . Hence, there must be an edge between any two distinct elements of in any imprecise -spanner for .

## 3 An imprecise spanner for balls

Let be a set of pairwise disjoint -dimensional balls. In this section, we present an algorithm that computes an imprecise spanner for with edges in time. The algorithm uses the WSPD [8, 9] for computing the imprecise spanner.

### 3.1 A well-separated pair for balls

Let be a bounded point set of . We define bounding box of , denoted by , as the smallest axes-parallel -dimensional hyperrectangle that contains . A -dimensional hyperrectangle is the Cartesian product of closed intervals. More formally,

 R=[l1,r1]×[l2,r2]×…×[ld,rd],

where and are real numbers with , for . We denote the length of in the -th dimension by . We denote the maximum and minimum lengths of by and , respectively. Let be a -dimensional ball that contains . We denote the distance between two disjoint -dimensional balls and by , i.e.,

 d(C,C′)=|cc′|−(r+r′),

where and are the center and radius, respectively, of , and and are the center and radius, respectively, of . (Clearly, if or is a point, then its radius is zero.)

###### Definition 1

[8, 9] Let be a real number, and let and be two finite sets of points in . We say that and are well-separated with respect to (or -well-separated) if there are two disjoint -dimensional balls and , such that

1. and have the same radius, and

2. .

In the following, we define -well-separated for sets and of balls. Assume that or contains at least one nondegenerate ball, i.e., a ball with a positive radius. Let be a set of pairwise disjoint -dimensional balls with arbitrary sizes, and let be the center of , for all . For any , let .

###### Definition 2

Let be a real number, and let and be two nonempty subsets of . We say that and are well-separated with respect to (or -well-separated) if there are two disjoint -dimensional balls and with the same radius, such that one of the following conditions holds:

• ,

• , for some , , and

• , for some , and or

• , , and

It is easy to see that if all balls of and are degenerate (balls with radius ) and and are well-separated with respect to by Definition 2, then and are well-separated with respect to by Definition 1, too. In the rest of the paper, we accept the following convention. Let and be -well-separated. If both and contain only points of , then and are -well-separated by Definition 1. If or contains at least one nondegenerate ball, then and are -well-separated by Definition 2. Let , where for each with , be a precise instance of , and for any , let .

###### Lemma 2

Let and be two nonempty subsets of that are well-separated with respect to , where is a real number and or contains at least one nondegenerate ball. Let be an arbitrary precise instance of , where for all . Then, and are -well-separated.

###### Proof

Recall that for any , we have , where is the center of . Since and are -well-separated, by Definition 2, there are disjoint -dimensional balls and with the same radius, such that one of the following cases holds for and . In each case, we prove that and are -well-separated, by Definition 1.

• .

Since both and are singletons, it is clear that and are -well-separated.

• for some , and .

Let , and let be a -dimensional ball with radius co-centered with . Since , the radius of each ball in is at most . (If contains a ball with the radius greater than , then is a singleton, contradicting our assumption that .) So, contains all balls in . Also, it is easy to see that contains bounding box . Therefore,

 d(ck,CB)−rk = d(ck,CB′)−2ρ−rk ≥ (3s+4)×ρ−2ρ = (3s+2)×ρ.

Consider a -dimensional ball with radius that is centered at a point on the line passing through and the center of , such that is on the boundary of and is between the centers of and . See Figure 2. Since and contains , ball contains bounding box . It follows that

 d(CAS,CB) ≥ d(Dk,CB) = d(ck,CB)−rk ≥ (3s+2)ρ ≥ s×(3ρ).

So, there are -balls and with radii containing and , respectively, such that . It follows that and are -well-separated. Figure 2: Illustrating CAS for A={Dk} and B, where |B|>1, in the plane for the second case of Lemma 2.
• , for some , and .

The proof is similar to the previous case.

• , , and .

Let , and let and be two -dimensional balls with radii co-centered with and , respectively. Hence, contains bounding box and contains bounding box . We get

 d(CA,CB) = d(CA′,CB′)−4ρ ≥ (3s+4)ρ−4ρ = s×(3ρ).

Therefore, and are -well-separated.

So, we prove that if and are -well-separated, then and are -well-separated.

### 3.2 The WSPD for balls

Recall that is a set of pairwise disjoint -dimensional balls with arbitrary sizes.

###### Definition 3

(Well-Separated Pair Decomposition of balls). Let be a real number. A well-separated pair decomposition (WSPD) for , with respect to , is a set

 {{A1,B1},{A2,B2},…,{Am,Bm}}

of pairs of nonempty subsets of , for some integer , such that

1. for any with , and are -well-separated (by Definition 2), and

2. for any two distinct balls and of , where , there is a unique index with , such that

• and , or

• and .

We call as the size of the WSPD. Recall that if is an arbitrary precise instance of , then for any , we have .

###### Lemma 3

Let be a real number, and let be an arbitrary precise instance of . If is a WSPD for with respect to , then is a WSPD for with respect to .

###### Proof

By Lemma 2, the proof is straightforward.

If we can compute a WSPD for , then (by Lemma 3) we can compute a WSPD for any precise instance of . Callahan and Kosaraju  used the split tree to compute a WSPD for a point set in . We also use the split tree to compute a WSPD for . Figure 3: A′={ck} and B′, where |B′|>1, are well-separated with respect to s′:=3s+6, but A={Dk} and B are not s-well-separated.

To compute a WSPD of , we construct a split tree on centers of all balls in . Then, we construct a WSPD of the centers with respect to using . Next, we transform to a WSPD of , denoted by , in the following way. For each pair in , if both and are singletons or both and contain more than one element, then we add to , where is the set of all balls in that their centers are in . Note that, by Definition 2, and are well-separated with respect to . Otherwise, one of sets and is a singleton and the other one contains more than one element. In this case, it is possible that and are not -well-separated, see Figure 3. Without loss of generality, we assume that and . We check pair to see if it is a -well-separated pair (by Definition 2). If it is a -well-separated pair, then we add it to and otherwise we partition to such that are -well-separated pairs and then add them to . For the details of the algorithm, see Algorithm 1.

In the following, we explain the details of the way of partitioning . We know that is a split tree on the centers of all balls in . For any node of , let be the set of all points that are stored in the subtree of . Let be a pair of such that , for some , and . Assume that and are the nodes of such that and . Obviously, is a leaf and is an internal node of . Note that for each node in the split tree, the bounding box of , denoted by , is stored at . So, we can test in time whether there is a ball containing such that . To this end, let be the -dimensional ball of radius centered at the center of , where is the length of the longest side of and the center of

is the intersection of perpendicular bisecting hyperplanes of sides of

. If , then is a -well-separated pair and so we add to . Otherwise, we follow the above process by and , where and are the left and the right children of , respectively.

For details of the partition algorithm, denoted by FindPairs, see algorithm 2. We may assume without loss of generality that always , that is, is a leaf of . Clearly, the algorithm FindPairs terminates.

Now, we show that the algorithm generates a WSPD of with pairs.

###### Lemma 4

If , for some integer , and , where , are well-separated with respect to (by Definition 1), but and are not -well-separated (by Definition 2), then .

###### Proof

The proof is by contradiction. Assume that . Let . Since and are well-separated with respect to (by Definition 1), we have , where is a -ball with radius that is centered at the center of . So,

 d(ck,CB′)−rk≥(3s+4)×ρ.

Therefore, and are well-separated with respect to (by Definition 2), a contradiction.

###### Lemma 5

Set is a WSPD for with respect to .

###### Proof

It is easy to see that for all , sets and are -well-separated (by Definition 2). By [8, 9], the proof of the second condition in Definition 3 is straightforward.

It remains to prove an upper bound on . We can partition the pairs in into two categories. In the first category, there are pairs such that is in . Since the size of is linear in , obviously the number of pairs in this category is linear in . The second category contains the pairs that generated by partitioning the sets in pairs of . In the following lemma, we show that the number of pairs in this category is also linear in . To this end, we show that any set appears in at most a constant number of pairs in this category. Note that each pair in this category contains a singleton and a set that may contain more than one element.

Let be the set of all pairs of that FindPairs returns at least two pairs. More precisely, let

 Z={{A′i,B′i}|1≤i≤q,{A′i,B′i}∈W′,|A′i|=1,|B′i|>1},

such that , for some leaf of , and , for some node of , and algorithm FindPairs returns at least two pairs, for all between and . Let be some pair returned by algorithm FindPairs such that , for some node of . In the following, we apply a packing argument (similar to Lemma 9.4.3 of [9, Chapter 9]) to prove that each is involved in at most a constant number (dependent only on and ) of pairs in . Let be the parent of node of , except for the root.

###### Lemma 6

Set involved in at most pairs in , where denotes Euler’s gamma-function.

###### Proof

Let be a node of such that , and let . Let be the center of bounding box , and . Without loss of generality, we assume that are all pairs of that contain . Since is a WSPD for , clearly, balls for all are pairwise distinct and, therefore, are pairwise disjoint. Assume and are the center and the leaf of corresponding to , respectively.

Let be a hypercube centered at point , where is the center of bounding box , and with side length . We have , because if , then

 d(ci,CB′p)−ri = d(Di,CB′p) > 12×side-length(C)−radius(CB′p) = (3s+4)×(ρ/2),

where is a ball with center and radius . (Clearly, contains .) Hence, and are -well-separated (by Definition 2), which is a contradiction because if and are well-separated with respect to , then FindPairs finishes and does not run FindPairs.

Since each element of is a well-separated pair with respect to , the pair is also a well-separated pair with respect to . Since and are not -well-separated, by Lemma 4, for each , , we have .

For each , let be a -dimensional ball with radius such that contains and . Since the balls are pairwise disjoint, the balls are also pairwise disjoint.

Let be a hypercube with sides of length and with center . The length of sides of is the sum of the length of sides of and two times the diameter of . Therefore, contains all balls , for each with . The volumes of and are and , respectively. (The volume of a ball with radius in is .) Therefore, we get . It follows that

 r≤(3s+9)d×Γ(d/2+1)/πd/2,

which completes the proof.

Since has nodes, it follows from Lemma 6 that . To sum-up, we have the following result.

###### Corollary 1

The set contains at most pairs.

Lemma 5 and Corollary 1 immediately imply the following result.

###### Theorem 3.1

Let be a set of -dimensional pairwise disjoint balls with arbitrary sizes, and let be a real number. There is a WSPD for with respect to of size . The WSPD can be computed in time by an algorithm that uses space.

###### Theorem 3.2

Let be a set of pairwise disjoint balls in , and let be a real number. There is an imprecise -spanner for with edges. This imprecise -spanner can be computed in time.

###### Proof

Let and, by Theorem 3.1, let be a WSPD for with respect to of size . Initialize . For , we add edge to , where and . Let be the resulting graph. By Theorem 3.1, can be computed in time. Let be an arbitrary precise instance of . By Lemma 3, is a WSPD for with respect to . It follows from  that is a -spanner for , that is, is an imprecise -spanner for .

## 4 Conclusions

Given a real number , in this paper, we present a set of pairwise disjoint line segments in the plane that any imprecise -spanner for the segments is the complete graph. This shows that studying imprecise spanners for some regions is not interesting. Then, we compute a WSPD with respect to a given real number of size for a set of pairwise disjoint -dimensional balls with arbitrary sizes in time, when and are constants. This WSPD helps us to compute imprecise spanners with edges for a set of pairwise disjoint -balls that have arbitrary sizes.

## Acknowledgments

The authors would like to thank the reviewer for his/her helpful and constructive comments that improved the paper.

## References

•  K. Buchin, M. Löffler, P. Morin, W. Mulzer, Preprocessing Imprecise Points for Delaunay Triangulation: Simplified and Extended, Algorithmica 61 (2011) 674–693.
•  M. Held, J. S. Mitchell, Triangulating input-constrained planar point sets, Information Processing Letters 109 (2008) 54–56.
•  M. V. Kreveld, M. Löffler, J. S. Mitchell, Preprocessing imprecise points and splitting triangulations, SIAM Journal on Computing 39 (7) (2010) 2990–3000.
•  M. Löffler, W. Mulzer, Unions of onions: preprocessing imprecise points for fast onion layer decomposition, Journal of Computational Geometry 5 (2014) 1–13.
•  M. Löffler, M. van Kreveld, Largest and smallest convex hulls for imprecise points, Algorithmica 56 (2010) 235–269.
•  M. Löffler, M. van Kreveld, Largest bounding box, smallest diameter, and related problems on imprecise points, Computational Geometry: Theory and Applications 43 (2010) 419–433.
•  M. A. Abam, P. Carmi, M. Farshi, M. Smid, On the power of the semi-separated pair decomposition, Computational Geometry: Theory and Applications 46 (2013) 631–639.
•  P. B. Callahan, S. R. Kosaraju, A decomposition of multidimensional point sets with applications to k-nearest-neighbors and n-body potential fields, Journal of the ACM (JACM) 42 (1) (1995) 67–90.
•  G. Narasimhan, M. Smid, Geometric spanner networks, Cambridge University Press, 2007.
•  M. A. Abam, M. de Berg, M. Farshi, J. Gudmundsson, Region-fault tolerant geometric spanners, Discrete & Computational Geometry 41 (4) (2009) 556–582.
•  K. R. Varadarajan, A divide-and-conquer algorithm for min-cost perfect matching in the plane, in: Foundations of Computer Science, 1998. Proceedings. 39th Annual Symposium on, IEEE, 1998, pp. 320–329.
•  J. Zeng, J. Gao, A linear time Euclidean spanner on imprecise points., in: Canadian Conference on Computational Geometry, 2014.