Approximation algorithms for the two-center problem of convex polygon
Indian Statistical Institute, Kolkata, India
School of Computer Science, Carleton University, Ottawa, Canada
Given a convex polygon with vertices, the two-center problem is to find two congruent closed disks of minimum radius such that they completely cover . We propose an algorithm for this problem in the streaming setup, where the input stream is the vertices of the polygon in clockwise order. It produces a radius satisfying using space, where is the optimum solution. Next, we show that in non-streaming setup, we can improve the approximation factor by , maintaining the time complexity of the algorithm to , and using extra space in addition to the space required for storing the input.
Keywords. Computational geometry, two-center problem, lower bound, approximation algorithm, streaming algorithm.
Covering a geometric object (e.g., a point set or a polygon) by disks has drawn a lot of interest to the researchers due to its several applications, for example, base station placement in mobile network, facility location in city planning, etc. There are mainly two variations of the disk cover problem, namely standard version and discrete version, depending on the position of the centers of the disks to be placed. In standard version, the position of centers of disks are anywhere on the plane, whereas in the discrete version, the center of the disks must be on some specified points, also given as input. The objective of a -center problem for a given set of points in a metric space is to find out points (also called centers) in the underlying space so that the largest distance of a point from its nearest center is minimized. In other words, in -center problem we want to cover a set of points using congruent balls of minimum radius. In this paper, we consider the standard two-center problem for a convex polygon in the metric, where the objective is to identify centers of two congruent closed disks whose union completely covers the polygon and their (common) radius is minimum. As stated by Kim and Shin , the major difference between the two-center problem for a convex polygon and the two-center problem for a point set are (1) points covered by the two disks in the former problem are in convex positions (instead of arbitrary positions), and (2) the union of two disks should also cover the edges of the polygon . The feature (1) indicates the problem is easier than the standard two-center problem for points, but feature (2) says that it might be more difficult.
1.1 Related work
The -center problem, where is a set of points in a Euclidean plane and the distance function is the metric, is NP-complete for any dimension . Therefore it makes sense to study the -center problem for small (fixed) values of ([3, 4, 7, 9, 10, 11, 18]) and to search for efficient approximation algorithms and heuristics for the general version (, ). Hershberger  proposed an time algorithm for the standard version of the two-center problem for the -points in plane. Sharir  improved the time complexity of the problem to . Eppstein  proposed a randomized algorithm with expected time complexity . Later, Chan  proposed two algorithms for this problem. The first one is a randomized algorithm that runs in time with high probability, and the second one is a deterministic algorithm that runs in time. The discrete version of the two-center problem for a point set was solved by Agarwal et al.  in time. The standard and discrete versions of the two-center problem for a convex polygon was first solved by Kim and Shin  in and time respectively, where is the number of vertices of . Recently Vigan  proposed the problem of covering a simple polygon by geodesic disks whose centers lie inside . Here, the geodesic distance between a pair of points and inside the polygon is the length of the shortest path inside . He showed that the maximum radius among these geodesic disks is at most twice as large as that of an optimal solution, and the time complexity of the proposed algorithm is . The algorithm proposed by Vigan , if applied for convex polygon, the approximation factor remains unaltered‡‡‡However, this algorithm is in the non-streaming setup. In non-streaming setup, we have better result.. There exists a heuristic to cover a convex region by congruent disks of minimum radii . However, to the best of our knowledge there are no linear time approximation algorithm for the -center problem of a convex polygon, where .
In the streaming model, McCutchen et al.  and Guha  have designed a ()-approximation algorithm for the -center problem of a point set in using space. For the 1-center problem, Agarwal and Sharathkumar  suggested a -factor approximation algorithm using space. The approximation factor was later improved to by Chan and Pathak . Recently, Kim and Ahn  proposed a ()-approximation algorithm for the two-center problem of a point set in . It uses space and update time where insertion and deletion of the points in the set are allowable. To the best of our knowledge, there is no approximation result for the two-center problem for a convex polygon under the streaming model.
1.2 Our result
We propose a -factor approximation algorithm for the two-center problem of a convex polygon in streaming setup. Here, the vertices of the input polygon is read in clockwise manner and the execution needs time using space. Next we show that if the restriction on streaming model is relaxed, then we can improve the approximation factor to 1.84 maintaining the time complexity to and using extra space apart from the space required for storing the input. We have observed the fact that if two disks cover a convex polygon , then they must also cover a “line segment” or a “triangle” lying inside that polygon . This fact has been used in our work to analyze the approximation factor of the radius of disks.
1.3 Notations and terminologies used
Throughout the paper we use the following notations. The line segment joining any two points and is denoted by and its length is denoted by . The - and -coordinate of a point are denoted by and respectively. The “horizontal distance” between a pair of points and is (the absolute difference between their -coordinates). Similarly, the “vertical distance” between a pair of points and is . The notation implies that the point lies on . We will use , and to represent triangle, axis-parallel rectangle, and quadrilateral of arbitrary orientation of edges respectively.
1.4 Organization of the paper
In this paper, the Section 2 describes the algorithm for two-center problem of a convex polygon in streaming setup along with the detailed analysis of the approximation factor. Section 3 discusses the same problem under non-streaming model and a linear time algorithm is proposed along with a detailed discussion on the analysis of approximation factor. Finally we conclude in section 4 with future work.
2 Two-center problem for convex polygon under streaming model
In this section, we first describe the streaming algorithm for the problem in subsection 2.1. Then in subsection 2.2, we discuss about the type of lower bounds of the optimal radius of the disks followed by the interesting characteristic of the problem in subsection 2.3 which shows that only quadrilaterals, triangles are to be studied instead of all convex polygons for the approximation factor. Subsection 2.4 will show the detailed analysis of the approximation factor.
2.1 Proposed algorithm
Under the streaming data model, the algorithm has only a limited amount of working space. So it cannot store all the input items received so far. In this model, the input data is read only once in a single pass. It does not require the entire data set to be stored in memory. In the streaming setup, the vertices of the convex polygon arrives in order one at a time. In a linear scan among the vertices of , we can identify the four vertices , , and of the polygon with minimum -, maximum -, minimum - and maximum -coordinate respectively as shown in Figure 1(a). This needs scalar locations. Let be an axis-parallel rectangle whose four sides passes through the vertices and of the convex polygon , where , , and .
The length and width of rectangle are and respectively. We split into two equal parts and by a vertical line , where and (see Figure 1(a)). Finally, compute two congruent disks and of minimum radii circumscribing and respectively (see Figure 1(b)). The output of our algorithm is , the radii of (resp. ). Since the two disks cover the rectangle together, they must also cover the polygon lying inside . For an axis-parallel rectangle of length and width (where ) covering the polygon , the value of (as shown in Figure 1(b)) computed by our algorithm is
The time complexity of our algorithm, determined mainly by identification of the four vertices , , and during the streaming input of the vertices of , takes time, where is the size of the input.
Let be the radius of the two congruent disks and for enclosing , returned by our algorithm. If is the minimum radius of the two congruent disks that cover , then the approximation factor of our algorithm is . We now propose a lower bound of , which suggests an upper bound of , i.e. .
2.2 Lower bound of
A convex polygon is said to be exactly covered by an axis-parallel rectangle , if and each of the four side of contain at least one vertex of .
A convex polygon is said to be a subpolygon of a convex polygon , if the set of vertices of are subset of the vertices of and this is denoted by .
Now, to have a better estimate of the approximation factor, we need a lower bound of , which is as large as possible. The following observations give us an idea of choosing two types of lower bound of .
The two disks whose union covers the convex polygon , must also cover a convex polygon which is a subpolygon of .
Thus, the lower bound of the radii of the two disks for covering a quadrilateral , where , is also a lower bound for the radius of the two-center problem for the convex polygon .
Let be the longest line segment within a quadrilateral inside . The two disks whose union covers the convex polygon , must also cover the line segment because .
From Observation 2, we conclude that . Moreover, the length of the line segment can be at most , the diameter of the convex polygon .
Let be a triangle inside the polygon . If a pair of disks and completely cover , they must also cover the triangle . Again, if a pair of disks and cover a triangle , one of them must fully cover one of the edges of .
Thus, a lower bound of is half of the length of the smallest edge of a triangle inside (Observation 3). In order to tighten the lower bound we find a triangle inside whose smallest edge is as large as possible. We use to denote the smallest edge of . We also use to denote the length of . Thus, is a lower bound for .
Note that, in our analysis may not always be the triangle whose smallest side is of maximum length among all triangles inscribed in . We try to find a triangle inscribed in such that the length of its smallest side has a closed form expression in terms of the length () and width () of the rectangle covering . This helps us to establish an upper bound on the approximation factor of our algorithm.
2.3 Characterization of the problem
The upper bound of the approximation factor for the two-center problem for the polygon is or, depending on the type of lower bound used. In order to have a worst case estimate of the approximation factor, at first we fix (or in other words both and of the rectangle ). Now, there are different convex polygons exactly covered by the same rectangle , and the lower bound of optimal radius for each such polygon are possibly different. Thus in order to have a worst estimate of the upper bound for the approximation factor , we choose the polygon inside for which the lower bound () of is minimum among all possible polygons inside . The following observation gives us an intuition for choosing quadrilaterals and triangles instead of inspecting all possible polygons exactly covered by the rectangle .
Let be a convex polygon which is exactly covered by an axis-parallel rectangle of length and width (). Let be a subpolygon of () so that is also exactly covered by the same axis-parallel rectangle . Then the upper bound of the approximation factor of our algorithm for polygon will be smaller than (or equal to) that for polygon .
Proof: Follows from the Observation 1 that the lower bound ( or ) of the optimal radius for polygon will be less than that for polygon (because of the fact that any triangle in or any line segment in also lies inside ).
Observation 4 says that in order to measure the upper bound of the approximation factor of our algorithm for a given convex polygon , one should choose a quadrilateral as a subpolygon of (i.e. ) where both and are exactly covered by the same rectangle . The reason for choosing the quadrilateral as subpolygon of is that quadrilateral is the minimal convex polygon (“minimal” in the sense that “there exists no subpolygon of the quadrilateral which is exactly covered by the same rectangle ”). From now onwards, we will use to denote “a subpolygon of such that both and are exactly covered by the same rectangle ”. It needs to mention that, we may have two degenerate cases, (i) if a vertex of the given convex polygon coincides with a vertex of , then the minimal subpolygon of will be a triangle with one of its vertex at , and (ii) if (maximum-, maximum-), and (minimum-, minimum-) coordinates correspond to two vertices, say and , of the given convex polygon (i.e. any two non-adjacent corners, say and , of the rectangle coincides with these two vertices and ), then we need to consider diagonal as a subpolygon (with area zero). Now note that, whatever be the shape of a convex polygon that is exactly covered by rectangle , we always obtain a subpolygon as a quadrilateral (including degeneracies). The observation 4 says that the approximation factor for this given convex polygon will be bounded above by that of its subpolygon . Therefore we will concentrate on all possible quadrilaterals inside rather than studying convex -gons with . Now, each such quadrilaterals have different lower bound of optimal radius. The minimum of these lower bounds for among all possible quadrilaterals will be used to compute the upper bound of the approximation factor for an arbitrary convex polygon which is exactly covered by the rectangle .
In our streaming model we have stored only the four vertices , , and of the convex polygon and we find out either a triangle (as defined in earlier section), or the longest line segment inside the instead of searching them inside and the approximation factor thus obtained gives an upper bound for the same in .
In the next subsection, we perform an exhaustive case analysis and finally present a flowchart in Figure 10 to justify the following result.
The approximation factor of the two-center problem for a convex polygon in the streaming model is .
2.4 Analysis of approximation factor
Let, , , and be the mid-points of , , and respectively, and and ( as shown in Figure 1(b)). Surely, (the diameter of the polygon ). We study, in detail, the case when is a quadrilateral. We also discuss the two degenrate cases, namely, (i) is a triangle and (ii) is a diagonal of .
2.4.1 is a quadrilateral
We consider the following two cases separately.
One of the diagonals of (e.g. in Figure 1(a)) must be at least of length and the two congruent disks must cover this diagonal. Thus, we have , and hence , implying . Since , we have .
Before studying this case, we show the following two important observations:
If both the vertices and lie at the same side of , the approximation factor will be 2.
Proof: Without loss of generality, assume that both and lie below , and as shown in Figure 2. Depending on the position of on the edge , we consider the following two cases :
Case (i): lies on
Refer to Figure 2(a). Choose a point such that . Let be the point of intersection of and . Whatever be the position of the vertex on , the point must lie always inside the quadrilateral . Hence, the triangle will also lie inside the . Now, as , we have . Here, we choose the triangle . Since the point lies below , we have . Also, . Therefore, the smallest side of the triangle will be at least . Hence, (since ).
Case (ii): lies on
Refer to Figure 2(b). Consider a horizontal line segment below at a distance of . This segment intersects at point . Now, since , and , the point must lie always within . Hence the triangle will also lie inside . Here, we choose this triangle . Now, intersect , and at the points , and respectively, where . From the similar triangles and , we have
Now, , and . Hence, the Equation 2 gives . Now, in , , and . Since , we have . Also, , because . Therefore, the smallest side of the must be at least . Therefore, the approximation factor will be given by since (). Thus, we have .
If both the vertices and lie at the same side of , the approximation factor will be 2.
Proof: Without loss of generality, assume that and lie to the right of and as shown in Figure 3. Depending on the position of on the edge , we study the following two cases:
Case (i): lies on
Refer to Figure 3(a). Let be a point on edge with . The line segments and intersect at . Whatever be the position of on , the point must lie inside the quadrilateral . Hence, the triangle , as shown in Figure 3(a), must also lie inside . Here, we choose the triangle . Now, since , we have . Surely, . Also, . Thus the smallest side of triangle will be either or . Now,
if , we have . Therefore, . Since , we have .
if , we have . Hence .
Case (ii): lies on
Refer to Figure 3(b). Consider a vertical line segment to the right of at a distance of . This segment intersect at . Now, since , and , the point must always lie within . Hence the triangle will also lie inside . We choose this triangle . Now, intersect and at the points and respectively, where , where is the mid-point of . From the similar triangles and , we have
Now, , and . Thus, Equation 3 gives . Now, in , , and . Any one of the three sides of can be smallest side . Now,
if , we have . Since , we have .
if , we have , since .
if , we have .
Now, since , the approximation factor is given by .
Observations 5 and 6 say that if either “ and lie in the same side of ” or, “ and lie in the same side of ”, or both, then . Thus, it remains to analyze the case where both “ and lie on the opposite sides of ”, and “ and lie on the opposite sides of ”. Without loss of generality, we assume that and . Now, depending on the positions of and , we need to consider the following two cases.
Case (A): The vertices and lie at the left and right of respectively.
Here, and (see Figure 4). We need to consider the following two cases depending on the length of the edge of .
Refer to Figure 4(a). The point , determined by the intersection of and , must lie inside . This is because of the fact that lies to the left of on and lies above on . Here, , where is the mid point of . We choose , where and . As , in we have , and hence .
Refer to Figure 4(b). The necessary condition for this case is that the point must lie at the right of the mid-point of , i.e. . Therefore, . Consider the point which is determined by the intersection of and . Hence, . In this case, the point must lie within the quadrilateral because of the constraints that cannot lie below , and lies on . We choose the triangle . In this triangle, and . Now, because . Also note that, §§§ Since , we have . Hence, in , we have , and .
Case (B): The vertices and lie at the right and left of respectively.
Refer to Figure 6. Let and be the mid-points of and respectively. Observe that, if then and vice-versa, otherwise the given condition will become invalid. Since , we also have . Since the longest line segment inside the is at least , we have the lower bound . Hence, the approximation factor (since ).
In this case, if then ; similarly, if then . Henceforth, without loss of generality, we assume that (see Figure 6 and Figure 7(a & b)). Let and be the mid-points of and respectively. Take two points and such that and . Now depending on the position of on the line segment , we divide this case into two sub-cases as follows:
Case B.2.a :
Here (see Figure 6). Connect with . Consider a horizontal line segment above at a distance of which intersect and at the points and respectively. From the similar triangles and , we have . This gives . Hence, . Therefore, . Now, whatever be the position of , and , the point , obtained above, must lie inside the . Thus we can choose whose three sides are of , and . Therefore, the smallest side of may be , or . If , then (since ).
On the other hand, if , then (since ). Thus we have .
Here (see Figure 7). Depending on the position of on , we divide this case into two sub-cases as follows:
Refer to Figure 7(a). In this case, the horizontal distance between