Figures
Abstract
We present improved algorithms for the Steiner tree problem with the minimum number of Steiner points and bounded edge length. Given n terminal points in a 2D Euclidean plane and an edge length bound, the problem asks to construct a spanning tree of n terminal points with minimal Steiner points such that every edge length of the spanning tree is within the given bound. This problem is known to be NP-hard and has practical applications such as relay node placements in wireless networks, wavelength-division multiplexing(WDM) optimal network design, and VLSI design. The best-known deterministic approximation algorithm has O(n3) running time with an approximation ratio of 3. This paper proposes an efficient approximation algorithm using the Voronoi diagram that guarantees an approximation ratio of 3 in O(n log n) time. We also present the first exact algorithm to find an optimal Steiner tree for given three terminal points in constant time. Using this exact algorithm, we improve the 3-approximation algorithm with better performance regarding the number of required Steiner points in O(n log n) time.
Citation: Shin D, Choi S (2023) An efficient 3-approximation algorithm for the Steiner tree problem with the minimum number of Steiner points and bounded edge length. PLoS ONE 18(11): e0294353. https://doi.org/10.1371/journal.pone.0294353
Editor: Praveen Kumar Donta, TU Wien: Technische Universitat Wien, AUSTRIA
Received: June 16, 2023; Accepted: October 30, 2023; Published: November 21, 2023
Copyright: © 2023 Shin, Choi. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.
Data Availability: In this paper, as the authors do not utilize any specific dataset, there is no available data to provide.
Funding: D. Shin has been granted by National Research Foundation of Korea(No.NRF-2022R1G1A1011933) and the funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript. No.NRF-2022R1G1A1011933 National Research Foundation of Korea https://www.nrf.re.kr/ S. Choi has been granted by Institute of Information & communications Technology Planning & Evaluation (IITP)(No.2019-0-01158) and the funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript. No.2019-0-01158 Institute of Information & communications Technology Planning & Evaluation (IITP) https://www.iitp.kr/.
Competing interests: The authors have declared that no competing interests exist.
1 Introduction
In this paper, we present improved algorithms for the Steiner tree problem with the minimum number of Steiner points and bounded edge length (STP-MSPBEL) introduced by Lin and Xue [1]. Given a set of n terminal points P = {p1, p2, …, pn} in the two-dimensional Euclidean space and a positive constant R, STP-MSPBEL asks for a tree spanning a superset of P such that each edge in the spanning tree has a length no more than R and the number of points other than those in P, called Steiner points [2], is minimized [1]. This problem has been applied to the relay node placement problem in wireless sensor networks [3, 4]. In monitoring sensor networks, connectivity among sensors is crucial for gathering information. Due to harsh environments like earthquakes, fires, or floods, a number of sensors can be simultaneously disabled. In this scenario, relay sensors are required to restore network connectivity. When the communication distance sets to R, STP-MSPBEL can be employed to recover the entire network at a low cost (with a minimal number of relay nodes). This problem also finds applications in wavelength-division multiplexing(WDM) optimal network design, VLSI design, and evolutionary/phylogenetic tree constructions in computational biology [1].
The classical Steiner tree problem, which aims to minimize the total length of the spanning tree, has been widely studied. This problem is NP-hard [5], and it is proven to be APX-hard, so it cannot be approximated within 96/95 in polynomial time unless p = np [6]. A number of approximation algorithms have been proposed [7–11]. The currently best-known approximation scheme achieved the approximation ratio of ln 4 + ϵ ≤ 1.39 using linear programming (LP) and iterative randomized rounding by Byrka et al. [7]. Later, Chen and Hsieh [8] proposed an efficient two-phase heuristic in greedy strategy with an approximation ratio of 1.4295. Recently, Traub and Zenklusen [10] proposed the purely combinatorial approach providing the approximation ratio of ln4+ ϵ, which is the same as the best-known approximation factor without solving an LP problem. Zhang et al. [11] presented a truthful-in-expectation mechanism that achieves the same approximation ratio. Berman et al. [12] presented a 1.25-approximation algorithm for the variation of the problem where a complete graph is given with edge lengths 1 and 2. Chen and Hsieh [10] analyzed the algorithm of Byrka et al. [7] and showed that it gives 1.162 + ϵ approximation for the problem on complete graphs with edge distances 1 and 2.
In STP-MSPBEL, Lin and Xue [1] proved that the problem is NP-hard and presented a polynomial-time approximation algorithm by exploiting a minimum spanning tree. Let len(e) be the length of an edge e. Given an edge ei whose length is greater than the given bounded edge length R, this algorithm inserts Steiner points to break the edge ei into small pieces of length at most R. Cheng et al. [3] called such edge as a steinerized edge. Given a tree, we can produce a steinerized tree for STP-MSPBEL using steinerized edges whenever the edge length exceeds the bounded edge length R. Lin and Xue [1] construct a steinerized minimum spanning tree from the minimum spanning tree of terminal points [13]. They showed that this algorithm has an approximation ratio of 5. Later, Chen et al. [13] proved that the steinerized minimum spanning tree indeed has an approximation ratio of exactly 4. They also presented a 3-approximation algorithm with O(n4) running time. At initialization, the algorithm adds edges between any pair of two terminal points if the distance between them is less than or equal to R. The algorithm examines all possible combinations of four terminal points from the entire set to determine if they are currently not connected and can be connected using a single Steiner point. If so, it inserts one Steiner point and four edges to connect those points and the Steiner point. After examining all subsets of four terminal points, the algorithm connects disconnected components using steinerized edges if the resulting graph is still disconnected. Cheng et al. [3] presented a 3-approximation algorithm with O(n3) running time. Instead of inspecting every subset of four terminal points, they investigate all subsets of three terminal points. Moreover, they proposed a randomized algorithm to give a 2.5 approximation with a probability of at least 0.5 in poly(n, qP) time where qP = max{qa,b,c|a, b, c ∈ P} and qa,b,c is the number of Stiner points used to steinerize the optimum Steiner tree on three terminal points {a, b, c} [3]. Senel and Younis [14] suggested an O(n4)-time algorithm to reduce Steiner points based on the Fermat point for all subsets of three terminal points. Later, they improved the algorithm with the discrete Fermat point in [15]; however, the time complexity of their algorithm to find the discrete Fermat point is not bounded because the algorithm should examine a large number of candidate points when the distance between input points is long. In summary, the best-known approximation ratio of deterministic algorithms for STP-MSPBEL has been 3 with running time O(n3).
We propose an efficient approximation algorithm for STP-MSPBEL using the Voronoi diagram, a well-known geometric data structure in computational geometry. This paper extends our previous work [16]. Our algorithm runs in O(n log n) time with the worst-case approximation ratio of 3, which is the same as the best-known deterministic approximation ratio and remarkably reduces the running time compared to the previous 3-approximation algorithms [3, 13]. In the classical Steiner tree problem, it is known that the optimal Steiner tree for the given three points can be computed in constant time by using the Fermat point [17]; however, in STP-MSPBEL, there has been no exact algorithm even for three terminal points in constant time. After we presented the exact algorithm in our preliminary paper [16], Senel and Younis [18] proposed a simpler method to find the optimal Steiner tree for three terminal points; however, this paper addresses the counterexample that shows their method indeed cannot find the optimal solution. In this paper, we present the exact algorithm to find a Steiner tree for given three points in constant time, and we propose an improved algorithm for STP-MSPBEL by using the exact algorithm. The proposed algorithm ensures a worst-case approximation ratio of 3 in O(n log n) time while achieving improved performance since we utilize the optimal solution of three terminal points.
Contributions
- We propose an efficient approximation algorithm for STP-MSPBEL using the Voronoi diagram that guarantees an approximation ratio of 3 in O(n log n) time. Previously, the best-known deterministic algorithm has an approximation of 3 in O(n3) time. The proposed algorithm remarkably reduces the running time.
- We present the first exact algorithm to provide an optimal Steiner tree for three input points in constant time. Since no exact algorithm for STP-MSPBEL has been addressed so far, we believe that our algorithm gives a good clue to finding a locally optimal solution. Moreover, it can be used to improve the performance of other approximation algorithms.
- By combining this exact algorithm and the efficient 3-approximation algorithm, we develop another 3-approximation algorithm that runs in O(n log n) time with better performance in terms of the number of required Steiner points.
2 Preliminaries
We briefly introduce a Voronoi diagram and the Fermat point, mainly used by the proposed algorithms.
The Voronoi diagram
Denote the Euclidean distance between two points p and q by |pq|. Let P = {p1, p2, …, pn} be a set of n distinct points in the plane; these points are the sites. A Voronoi diagram of P denoted by VD is defined as a subdivision of the plane into n cells, one for each site in P, with the property that a point q lies in the cell corresponding to a site pi if and only if |piq| < |pjq| for each pj ∈ P with j ≠ i [19]. In this paper, VD indicates only the edges and vertices of the subdivisions. The following properties hold:
Property 1. A point q is a vertex of VD if and only if its latest empty circle of q as its center with respect to P contains three or more sites on its boundary.
Property 2. The bisector between sites pi and pj defines an edge of VD if and only if there is a point q on the bisector such that its latest empty circle of q as its center with respect to P contains both pi and pj on its boundary but no other site.
Under the general position assumption that no four sites lie on the same circle, each vertex of the Voronoi diagram has a degree of three which means the Voronoi vertex has equidistance to three relevant sites. The number of Voronoi vertices is at most 2n − 5, and the number of Voronoi edges is at most 3n − 6. It can be efficiently computed in O(n log n) time [20].
The Fermat point
The Fermat point (or called Torricelli point) pF of a triangle Δpapbpc is a point such that the sum of distances from pF to each vertex (|pFpa| + |pFpb| + |pFpc|) is minimized. In the classical Steiner tree problem [21], the Fermat point is used to build the optimal Steiner tree for the given three points. There are two cases to compute the Fermat point. In one case where a triangle has an angle , the Fermat point is one of the input points; precisely, the Fermat point is sited at the obtuse-angled. In the other case, the Fermat point is inside the triangle Δpapbpc and can be found by drawing equilateral triangles on each side [17]. In this case, the following property holds:
Property 3. The angles subtended by the sides of the triangle at the Fermat point are all equal to when the Fermat point is inside the triangle.
3 An efficient 3-approximation algorithm
We propose an O(n log n)-time approximation algorithm with an approximation ratio of at most three by exploiting the Voronoi diagram as described in Fig 1. More precisely, it takes O(n log n) time to determine the number of Steiner points. It takes O(n log n + S) to report the locations of Steiner points where S is the number of Steiner points in the optimal Steiner tree for STP-MSPBEL since the algorithm produces no more than three times the number of Steiner points in the optimal Steiner tree. Indeed, the number of Steiner points S is independent of the number of terminal points n. Similar to the previous works [3, 13], this paper does not consider the cost of making steinerized edges when analyzing algorithms. We first compute a minimum spanning tree and sort the edges in increasing order in Step 1. If the length of the edge is less than or equal to R, we insert the edge into the result tree in Step 2. If several connected components still remain after adding edges, it requires Steiner points to connect those components. In Step 3, we construct a Voronoi diagram of the terminal points as sites. At each Voronoi vertex, we investigate its three relevant sites, {pa, pb, pc} ∈ P, to determine whether these points are in different connected components and whether the radius of the smallest enclosing circle of three sites is less than R. If so, we add one Steiner point at the center of the circle and insert three edges to connect relevant terminal points from the Steiner point. The center of the smallest enclosing circle for pa, pb, and pc is located at the Voronoi vertex when the triangle Δpapbpc is not an obtuse triangle by property 1. If Δpapbpc is an obtuse triangle, the center of the smallest enclosing circle is located at the middle of the longest side of Δpapbpc. Note that if the Voronoi vertex is associated with more than three sites, the same approach can be applied using the same Voronoi vertex. Lastly, if two endpoints of the edges in the minimum spanning tree are in different connected components, we steinerize the edge and insert it into the result tree in Step 4.
Now, we analyze the time complexity and performance of the proposed algorithm.
Lemma 1. AlgA takes O(n log n) time.
Proof. In Step 1, it takes O(n log n) time to compute the minimum spanning tree and to sort the edges of the minimum spanning tree. In Steps 2 and 4, we check at most n − 1 edges whether the edge connects two different connected components. Connected components can be efficiently maintained by disjoint-set forest, a well-known data structure in which connectivity query can be answered in O(log n) time, and two trees are merged in O(1) time [22]. Consequently, Steps 2 and 4 take O(n log n) time. The Voronoi diagram of n sites in the plane can be constructed in O(n log n) time [4]. Since the number of vertices in the Voronoi diagram is at most 2n − 5 in 2D, Step 3 also takes in O(n log n) time. Overall, AlgA takes O(n log n) time.
We show that the AlgA needs Steiner points no more than three times the number of Steiner points in the optimal solution in a similar way of [3, 13]. We briefly introduce the terminology used in the previous work. A full component of a Steiner tree is a subtree in which every Steiner point is a non-leaf node, and every input point is a leaf node. Given a Steiner tree T, C(T) denotes the number of Steiner points in T.
Lemma 2. [1]. There exists a shortest length optimal Steiner tree for STP-MSPBEL such that every Steiner point has degree at most five.
Lemma 3. [13]. Every steinerized minimum spanning tree has the minimum number of Steiner points among steinerized spanning trees.
Lemma 4. [13]. Let T* be a shortest optimal tree for STP-MSPBEL with property that every Steiner point has degree at most five. Let Tj be a full component of T*. Then the followings hold:
- (1). The steinerized minimum spanning tree on terminals in Tj contains at most 3 ⋅ C(Tj) + 1 Steiner points.
- (2). If Tj contains a Steiner point with degree at most four, then the steinerized minimum spanning tree on terminals in Tj contains at most 3 ⋅ C(Tj) Steiner points.
- (3). If the steinerized minimum spanning tree on terminals in Tj contains an edge between two terminals, then it contains at most 3 ⋅ C(Tj) Steiner points.
We slightly modify the lemma in [13] to apply it to our algorithm.
Lemma 5. Let T* be an optimal tree for STP-MSPBEL and TA be the tree produced by AlgA. Then C(TA) ≤ 3 ⋅ C(T*).
Proof. Let TS be the steinerized minimum spanning tree. Let k be the number of Steiner points inserted by AlgA in Step 3. Since each of those Steiner points combines three different connected components at once and every edge whose length is less than or equal to R in the minimum spanning tree is added in Step 2, it is obvious that
(1)
By Lemma 2, we assume that T* is the shortest length optimal Steiner tree such that every Steiner point has a degree at most five. We split T* into full components Tj(1 ≤ j ≤ Nf) where Nf is the number of full components. For each full component Tj, we construct corresponding steinerized minimum spanning trees
. If any full component contains at least one Steiner point whose degree is at most four, the corresponding steinerized minimum spanning tree has not more than 3 times the number of Steiner points in the full components by Lemma 4 (2). Moreover, if the distance between any pair of two points in the full component is not more than R, the corresponding steinerized minimum spanning tree requires no more than 3 times the number of Steiner points in the full components by Lemma 4 (3). Now, we consider a spanning tree
which consists of steinerized minimum spanning trees of each full component. By Lemma 4,
(2)
where g is the number of full components in which every Steiner point has degree 5 and the distance between any two points is greater than R. By Lemma 3,
(3)
From (1), (2) and (3), C(TA) ≤ 3 ⋅ C(T*) + g − k. Therefore, the approximation ratio produced by AlgA is bounded by 3 if g ≤ k. To show that g ≤ k, we construct two forests F1 and F2. We put all input points into F1 and F2 each and then add edges whose length is less than or equal to R in the minimum spanning tree. Let p be the number of connected components in F1 (= F2) so far, which is the result of Step 2 of AlgA. We add k Steiner points and their induced edges to F1 according to Step 3. The number of connected components in F1 is equal to p − 2k.
Now, we examine g full components in which every Steiner point has a degree of 5. Such components are either only one Steiner point or multiple Steiner points. In the case of components with a single Steiner point in which 5 input points are in different connected components and enclosed by a circle with a radius of R, the input points belong to at most three connected components in F1 after Step 3. We deal with three Voronoi vertices related 5 input points in Step 3. Let us consider one of Voronoi vertices and its relevant three points. If they are in all the different components, they are connected by a Steiner point. Otherwise, at least two of the points are already connected. Then we look into another Voronoi vertex associated with two input points unrelated to the former Voronoi vertex. Similarly, at least two of these points become a part of the same component. Accordingly, we connect two pairs of input points by adding two edges in F2. Even though we merge them, the number of connected components in F2 is still greater than or equal to that in F1. Now, we consider the other case. If the full component has more than one Steiner point, we can always find two Steiner points whose four neighbor points are input points. These four points belong to at most three connected components in F1 after Step 3. In a similar way to the previous case, at least three points are examined for connectivity due to the associated Voronoi vertex in Step 3. A Steiner point connects them, or two of them are already connected. Even if we add two edges into F2 to connect a pair of input points at each of two Steiner points, the number of connected components in F2 is still greater than or equal to that in F1. In both cases, the number of connected components is equal to p − 2g in F2 since we add two edges for every g full component. It satisfies that p − 2k ≤ p − 2g. Therefore, g ≤ k.
Lemmas 1 and 5 yield the following theorem.
Theorem 1. AlgA produces a Steiner tree in which the number of Steiner points is no more than 3 times the number of Steiner points in the optimal Steiner tree in O(n log n) time.
4 An exact algorithm for three input points
Given three terminal points pa, pb, and pc, we present the first exact algorithm AlgB to determine the optimal number of Steiner points for STP-MSPBEL in constant time as well as we provide one of the optimal Stiner trees. An optimal tree connecting pa, pb, and pc is formed as either a 3-star or a wedge, as shown in Fig 2. If an optimal Steiner tree is shaped as a wedge, we can easily find the optimal tree because the steinerized minimum spanning tree becomes optimal by Lemma 3. In the other case, pa, pb, and pc are connected by a junction point pJ, which is a tree in the shape of a 3-star. In this case, it is important to seek the location of pJ at which is minimized. Since the optimal Steiner tree is formed as either a wedge, a 3-star, or both, it can be obtained by comparing the 3-star and the wedge. Since finding a steinerized minimum spanning tree is trivial for three points, the main part of AlgB aims to seek an optimal junction point.
Empty dots represent Steiner points. (a) the steinerized minimum spanning tree requires 4 Steiner points (b) the steinerized 3-star tree using the Fermat point requires 4 Steiner points (c) the optimal Steiner tree for STP-MSPBEL requires 3 Steiner points. A junction point can be optimally placed in any of 3 shaded regions.
The Fermat point pF can be a good candidate as a junction point of pa, pb, and pc because the Fermat point is defined as a point that minimizes |papF| + |pbpF| + |pcpF|. In STP-MSPBEL, unfortunately, pF does not always become an optimal location for the junction point, as shown in Fig 2. Consider an equilateral triangle formed by pa, pb, and pc where each length of a side is 2.25R. The steinerized minimum spanning tree and a steinerized 3-star tree using the Fermat point require four Steiner points to satisfy bounded edge length R. The optimal Steiner tree, however, needs three Steiner points, as shown in Fig 2(c).
Let TF be a 3-star tree connecting input points pa, pb, and pc using the Fermat point pF as a junction point pJ.
Lemma 6. There is no steinerized 3-star tree T3s such that C(T3s) < C(TF) − 2.
Prrof. It is obvious that and
. Suppose that there is a steinerized 3-star tree T3s such that C(T3s) < C(TF) − 2. Let pJ′ be a junction point of T3s. To satisfy C(T3s) < C(TF) − 2, the following inequalities should hold:
. Since TF minimizes the sum of edge lengths,
. It contradicts that
. Thus, such T3s cannot exist.
Let be a circle centered at a point px with a radius of y ⋅ R. We subdivide the plane by circles centered at each input point pa, pb, and pc with various radii; we draw concentric circles
,
, and
,
as illustrated in Fig 4.
Observation 1. When the optimal Steiner tree of three points is formed as 3-star, the optimal location of pJ is inside the convex cell, which is an intersection area of ,
, and
such that i* + j* + k* is minimized. Note that an optimal convex cell can be a single point if circles intersect at a point.
Proof. It is obvious that any point px in (or
,
) requires at least q − 1 Steiner points to reach pa (or pb, pc). When px is a junction point and
,
, and
are the smallest circles containing px, we need i + j + k − 2 Steiner points including px to connect all input points. If px is not in the convex cell, we can always find the cell in which any point px′ can connect pa, pb, and pc with fewer Steiner points. Suppose that the cell containing px has at least one concave arc on its boundary and w.l.o.g., we assume that this arc is the part of circle
. Since px is outside of
, any point px′ contained by
,
, and
requires one fewer Steiner points than that of px. Therefore, an optimal junction point pJ should be inside of the convex region generated by
,
, and
such that i* + j* + k* is minimum.
Based on Observation 1, it is easy to show that the optimal location of a junction point can be represented as a region rather than a single point. Therefore, we focus on searching for a convex region induced by the intersection of circles; more precisely, we search for an optimal region among convex cells in the plane subdivided by concentric circles.
Observation 2. An optimal convex cell may not be unique.
In the example of Fig 2(c), there are three cells in which we can optimally put a junction point. As the distance between terminal points increases, the number of convex regions requiring the same number of Steiner points can be highly many. Indeed, the number of optimal regions is not bounded by the input size. In this paper, we provide an algorithm to find at least one optimal convex cell to construct the Steiner tree, which requires the least number of Steiner points among all possible 3-star trees connecting pa, pb, and pc.
Observation 3. The intersection of triangle Δpapbpc and optimal regions for the junction point of pa, pb, and pc is not empty.
Proof. Let be a line through two points p and q. Suppose that an optimal convex cell is completely outside of Δpapbpc and w.l.o.g., this convex cell lies on the opposite side of
from pc. The boundary of the convex cell does not consist of
since pc is on the opposite side. If the convex cell consists of
and
, it should stab the line
. Therefore, the optimal convex cells are either completely inside of Δpapbpc or on the edges of Δpapbpc.
We present AlgB, which provides an optimal Steiner tree for three input points as described in Fig 3. We consider a 3-star tree first and then compare it with the minimum spanning tree. The convex region formed by the intersection of three circles ,
, and
is denoted by
. Let
be the intersection point of
and
that lies on the same side of
as pa or on
, in other words, the intersection point closer to pa.
In the first phase, we aim to construct an optimal 3-star tree which induces a Steiner tree requiring the minimum number of Steiner points under the bounded edge length R among all possible 3-star trees (refer to Step 1 and 2 of AlgB in Fig 3). By Observations 1 and 3, we can find the optimal location for the junction point by checking all convex cells in Δpapbpc. Because there could be a number of optimal regions in Δpapbpc by Observation 2, the algorithm focuses on finding one optimal convex cell. The first phase consists of three sub-parts symmetrically in which each input point is used as a reference point. W.l.o.g., we explain the sub-part on the basis of a point pa. By Lemma 6, the number of Steiner points for an optimal 3-star tree is between iF + jF + kF − 4 and iF + jF + kF − 2 where ,
, and
. In the case that the optimal number of Steiner points is equal to iF + jF + kF − 2, the Fermat point becomes one of the optimal junction points. Otherwise, the algorithm searches for the convex cell
such that i+ j+ k−2 is equal to iF+ jF+ kF−3 or iF+ jF+ kF−4. We first assume that the optimal 3-star tree requires iF + jF + kF − 4 Steiner points. To figure out the existence of the target convex cell, we consider the series of particular convex cells which form
where i + j + k = iF + jF + kF − 2 and
. When j and k are given, we check whether there exists δz satisfying that
is not empty where i = iF + jF + kF − j − k − 2. We build a distance function
that signifies the distance between pa and
. If there exists any integer value
satisfying
, there exists a convex cell
. Given i, j, and k, we can find the interval of δr to satisfy the following inequality:
(4)
If the intervals of δr satisfying f(i, j, k, δr) ≤ 0 include any integer value
,
is nominated for a candidate cell. If there is no convex cell satisfying i + j + k − 2 = iF + jF + kF − 4, the algorithm seeks convex cells which require iF + jF + kF − 3 Steiner points in the same manner.
For easy representation, we use the similarity transform by setting pb = (0, 0) and pc = (1, 0). The scale factor of the transform is . Accordingly, pa is transformed to
and bounded edge length R becomes
. For given j and k, the coordinate of transformed
is represented by (xi, yi) where
and
. Now, we rewrite the function f(i, j, k, δr) in (4) as follows.
(5)
where
.
By substituting for δr, we can rewrite the function f′(i, j, k, δr) as follows:
(6)
where
and t is the desired number of Steiner points. Note that t is initially set to iF + jF + kF − 4 and later is set to iF + jF + kF − 3. We can solve Eq (6) by the quartic formula since
is of quartic form of
for given i, j, and k. We calculate the valid interval of δr from
satisfying inequality (7). If we find an integer value
in the valid interval of δr,
is set to a candidate cell.
(7)
Once we set the desired number of Steiner points t, we should investigate with all possible combinations of j and k. In this paper, we reveal that only four pairs of j and k are enough to find the optimal cell for each of the two i values in each sub-part. In other words, instead of checking all convex cells, we solve Eq (6) at most 8 times in each sub-part with the parameters below. W.l.o.g., we assume that |pbpF| ≥ |pcpF|. If |pbpF| < |pcpF|, we regard pb as pc and pc as pb. In the case that the target number of Steiner points t is iF + jF + kF − 4, we assign a set of parameters for Eq (6) to (i, j, k) ∈ {(iF − 2, jF, kF), (iF − 3, jF, kF + 1), (iF − 4, jF, kF + 2), (iF − 3, jF + 1, kF)}. If there exists any convex cell satisfying the condition, the convex cell becomes the optimal solution for the 3-star tree. Otherwise, we increase the i value of the above set of parameters by 1 and solve the equations again in order to examine whether there exists a 3-star tree requiring iF + jF + kF − 3 Steiner points. If there is still no convex cell satisfying the condition,
becomes the optimal solution for the 3-star tree.
In the second phase, we construct the minimum spanning tree TMST of terminal points as described in Step 3. If the number of required Steiner points of TMST is less than that of the optimal 3-star tree T3S, we return steinerized TMST as an optimal Steiner tree for the three terminal points. Otherwise, we return steinerized T3S.
Now, we prove that the result tree of AlgB is an optimal Steiner tree for STP-MSPBEL given three terminal points. We begin by demonstrating that the steinerized 3-star tree, as generated through Step 2, demands the fewest Steiner points compared to all possible 3-star trees connecting terminal points. This is achieved by comparing the candidate convex cell produced by AlgB with all convex cells that are in the triangle Δpapbpc or intersect with the boundary of the triangle Δpapbpc. We partition the triangle Δpapbpc into seven distinct regions, delineated by ,
, and
as illustrated in Fig 4. Subsequently, we investigate convex cells within each respective region.
The triangle Δpapbpc is partitioned into 7 regions by ,
, and
.
First, we look into region 1, the intersection area of ,
, and
, which indicates the smallest convex cell containing the Fermat point.
Lemma 7. No convex cell exists such that i + j + k < i* + j* + k*, i ≤ iF, j ≤ jF, and k ≤ kF where
is the candidate cell for the junction point of a 3-star tree as the result of AlgB.
Proof. In region 1, a convex cell satisfies that i + j + k ≥ iF + jF + kF − 2, iF − 2 ≤ i ≤ iF, jF−2 ≤ j ≤ jF, and kF − 2 ≤ k ≤ kF by Lemma 6. In Step 2-1 of AlgB, convex cells
are investigated by Inequality (7) with parameters (i, j, k) ∈ {(iF − 2, jF, kF), (iF − 1, jF, kF)}. Also, convex cells
and
are checked in Step 2-2 and 2-3 respectively. Consequently, all convex cells are investigated in
by AlgB.
To prove Lemmas 8 and 9, we partition the plane into six wedges centered around the Fermat point pF using the lines ,
, and
. Note that each wedge has an interior angle of 60°. As illustrated in Fig 5, we denote W1 as the wedge on the same side as pb among two adjacent wedges of a line segment (pa, pF). Accordingly, we denote W2, …, W6 in clockwise order.
denotes an intersection point of circles
and
, positioned closer to pa. Dotted curves represent an ellipse
and a hyperbola
with two focal points pb and pc through a point
.
Lemma 8. If and
, no convex cell
exists where δN < i/2, and
.
Proof. Given a convex cell, we consider two cases: the first case is when one of vertices of the convex cell is closer to pa and the second case is when the closest point to pa is on the boundary. In the first case, we use
to determine whether
contains
. In the case that
, the intersection point of
and the boundary of Δpapbpc is used for proof instead of
.
We explain with the case that . We show that |papI| − 2R ≤ |papI+1| for any
, and
which implies that pI+1 cannot be contained by
unless pI lies inside
. As depiced in Fig 6, we denote l = |pIpI+1| as the distance between pI and pI+1. If l ≥ 2R,
(see Fig 6(b)). Since pI ∈ W1 ∪ W2,
. Thus, it should hold that
. It implies that l < 2R. l + |papI+1| ≥ |papI| by triangle inequality. It holds that |papI+1| ≥ |papI| − l ≥ |papI| − 2R.
(a) The distance l between the intersection point of
and
, and
. (b) For l ≥ 2R, the angle
is strictly less than
.
Consequently, does not exist.
Let EPb,c(px) be the ellipse through a point px with two focal points pb and pc (see Fig 5). Let HBb,c(px) be the pc-side curve of the hyperbola with two focal points pb and pc through a point px.
Lemma 9. If (or W2) and
, no convex cell
(or
),
, exists.
Proof. We consider a circle centered at pa with a radius of
and an ellipse
as illustrated in Fig 7. Note that
. When one of the intersection points of the ellipse and the circle lies inside of W1, the other intersection point is located in W2 ∪ W3 ∪ W4 since |pbpF| ≤ j ⋅ R. It implies that
is outside of
as well as
. Thus,
does not exist unless
.
Now, we look into the cells in regions 2, 3, and 4. W.l.o.g., we show that there is no better convex cell compared to the candidate cell of the algorithm in region 2. We assume that |pbpF| ≥ |pcpF| for the proof of Lemmas 10 and 11.
Lemma 10. No convex cell exists such that i + j + k < i* + j* + k*, i ≤ iF, j ≥ jF, and k ≥ kF where
is the candidate cell as the result of AlgB.
Proof. AlgB investigates ,
,
, and
by solving Inequality (7) in Step 2-1. We prove that there is no better cell in region 2 by comparing it with these four convex cells.
EPb,c(pF) is tangent to the circle centered at pa with a radius of |papF| and tangent lines of EPb,c(pF) and HBb,c(pF) are orthogonal at a point pF. Thus, becomes a tangent line of HBb,c(pF) at pF and HBb,c(pF) lies in W2 ⋃ W3 ⋃ W4. Since |pbpF| − |pcpF| < (jF + 1 − kF)R,
is also in W2 ⋃ W3 ⋃ W4. Thus,
is in W2. By Lemma 9, convex cells composed by
and
,
require at least the same number of Steiner points as that of the convex cell consisting of
and
.
is in W1 because jFR − |pbpF| < R and the distance between two intersection points of W2 and
is less than
. By Lemma 9, convex cells composed by
and
require Steiner points not less than that of the convex cell consisting of
and
.
Up to now, we have examined the convex cells such that i ≤ iF and either j = jF or k = kF. Next, we consider a convex cell
such that i ≤ iF, j = jF + δ1N, k = kF + δ2N, and
. When δ1N ≥ δ2N, we compare the convex cell
with the convex cell CVcomp composed by
and
. By Lemma 8,
is not better than CVcomp which is already checked above. Equally, we compare the convex cell
with the convex cell CVcomp composed by
and
when δ1N < δ2N. By Lemma 8,
is also not better than CVcomp. Consequently, there does not exist
such that i + j + k < i* + j* + k*, i ≤ iF, j ≥ jF, and k ≥ kF where
is the candidate cell as the result of AlgB.
Lastly, we prove that there is no better convex cell in regions 5, 6, and 7 than the candidate cell. W.l.o.g., we show the case of region 5.
Lemma 11. No convex cell exists such that i + j + k < i* + j* + k*, i > iF, j < jF, and k < kF where
is the candidate cell as the result of AlgB.
Proof. HBb,c(pF) is tangent to at pF as explained in Lemma 10. Since the algorithm investigates all convex cells of which one of vertices is on
, we first look up convex cells
such that i > iF, j < jF, k < kF, and j − k < jF − kF − 2 and then
such that i > iF, j < jF, k < kF, and j − k > jF − kF + 1. If an ellipse with two focal points pb and pc intersects with
at a single point, the point is in the same side of HBb,c(pF) as pc. When the ellipse intersects with
at two points, if one intersection point is on the same side of HBb,c(pF) as pb, the other intersection point should be in the opposite side of HBb,c(pF). Therefore, if there exists a convex cell
such that i + j + k < i* + j* + k*, i > iF, j < jF, k < kF, and j − k < jF − kF − 2, there also exists a convex cell
such that j′ + k′ is equal to j + k and j′ − k′ is either jF − kF − 1 or jF − kF − 2. Since the algorithm investigates
and
,
cannot be better than the candidate cell of the algorithm.
Next, we inspect convex cells such that i > iF, j < jF, k < kF, and j − k > jF − kF + 1. Since all intersection points of
and
are in W4, any convex cell
such that i > iF, j < jF, k < kF, and j − k > jF − kF + 1 cannot be better than
induced by
by Lemma 9 with a slight modification.
Theorem 2. Given 3 input points, AlgB computes an optimal Steiner tree for STP-MSPBEL in constant time.
Proof. It is obvious that AlgB takes constant time. We can compute the Fermat point in constant time in Step 1. In Step 2, we solve Eq (6) at most 8 times for each sub-part. Finally, in Step 3, the minimum spanning tree of three points can also be constructed in constant time.
Now, we show that the result steinerized tree is optimal for STP-MSPBEL. There are two ways to connect three terminal points with minimum Steiner points: one is to connect three points with a junction point, and the other is to connect two pairs of input points directly. Through Step 2, the algorithm presents the optimal 3-star tree among all possible 3-star trees connecting input points. By Observations 1 and 3, at least one optimal convex cell for a junction point intersects with Δpapbpc. By Lemmas 9, 10, and 11, we have shown that the result convex cell of the algorithm is better than or equal to other convex cells in Δpapbpc. Therefore, an optimal 3-star Steiner tree can be constructed by putting the junction point in the result convex cell and connecting input points with the minimum number of Steiner points. Since the algorithm computes the minimum spanning tree in Step 3, the optimal Steiner tree for STP-MSPBEL is presented by comparing those two trees.
We argue that the optimal location for the junction point may not be found although investigating all intersection points among ,
,
,
,
, and
which implies that the method in [18] cannot provide the optimal Steiner tree for three points. The counterexample exists when |papF| is short, and both |pbpF| and |pcpF| are relatively long. As shown in Fig 8, we set R = 1, |papF| = 1.739, |pbpF| = 1100.95 and |pcpF| = 1000.3007. Then, the distance between pa and
is greater than 2; however,the distance between pa and
is less than 4. Thus, if the junction point is located at
, it requires 2101 Stiner points which is one less than that using
. If the junction point is located at any intersection points among
,
,
,
,
, and
, it requires at least 2102 Steiner points. In addition, the steinerized minimum spanning tree needs 2102 Steiner points.
It shows that none of the intersection points between ,
,
,
,
, and
might yield the optimal junction point location.
5 A combined algorithm
In this section, we develop another 3-approximation algorithm by combining the exact algorithm AlgB and the approximation algorithm AlgA to further reduce the number of required Steiner points in O(n log n) time. As described in Fig 9, AlgC computes the minimum spanning tree (MST) of terminal points and sorts MST edges by the number of required Steiner points in ascending order. Next, AlgC constructs the Voronoi diagram of the set of terminal points as sites and calculates the number of Steiner points required at each Voronoi vertex to connect its relevant 3 terminal points by AlgB. Then, the algorithm sorts the Voronoi vertices by the number of required Steiner points. Let EMST(i) be a set of MST edges requiring i Steiner points and VVD(j) be a set of Voronoi vertices requiring j Steiner points. By looking up the sorted lists of MST edges and Voronoi vertices, we are able to construct a steinerized spanning tree. We process an edge case or a vertex case by the following rules:
- Rule 1. EMST(i) is processed before VVD(j) where i < ⌈j/2⌉.
- Rule 2. VVD(j) is processed before EMST(i) where j ≤ 2i.
In the edge case, if two endpoints are not in the same component, we steinerize the edge and add it to the resulting tree. In the vertex case, if three relevant terminal points of the Voronoi vertex are not in the same component, we add Steiner points and relevant edges into the resulting tree by AlgB. For example, at first, we add all MST edges in EMST(0) by Rule 1, and then we look at the Voronoi vertices in VVD(1) and VVD(2) by Rule 2. Iteratively, we increase the result tree size by processing with EMST(i), VVD(2i + 1), and VVD(2i + 2). The basic idea behind this strategy is that if three points are in different connected components after adding edges in EMST(i), at least 2(i + 1) Steiner points are required to connect those three components by MST edges. Thus, it is beneficial to use the vertex case if VVD(2i + 1) or VVD(2i + 2) connects those three points. If three points are already in the same connected component before VVD(j) are considered, the bottleneck of the path between any of two points is less than or equal to ⌈j/2⌉ − 1. Thus, Despite removing the two bottleneck edges, the result tree deteriorates when Steiner points are inserted based on VVD(j).
Theorem 3. AlgC provides the Steiner tree TC satisfying C(TC) ≤ C(TA) in O(n log n) time where TA is the Steiner tree produced by AlgA.
Proof. It is straightforward that AlgC takes O(n log n) time. Since AlgB takes constant time, Step 1 and 2 of AlgC takes O(n log n) time. In Step 3, there are n − 1 MST edges and the O(n) Voronoi vertices in the sorted lists. Since each connectivity query takes O(log n) time, the overall time complexity is bounded by O(n log n). The performance of AlgC is better than or equal to that of AlgA. AlgC first processes with E(0) and V(1). The resulting tree (forest) is exactly the same as the result of AlgA after processing Step 3. In the context of AlgC, Steiner points are introduced through the vertex case exclusively if the spanning tree established by AlgB outperforms the tree formed by steinerized edges of the minimum spanning tree. Consequently, AlgC produces a spanning tree that requires an equal or fewer number of Steiner points than that of AlgA.
6 Conclusion
We present approximation algorithms for the Steiner tree problem with the minimum number of Steiner points and bounded edge length. Previously, the best-known deterministic approximation algorithm has O(n3) running time with an approximation ratio of 3. In this paper, we propose O(n log n)-time approximation algorithm with the same approximation ratio, significantly improving the time complexity. Additionally, to enhance performance, we introduce the first exact algorithm that can provide an optimal Steiner tree for any given three points in constant time. By using this exact algorithm, we develop another 3-approximation algorithm that runs in O(n log n) time with better performance in terms of the number of required Steiner points.
References
- 1. Lin GH, Xue G. Steiner tree problem with minimum number of Steiner points and bounded edge-length. Information Processing Letters. 1999;69(2):53–57.
- 2. Gilbert EN, Pollak HO. Steiner Minimal Trees. SIAM Journal on Applied Mathematics. 1968;16(1):1–29.
- 3. Cheng X, Du DZ, Wang L, Xu B. Relay sensor placement in wireless sensor networks. Wireless Networks. 2008;14(3):347–355.
- 4. Younis M, Senturk IF, Akkaya K, Lee S, Senel F. Topology management techniques for tolerating node failures in wireless sensor networks: A survey. Computer Networks. 2013;.
- 5. Hartmanis J. Computers and intractability: a guide to the theory of np-completeness (michael r. garey and david s. johnson). Siam Review. 1982;24(1):90.
- 6. Chlebík M, Chlebíková J. The Steiner tree problem on graphs: Inapproximability results. Theoretical Computer Science. 2008;406(3):207–214.
- 7. Byrka J, Grandoni F, Rothvoß T, Sanità L. Steiner tree approximation via iterative randomized rounding. Journal of the ACM (JACM). 2013;60(1):1–33.
- 8.
Chen CY. An efficient approximation algorithm for the Steiner tree problem. In: Proceedings of the 2nd International Conference on Information Science and Systems; 2019. p. 179–184.
- 9. Chen CY, Hsieh SY. An improved algorithm for the Steiner tree problem with bounded edge-length. Journal of Computer and System Sciences. 2022;123:20–36.
- 10.
Traub V, Zenklusen R. Local search for weighted tree augmentation and Steiner tree. In: Proceedings of the 2022 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA). SIAM; 2022. p. 3253–3272.
- 11.
Zhang J, Liu Z, Deng X, Yin J. Truthful Mechanisms for Steiner Tree Problems. In: Proceedings of the AAAI Conference on Artificial Intelligence. vol. 37; 2023. p. 5884–5891.
- 12.
Berman P, Karpinski M, Zelikovsky A. 25-Approximation Algorithm for Steiner Tree Problem with Distances 1 and 2. In: Workshop on Algorithms and Data Structures. Springer; 2009. p. 86–97.
- 13. Chen D, Du DZ, Hu XD, Lin GH, Wang L, Xue G. Approximations for Steiner trees with minimum number of Steiner points. Journal of Global Optimization. 2000;18(1):17–33.
- 14. Senel F, Younis M. Relay node placement in structurally damaged wireless sensor networks via triangular steiner tree approximation. Computer Communications. 2011;34(16):1932–1941.
- 15.
Senel F, Younis M. Optimized relay node placement for establishing connectivity in sensor networks. In: Global Communications Conference (GLOBECOM), 2012 IEEE; 2012. p. 512–517.
- 16.
Shin D. Efficient algorithms with performance guarantees for geometric problems in wireless networks; 2016. Doctoral dissertation, KAIST, http://library.kaist.ac.kr/search/detail/view.do?bibCtrlNo=648280.
- 17. Gueron S, Tessler R. The fermat-steiner problem. The American Mathematical Monthly. 2002;109(5):443–451.
- 18. Senel F, Younis M. Novel relay node placement algorithms for establishing connected topologies. Journal of Network and Computer Applications. 2016;70:114–130.
- 19.
Mark dB, Otfried C, Marc vK, Mark O. Computational geometry algorithms and applications. Spinger; 2008.
- 20.
Sack JR, Urrutia J. Handbook of computational geometry. Access Online via Elsevier; 1999.
- 21.
Hwang FK, Richards DS, Winter P. The Steiner tree problem. Elsevier; 1992.
- 22.
Leiserson CE, Rivest RL, Stein C, Cormen TH. Introduction to algorithms. The MIT press; 2001.