Abstract
The minimum-area parallelogram annulus problem is studied, in which one wants to compute a parallelogram annulus of minimum area that includes n input points in the plane. Extending an usual, doughnut-shaped circular annulus, a parallelogram annulus is defined to be a region between two edge-parallel parallelograms. As a parallelogram has two distinct orientations for its sides, so does a parallelogram annulus as well. In this paper, several variants of the problem are considered: (1) when both side orientations are given and fixed, (2) when one of them is fixed and the other can be freely chosen, (3) when the interior angles of the resulting parallelogram annulus is given and fixed, and (4) when both side orientations can be chosen arbitrarily. The first and efficient algorithms for each of these cases are presented, whose running times are (1) , (2) , (3) , and (4) , respectively. Further, bicriteria variants of the problem are considered, in which both width and area of the resulting parallelogram annulus are simultaneously minimized. In order to obtain these new algorithms, geometric observations, newly obtained in this paper and known in previous papers, and the symmetric nature of parallelograms and parallelogram annuli are exploited.
1. Introduction
The geometric location problem is one of the central topics in computational geometry. In problems of this type, one is often asked to find an optimal location of particular geometric shapes in metric spaces in terms of a specified objective function. According to different shapes, objective functions, and their underlying spaces, there are many algorithmic results known in the literature. Typical and classical examples include the problem of finding a smallest circle enclosing a set P of input points in the plane [1] and the problem of finding a maximum-area rectangle within a prescribed bound that avoids all points in P [2,3].
It was relatively recent that the minimum annulus problem and its variants started to attract researchers. An annulus is a shape of a doughnut, or the closed region between two concentric circles, more precisely. The minimum annulus problem asks to find a minimum annulus that encloses a given set P of points in the plane. Early results on the annulus problem [4,5,6] presented -time algorithms that compute a circular annulus of minimum width. The currently best algorithm for the same problem takes time [7,8] where denotes an arbitrarily small positive constant. Agarwal et al. [9] and Chan [10] also presented linear-time approximation schemes for the circular annulus problem.
The minimum annulus problem has a natural application to the shape matching problem. If input points in P are regarded to be sampled from the boundary of a circle, then a circular annulus of minimum extent that includes P would best describe the original circle. For a variety of applications, including the curve matching problem, the minimum annulus problem has been intensively studied for the last years, with many extensions and variations. Most of the recent study has focused on rectangular or square annuli, which extend the doughnut-shaped circular annulus to rectilinear shapes. More precisely, a rectangular or square annulus is defined as the region between a rectangle or a square and its inward offset. See Figure 1 for an illustration of annuli of different shapes. Two different extent measures, width and area, have been mostly considered in the minimum annulus problem, so we want to minimize the width or the area of the resulting annulus of a particular shape.
Figure 1.
Annuli of different shapes whose widths are equal to w: (a) a circular annulus, (b) a square annulus, (c) a rectangular annulus, and (d) a parallelogram annulus.
The minimum-width axis-parallel rectangular annulus problem was first considered by Abellanas et al. [11], who presented an -time algorithm. For the axis-parallel square annulus, an -time algorithm is known by Gluchshenko et al. [12], who also proved a lower bound of . It becomes more difficult when considering rectangular or square annuli that minimize width over all orientations. For rectangular annuli in arbitrary orientation, an -time algorithm that finds a minimum-width rectangular annulus was presented by Mukherjee et al. [13]. For the square case, the first -time algorithm that computes a minimum-width square annulus over all orientations was presented by the author [14]. This algorithm was soon improved to [15] and to time [16], subsequently.
Note that all the previous results mentioned above considered the minimum-width annulus problem, in which the objective is to minimize the width of the resulting annulus. However, less is known in the literature about the minimum-area annulus problem. It is known that the minimum-area circular annulus problem can be solved by a linear programming formulation, spending linear time, as also pointed out by Chan [10]. Compared to the currently best running time for its minimum-width variant [8], one would need a different approach to efficiently solve the minimum-area annulus problem. For the rectangular or square case, the author presented several first algorithms that compute a rectangular or square annulus with minimum area in fixed or arbitrary orientation [15]. In particular, a minimum-area rectangular annulus enclosing P over all orientations can be computed in time.
In this paper, we are interested in parallelogram annuli. A parallelogram annulus is defined to be the closed region between two edge-parallel parallelograms, see Figure 1d. Its precise definition will be given in the next section. As a square or rectangle is a special case of a parallelogram, parallelogram annuli generalize both square or rectangular annuli, with at least one more degree of freedom to determine one such annulus. Very recently, the author [17,18] studied several variants of the minimum-width parallelogram annulus problem, and presented first algorithms, see Table 1 for the details.
Table 1.
Summary on the currently best algorithms for the parallelogram annulus problem. Each column labeled by ‘W’, ‘A’, ‘AW’, and ‘WA’ stands for ‘minimum-width’, ‘minimum-area’, ‘minimum-area minimum-width’, and ‘minimum-width minimum-area’, respectively. The parameters and represent the two side orientations of parallelogram annuli. Each entry of the table shows the time complexity of the currently best algorithm in the worst case and its reference. Here, the big-Oh symbol is omitted.
This paper continues the study of the minimum parallelogram annulus problem with different objective functions, such as area, width, and their combinations. For these two popular extent measures, width and area, we reveal their relations and differences in the parallelogram annulus problem, upon the previous observations for minimum-width annuli [17], and finally devise first yet efficient algorithms for several variants of the problem. Our results in this paper are summarized as follows. Note that a parallelogram has two orientations for its sides, and so does a parallelogram annulus by definition.
- (1)
- When both side orientations are given and fixed, a minimum-area parallelogram annulus enclosing P can be computed in time. We also prove that, in this case, there is a unique minimum-area parallelogram annulus enclosing P, and it also minimizes the width.
- (2)
- When one of the two side orientations is fixed and the other can be freely chosen, a minimum-area parallelogram annulus enclosing P can be found in time.
- (3)
- When the angle between the adjacent sides is fixed, a minimum-area parallelogram annulus enclosing P can be computed in time. This algorithm generalizes the previous -time algorithm [15] finding a minimum-area rectangular annulus over all orientations, without increasing the running time.
- (4)
- A minimum-width parallelogram annulus enclosing P over all pairs of side orientations can be found in time, where is an arbitrarily small positive constant.
All the above algorithms are the first nontrivial solutions to the corresponding variant of the problem. To our best knowledge, there was no known algorithm that minimizes the area of the resulting parallelogram annulus in the literature. We also consider several bicriteria variants of the problem for each of the above four cases: finding a minimum-width minimum-area annulus or minimum-area minimum-width annulus. Table 1 summarizes the currently best algorithms for each of those variants of the minimum parallelogram annulus problem, including our present results. In order to obtain these new algorithms, we exploit geometric observations, newly obtained in this paper and known in the previous papers [15,17,18], and the symmetric nature of parallelograms and parallelogram annuli.
The rest of the paper is organized as follows: Section 2 introduces necessary concepts and definitions, and precisely formulates our problems. We then investigate the parallelogram annulus problem and devise efficient algorithms in Section 3, Section 4, Section 5 and Section 6 for each of the above four cases. After some discussion on our results in Section 7, we finally conclude the paper in Section 8 with some remarks.
2. Preliminaries
Throughout the paper, we consider the plane with the horizontal x-axis and the vertical y-axis. Let be any subset. Let and denote its boundary and interior. The line segment between any two points shall be denoted by , and its Euclidean length by .
Parallelograms and parallelogram annuli are the geometric objects we will mainly discuss in this paper. Generalizing a circular annulus, a parallelogram annulus is the closed region obtained by subtracting a parallelogram hole from a larger parallelogram. Note that a circular annulus is the closed region between two concentric circles. In this paper, we give a precise definition of a parallelogram annulus in terms of strips.
2.1. Strips and Parallelogram Annuli
A strip is the closed region between two parallel lines in the plane. The orthogonal distance between the two bounding lines of any strip S is called the width of S, denoted by . The middle line of strip S is the line parallel to its bounding lines such that the distance between and each of the bounding lines is exactly half the width of S, see Figure 2a.
Figure 2.
Illustration to (a) a strip S and its middle line , and (b) a parallelogram annulus defined by its outer parallelogram R and inner parallelogram , such that and for defining four strips with and . The arrows depict the width of each shape.
A parallelogram is a quadrilateral obtained by intersecting two non-parallel strips. A parallelogram annulus A is defined by the closed region between its outer parallelogram R and inner parallelogram such that the following conditions are satisfied: Letting be four strips such that and ,
- ,
- , and
- .
The width of A, denoted by , is the distance between its outer parallelogram R and inner parallelogram , that is,
The area of A, denoted by , is the difference of the areas of R and , that is,
See Figure 2b for an illustration.
2.2. Orientations and the Width Function
Any line or line segment ℓ has its orientation such that rotating ℓ by in the clockwise direction makes it parallel to the x-axis. A line or line segment is called θ-aligned if its orientation is . For any strip S, if its bounding lines are -aligned, then we say that S is -aligned. A parallelogram or parallelogram annulus shall be called -aligned if it is defined by -aligned and -aligned strips. A -aligned parallelogram or parallelogram annulus is also called either -aligned or -aligned.
Let be two points in the plane. Throughout the paper, we will often handle strips defined by two parallel lines through p and q, and their widths. For any orientation , let be the width of the strip defined by two -aligned lines through p and q, respectively. We then observe that
where denotes the orientation of and denotes the absolute value, see Figure 3a.
Figure 3.
(a) The -aligned strip defined by p and q, and its width . (b) The minimum-width -aligned strip enclosing P, and the antipodal pair of P for orientation .
2.3. Sinusoidal Functions
A function of the form
for some constants is called a sinusoidal function, where a, b, , and are called its amplitude, base, (angular) frequency, and phase, respectively.
Sinusoidal functions have several nice behaviors. The following are of special interests in this paper.
Lemma 1
(Lyons [19]). The sum of two sinusoidal functions of base 0 and frequency ω is another sinusoidal function of base 0 and frequency ω. Thus, there is at most one solution that makes equal the values of two sinusoidal functions of equal frequency.
Lemma 2.
The product of two sinusoidal functions of base 0 and frequency ω is equal to a sinusoidal functions of frequency . Specifically, it holds that
for any constants .
Proof.
We use the exponential form of sinusoidal functions:
where i denotes the ideal unit such that .
Therefore, we have
as claimed, as for any . □
Note that, taking as a variable, the function for fixed points is piecewise sinusoidal of frequency 1 and base 0 with at most one breakpoint at .
2.4. Extreme Points and Antipodal Pairs
Now, suppose that a set P of n points in is given. Let be its convex hull. An extreme point of P is one that appears as a corner of the convex hull of P. For any , consider the -aligned strip of minimum width that encloses P, and denote it by . Then, the two lines that bound go through two extreme points of P, one on each. More precisely, let and be the two bounding lines of such that lies to the left of if , or lies above if . There exists an extreme point of P on each of and ; we denote it by and , respectively. Then, the width of is represented by
See Figure 3b.
For each , the pair is called antipodal. Toussaint [20] invented the well-known rotating caliper technique and proved the following lemma.
Lemma 3
(Toussaint [20]). There are different antipodal pairs for P. All these antipodal pairs can be identified in time, after the convex hull is computed.
Starting from , consider the motion of the two lines and as continuously increases. During this motion, observe that the antipodal pair for changes only when either or contains two extreme points of P and thus an edge of . Thus, we can decompose the orientation domain into maximal intervals I such that the antipodal pair remains constant in I. The number of such intervals I is bounded by by Lemma 3.
2.5. Problems Definition
In this paper, we study the problem of computing a parallelogram annulus of minimum extent enclosing n given points P. The objective extents to be minimized are area, width, and their combinations. We consider four variants by restricting the two side orientations of the resulting parallelogram annuli.
To be more precise, for each , let be the collection of all -aligned parallelogram annuli enclosing P. Let , and . We consider the following optimization problems: The minimum-width problem and the minimum-area problem ask to minimize and , respectively,
- (1)
- over all for fixed orientations ,
- (2)
- over all for a fixed ,
- (3)
- over all for a fixed angle , or
- (4)
- over all .
In some cases, there is a unique optimal annulus for the above optimization problems, while this is not the case in general. Thus, one can consider a bicriteria optimization problem that minimizes both width and area. Here, in this paper, we will discuss the following in each of the above four cases.
- The minimum-area minimum-width problem: find a parallelogram annulus of minimum area among those with minimum width over , , , or .
- The minimum-width minimum-area problem: find a parallelogram annulus of minimum width among those with minimum area over , , , or .
3. When Both Side Orientations Are Fixed
In this section, we study the problem when two side orientations and are fixed. Thus, in this variant of the problem, we are given a set P of n points in the plane and two orientations , and want to find an optimal parallelogram annulus over all -aligned annuli that encloses P.
3.1. Minimum-Area Annuli
For any with , let be the -aligned parallelogram obtained by intersecting two strips and . By definition, observe that every side of contains an extreme point of P. Note that if a point lies at a corner of , then we regard that p lies both on the two sides incident to the corner. This implies that is indeed the smallest -aligned parallelogram that encloses P.
Lemma 4.
Let A be any minimum-area -aligned annulus that encloses P. Then, its outer parallelogram must be .
Proof.
Let A be any minimum-area -aligned annulus that encloses P. Let and be the -aligned strip and the -aligned strip, respectively, whose intersection determines the outer parallelogram R of A. Suppose that the outer parallelogram R is not exactly equal to , that is, . As A encloses P, so does R. Since is the smallest -aligned parallelogram that encloses P, we have , and thus there exists a side of R in which no point of P is contained. In the following, we show that there exists another -aligned annulus that encloses P with , leading to a contradiction.
Assume without loss of generality that and the upper horizontal side e of R contains no point of P. Note that e is a portion of the upper boundary line ℓ of , so ℓ contains no point of P on it, see Figure 4a. Now, we slide ℓ downwards until it hits a point in P, and let be the resulting line by this sliding process. We replace the upper bounding line ℓ of by to have a new strip . Let and be the -aligned annulus whose outer parallelogram is and width is exactly the same as the width of A, see Figure 4b.
Figure 4.
Illustration to the proof Lemma 4. (a) If the upper horizontal side of the outer parallelogram R of annulus A contains no point in P, then we can slide it downwards until it hits a point in P so that (b) a new annulus with smaller area is obtained.
Observe that no point of P sticks out above ℓ during the above sliding process, that is, the new annulus still encloses P. Further, observe that , thus it holds that . This leads to a contradiction to the assumption that A is a minimum-area -aligned annulus.
The argument so far implies that every side of the outer parallelogram R of any minimum-area -aligned annulus A enclosing P should contain a point of P. Therefore, R is the smallest -aligned parallelogram enclosing P, that is, . □
For any , let be the -aligned annulus whose outer parallelogram is and width is w. By Lemma 4, the minimum-area -aligned annulus that encloses P can be computed by finding the smallest width such that encloses P. This implies the uniqueness of the annulus of minimum area.
Lemma 5.
There exists a unique minimum-area -aligned annulus that encloses P.
Proof.
Suppose that there are two distinct minimum-area -annuli A and that enclose P. Hence, we have on one hand. By Lemma 4, on the other hand, any minimum-area -aligned annulus enclosing P has as its outer parallelogram. Thus, is the common outer parallelogram of both A and .
Let and . As A and have the same outer parallelogram, it must hold that . Assume without loss of generality that . This implies that , a contradiction to the assumption that both A and are of minimum area and thus . □
Now, we describe how to compute the minimum width such that encloses P. From the definition of parallelogram annuli, note that the inner parallelogram of for each is determined by the intersection of two strips and such that , , and . Furthermore, observe that contains a point if and only if the distance from p to the boundary of is at most w. Let be this distance from p to the boundary of . Since is chosen as the minimum among the distance from p to every side of , we can write
Since is the smallest value of w such that contains p, we have
We are now ready to describe our algorithm, when both side orientations are given. First, we find the four extreme points , , , and . This can be done in time. We then compute the values of for all and find their maximum, which is exactly , as discussed above. The corresponding annulus can be constructed from the outer parallelogram and its width . Therefore, we conclude the following.
Theorem 1.
Given a set P of n points in the plane and two orientations with , there exists a unique minimum-area -aligned annulus that encloses P and it can be computed in time.
3.2. Minimum-Width Annuli
Here, we investigate relations between minimum-area and minimum-width parallelogram annuli in a fixed pair of side orientations.
Let be two fixed orientations with as declared above. Let be the unique minimum-area -aligned annulus described in Lemma 5.
The author [17] studied the minimum-width variant of the problem. Unlike the minimum-area counterpart, it is not difficult to see that there can be infinitely many annuli of the same minimum width that encloses P. An important observation on the minimum-width annuli is the following:
Lemma 6
(Bae [17]). Given with , there exists a minimum-width -aligned annulus that encloses P whose outer parallelogram is .
This observation together with the above discussions on the minimum-area annulus implies the following.
Lemma 7.
For any with , the minimum-area annulus is also a minimum-width -aligned annulus that encloses P. Therefore, its width is indeed the minimum possible width over all -aligned annuli that enclosing P.
Proof.
Recall that the annulus is constructed in the way that we minimize its width given the outer parallelogram . Lemma 6 implies that the existence of a minimum-width annulus whose outer parallelogram is . Thus, this implies that is also a minimum-width -aligned annulus that encloses P. □
Summarizing, the annulus is the optimal solution both to the minimum-area and minimum-area parallelogram annulus in a fixed pair of side orientations. This makes all bicriteria optimization variants of the problem trivial to compute the annulus , thus solved in time by Theorem 1.
Theorem 2.
Given a set P of n points in the plane and two orientations with , the annulus is the unique common optimal solution to the problems of computing a minimum-area, minimum-width, minimum-width minimum-area, and minimum-area minimum-width -aligned parallelogram annulus that encloses P.
3.3. Relation between Width and Area
Finally, we conclude this section by deriving an equation between the width and the area of the annulus for any with . Throughout the paper, we shall write
and
for short, hereafter.
Lemma 8.
For any with , it holds that
Proof.
By a simple geometric observation, we have the following identity:
where denotes the perimeter of a polygon, see Figure 5a.
Figure 5.
Illustrations to Lemma 8. (a) The area is exactly the perimeter of multiplied by minus the area of the four congruent small parallelograms shaded in darker blue. Here, and . (b) The length of a -aligned side of the outer parallelogram is exactly , where denotes the width of .
The perimeter of the parallelogram can be represented as follows in terms of the extreme points. Note that , the intersection of two strips enclosing P. By definition, the strip for any is determined by two -aligned lines through the extreme points and of P in orientation .
Let and be the length of a side of that is -aligned and -aligned, respectively. The length is determined by two extreme points and . More precisely, the endpoints of a -aligned side e of are the projections of and onto the line extending e in direction . This implies that
See Figure 5b for an illustration. Symmetrically, we have
As for any real , we have . In turn, the perimeter of can be represented as follows:
Plugging this into the above equation for , we obtain the claimed equation. □
4. When One Orientation Is Fixed and the Other Is Arbitrary
In this section, we consider the case where one side orientation is given and fixed while the other side orientation can be chosen arbitrarily. That is, given an orientation , our goal is to find an optimal annulus over all -aligned parallelogram annuli enclosing P. From the discussion in the previous section, Theorem 2 implies that it suffices to find an optimal one among annuli over all , regardless of which objective we take into account: the width, the area, or their combinations.
In the following, we assume that without loss of generality. We first solve the minimum-area problem in this case and then consider the annuli of minimum width.
4.1. Minimum-Area Annuli
For any , let . Also, let and be its width and area.
In this section, we consider as a variable and the above objects as functions of . We analyze the width and area functions, and , and show how to efficiently compute their explicit description, from which we can minimize and over .
We start by investigating the width function . For each , define a function such that is the distance to the boundary of the outer parallelogram of . Then, the distance can be represented by the minimum of the distances to the four sides of , that is,
The width of the annulus is obtained by choosing the maximum of the values of over all :
since should enclose all points of P.
Recall from Lemma 3 that there are different antipodal pairs and the orientation domain is decomposed into maximal intervals I such that the pair is fixed over all . We shall call such an interval I a primary interval. Pick any primary interval I, and consider the functions on I for . For , the corresponding extreme points and are fixed, so is of a constant descriptive complexity. Note that and are just constants, and the other two terms and are piecewise sinusoidal of frequency 1 and base 0 with at most one breakpoint, as discussed in Section 2. Since the function is indeed the lower envelope of these four terms, the function over I is piecewise sinusoidal with breakpoints. As is the upper envelope of the functions for all , we conclude the following.
Lemma 9.
Let be any primary interval. The width function over I is piecewise sinusoidal of frequency 1 and base 0 with breakpoints, where denotes the inverse Ackermann function. Moreover, each sinusoidal piece of is concave. The explicit description of over I can be computed in time.
Proof.
From the above discussion, we know that the function for each is piecewise sinusoidal of frequency 1 and base 0 with breakpoints over any primary interval I. In other words, can be described partial functions that are sinusoidal of frequency 1 and base 0. Moreover, note that each of these partial functions are from for some extreme point , and thus it is always nonnegative. This implies that each such partial function of is indeed concave.
Now, consider the function over I. Since , it is the upper envelope of sinusoidal partial functions. By Lemma 1, any two sinusoidal functions cross at most once over I. Thus, the upper envelope of such sinusoidal curves corresponds to a Davenport–Schinzel sequence of order 3 and can be described by at most sinusoidal pieces [21]. These pieces are of frequency 1 and base 0, and concave as they are portions of functions .
The explicit description of function over I can be obtained by computing the upper envelope of the graphs of over I. Since the graphs of for all consists of sinusoidal curves and any two of them cross at most once by Lemma 1, this can be done by applying the algorithm by Hershberger [22] in . □
Now, we consider the area function . Lemma 8 tells us that is represented in terms of the width . More specifically, we have
In each primary interval I, note that the antipodal pair is fixed for any . Therefore, between any two consecutive breakpoints of function , the function is of the form
where are some constants, by Lemmas 1 and 2.
This implies the following.
Lemma 10.
Let be any primary interval. The area function over I is piecewise of the form for some constants with at most breakpoints, and its explicit description can be computed in time.
Proof.
Immediate from the above discussion. □
For each primary interval I, we can compute the description of function and thus can minimize it over I. Lemma 10 tells us that the function consists of pieces of constant descriptive complexity. Therefore, we can find the minimum in time. Since there are primary intervals by Lemma 3, we spend time in total to compute the full description of over and to find its global minimum . Hence, we conclude the following.
Theorem 3.
Given a set P of n points in the plane and an orientation , a minimum-area ϕ-aligned parallelogram annulus that encloses P can be computed in time.
Proof.
Here, we give a brief description of our whole algorithm to compute a minimum-area -aligned parallelogram annulus that encloses P. As above, we assume without loss of generality. Then, the problem is turn to minimize over .
First, we compute the convex hull in time and specify all extreme points and antipodal pairs by Lemma 3. This way, we can find all primary intervals. Then, for each primary interval I, we compute in time the description of function on I by Lemma 9 and that of function on I by Lemma 10. As discussed above the minimum of over can be computed in time.
Since there are antipodal pairs by Lemma 3, the total time to compute a global minimum of over is bounded by . □
Note that our algorithm indeed compute the full description of the function to find its minimum. Thus, we can indeed find all the minimum points of in the same time bound. This implies the following corollary.
Corollary 1.
Given a set P of n points in the plane and an orientation , all minimum-area ϕ-aligned parallelogram annuli that encloses P can be computed in time. Therefore, a minimum-width minimum-area ϕ-aligned parallelogram annulus that encloses P can be computed in the same time bound.
4.2. Minimum-Width Annuli
Next, we consider the problem of computing a minimum-area minimum-width annulus. By the above approach, we also obtain the full description of the function over in time. This implies that we can specify all minimum-width annuli and thus compute a minimum-area minimum-width annulus that encloses P. In the following, we show that it can be done in time.
We start by a brief review of the -time algorithm that finds a minimum-width annulus for a fixed side orientation presented in the previous paper [17]. Let be the minimum possible width.
The algorithm in [17] computes as follows: For each and , let be the distance from p to the boundary of the strip , that is,
Sort the points in P in the descending order of the distance to the boundary of the strip , that is, in the descending order of the values for . Let be the points in P in this order, and let for each . Let for . For each , compute the smallest value such that there exists an orientation such that for all . Then, we have .
Note that we have and by definition. The above procedure is proven to correctly compute and computing the values of for all can be done in time in [17].
Here, our goal is to specify all -aligned annuli of width that enclose P over all , and find one with minimum area among them. Let be the smallest index such that . We then have either or . For , define to be the -aligned strip such that and its middle line is equal to the middle line of , that is, . Let for convenience. Then, observe that all points in are contained in . In order to specify all -aligned annuli of width , we find all such that the rest of points Q are contained in . For such an orientation , the annulus defined by , , , and encloses all points of P and is of width exactly .
For the purpose, we consider the point that determines the width of for each . For each , let be the set of points that is closer to the boundary line through of , and . Let be the farthest points from the boundary lines of through and , respectively. Then, define to be the minimum value such that the strip contains all points of Q, where denotes the strip with and . Therefore, we have
In the following, we show that the explicit description of the function for is of complexity and can be computed in time. After specifying the description of , we can find all such that and thus there exists a -aligned annulus of width enclosing P.
Here, as done in [17], we adopt a geometric dualization ([23], Chapter 8). The plane in which we have so far discussed things is called the primal plane with the x- and y-axes. We consider another plane , called the dual plane, with the u- and v-axes that correspond to the horizontal and vertical axes, respectively. A duality transform, denoted by , acts on points and lines in the primal plane and the dual plane . More specifically, it maps a point into a line and a non-vertical line into a point , and vice versa. As a result, we have and for any point p and any non-vertical line ℓ either in or in . A geometric object and its image under the duality transform are said to be dual to each other. Note that p lies below (on or above, resp.) ℓ if and only if lies below (on or above, resp.) . See Figure 6 for an illustration.
Figure 6.
Illustration to the geometric dual transform .
Back to our problem, we consider the dual of the points in P, that is, the set of n lines in the dual plane . From the arrangement of these lines in , consider the upper envelope and the lower envelope, denoted by and , respectively. By an abuse of notation, we also consider these envelopes as two functions of so that and are the v-coordinates in of points on and , respectively, at . Define a third function to be . Observe that is the v-coordinate of the midpoint of the vertical segment for each in the dual plane . Analogously, we regard as the function itself and its graph drawn in at the same time.
By the duality, we observe the correspondence between the above objects in and the strip in .
Lemma 11
(Bae [17]). For each with , let . Then, the following hold:
- (1)
- The dual of the two bounding lines of is the two points and in .
- (2)
- The dual of the middle line of is the point in .
Thus, we may say that the boundary of the strip over all is dual to , and the middle line is dual to . It is indeed well known that correspond to the boundary of and thus the extreme points of P. From the correspondence between and , we observe that forms a chain of line segments by Lemma 3.
Next, we consider the set of lines in , and its arrangement . As , all lines in lie in between and in the dual plane . We further add in the arrangement to result in . Let be the lower envelope of the portions of lines in above . Symmetrically, is defined to be the upper envelope of those in below . From the duality, we then observe the correspondence between and .
Lemma 12
(Bae [17]). For each with , let . Then, the duals of the two θ-aligned lines through and are the two points and in .
Lemma 12 implies that we can specify all pairs over , once we have the substructures and in the arrangement . Consequently, the orientation space is decomposed into maximal intervals in which the pair is fixed and thus the function is expressed in a fairly simple form.
To be more precise, take all breakpoints of , , and and their u-coordinates, say . Let and decompose the orientation space into intervals by cutting it at every . We call such intervals of secondary intervals. Let be any secondary interval. By our construction and Lemma 12, observe that the four points , , , and are fixed over all . For each secondary interval , let , , , and be these fixed points for any .
Lemma 13.
There are at most secondary intervals, and we can compute them with the corresponding tuple of four points in time.
Proof.
By definition, the endpoints of each secondary interval correspond to breakpoints of , , and . Therefore, in this proof, we analyze the structural complexity of , , and , and an efficient algorithm to compute them.
Recall that is dual to the middle line of by Lemma 11, so Lemma 3 implies that consists of line segments that correspond to the antipodal pairs. We can compute in time by computing the convex hull and the extreme points of P by Lemma 11.
In order to bound the complexity of and , we make use of the Zone Theorem in the arrangement of lines. For any set Z of lines and a line ℓ in the plane, the zone of ℓ in the arrangement of Z is the set of cells of that are intersected by ℓ. The Zone Theorem then states that the total number of vertices, edges, and cells in the zone of ℓ in is at most [23]. This also enables us to compute the arrangement in an incremental fashion in total quadratic time.
We start by computing the arrangement of lines for all . This takes time. Then, for each segment e of , we find all intersection points for all . There are at most such intersections for each e. Then, we can specify the part of and above and below e, respectively, simply by walking along the boundary of cells of that are intersected by e. Since the segment e is a portion of a line extending e, we apply the Zone Theorem to conclude that the number of vertices, edges, and cells of we traverse is bounded by and the time spent for the walk is also bounded by for each segment e of . Since consists of segments, the total complexity to explicitly construct and is bounded by .
This also implies the complexity of and is , as the number of intersections between each segment e of and lines in is at most n. That is, the number of breakpoints of and is , so the number of secondary intervals is . The corresponding tuple of four points for each secondary interval J can be also identified in the same time bound by traversing , , and in a linear way. □
We then turn to our original problem, and describe our algorithm that computes a minimum-area minimum-width 0-aligned annulus that encloses P. Recall that we want to find all such that and minimize the area of annuli among those orientations.
For each secondary interval and any , we have
Since the four points , , , and are fixed for any , the function over is piecewise sinusoidal of frequency 1 and base 0 with breakpoints by Lemma 1. Hence, all such that form a constant number of disjoint closed subintervals in J, and those intervals can be computed in time for each secondary interval J. We collect all those subintervals for all secondary intervals J in time, denoted by , where . For each of these subintervals of some secondary interval J, we minimize the area of the corresponding -aligned annulus whose width is . By Lemma 8, the area is represented as follows: for any ,
Note that the terms and are constants in the above equation, so is of the form for some constants in such a subinterval . Therefore, for each , we can minimize the area over in time. Since the number m of such subintervals is , it takes another time to minimize over all . After identifying an optimal orientation that minimizes the area , the corresponding annulus can be easily constructed by taking as the outer parallelogram and as the width.
We finally conclude the following theorem.
Theorem 4.
Given a set P of n points in the plane and an orientation , a minimum-area minimum-width ϕ-aligned parallelogram annulus that encloses P can be computed in time.
5. When an Interior Angle Is Fixed
Any parallelogram has two distinct interior angles that sum up to exactly . We say that any parallelogram annulus is with interior angles and if its outer and inner parallelograms have interior angles and . It is obvious that any -aligned annulus with has interior angles and .
Here, we consider another variant of the minimum parallelogram annulus problem in which we are given a set P of n points and an angle , and want to find an optimal parallelogram annulus with interior angle . Again by Lemma 5, it suffices to handle the annuli whose outer parallelogram is the smallest -aligned parallelogram enclosing P.
Let be a given interior angle that is at most . As discussed above, the other interior angle is also fixed by , which is at least . Our focus is thus on the -aligned annuli such that . We thus define the width and the area functions for such annuli:
for each , where is supposed to be taken in modulo when it is larger than .
The author in the previous paper [18] presented an -time algorithm that computes a minimum-width parallelogram annulus with a given interior angle, and proved the following about the width function .
Lemma 14
(Bae [18]). The width function for is piecewise sinusoidal of frequency 1 and base 0 with breakpoints, where denotes the inverse Ackermann function, and its explicit description can be computed in time.
From the result summarized in Lemma 14, it is not difficult to find all that minimizes . Hence, we have the following result.
Theorem 5.
Given a set P of n points in the plane and an angle , all minimum-width parallelogram annuli with interior angle α that encloses P can be computed in time. Therefore, a minimum-area minimum-width parallelogram annulus with interior angle α that encloses P can be computed in the same time bound.
Proof.
First, we compute the description of the function over in time by Lemma 14. Moreover, Lemma 14 also states that the function consists of partial functions that are sinusoidal of frequency 1 and base 0. That is, for each interval between two consecutive breakpoints, the function is expressed in the form of for some constants . Hence, we can minimize over in time. Since there are of such intervals J, it takes time to find all such that . The total running time is dominated by , as . □
Next, we consider minimum-area annuli with fixed interior angle. The area of the annulus can be written as follows by Lemma 8.
Note that is a fixed constant and every term in the equation is the product of two sinusoidal functions of frequency 1 and base 0 in such an interval J that the extreme points , , , and are fixed and is also sinusoidal for all . Hence, we decompose the orientation space into such intervals as follows.
First, take all breakpoints of function obtained by Lemma 14 and let be the set of these breakpoints. Next, consider all endpoints of primary intervals obtained by Lemma 3 and let be the set of these endpoints. Finally, let . We then decompose the orientation space into intervals by cutting it at every orientation in . Since by Lemma 14 and by Lemma 3, we have such intervals.
Lemma 15.
The area function for is piecewise sinusoidal of frequency 2 with breakpoints.
Proof.
As discussed above, the orientation space is decomposed into intervals, in each of which the extreme points , , , and are fixed and is sinusoidal of frequency 1 and base 0. Hence, in such an interval, the function is the sum of three products of two sinusoidal functions of frequency 1 and base 0, divided by a constant . By Lemmas 1 and 2, this results in a sinusoidal function of frequency 2. Thus, the lemma follows. □
In order to minimize over , we are done by handling each of these intervals between two consecutive breakpoints of . In this way, we can find all orientations such that , and the corresponding annuli.
Theorem 6.
Given a set P of n points in the plane and an angle , all minimum-area parallelogram annulus with interior angle α that encloses P can be computed in time. Therefore, a minimum-width minimum-area parallelogram annulus with interior angle α that encloses P can be computed in the same time bound.
6. When Both Side Orientations Are Arbitrary
We then consider the most general case where both side orientations can be chosen arbitrarily. We first solve the minimum-area problem of finding a minimum-area parallelogram annulus that encloses a given set P of n points, and then consider the minimum-width problem.
6.1. Minimum-Area Annuli
Specifically, our goal here is to find a global minimum of the bivariate function over . As done in the previous sections, we analyze the width function and find its explicit description. Then, we can find the description of function by Lemma 8.
Recall that and are the width and the area of the minimum -aligned annulus whose outer parallelogram is . For each and , let be the distance from p to the boundary of the outer parallelogram . Since the four sides of contain the extreme points of P for orientations and , we can write
We then have
Consider two primary intervals , and the function restricted to subdomain . Note that the extreme points and are fixed in any primary interval I, and thus and , as functions of , are piecewise sinusoidal of frequency 1 and base 0 with at most one breakpoint, as discussed above. This implies that the function for each p on is the lower envelope of at most eight sinusoidal patches in three dimension. More specifically, consider the graph of the function for each p, that is, a surface in a three-dimensional space , based on the -plane with the third z-axis. From the above discussion, the graph of for consists of a constant number of sinusoidal surface patches. Hence, the function over is the upper envelope of sinusoidal patches.
Lemma 16.
Let be two primary intervals. The graph of function over consists of surface patches that are of the form or for some constants , where ϵ is an arbitrarily small positive constant. Its explicit description can be computed in time.
Proof.
As discussed above, the graph of over consists of sinusoidal surface patches. These patches are the graph of partial functions of the form or by definition, for some constants . Let be the set of these patches from for each .
Since is the maximum of over all , its graph in the three-dimensional space is the upper envelope of the surface patches in . The number of patches involved is .
Here, we apply the algorithm by Boissonat et al. [24] that computes the upper envelope of surface patches in three dimension. This implies that the graph of function over consists of surface patches and can be computed in time. □
We then apply Lemma 8 to obtain the area function over .
Lemma 17.
Let be two primary intervals. The graph of function over consists of surface patches of the form
for some constants . Its explicit description can be computed in time.
Proof.
From Lemmas 8 and 16, it follows that the graph of function over consists of surface patches, and these patches can be computed in the same time bound.
By Lemmas 1, 2, and 16, each of these patches of function appears to have the claimed form. □
The above lemmas imply that for any two primary intervals , the rectangular subdomain is decomposed into cells in each of which the function is of constant descriptive complexity. Hence, we can minimize in each cell in time. Consequently, we conclude the following.
Theorem 7.
Given a set P of n points in the plane, a minimum-area parallelogram annulus that encloses P can be computed in time, where denotes an arbitrarily small positive real number.
Proof.
By Lemma 17 and the above discussion, for two primary intervals , we can find a minimum of the area function in time by traversing all the cells in which the function is of constant complexity. Since there are primary intervals in total by Lemma 3, there are pairs of them. By iterating all the pairs of primary intervals, we can find a global minimum of function , and the corresponding annulus, which must be a minimum-area parallelogram annulus that encloses P. The total time complexity is bounded by . □
Our approach computes the full description of the width and the area functions. Thus, we can indeed find all minimum-area annuli in the same time bound. This solves a bicriteria problem of computing a minimum-width minimum-area annulus that encloses P.
Corollary 2.
Given a set P of n points in the plane, all minimum-area parallelogram annuli that encloses P can be computed in time, where denotes an arbitrarily small positive real number. Therefore, a minimum-width minimum-area parallelogram annulus that encloses P can be computed in the same time bound.
6.2. Minimum-Width Annuli
Analogously, by Lemma 16, we can compute the description of in total time, and find all minimum-width annuli. This enables us to compute a minimum-area minimum-width annulus in the same time bound.
In the following, we show that this bicriteria optimization problem can be solved faster. The author in the previous paper [17] showed that a minimum-width parallelogram annulus that encloses P can be computed in time. This faster algorithm works with a decision algorithm, which in time tests if there exists an annulus of a given width that encloses P and finds one if exists; however, it is not guaranteed that this algorithm finds all minimum-width annuli.
Let be the minimum width over all parallelogram annuli that encloses P. The value of can be computed in time by the algorithm mentioned above [17]. We now describe how to find all pairs such that , so we can find one minimizing the area among those pairs.
For each and , recall the function , defined in Section 4 to be the distance from p to the boundary of the strip , that is,
We make use of the following property of minimum-width annuli.
Lemma 18.
Let be such that . Then, there exists at least one point such that either or holds.
Proof.
Let be two orientations such that . Consider the corresponding annulus . The annulus A is a minimum-width annulus that encloses P by definition. Recall that the outer parallelogram of A is the intersection of two strips and .
Suppose to the contrary that the claimed condition does not hold, so we have and for all . We let be the set of points such that the distance from the boundary of is at most , that is, . Analogously, let be the set of points such that . Since A encloses all points in P and its width is , we have that . Since we have and for all , we have strict inequalities
and
We let and . Note that and . Now, consider a new annulus of width whose outer parallelogram is still . Observe that still encloses P, while . This leads to a contradiction to the assumption that A is a minimum-width annulus that encloses P. Therefore, the lemma follows. □
Now, we describe our algorithm that computes a minimum-area minimum-width annulus that encloses P. After computing , we find all such that for each . This can be done in time per by the following lemma.
Lemma 19.
For each , the function is piecewise sinusoidal of frequency 1 and base 0 with breakpoints, and its explicit description can be computed in time, provided that all primary intervals are specified in order.
Proof.
Suppose that all primary intervals have been specified in order. For each primary interval I, note that restricted to I is piecewise sinusoidal of frequency 1 and base 0 with at most breakpoints by Lemma 1, since the extreme points and are fixed over . Since there are only primary intervals by Lemma 3, the function has at most breakpoints. Its full description can be computed by iterating primary intervals in time if we know the ordering of primary intervals, which can be obtained by once computing the convex hull and scanning its boundary. □
After computing the description of in time, we solve the equation for each sinusoidal piece of . By Lemma 1, the number of solutions is at most two per piece, and they can be found in time. We do this for all and collect those orientations such that for some . Let be the set of all those orientations. Note that . By construction and our discussion above, any minimum-width annulus that encloses P is -aligned for some . To find one with minimum area among all minimum-width annuli, we can just invoke the algorithm described in Theorem 4 for each fixed orientation . As the number of orientations in is bounded by , we take time in the worst case.
Theorem 8.
Given a set P of n points in the plane, a minimum-area minimum-width parallelogram annulus that encloses P can be computed in time.
7. Discussion
We addressed the minimum-area parallelogram annulus problem, and presented the first algorithms for its several variants, including bicriteria optimization problems considering both width and area.
Our algorithms that compute a minimum-area annulus take time when both side orientations are given and fixed, when one orientation is fixed and the other can be chosen arbitrarily, when interior angles are given and fixed, and when both orientations can be chosen arbitrarily. All the above algorithms are the first nontrivial solutions to the corresponding variant of the problem.
For the bicriteria optimization problems, we considered the minimum-area minimum-width parallelogram annulus problem and the minimum-width minimum-area parallelogram annulus problem in each of the above four cases. Specifically, our algorithms that compute a minimum-area minimum-width annulus take time when both side orientations are given and fixed, when one orientation is fixed and the other can be chosen arbitrarily, when interior angles are given and fixed, and when both orientations can be chosen arbitrarily. In addition, our algorithms that compute a minimum-width minimum-area annulus take time when both side orientations are given and fixed, when one orientation is fixed and the other can be chosen arbitrarily, when interior angles are given and fixed, and when both orientations can be chosen arbitrarily. See Table 1 in Section 1 for a summary. These algorithmic results are also the first nontrivial results to the corresponding variant of the problem.
The present results compare with the currently best algorithms for the minimum-width counterpart, while the minimum-area problem requires a bit more time for the general case. This is due to the nature of the objective function: for the minimum-width problem, two side orientations behave more independently as the width of the resulting annulus is determined by the maximum of the distance to two defining strips; for the minimum-area problem, the area function is more involved in both orientations. This results in an efficient decision algorithm for the width problem, while it is not the case for the area problem.
8. Conclusions
We finally conclude the paper by introducing a couple of possible directions of future research.
One natural question is how to improve the running times of our present algorithms, in particular for the most general case, in which both side orientations can be chosen arbitrarily. This question is also related to the computational complexity of the problems. What is the lower bound of the problem of computing an optimal parallelogram annulus in a proper model of computation, such as the algebraic decision tree model?
Another direction of future research is to generalize parallelogram annuli to more general shapes, or to a three-dimensional space.
Funding
This work was supported by Kyonggi University Research Grant 2021.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
Not applicable.
Conflicts of Interest
The author declares no conflict of interest.
References
- Megiddo, N. Linear-Time Algorithms for Linear Programming in R3 and Related Problems. SIAM J. Comput. 1983, 12, 759–776. [Google Scholar] [CrossRef]
- Aggarwal, A.; Suri, S. Fast algorithm for computing the largest empty rectangle. In Proceedings of the Third Annual Symposium on Computational Geometry (SoCG 1987), Kyoto, Japan, 8–11 June 1987; pp. 278–290. [Google Scholar]
- Orlowski, M. A new algorithm for largest empty rectangle problem. Algorithmica 1990, 5, 65–73. [Google Scholar] [CrossRef]
- Ebara, H.; Fukuyama, N.; Nakano, H.; Nakanishi, Y. Roundness algorithms using the Voronoi diagrams. In Proceedings of the Abstracts 1st Canadian Conference Computational Geometry (CCCG), Montreal, QC, Canada; 1989; p. 41. [Google Scholar]
- Wainstein, A. A non-monotonous placement problem in the plane. In Proceedings of the Software Systems for Solving Optimal Planning Problems; Abstract 9th All-Union Symp. USSR, Symp. 1986; pp. 70–71. [Google Scholar]
- Roy, U.; Zhang, X. Establishment of a pair of concentric circles with the minimum radial separation for assessing roundness error. Comput.-Aided Des. 1992, 24, 161–168. [Google Scholar] [CrossRef]
- Agarwal, P.; Sharir, M.; Toledo, S. Applications of parametric searching in geometric optimization. J. Algo. 1994, 17, 292–318. [Google Scholar] [CrossRef]
- Agarwal, P.; Sharir, M. Efficient randomized algorithms for some geometric optimization problems. Discret. Comput. Geom. 1996, 16, 317–337. [Google Scholar] [CrossRef]
- Agarwal, P.K.; Har-Peled, S.; Varadarajan, K.R. Approximating extent measures of points. J. ACM 2004, 51, 606–635. [Google Scholar] [CrossRef]
- Chan, T. Approximating the diameter, width, smallest enclosing cylinder, and minimum-width annulus. Int. J. Comput. Geom. Appl. 2002, 12, 67–85. [Google Scholar] [CrossRef]
- Abellanas, M.; Hurtado, F.; Icking, C.; Ma, L.; Palop, B.; Ramos, P. Best Fitting Rectangles. In Proceedings of the Euro. Workshop Comput. Geom. (EuroCG 2003), Bonn, Germany, 24–26 March 2003. [Google Scholar]
- Gluchshenko, O.N.; Hamacher, H.W.; Tamir, A. An optimal O(nlogn) algorithm for finding an enclosing planar rectilinear annulus of minimum width. Oper. Res. Lett. 2009, 37, 168–170. [Google Scholar] [CrossRef]
- Mukherjee, J.; Mahapatra, P.; Karmakar, A.; Das, S. Minimum-width rectangular annulus. Theor. Comput. Sci. 2013, 508, 74–80. [Google Scholar] [CrossRef]
- Bae, S.W. Computing a Minimum-Width Square Annulus in Arbitrary Orientation. Theor. Comput. Sci. 2018, 718, 2–13. [Google Scholar] [CrossRef]
- Bae, S.W. On the minimum-area rectangular and square annulus problem. Comput. Geom. Theory Appl. 2021, 92, 101697. [Google Scholar] [CrossRef]
- Bae, S.W.; Yoon, S.D. Empty Squares in Arbitrary Orientation Among Points. In Proceedings of the 36th Symposium on Computational Geometry (SoCG 2020), Zürich, Switzerland, 22–26 June 2020; Volume 164, LIPIcs. pp. 13:1–13:17. [Google Scholar]
- Bae, S.W. Minimum-width double-strip and parallelogram annulus. Theor. Comput. Sci. 2020, 833, 133–146. [Google Scholar] [CrossRef]
- Bae, S.W. Minimum-Width Parallelogram Annulus with Given Angles. J. Comput. Sci. Eng. 2021, 15, 78–83. [Google Scholar] [CrossRef]
- Lyons, R.G. Sum of Two Sinusoids. 2011. Available online: https://dspguru.com/files/Sum_of_Two_Sinusoids.pdf (accessed on 18 January 2022).
- Toussaint, G. Solving geometric problems with the rotating calipers. In Proceedings of the IEEE MELECON, Athens, Greece, 24–26 May 1983. [Google Scholar]
- Sharir, M.; Agarwal, P.K. Davenport-Schinzel Sequences and Their Geometric Applications; Cambridge University Press: New York, NY, USA, 1995. [Google Scholar]
- Hershberger, J. Finding the upper envelope of n line segments in O(nlogn) time. Inform. Proc. Lett. 1989, 33, 169–174. [Google Scholar] [CrossRef]
- de Berg, M.; van Kreveld, M.; Overmars, M.; Schwarzkopf, O. Computationsl Geometry: Alogorithms and Applications, 2nd ed.; Springer: Berlin/Heidelberg, Germany, 2000. [Google Scholar]
- Boissonnat, J.D.; Dobrindt, K.T. On-line construction of the upper envelope of triangles and surface patches in three dimensions. Comput. Geom.: Theory Appl. 1996, 5, 303–320. [Google Scholar] [CrossRef][Green Version]
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).