Connectivity with Uncertainty Regions Given as Line Segments

For a set \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathcal {Q}}$$\end{document}Q of points in the plane and a real number \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\delta \ge 0$$\end{document}δ≥0, let \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathbb {G}}_\delta ({\mathcal {Q}})$$\end{document}Gδ(Q) be the graph defined on \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathcal {Q}}$$\end{document}Q by connecting each pair of points at distance at most \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\delta $$\end{document}δ.We consider the connectivity of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathbb {G}}_\delta ({\mathcal {Q}})$$\end{document}Gδ(Q) in the best scenario when the location of a few of the points is uncertain, but we know for each uncertain point a line segment that contains it. More precisely, we consider the following optimization problem: given a set \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathcal {P}}$$\end{document}P of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$n-k$$\end{document}n-k points in the plane and a set \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathcal {S}}$$\end{document}S of k line segments in the plane, find the minimum \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\delta \ge 0$$\end{document}δ≥0 with the property that we can select one point \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p_s\in s$$\end{document}ps∈s for each segment \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$s\in {\mathcal {S}}$$\end{document}s∈S and the corresponding graph \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathbb {G}}_\delta ( {\mathcal {P}}\cup \{ p_s\mid s\in {\mathcal {S}}\})$$\end{document}Gδ(P∪{ps∣s∈S}) is connected. It is known that the problem is NP-hard. We provide an algorithm to exactly compute an optimal solution in \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\,\mathrm{{\mathcal {O}}}\,}}(f(k) n \log n)$$\end{document}O(f(k)nlogn) time, for a computable function \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$f(\cdot )$$\end{document}f(·). This implies that the problem is FPT when parameterized by k. The best previous algorithm uses \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\,\mathrm{{\mathcal {O}}}\,}}((k!)^k k^{k+1}\cdot n^{2k})$$\end{document}O((k!)kkk+1·n2k) time and computes the solution up to fixed precision.


Introduction
For a set Q of points in the plane and a real value δ ≥ 0, let G δ (Q) be the graph with vertex set Q and edges connecting each pair of points p, q at Euclidean distance at most δ.Connectivity of the graph G δ (Q) is one of the basic properties associated to the point set Q.For example, if the points represent devices that can communicate and δ is the broadcasting range of each device, then the connectivity of G δ (Q) reflects whether all the devices form a connected network and they can exchange information, possibly through intermediary devices.
In this work we consider the problem of finding the smallest δ such that G δ (Q) is connected, when some of the points from Q are to be chosen from prescribed regions.More precisely, we consider the following optimization problem.

Connectivity
Given a set U = {U 1 , . . ., U k } of regions in the plane and a set P = {p k+1 , p k+2 , . . ., p n } of points in the plane, find δ * = min δ s.t.p i ∈ U i , for i = 1, . . ., k G δ ({p 1 , . . ., p n }) is connected.In this work we will provide efficient algorithms for the Connectivity problem when the regions are line segments and k is small.See Figure 1 for an example.
There are other ways to characterize the connectivity of the graph G δ (Q).Let D(p, r) denote the closed disk of radius r centered at p.Then, the graph G δ (Q) is connected if and only if p∈Q D(p, δ/2) is a connected set.Another characterization is provided by the Euclidean Minimum Bottleneck Spanning Tree of Q, denoted by MBST(Q), a spanning tree of Q where the length of the longest edge, called bottleneck edge, is minimized; a formal definition is given below.The graph G δ (Q) is connected if and only if MBST(Q) uses only edges of length at most δ.
It follows that the problem Connectivity is equivalent to the following problems: • choose a point p i per region U i , where i = 1, . . ., k, in such a way that i=1,...,n D(p i , r) is connected and r is the smallest possible; here the minimum r is δ * 2 .• choose a point p i per region U i , where i = 1, . . ., k, in such a way that the M BST on points p 1 , p 2 , . . ., p n has shortest bottleneck edge.
Related work.The problem we consider, Connectivity, was introduced by Chambers et al. [9] under the name of Best-Case Connectivity with Uncertainty.In this setting each region U i is the uncertainty region for the point p i .They also considered the worst-case connectivity scenario, where one seeks for the minimum δ such that G δ ({p 1 , . . ., p n }) is connected for all choices p i ∈ U i , where i = 1, . . ., k.Thus, while in the best case we want to select points to achieve connectivity, in the worst case we want to guarantee connectivity for all possible choices.Chambers et al. [9] showed that Connectivity is NP-hard even in the very restricted case when the uncertainty regions are vertical line segments of unit length or when the uncertainty regions are axis-parallel unit squares.For the case when the regions are line segments, they provide an algorithm that in O((k!) k k k+1 •(n+k) 2k ) time computes an optimal solution up to fixed precision.The precision appears because of rounding the intermediary computations.
The case when the uncertainty regions are the whole plane, thus U 1 = • • • = U k = R 2 has been studied earlier under names like bottleneck Steiner tree problem or bottleneck k-Steiner tree problem.The results by Sarrafzadeh and Wong [24] imply that the problem is NP-hard.Ganley and Salowe [13] provided an approximation algorithm; they also considered the rectilinear metric.Wang and Li [29] provided approximation algorithms, while Wang and Du [28] provided inapproximability results, assuming P̸ =NP.Bae et al. [3] showed that the case of k = 1 can be solved exactly in O(n log n) time, and the case k = 2 can be solved in O(n 2 ) time.Bae et al. [2] showed that the problem can be solved in f (k) • (n k + n log n) time, for some function f (•).This last paper provides algorithms for the L 1 and L ∞ metrics with a better running time, f (k) • (n log 2 n).Very recently, Bandyapadhyay et al. [4] have shown that the problem can be solved in f (k) • n O (1) time for some function f (•), which means that the bottleneck k-Steiner tree problem in the plane is fixed-parameter tractable with respect to k.The techniques can also be used in other L p metrics.
Instead of minimizing the longest edge of the spanning tree (bottleneck version), one could minimize the total length of the tree.In the k-Steiner tree problem, we are given a set P of points, and we want compute a shortest Steiner tree for P with at most k Steiner points.This is similar to the Connectivity problem because we can take but the optimization criteria is the sum of the lengths of the edges.The 1-Steiner tree problem was solved in O(n 2 ) time with the algorithm of Georgakopoulos and Papadimitriou [14].Brazil et al. [7] solved the k-Steiner tree problem in O(n 2k ) time.Their technique can be adapted to the problem Connectivity and, assuming that the uncertainty regions are convex of constant description size, the problem reduces to O(n 2k ) instances of quasiconvex programming [12], each with O(k) variables and constraints.
Closer to our setting is the work of Bose et al. [6], who considered the version of the k-Steiner tree problem where the points have to lie on given lines, and showed how to solve it in O(n k +n log n) time.Like the work of Brazil et al. [7], their technique can be adapted to the problem Connectivity with uncertain segment regions.With this, the Connectivity problem with uncertain segments reduces to O(n k ) instances of quasiconvex programming [12], each with O(k) variables and constraints.
The problem Connectivity is an instance of the paradigm of computing optimal geometric structures for points sets with uncertainty or imprecision: each point is specified by a region in which the point may lie.In this setting, we can model that the position of some points is certain by taking the region to be a single point.Usually one considers the maximum and the minimum value that can be attained for some geometric structure, such as the diameter, the area of the convex hull, or the minimum-area rectangle that contains the points.This trend was started by Löffler and van Kreveld; see for example [18,19,27] for some of the earlier works in this paradigm.
Our results.We consider the Connectivity problem when each of the regions are line segments.To emphasize this, we use S instead of U and s i instead of U i .
First, we consider the decision version of the problem: Given a set S = {s 1 , . . ., s k } of k segments in the plane, a set P = {p k+1 , p k+2 , . . ., p n } of n−k points in the plane, and a value δ ≥ 0, decide whether there exist points p i ∈ S i for i = 1, . . ., k such that G δ ({p 1 , . . ., p n }) is connected.We call this version of the problem DConnectivity.
Our first main result is showing that DConnectivity for segments can be solved using f (k)n log n operations, for some computable function f (•).In fact, after a preprocessing of the instance taking O(k 2 n log n) time, we can solve DConnectivity for any δ ≥ 0 using f (k)n operations.For this we use the following main ideas: • Instead of searching for connectivity, we search for a MBST.
• It suffices to restrict our attention to MBST of maximum degree 5.
• The MBST will have at most O(k) edges that are not part of the minimum spanning tree of P.
• We can iterate over all the possible combinatorial ways how the uncertain points interact with the rest of the instance.Such interaction is encoded by a so-called topology tree with O(k) nodes, and there are k O(k) different options.
• For each topology tree τ , we can employ a bottom-up dynamic programming across τ to describe all the possible placements of points on the segment that are compatible with the subtree.
Our strongest result is showing that Connectivity for segments can be solved using f (k)n log n operations, for some other computable function f (•).For this we use parametric search [20,21], a generic tool to transform an algorithm for the decision version of the problem into an algorithm for the optimization problem.We provide a careful description of the challenges that appear when using parametric search in our setting.While we can use Cole's technique [10] in one of the steps, we provide an alternative that is simpler, self-contained and uses properties of the problem.Eventually, we manage to solve the optimization problem without increasing in the time complexity of the algorithm the dependency on n; the dependency on k increases slightly.
Our result shows that Connectivity for line segments is fixed-parameter tractable when parameterized by the number k of segments.The running time of our algorithms are a large improvement over the best previous time bound of O(n 2k ) by Chambers et al. [9] and the bound of O(n k + n log n) that could be obtained adapting the approach of Bose et al. [6].
Compared to the work of Chambers et al. [9], we note that they did not consider the decision problem, but instead guessed a critical path that defines the optimal value.Then they show that there are O(n 2k ) critical paths.Compared to the work of Bose et al. [6] and Brazil et al. [7], we first note that they are minimizing the sum of the length of the edges.Optimizing the sum is usually harder than optimizing the bottleneck value.Also, considering the decision problem is often useful for the bottleneck version because it reduces the number of combinatorial options to consider, but this benefit is rarely present when minimizing the sum.To be more precise, in the decision version of our bottleneck problem, to extend a partial solution we only need to know whether it can be connected to a connected subgraph, but we do not care to which vertex of the connected subgraph we are connecting.In contrast, when minimizing the sum of the lengths one has to carry the information of whom do you connect to and how much it costs.This means that we have to carry a description of the cost function, which has a larger combinatorial description complexity.
When k = O(1), our algorithms take O(n log n) time, which is asymptotically optimal: since finding a maximum-gap in a set of n unsorted numbers has a lower bound of Ω(n log n) in the algebraic decision tree model, the problem of finding a MBST also takes Ω(n log n), even without uncertainty regions.
In our problem, we have to be careful about the computability of the numbers appearing through the computation.It is easy to note that we get a cascading effect of square roots.A straightforward approach is to round the numbers that appear through the computation to a certain precision and bound the propagation of the errors.This is easy and practical, but then we do not get exact results.
The numbers computed through our algorithm have algebraic degree over the input numbers that depends on k, and thus can be manipulated exactly if we assume that the input numbers are rational or of bounded algebraic degree.The actual running time to manipulate these numbers exactly depends on k and the assumptions on the input numbers, and this is hidden in the function f (•).Below we provide background on algebraic numbers and computation trees, the tool we use to manipulate numbers.Our running times are stated assuming exact computation.
To summarize, there are two sources that make the dependency on k at least exponential: the number of topology trees considered in the algorithm is k O(k) , and we are manipulating Θ(n) numbers of algebraic degree at least 2 Ω(k) .
Organization.The rest of the paper is organized as follows.In Section 2 we explain the notation and some of the concepts used in the paper.We also provide some basic geometric observations.In Section 3 we provide a careful description of geometric operations that will be used in the algorithm.We pay attention to the details to carry out the algebraic degree of the operations.In Section 4 we provide the algorithm for the decision problem.In Section 5 we analyze a function that will appear when analyzing parametric search; we need to bound the algebraic degree of certain equations that appear in the algorithm.In Section 6 we provide the optimization algorithm using the paradigm of parametric search.We conclude in Section 7.
2 Notation, numbers and preliminary results

Notation
For each positive integer n, we use [n] = {1, . . ., n}.For each set A and t ∈ N, we use A t to denote the set of all subsets of A with t elements.
All graphs in this paper will be undirected.Hence, each graph will be given as an ordered pair G = (V, E), where V is the set of its vertices and E ⊆ V 2 is the set of its edges.We also write V (G) and E(G) for the sets of vertices and edges of G, respectively.We use the notation uv for the edge with vertices u and v.The graph G is edge-weighted, if it is accompanied by a weight function w : E → R ≥0 .The weight of an edge-weighted subgraph H, denoted w(H), is the sum of weights of all of its edges.
If Q is a set of points in the plane, then we denote by K Q the complete graph on vertices Q.Such a graph is naturally accompanied by a weight function on edges that we call edge length.In this setting, the edge length of the edge uv, where u, v ∈ Q, is the Euclidean distance between u and v, denoted by d(u, v).We also write |uv| = d(u, v).
Let G = (V, E) be an edge-weighted graph.If T is a spanning tree of G, a bottleneck edge of T is an edge in T with largest weight.We call T a minimum bottleneck spanning tree or MBST of G, if its bottleneck edge has the smallest weight among all bottleneck edges of spanning trees of G.A minimum spanning tree or MST of G is a spanning tree of G that has minimum weight, over all spanning trees of G.
We will not distinguish between points and their position vectors.For two sets A and B in the plane, their Minkowski sum is Recall that D(p, r) is the closed disk with center p and radius r.Then A ⊕ D(0, r) is precisely the set of points at distance at most r from some point of A. We call this set the r-neighborhood of A. Any segment in this paper will be a line segment.A segment between two points a and b will be denoted as ab.For a point a, we will use ||a|| to denote the distance from a to the origin.

Representation of numbers and algebraic operations
Each number that will be computed through our algorithm will be obtained from previous numbers by either one of the usual arithmetic operations (addition, subtraction, multiplication or division), by computing a square root or by solving a polynomial equation of degree at most 2 O(k) .Each number that is computed inside the algorithm has its computation tree.This is a rooted tree that has the just described operations as internal vertices and input values as leaves.Each vertex in the tree represents a number that is computed by the operation described in this vertex applied to its descendants.See Figure 2, left, for an example.
Computer algebra provides tools to manipulate and compare these numbers exactly; see for example [5,Section 10.4] or [30].Exact computation is a paradigm promoted within Computational Geometry [8,16,17,26].We will show that the depth of computation trees for numbers inside our algorithms will depend only on k.It follows that in our algorithms the time complexity of each of the numerical operations will always be a function only of k, independent of n.To avoid a cumbersome description, we will assume in the description that the manipulation of numbers takes O(1) time.Let us note here that our algorithms will not compute numbers directly by their computation trees, rather by related rooted directed acyclic graphs which are essentially computation trees, but with joint nodes that produce the same number using the same operations.This is a known concept, used for example in [22].To give an example, if we consider a slightly modified example from Figure 2, left, that computes (1+ √ 3)( √ 3−2), we see that we do not need a node for number 5 and that we only need to compute √ 3 once, hence we need 2 fewer nodes.See Figure 2, right.Note that such a transformation does not change the depth of the computation.
The following discussion is about bounding the algebraic degree of the numbers appearing in the algorithm and it is aimed to readers familiar with algebraic computations.In our final results we do not talk explicitly about the algebraic degree of the numbers and it suffices to know that the problem of performing ℓ algebraic operations on at most ℓ numbers is decidable for any ℓ.
A possible way to represent such a number α is as a univariate polynomial P (x) with integer coefficients together with an isolating interval I; this is an interval with the property that α is the unique root of P (x) inside I.The minimum degree of the polynomial representing α is the algebraic degree of α (over the integers).
It is known that if α and β ̸ = 0 are numbers of algebraic degree k, then α ± β, α • β, α/β and √ α have algebraic degree at most k 2 .Moreover, if α is the root of a polynomial of degree d with coefficients of algebraic degree k, then α has algebraic degree O(dk d ).To see this, we first construct a common field extension for all the coefficients, which will have degree O(k d ), and then use the relation of the degree between towers of field extensions.
In our decision algorithm, the numbers used in our computations have a computation tree of depth O(k) on the input numbers, with internal nodes containing only arithmetic operations and square roots.Therefore, we employ numbers of algebraic degree 2 O(k) .For the optimization problem, at the leaves of the computation tree of some numbers we will also have a root of a polynomial of degree 2 O(k) .For a computation tree, it is always the same root of a polynomial that is being used.Therefore, for the computation, it suffices to work with an extension field of all the input numbers, which has degree 2 O(k) because there is a single number of algebraic degree 2 O(k) .Therefore, also in the optimization problem, the numbers involved in the computation have algebraic degree 2 O(k) .

Properties of minimum trees
In this section we present some well known claims that will be used later.The first property is a standard consequence of Kruskal's algorithm to compute the MST.
Claim 1.In any edge-weighted connected graph, all MSTs have the same weight of the bottleneck edge which is the same as the weight of a bottleneck edge in any MBST.In particular, each MST is also a MBST.
The following result is also well known; see for example [23].
Claim 2. For each non-empty set Q of points in the plane, there exists a MST and a MBST of the complete graph K Q with maximum degree at most 5.

Geometric computations
In this section we describe representations of geometric objects that we will use and we present some basic geometric computations that will be needed in the algorithms.Each line segment s is determined by a quadruple (p s , e s , a s , b s ), where p s is an arbitrary point on the line supporting s, e s is a unit direction vector of s, and real numbers a s ≤ b s determine the endpoints of s, which are p s + a s e s and p s + b s e s .When a s = b s , the segment degenerates to a single point; we keep calling it a segment to avoid case distinction.We will write s = (p s , e s , a s , b s ).We could easily allow for non-unit vectors e s , but then some of the equations below become a bit more cumbersome.We will use such representations of line segments because we will often consider their subsegments, hence p s and e s will remain constant and only a s and b s will change.
A segmentation on a line L denotes a union of pairwise-disjoint line segments on L. Some of the segments may be a single point.If the line is given by a position vector of some point p on the line and a unit direction vector e, then we will represent a segmentation of this line with N disjoint subsegments and points as a (2N + 2)-tuple , the line segment (p, e, a i , b i ) is part of the segmentation X.We call N the size of the segmentation X. See Figure 3 for an example.I) Intersection of two lines.Suppose we are given two lines L 1 ≡ p 1 + t 1 e 1 and L 2 ≡ p 2 + t 2 e 2 , where p 1 and p 2 are points on the first and second line, respectively, e 1 and e 2 are their unit direction vectors, respectively, and t 1 , t 2 ∈ R are parameters.We would like to compute If the lines are parallel, which is equivalent to e 1 = ±e 2 , then we have two options.If the system of two linear equations in one unknown p 2 = p 1 + te 1 has some solution, then the lines are equal and If the lines are not parallel, then the system of two linear equations with two unknowns In all cases, we can compute L 1 ∩ L 2 with O(1) arithmetic operations.II) Intersection of a circle with a line.Suppose we are given a circle (curve) C with center at c and radius δ > 0, and a line L ≡ p + te, where p is a point on the line, e is its unit direction vector and t ∈ R is a parameter.We would like to compute the intersection This means that we need to solve the equation ||p + te − c|| = δ, which is quadratic in the unknown t ∈ R.This is equivalent to solving which can be rewritten as ii) ∆ = 0.In this case, there is one solution of our quadratic equation, which is iii) ∆ > 0. In this case, there are two solutions of our quadratic equation, which are III) Intersection of a disk with a line segment.Suppose we are given a disk D with center at c and radius δ > 0, and a line segment s = (p s , e s , a s , b s ).We would like to compute the intersection D ∩ s.
First we compute the intersection between the boundary C of D and the line L that contains s, as described in II).
ii) If L is tangent to C at the point p s + t 0 e s , for some t 0 , then we verify whether t 0 is between a s and b s .In this case D ∩ s contains exactly the point p s + t 0 e s , otherwise s IV) Intersection of two segmentations of a line.Suppose we have segmentations X 1 and X 2 on some line of sizes N 1 and N 2 , respectively.We would like to compute the segmentation X 1 ∩X 2 .The segmentation X 1 ∩X 2 has size at most N 1 +N 2 because the points of the segmentation X 1 ∩ X 2 are points of X 1 or X 2 .Moreover, because each segmentation already has its segments and points ordered, we can compute comparisons.The idea is similar to the merging of two sorted lists.For example, we can use 3 pointers, one for X 1 , one for X 2 and one for the merged list, that are traversed simultaneously once and, for each two consecutive points in the merged list, we verify whether the corresponding line segment is a subset of X 1 ∩ X 2 or not in O(1) time.
V) Computing a Voronoi diagram on a line segment for some set of points.Suppose we are given a set Q = {q 1 , q 2 , . . ., q N } of N points in the plane and a line segment s = (p s , e s , a s , b s ).We would like to compute the Voronoi diagram on the line segment s for points in Q. See Figure 4.For our purpose we can say that such a Voronoi diagram is a sequence of pairs (q ′ 1 , J 1 ), (q ′ 2 , J 2 ), . . ., (q ′ N ′ , J N ′ ) with the following properties: • for each i ∈ [N ′ ], the point q ′ i belongs to Q and J i is a segment contained in s, • for each i ∈ [N ′ ] and for each point p in J i , the smallest distance from p to any point in Q is d(p, q ′ i ), • the union of the segments J 1 , . . ., J N ′ is the segment s, • for each i ∈ [N ′ − 1], J i and J i+1 have exactly a boundary point in common, • for each distinct and non-consecutive i, j ∈ [N ′ ], the segments J i and J j are disjoint, and It is well known that this can be done in O(N log N ) time by computing the Voronoi diagram of Q in R 2 and intersecting it with the segment s. See for example the textbook by de Berg et al. [11,Chapters 7 and 2].
Because we are only interested in the segment s, this can be done also easily using a simple divide-and-conquer approach, as follows.When Q contains a single point, its Voronoi diagram is the whole segment s.When Q has at least two points, we split Q arbitrarily into two sets, Q 1 and Q 2 , of roughly the same size, and recursively compute the Voronoi diagram on s for Q 1 and for Q 2 .We get those two Voronoi diagrams as sequences To merge them, we first compute all the non-empty intervals J ′ i ∩ J ′′ j for i ∈ [N ′ ] and j ∈ [N ′′ ].This takes O(N ′ + N ′′ ) time because the two sequences are sorted along s.We also obtain the output sorted along s.We know that, for each such non-empty J ′ i ∩ J ′′ j , the closest point of Q is either q ′ i or q ′′ j .For each such non-empty J ′ i ∩ J ′′ j , we compute the intersection p i,j of the bisector for q ′ i and q ′′ j with the line supporting s.If the intersection point p i,j lies on J ′ i ∩ J ′′ j , we split J ′ i ∩ J ′′ j into two intervals at p i,j .We have obtained a sequence of intervals along s with the property that each point in an interval has the same closest point of Q.With a final walk along the intervals, we merge adjacent intervals with the same closest point in Q into a single interval.This merging step takes O(N ′ + N ′′ ) time.
If T (N ) denotes the running time of the divide-and-conquer algorithm for N points, we have the recurrence Each number computed in the procedure is obtained from the input data by O(1) additions, subtractions, multiplications and divisions.This is because each value is obtained by computing the intersection of a bisector of two points of Q with the line supporting s.
VI) Intersection of a union of disks with a line segment, equipped with a Voronoi diagram.Suppose we are given N disks D(q 1 , δ), D(q 2 , δ), . . ., D(q N , δ) with radius δ > 0, a line segment s = (p s , e s , a s , b s ) and a Voronoi diagram (q ′ 1 , J 1 ), (q ′ 2 , J 2 ), . . ., (q ′ N ′ , J N ′ ) on s for the points q 1 , q 2 , . . ., q N .We would like to compute the intersection Although we do not need the Voronoi diagram to compute X, we will use it to compute it in a linear number of steps.We first observe that (see Figure 5) This implies that X can be computed in time O(N ) by applying N ′ times the procedure in III) and then joining each two consecutive line segments D(q ′ j , δ)∩J j and D(q ′ j+1 , δ)∩J j+1 , if they have a common endpoint J j ∩ J j+1 .Note that the output is a segmentation contained in s.
VII) Intersection of a δ-neighborhood of a segmentation with a line segment.Suppose we are given some δ > 0, a line segmentation X = (p X , e X , a 1 , b 1 , . . ., a N , b N ) and a line segment s = (p s , e s , a s , b s ).We would like to compute the intersection X ′ = (X ⊕ D(0, δ)) ∩ s between s and the δ-neighborhood of X.This is a segmentation in the line supporting the segment s. See the top of Figure 6.
For each j ∈ [N ], let σ j be the j-th segment of the segmentation X; thus σ j = (p X , e X , a j , b j ).For each j ∈ [N ], let γ j be the boundary of σ j ⊕ D(0, δ); see the bottom of Figure 6.The boundary of γ j consists of two semicircles of radius δ, one centered at p X + a j e X and another centered at p X + b j e X , and two copies of the segment σ j translated perpendicularly to σ j by δ, one in each direction.
For each j ∈ [N ], we compute the (possibly empty, possibly degenerate) segment η j = σ j ⊕ D(0, δ) ∩ s.See the top of Figure 7.To do this we compute γ j ∩ s using I) and II) for the lines and circles supporting pieces of γ j and, for each intersection point we find, we test whether it indeed belongs to γ j .We also test whether the endpoints of s belong to σ j ⊕ D(0, δ), as the segment s may start inside multiple regions σ j ⊕ D(0, δ).This takes O(N ) time and each number we computed requires O(1) arithmetic operations, square roots, δ and comparisons.(The explicit computation of η j may require the square root.)Each such non-empty segment η j is represented as η j = (p s , e s , a ′ j , b ′ j ), using the same point p s and direction unit vector e s for all j ∈ [N ].
If we found no intersections, meaning that η j = ∅ for all j ∈ [N ], we return X ′ = ∅.Otherwise, the segments η 1 , . . ., η N may overlap and we have to merge them.We must be careful because the line segment s does not need to enter the regions γ j , γ j+1 and γ j+2 , for some j ∈ [N − 2] in this order.See for example the bottom of Figure 7.However, we can be sure about two things: This means that we can merge the segments η 1 , . . ., η N by considering only segments with adjacent indices.One way to do it is to compute and make a linked list with the collinear segments

Solving the decision version
In this section we show how to solve the decision of the problem, DConnectivity, when the uncertain regions are segments.Let us recall the problem.Given a set S = {s 1 , . . ., s k } of k segments in the plane, a set P = {p k+1 , p k+2 , . . ., p n } of n−k points in the plane, and a value δ ≥ 0, decide whether there exist points p i ∈ s i for i = 1, . . ., k such that G δ ({p 1 , . . ., p n }) is connected.Denoting by δ * the optimal value in the optimization problem, we want to decide whether δ ≥ δ * .We will consider the case δ = 0 separately.Then we will present an algorithm that solves DConnectivity for δ > 0 in 4 parts, which are in bold in the next sentence.DStep 1 will be executed first, followed by DStep 2. Then we will use a DLoop inside of which DStep 3 will be performed k O(k) times.The letter D in DStep and DLoop specifies that the steps are of the algorithm for the decision variant.
Case δ = 0. Solving the problem DConnectivity for δ = 0 is equivalent to deciding whether all line segments from S have a common point which is the same as each point in P.This can clearly be done in time O(n).For the rest of the description, we assume δ > 0.
DStep 1.We compute a MST T for points in P. It is well known that the tree T can be computed in O(n log n) time [25].The most usual way is noting that a MST of any Delaunay triangulation of the point set P is a MST for P [11,Exercise 9.11].
We remove all edges from T that are longer than δ.Let the remaining connected components of the tree T be C = {C 1 , C 2 , . . ., C ℓ }.Note that we removed exactly ℓ − 1 edges.If ℓ > 4k + 1, return FALSE.We first show that this decision based on ℓ > 4k + 1 is correct.Lemma 3. Any two points in P from distinct components C 1 , C 2 , . . ., C ℓ are more than δ apart.
Proof.If the lemma was false, then there would exist points p a , p b ∈ P such that d(p a , p b ) ≤ δ and p a ∈ C a ′ , p b ∈ C b ′ , where a ′ ̸ = b ′ .Clearly, the edge p a p b is not part of the tree T .If we add it to the tree, we get a cycle that connects the points p a and p b either via the edge p a p b or via a path that contains an edge e that was longer than δ, because the components C a ′ and C b ′ are distinct.It follows that if we add the edge p a p b and remove the edge e from T , we get a spanning tree on points P with weight less than the weight of T , which is a contradiction.Hence, the lemma must be true.
Proof.We show the contrapositive statement.Hence, we assume δ ≥ δ * .Let p i ∈ s i , for i ∈ [k], be such points that any MBST on points p 1 , p 2 , . . ., p n has a bottleneck edge of length δ * .Such points exist by definition of δ * .By Claim 1, any MST on these points also has a bottleneck edge of length δ * .Let T ′ be a MST tree on points p 1 , p 2 , . . ., p n with the degree of each vertex at most 5.Such a tree exists by Claim 2. Hence, there are at most 5k neighbors of points p 1 , p 2 , . . ., p k .By Lemma 3, any two points from distinct components C 1 , C 2 , . . ., C ℓ are not connected directly with edges of T ′ , hence for each component there is an edge in T ′ from a point in this component to a point in {p 1 , p 2 , . . ., p k }.Let E 1 be the set of edges in T ′ that have exactly one vertex in {p 1 , p 2 , . . ., p k } and let E 2 be the set of edges in T ′ that have both vertices from the set {p 1 , p 2 , . . ., p k }.We have |E 1 | + 2|E 2 | ≤ 5k.Because there are no edges between components C i and C j , for i ̸ = j, we have This is because using edges from E 1 ∪ E 2 we have to connect at least k + ℓ distinct "clusters" of points: each point in {p 1 , p 2 , . . ., p k } is one "cluster" and each component C 1 , C 2 , . . ., C ℓ contributes at least one cluster.This implies k + ℓ − 1 ≤ 5k, which gives ℓ ≤ 4k + 1.
DStep 2. For each component C i ∈ C and for each line segment s j ∈ S, we compute the Voronoi diagram on s j of the points in C i .This can be done with O(kn log n) steps as explained in V).
DLoop.We treat each line segment from S and each component from C as an abstract node and we iterate over all possible trees on these k + ℓ nodes such that a) each node from S has degree at most 5 and b) no two nodes from C are adjacent.
We call each such a tree a topology tree, because it describes a potential way to connect the components in C via points from the line segments in S. See Figure 8 for an example.Note that we are reserving the term node for each connected component of C and each segment of S. In this way we distinguish nodes from a topology tree from vertices of other graphs.
We say that a topology tree τ is δ-realizable, if there exist points p j ∈ s j , for each j ∈ [k], such that a) for each edge s i s j in τ , where s i , s j ∈ S, it holds d(p i , p j ) ≤ δ, and b) for each edge C i s j in τ , where C i ∈ C and s j ∈ S, there exists a point p ∈ C i such that d(p, p j ) ≤ δ. (Note that we may use different points p ∈ C i for different edges C i s j , C i s ′ j of τ .) Lemma 5.There exists a δ-realizable topology tree if and only if δ ≥ δ * .Proof.Let τ be a δ-realizable topology tree.Let us fix points p j ∈ s j , for each j ∈ [k], such that a) for each edge s i s j in τ , where s i , s j ∈ S, it holds d(p i , p j ) ≤ δ and b) for each edge C i s j in τ , where C i ∈ C and s j ∈ S, there exists a point p ∈ C i such that d(p, p j ) ≤ δ.
Let G = G δ ({p 1 , p 2 , . . .p n }).We will prove that G is connected, which by definition of δ * implies δ ≥ δ * .Note that any two vertices in the same component C of C are connected in G. Indeed, since there exists a path connecting two vertices of C in the MST T that uses only edges of length at most δ, such a path is also present in G. Consider two arbitrary points p i and p j , where i, j ∈ [n].Let v i be the node of τ that contains p i ; it may be that v i = C for some C ∈ C or that v i = s for some s ∈ S. Similarly, let v j be the node of τ that contains p j .If v i = v j and v i is a segment of S, then p i = p j and they are connected in G.If v i = v j and v i is a connected component C ∈ C, then they are also connected in G.
It remains to handle the case when v i ̸ = v j .Because τ is a tree, then there exist nodes u 1 , u 2 , . . ., u m of τ such that u 1 u 2 • • • u m is a path in τ with u 1 = v i and u m = v j We will construct a corresponding walk in G that connects p i and p j by transforming the path u 1 u 2 u 3 • • • u m in the following way.
1.If u 1 = s i ∈ S, then we replace u 1 by p i .Otherwise u 1 = C for some C ∈ C. From the definition of τ it follows that the node u 2 = s y for some segment s y ∈ S, and there exists a point p from C such that d(p, p y ) ≤ δ.We replace the node u 1 with a path from p i to p in C.

2.
If u m = s j ∈ S, then we replace u m by p j .Otherwise u m = C for some C ∈ C. From the definition of τ it follows that the node u m−1 = s y for some segment s y ∈ S, and there exists a point p from C such that d(p, p y ) ≤ δ.We replace the node u m with a path from p to p j in C.

3.
For each vertex u x ∈ {u 2 , . . ., u m−1 } from C, we know from the definition of τ that u x−1 = s y ∈ S and u x+1 = s z ∈ S, for some y, z ∈ [k].By definition of τ there exist points q x and q ′ x from the component u x ∈ C such that d(q x , p y ) ≤ δ and d(q ′ x , p z ) ≤ δ.We replace u x with a path from q x to q ′ x in the component u x .
4. For each vertex s x ∈ {u 2 , u 3 , . . ., u m−1 } from S, we replace s x with the corresponding point p x ∈ s x .
It is clear that we transformed the path u 1 u 2 u 3 • • • u m in τ into a walk in the graph G from p i to p j .Hence, G is connected, which implies δ ≥ δ * .For the other direction, assume δ ≥ δ * .Let points p i ∈ s i , for each i ∈ [k], be such that any MBST on points p 1 , p 2 , . . ., p n has a bottleneck edge of length δ * .Let T ′ be a MBST of the complete graph K {p 1 ,...,pn} such that each vertex of T ′ has degree at most 5.Such a tree T ′ exists by Claim 2. Because of Lemma 3 and because δ ≥ δ * , there is no edge in T ′ between points from distinct components from C. Let Γ be a graph with k + ℓ nodes C ∪ S and the following edges: • s i s j , whenever p i p j is an edge in T ′ , • s i C j , whenever there exists a point p in C j such that p i p is an edge in T ′ .Such a graph Γ is not necessarily a tree, however we claim that it is connected.This follows from the fact that any path in T ′ can be mapped into a walk in Γ by replacing each vertex from a component C i with the component C i , each vertex from a line segment s j with the line segment s j , and then deleting the potential consecutive repetitions of vertices of Γ.Because the tree T ′ has maximum degree 5, it follows by definition of edges of Γ that the degree of each node s i ∈ S of Γ has degree at most 5. Let τ be any spanning tree of Γ.It is clear that τ is a δ-realizable topology tree.
Proof.Using Cayley's formula for the number of spanning trees of a labeled complete graph, we get that that the number of topology trees is at most (k + ℓ) k+ℓ−2 ≤ (5k + 1) 5k−1 .To construct a topology tree, it is enough to determine the neighbors of each node from S. Because each node from S has degree at most 5 in a topology tree, we can use brute force to generate all topology trees on k + ℓ ≤ 5k + 1 nodes in (O(k)) 5k time.
Note that, even with more careful estimates, we could not get a bound below k O(k)  because there are at least k! 2 = k Ω(k) ways to construct a path of length k out of elements of S.
DStep 3. Given a topology tree τ , in this step we will verify whether it is δ-realizable.Therefore, because of Lemma 6, we will execute this step k O(k) times.For the discussion, we consider a fixed topology tree τ .
We observe that if a node C from C is a separating vertex of τ , which is equivalent to saying that C has degree at least 2 in τ , then we can treat each part of the tree τ that is "separated" by C independently.This motivates the following definition of a significant topology subtree of τ .
If we remove the nodes C from τ , we get a forest.To each tree τ ′ in this forest, we add all nodes from C that are adjacent in τ to some vertex in τ ′ , with the corresponding edges.The resulting tree is a significant topology subtree of τ .See Figure 8.Let us state a few observations about significant topology subtrees that can be checked easily.a) Each significant topology subtree of τ is an induced subtree of τ .b) Each node from C that is part of a significant topology subtree τ ′ of τ , has degree exactly 1 in τ ′ .If there is another vertex of degree 1 in τ ′ , it must have degree 1 in τ as well.
c) Each significant topology subtree has maximum degree at most 5.
d) The union of all significant topology subtrees of τ is the whole τ .
e) An intersection of any two significant topology subtrees of τ is either empty or a graph with one node from C.
f) Each node from S belongs to exactly one significant topology subtree of τ .
g) There are at most k significant topology subtrees of τ .
The definition of δ-realizability can now be naturally extended to significant topology subtrees.We say that a significant topology subtree τ ′ is δ-realizable, if there exist points p j ∈ s j , for each vertex s j ∈ S from τ ′ , such that a) for each edge s i s j in τ ′ , where s i , s j ∈ S, it holds d(p i , p j ) ≤ δ, and b) for each edge C i s j in τ ′ , where C i ∈ C and s j ∈ S, there exists a point p ∈ C i such that d(p, p j ) ≤ δ.
Lemma 7. The topology tree τ is δ-realizable if and only if all of its significant topology subtrees are δ-realizable.
Proof.If the topology tree τ is δ-realizable, it is clear that each of the significant topology subtrees of τ is also δ-realizable.To prove the opposite direction, assume that all of significant topology subtrees of τ are δ-realizable.For each significant topology subtree τ ′ of τ , we can choose points p j ∈ s j in each node s j ∈ S of τ ′ , such that a) for each edge s i s j in τ ′ , where s i , s j ∈ S, it holds d(p i , p j ) ≤ δ, and b) for each edge C i s j in τ ′ , where C i ∈ C and s j ∈ S, there exists a point p ∈ C i such that d(p, p j ) ≤ δ.
This way we uniquely defined points p j ∈ s j , for each j ∈ [k].This is because, for each s j ∈ S, there exists exactly one significant topology subtree τ ′ of τ that has s j as node.It is clear that such a choice of points p j ∈ s j , over all j ∈ [k], shows that the topology tree τ is δ-realizable.
We just showed that, to describe DStep 3, it is enough to describe how to verify whether a given significant topology subtree τ ′ of τ is δ-realizable.To describe the latter, we restrict our attention to a fixed significant topology subtree τ ′ .Let the set of nodes of τ ′ be V ′ ⊆ S∪C.We denote S ′ = S ∩ V ′ and C ′ = C ∩ V ′ .Therefore V ′ is the disjoint union of S ′ and C ′ .By definition of τ ′ , we know that S ′ is not empty.Let us choose a root s r ∈ S ′ for τ ′ .For each segment s i ∈ S ′ , let τ ′ (s i ) be the subtree of τ ′ rooted at s i .In particular τ ′ (s r ) = τ ′ .
Next, we will use dynamic programming bottom-up along τ ′ to compute the possible locations of points p i ∈ s i on line segments s i ∈ S ′ that can yield δ-realizability for the subtree of τ ′ rooted at s i .More exactly, for each s i ∈ S ′ , we define and one point p j ∈ s j , for each node s j ∈ S ∩ V (τ ′ (s i )) with j ̸ = i, such that for each edge s ℓ s j of τ ′ (s i ) we have d(p ℓ , p j ) ≤ δ and for each edge s j C ℓ of τ ′ (s i ) we have d(p j , q ℓ ) ≤ δ}.
We begin with leaves of τ ′ .If we have a leaf s i from S ′ , we then have X i = s i .For internal nodes of τ ′ , we have the following recursive property.Lemma 8. Let s i be an internal node in τ ′ from S ′ .Reindexing the nodes, if needed, let us assume that the children of s i in τ ′ are s 1 , . . ., s t and C 1 , . . ., C u .Then Proof.Consider any point p i in X i .From the definition of X i this means that we can select one point q ℓ ∈ C ℓ , for each node C ℓ ∈ C ∩ V (τ ′ (s i )) and one point p j ∈ s j for each node s j ∈ S ∩ V (τ ′ (s i )) with j ̸ = i such that • for each edge s j s ℓ of τ ′ (s i ) we have d(p j , p ℓ ) ≤ δ, and Looking at the edges connecting s i to its children, we obtain Moreover, because the definition of X i includes a condition for the whole subtree τ ′ (s i ) and, for each child s ℓ of s i , we have τ ′ (s ℓ ) ⊂ τ ′ (s i ), we have We conclude that the point p i belongs to t j=1 X j ⊕ D(0, δ) .Because for each ℓ ∈ [u] we also have q ℓ ∈ C ℓ , we also conclude that p i belongs to u ℓ=1 C ℓ ⊕ D(0, δ) .This finishes the proof that X i is included in the right hand side.
To see the other inclusion, consider one point p i on the right hand side of the equality we want to prove.We then have: • for each ℓ ∈ [t], the point p i belongs to X ℓ ⊕ D(0, δ); We can rewrite these properties as For each ℓ ∈ [t], the property that p ℓ ∈ X ℓ implies that we can find points in all the nodes in τ ′ (s ℓ ) satisfying the definition for X ℓ .Since the subtrees τ ′ (s 1 ), . . ., τ ′ (s t ) are disjoint, the selection of points for those subtrees are for different nodes, and thus they do not interact.The points p i , p 1 , . . ., p t , q 1 , . . ., q u and the ones selected for the condition of X 1 , . . ., X t certify that p i ∈ X i because each edge of τ ′ (s i ) appears in one of the conditions.
All geometrical computations needed to compute X i are described in Section 3. We can compute X i with t operations X ℓ ⊕ D(0, δ) ∩ s i , described in VII), u operations C ℓ ⊕ D(0, δ) ∩ s i described in VI), and t + u − 1 intersections of segmentations described in IV).For each ℓ ∈ [u], the size of the segmentation C ℓ ⊕ D(0, δ) ∩ s i is at most |C ℓ |, and using induction on the structure of τ ′ (the base of the induction are the leaves), we can see that each point from P contributes at most one segment to X i .Using that τ ′ has at most k leaves from S, we see that the size of X i is at most |P| + |S| = n.Finally, note that t + u ≤ 5 because τ ′ has maximum degree at most 5. Assuming that X ℓ is already available for each child s ℓ ∈ S ′ of s i (thus for all ℓ ∈ [t]), and assuming that the Voronoi diagrams on s i for C ℓ are available for each ℓ ∈ [u], we can compute X i in O(n) time.Recall that the Voronoi diagrams inside s i for each C ℓ were computed in DStep 2, and thus are available.
The significant topology subtree τ ′ is δ-realizable if and only if X r is not empty.We can compute the sets X i for all s i ∈ S ′ bottom-up.At each node of τ ′ from S ′ we spend O(n) time.
We have to repeat the test for each significant topology subtree.Recall that, by Lemma 7, a topology tree is δ-realizable if and only if all its significant topology subtrees are δ-realizable.Since each node of S appears exactly in one significant topology subtree, for each s j ∈ S we compute the corresponding set X j exactly once.It follows that we spend O(kn) time for a topology tree.We summarize.
Lemma 9. Assume we have already performed DStep 1 and DStep 2. For any given topology tree τ , we can decide whether τ is δ-realizable performing O(kn) operations.Here, an operation may include manipulating a number that has a computation tree of depth O(k) whose internal nodes are additions, subtractions, multiplications, divisions or square root computations and whose leaves contain input numbers (including δ).
Proof.Correctness and the bound on the number of operations follows from the discussion.It only remains to show the property about the computation tree of numbers.Each component of a segmentation X i that corresponds to a node v in some rooted topological subtree τ ′ of τ is computed with O(1) operations from input numbers or components of the segmentations that correspond to the children of v in τ ′ .Since each significant topology tree τ ′ has depth at most k + 1, the claim follows.(Note that the numbers may participate in many more comparisons.) In DLoop, we try each topology tree τ and perform DStep 3 for τ .If for some topology tree we find that it is δ-realizable, we return TRUE.If the loop finishes without finding any δ-realizable topology tree, we return FALSE.
Because of our future use in the optimization version of the problem, we decouple the running time of DStep 1 and DStep 2.
Theorem 10.Assume that we have an instance for Connectivity with k line segments and n − k points (δ is not part of the input).After a preprocessing of O(k 2 n log n) time, for any given δ, we can solve the decision version DConnectivity performing k O(k) n operations.
Here, an operation may include manipulating a number that has a computation tree of depth O(k) whose internal nodes are additions, subtractions, multiplications, divisions or square root computations and whose leaves contain input numbers (including δ).
Proof.We have shown that DStep 3 requires linear number of steps in n and that the number of repetitions of DLoop depends only on k.Hence, to prove the theorem, we need to reduce the log n factor from DStep 1 and DStep 2 with preprocessing.
The main part of DStep 1 is computing a MST on n − k points, which takes O(n log n) time and is independent of δ.Hence, it can be done with preprocessing.The rest of DStep 1 (ie.defining the clusters C) can be implemented in time O(k) for any δ.
For DStep 2, we observe that δ can be classified into O(k) different intervals of values that will give the same clusters C and for which DStep 2 is the same.More precisely, let e 1 , . . ., e 4k+1 be 4k + 1 longest edges in the MST T for P, obtained after preprocessing for Here, an operation may include a number that has a computation tree of depth O(k) whose internal nodes that are additions, subtractions, multiplications, divisions or square root computations and whose leaves contain input numbers (including the input value δ).

Introducing h-square root functions
When using parametric search, we will need to trace the boundary of the segmentations X i (δ) as a function of δ.In this section we introduce and discuss the properties of the functions that will appear.
For any natural1 number h, we define h-square root functions recursively.A 0-square root function is any linear function.For h ≥ 1, an h-square root function is any function of the form f (x) = a 1 g(x) + a 2 + a 3 ±x 2 + a 4 g(x) 2 + a 5 g(x) + a 6 , where a 1 , a 2 , a 3 , a 4 , a 5 , a 6 ∈ R, and g(x) is a (h−1)-square root function.The domain of an h-square root function is all such x ∈ R for which all the square roots that appear inside them have non-negative arguments.Note that an h-square root function is also an h ′ -square root function for all h ′ ≥ h because we may take a 1 = 1 and a 2 = a 3 = 0.
The following lemma presents the setting where we will meet the h-square root functions.Note that this setting can occur in computations in II), that is, when computing the intersection of a circle with a line.Lemma 12. Let q, e and f be vectors in R 2 , ||e|| = ||f || = 1 and let g(x) be an (h−1)-square root function, for some h ∈ Z + .Then any continuous function t(x) that solves the equation We thus get the equation We expand the terms (A 1 (x) + a 3 A 2 (x)) β and (B 1 (x) + b 3 B 2 (x)) γ using the binomial theorem and, in the resulting equation, we replace We group the terms with a factor A 2 (x) or B 2 (x) remaining.For some polynomial Q 1 (X, Y, Z) of degree at most 4 i , polynomials Q 2 (X, Y, Z) and Q 3 (X, Y, Z) of degree at most 4 i − 1 and polynomial Q 4 (X, Y, Z) of degree at most 4 i − 2 we get an equation We pass the terms with A 2 (x) to one side and all the other terms to the other side.We square the equation, expand each side, replace each ( A 2 (x)) 2 with A 2 (x), and replace each ( B 2 (x)) 2 with B 2 (x).We are left with an equation where some terms include the factor B 2 (x); all the other terms are polynomial in x, f h−i−1 (x) and g h−i−1 (x).We collect on one side the terms with B 2 (x), square both sides of the equation, and replace each ( B 2 (x)) 2 with B 2 (x).We are left with an equation that is polynomial in x, f h−i−1 (x) and g h−i−1 (x); this equation defines the polynomial P i+1 (X, Y i+1 , Z i+1 ).Since we have done reorganizations and have squared both sides of the equation twice, the degree of the polynomial P i+1 is at most 4 times the degree of P i .Therefore P i+1 has degree at most 4 i+1 .
For i = h, we obtain a polynomial P h (X, Y h , Z h ) of degree at most 4 h such that the solutions to P h (x, f 0 (x), g 0 (x)) = 0 contains the solutions for f (x) = g(x).Note that the equation P h (x, f 0 (x), g 0 (x)) = 0 may contain some additional solutions that are added through the algebraic manipulation, possibly also solutions that are not in the domains of f (x) or g(x).The equation P h (x, f 0 (x), g 0 (x)) = 0 is a polynomial of degree at most 4 h in x because f 0 (x) and g 0 (x) are linear.
For each i ∈ [h], because the polynomial P i (X, Y i , Z i ) has degree at most 4 i , it is defined by 2 O(i) coefficients, and each of its coefficients comes from making 2 O(i) operations through the computation.We conclude that all the polynomials can be computed in 2 O(h) time.
parallel to e X at distance δ from σ j .Because of Lemmas 12 and 13, the value δ j is a root of a polynomial in δ of degree at most 4 h(s i ) ≤ 4 k .We then do a parametric search among the values {δ 1 , . . ., δ N } to update δ m and δ M .We can then assume that, for each j ∈ [N ], the segment η j (δ) is empty for all δ with δ m < δ < δ M or non-empty for all δ with δ m < δ < δ M .
For each j ∈ [N ], we have the (possibly empty) segment η j (δ) = (p s , e s , a ′ j (δ), b ′ j (δ)).All these segments have the same reference point p s and vector e s .The functions a ′ j (δ) and b ′ j (δ) are at most h(s i )-square root functions because of Lemma 12.To merge the non-empty segments that are overlapping, we have to sort the values a . For this, we perform a step of parametric search among the solutions of the equations a . Because of Lemma 13, these solutions are roots of polynomials of degree at most 4 k .
Note that N ′ depends on δ and ℓ, but it is constant for all δ ∈ (δ m , δ M ).We perform this procedure for each ℓ ∈ [t], where t ≤ 5. If, for some δ ∈ (δ m , δ M ) and hence for all δ ∈ (δ m , δ M ), we get that X ℓ (δ) ⊕ D(0, δ) ∩ s i is empty, then we know that the topology tree τ under consideration is not δ-realizable for any δ < δ M and therefore we can move on to the next topology tree τ inside Loop.
Computing an intersection of a δ-neighborhood of a set of points with a line segment.Next, we describe each of the u operations Z ℓ (δ) = C ℓ ⊕ D(0, δ) ∩ s i .We will often leave out in the notation the dependency on ℓ and i.Let (a 1 , J 1 ), . . ., (a N , J N ) be a Voronoi diagram on s i for points from C ℓ .Then This implies that when δ goes from δ m to δ M , the set Z ℓ (δ) goes through O(N ) combinatorial changes.This is because for each j ∈ [N ], D(a j , δ) ∩ J j goes through at most 3 combinatorial changes: when D(a j , δ) ∩ J j ̸ = ∅ for the first time, when one endpoint of J j is included in D(a j , δ) and when both endpoints of J j are included in D(a j , δ).See Figure 9.
We compute in time O(N ) all O(N ) values of δ for which these combinatorial changes occur and we do a parametric search among them to update δ m and δ M .After that, for any δ ∈ (δ m , δ M ), the segmentation Z ℓ (δ) has fixed size and its components are at most 1-square root functions of δ.
We perform this procedure for each ℓ ∈ [u].Using that |C ℓ | ≤ n for all ℓ ∈ [u] and that u ≤ 5, we spend a total of O(n log n) time plus O(log n) calls to the decision problem.If, for some δ ∈ (δ m , δ M ) and hence for all δ ∈ (δ m , δ M ), we get that for some ℓ ∈ [u] the segmentation Z ℓ (δ) is empty, then we know that the topology tree τ under consideration is not δ-realizable for any δ < δ M and therefore we can move on to the next topology tree τ inside Loop.
Computing intersections of segmentations.Let us describe how we can compute the intersections of segmentations needed to finish the computation of X i (δ).As in the statement of Lemma 8, let t and u denote the number of children of each type for s i in τ ′ .At this point we have: j ∈ [N ], and the functions b j (δ), for j ∈ [N ′ ] are (not necessarily strictly) increasing on the interval (δ m , δ M ).Moreover, all these functions are h(s i )-square root functions, defined (at least) on the interval (δ m , δ M ).By continuity, they are also defined on the interval (δ m , δ M ]. Lemma 15.There are at most 4 k O(N + N ′ ) values of δ in the interval (δ m , δ M ) where the boundary of some segment in X(δ) may intersect with a boundary of some segment in X ′ (δ).We are only considering such pairs of boundaries, where not both boundaries are constant on the interval (δ m , δ M ).These values can be computed in Proof.Let σ 1 (δ), . . ., σ N (δ) be the segments in X(δ); let σ ′ 1 (δ), . . ., σ ′ N ′ (δ) be the segments in X ′ (δ).If for some δ the boundary of some segments σ i (δ) and σ ′ j (δ) intersect, then, because the segments are monotonely increasing, σ i (δ M ) and σ ′ j (δ M ) intersect.Here we are only inserting δ = δ M into the boundaries of segments σ i and σ ′ j and we are not considering possible combinatorial change of X(δ) or X ′ (δ) at δ = δ M .This is because we are only interested in limits when δ ∈ (δ m , δ M ) approaches δ M .Because σ 1 (δ M ), . . ., σ N (δ M ) are pairwise interior disjoint, and σ ′ 1 (δ M ), . . ., σ ′ N ′ (δ M ) are pairwise interior disjoint, there may be at most O(N + N ′ ) pairs of indices Therefore, it suffices to compute those pairs Π and, for each (i, j) ∈ Π consider the 4 equations c i (δ) = c ′ j (δ) with c i ∈ {a i , b i } and c ′ j ∈ {a ′ i , b ′ i }.The solutions to those equations are roots of a polynomial of degree at most 4 h(s i ) because of Lemma 13.
The computation of Π takes O((N +N ′ ) log(N +N ′ )) time, and then we have to compute the roots of the resulting O(N + N ′ ) polynomials of degree 4 h(s i ) .
Using the lemma, we compute in 2 O(k) (N +N ′ ) +O((N +N ′ ) log(N +N ′ )) = 2 O(k) n log n time the 4 k O(N + N ′ ) = 2 O(k) n values of δ where the boundaries of the segments may intersect and do a parametric search among them to update δ m and δ M .After that, for any δ ∈ (δ m , δ M ), the endpoints of the segments in X(δ) and X ′ (δ) are sorted in the same way, and we can easily compute X(δ) ∩ X ′ (δ).Note that the endpoints of the resulting segmentation X(δ) ∩ X ′ (δ) keep being described by h(s i )-square root functions because for each endpoint there was an endpoint in X(δ) or X ′ (δ).
We repeat t + u − 1 ≤ 4 times the computation of intersection of two segmentations on s i , until we obtain Altogether, we used k O(k) n log n steps.
Summary of Step 3. We perform the computation of X i (δ) bottom-up along the significant topology tree τ ′ .For each node s i ∈ S ′ of τ ′ we spend k O(k) n log n time.At end of processing the significant topology tree τ ′ , we have computed in k O(k) n log n time values δ m < δ M such that the set X r (δ) is either empty, for all δ m < δ < δ M , or non-empty, for all δ m < δ < δ M .This is because there are no combinatorial changes for δ ∈ (δ m , δ M ).After we compute the set X r (δ) for each significant topology subtree of τ , we know that at least one of these sets is empty.If all of the sets X r were non-empty, then δ * should be at most δ m by continuity, which cannot be the case.We repeat Step 3 for each topology tree τ .After Loop finishes, we return δ * = δ M .Since there are k O(k) different topology trees to consider, and for each topology tree we spend k O(k) n log n time, the algorithm takes k O(k) k O(k) n log n = k O(k) n log n time in total.
Theorem 16.The optimization problem Connectivity for k line segments and n − k points can be solved performing k O(k) n log n operations.Here, an operation may include a number that has a computation tree of depth O(k) whose internal nodes are additions, subtractions, multiplications, divisions or square root computations and whose leaves contain input numbers and a root of a polynomial of degree at most 4 k with coefficients that are obtained from the input numbers using 2 O(k) multiplications, additions and subtractions.
Proof.The correctness of the algorithm was argued as the algorithm was described.It remains to discuss the depth of computation tree of the numbers being computed through algorithm.The depths of the computation tree of numbers used in the preprocessing, Step 1 and Step 2 are O(1).Numbers in each iteration of Loop are computed independently of the numbers computed in another iteration.The depth of computation trees of numbers used in Step 3 is O(k), but in the calls to the decision problem we are using a root of a polynomial of degree 4 k .Therefore, we are using Theorem 10 with an input number that is a root of a polynomial of degree 4 k that is computed by using Lemma 13.The result follows.
Without diving into the time needed for the algebraic operations performed by the algorithm and trying to optimize them, we obtain the following.
Corollary 17.The optimization problem Connectivity for k line segments and n − k points can be solved in f (k)n log n time for some computable function f (•).

Conclusions
We have shown that the Connectivity problem for k segments and n − k points in the plane can be solved in f (k)n log n time, for some computable function f (•).The precise function f depends on the time to manipulate algebraic numbers.The decision problem is simpler, while the algorithm for the optimization problem uses parametric search.
The algorithms can be extended to R d , for any fixed dimension d, when the uncertain regions are segments.The main observations are the following: • A MST for a set of points in R d has maximum degree c d = 2 O(d) .Indeed, Claim 2 shows that any two edges incident to a point need to have angle at least π/3.This implies that the maximum degree of the MST is bounded by the kissing number in dimension d, which is known to be c d = 2 O(d) using a simple volume argument.
• A MST for a set P of n points in R d can be computed in O(dn 2 ) time by constructing the complete graph K P explicitly and using a generic algorithm for MST in dense graphs.The term O(d) is added because it is needed to compute each distance.More efficient algorithms with a time complexity of O(n 2− 2 ⌈d/2⌉+1 +ε ), for any ε > 0, are known [1] for any fixed dimension d.(The constant hidden in the O-notation depends on ε.) • In Lemma 4, we have to consider the components obtained by removing up to kc d edges of the MST of P.
• The rest of the discussion follows as written.When constructing the Voronoi diagram restricted to a segment s i and all the other geometric constructions, the dimension of the ambient space does not matter.In fact, when considering a segment s i , we could just replace the input points by points that are coplanar with the segment and have the same distances to the line supporting the segment.

1 Figure 1 :
Figure 1: Example of the instances we consider, where the regions are line segments.Left: input data with two segments.Center and right: two possible choices of points (p 1 , p 2 ) ∈ U 1 × U 2 and the resulting graph G δ for the minimum δ that makes G δ connected.The edges of length δ are marked in dashed red; δ is different in each case.

p 3 p + ea 2 = p + eb 2 Figure 3 :
Figure 3: A segmentation of size 3 where the second segment degenerates to a point.

Figure 4 :
Figure 4: Example of Voronoi diagram on a segment s defined by points.For each Voronoi cell we mark its closest site.

Figure 5 :Figure 6 :
Figure 5: Computing the intersection of a segment and the union of congruent disks using the Voronoi diagram of the centers.

3 C 3 C 1 C 2 C 4 Figure 8 :
Figure 8: Two examples of topology trees.The left example has one significant topology subtree (a concept we will introduce later), while the right one has two significant topology subtrees, one spanned by the nodes {s 1 , s 2 , C 1 , C 2 , C 3 } and one spanned by {s 3 , C 3 , C 4 }.
DStep 1 described above, sorted such that |e 1 | ≥ |e 2 | ≥ . . .≥ |e 4k+1 |.For each i ∈ [4k] and each δ in the interval (|e i |, |e i+1 |] we will have the same family C of i + 1 connected componenents, namely those in the graph T − {e 1 , . . ., e i }.For each δ ≥ |e 1 |, we have a single component in C. For each δ < |e 4k+1 |, we know that δ < δ * because of Lemma 4. Therefore, we can consider the O(k) different connected components that appear in the graphs T 0 = T and T i = T i−1 − e i , where i ∈ [4k].For each such connected component C and each segment s ∈ S, we compute the Voronoi diagram on s of the points of C using DStep 2. In total we compute O(k 2 ) Voronoi diagrams, and each of them takes O(n log n) time.This can all be done with preprocessing, hence DStep 2 can be implemented in time O(1) for any δ.The depths of the computation trees of numbers used in DStep 1 and DStep 2 are O(1).Consider now that we are given a value δ after the just described preprocessing.If δ < |e 4k+1 |, we return FALSE.Otherwise, DStep 1 and DStep 2 now require only O(k) time.We perform DLoop iterating over all topology trees.The correctness is proven with Lemma 5 and Lemma 9.By Lemma 6, DStep 3 is repeated k O(k) times, and each such iteration performs O(kn) operations because of Lemma 9.In total we perform k O(k) n operations.Numbers in each iteration of DLoop are computed independently of the numbers computed in another iteration, and therefore we can use the bound on the depth of computation trees of Lemma 9 for each of them.Corollary 11.The decision problem DConnectivity for k line segments and n − k points can be solved performing k O(k) n log n operations.
in two points p s + t 1 e s and p s + t 2 e s , where t 1 < t 2 , this means that D ∩ L is the line segment s ′ = (p s , e s , t 1 , t 2 ).Hence, D ∩ s = s ′ ∩ s and can be computed with O(1) additional comparisons between the values t 1 , t 2 , a s , b s .
Note that to compute D ∩ s all arithmetic computations were performed when computing C ∩ L. The rest of the operations are only O(1) comparisons.