1 Introduction
In this paper we study two classical problems in computational geometry in an imprecise context. Given a set of points in the plane, let the largestarea triangle and the smallestarea triangle be defined by three points of that form the triangle with the largest or smallest area, respectively. When is uncertain, the areas of and are also uncertain. Our aim is to compute tight bounds on these areas given bounds on the locations of the points in . As a natural extension, we also study all the above questions for gons instead of triangles.
Motivation
Data uncertainty is paramount in presentday geometric computation. Many different ways to model locational uncertainty have been introduced over the past decades, and can be mainly categorized by whether the uncertainty is discrete or continuous jlpgcip11
, and whether we assume the uncertainty is governed by an underlying probability distribution or not
surimost; agarwalconvex. In this paper, we assume the uncertainty in each point is captured by a continuous set of possible locations; we call such a set an imprecise point. This model can be traced back to early attempts to create robust geometric algorithms in the 80s Salesin, and has attracted considerable attention since AHN2013253; jup; klgmiphd09; lofflerphdthesis; Myers:2010:UGD:1839778.1839801; farnaz. Nagai and Tokura ntteb00 first introduced the idea of analyzing the computational complexity of computing tight error bounds on an output value based on a set of imprecise points, and Löffler and van Kreveld formalized this notion to calculate bounds on the area of the convex hull 39.The special case of using vertical line segments as uncertainty regions has received special attention in the literature. First, it is a natural first step towards general 2 or 3dimensional uncertainty regions. Many geometric problems where first studied on segments and later generalized to squares or disks, and this is also true for imprecision mountproximity; 58; 39. However, 1dimensional uncertainty already occurs naturally in several application areas. For instance laser scanners output points on a known line but the distance between the scanner and the scanned object has an error; this is especially significant when the distance is large, such as in LIDAR (Light Detection and Ranging) data tasdizen2003feature leading to distinct geometric challenges glssi15dt10.
The same geometric problems also show up in, and are sometimes studied from the point of view of, different applications. In imaging, the problem of whether a set of vertical (or horizontal) scan lines are stabbed by a geometric object has been studied extensively several decades ago. When the object is to test whether the set of segments may be stabbed by a convex polygon gsch, this is equivalent to asking whether a set of imprecise points, modeled as vertical segments, could possibly be in convex position 56; kgonsolved
. Computing the largest inscribed/inscribing polygons plays an important role in heuristic motion planning
Fleischer:1992; robots increasingly operate in uncertain environments.Related work
There is a large body of research on the existence and computation of empty gons in a set of points 41; 43; the best known time for finding such a gon for arbitrary is , where is the number of empty triangles in the set of points—we know this value can vary from to 42.
There has been some work which focuses on constant values of . The special case is the classical problem of finding the diameter of a given set of points. Shamos presented an algorithm for the diameter problem which can find the diameter in linear time, if the convex hull of the points is given shd.
Dobkin and Snyder 45 claimed a lineartime algorithm for finding the largestarea triangle inscribed in a convex polygon. Their claim has recently been shown to be incorrect by Keikha et al. kluv; see also jin; kallus. There exists, however, another lineartime algorithm for this problem chandran, originally intended to solve the parallel version of the problem.
Boyce et al. 48 presented a dynamic programming algorithm for the problem of finding the largest possible area and perimeter convex gon on a given set of points in time and linear space, that Aggarwal et al. msearch improved to by using a matrix search method. Both algorithms still rely on the correctness of the Dobkin and Snyder algorithm for triangles 45, and hence, also fail by the analysis in kluv. There is also an time lower bound for finding the maximum possible area and perimeter inscribed gon 52.
The problem of finding the smallest possible area and perimeter gon has received considerable attention as well. Dobkin et al. presented an time algorithm newdob for finding minimum perimeter gons. Their algorithm was improved upon by Aggarwal et al. to time 49. Eppstein et al. 50 studied three problems: finding the smallest possible gon, finding the smallest empty gon, and finding the smallest possible convex polygon on exactly points, where the smallest means the smallest possible area or perimeter. They presented a dynamic programming approach for these problems in time and space, that can also solve the maximization version of the problem as well as some other related problems. Afterwards, Eppstein 51 presented an algorithm that runs in time and space for constant values of .
Finally, we mention a large body of related research, such as stabbing problems or convex transversal problems, and proximity problems. In the two first aforementioned areas, the general problem is that we are given a set of geometric input objects and we want to find another object which intersects with all or most of the given input objects, such that some measure on that object is optimized 56; 54; 58; gsch; kgonsolved; 39. Also the input of such problems can be considered as a set of colored points, e.g., Daescu et al. 72 studied the following related problem: we are given a set of points with colors, and we want to find the convex polygon with the smallest possible perimeter such that the polygon covers at least one of the given colors. They presented an  approximation algorithm with time for this problem, and proved that this problem is NPhard if is a part of the input.
Similarly, there are many studies in proximity problems, where the general question is the following: given a set of points in the plane , for each point find a pair , where , such that a defined measure on the triplet is maximized or minimized. In mukhopadhyay2006all the authors studied the problem of computing the maximum value of , where defined by the distance of each point from a segment , where the distance from a point to a segment is the minimum distance from to this segment. Their algorithm runs in , where is the number of vertices on the convex hull of . Their running time improved to drysdale2008nlogn. Recently the problem of computing all the largest/smallest area/perimeter triangles with a vertex at for was studied in mukhopadhyay2013all (see also the references there), where the presented running times for the largest/smallest area triangle problems were quadratic in the worst case (we also achieve similar running times with uncertain input).
It is natural to ask how uncertainty of data affects the solutions of those problems. Motivated by this, we are interested in computing some lower bound and upper bound on the area of the smallest and largest gons with vertices on a given set of imprecise points modeled as parallel line segments.
In the imprecise context, Löffler and van Kreveld studied the diameter problem () on a given set of imprecise points modeled as squares or as disks, where the problem is choosing a point in each square or disk such that the diameter of the resulting point set is as large or as small as possible. They presented an time algorithm for finding the maximum/minimum possible diameter on a given set of squares, and presented an time algorithm for the largest possible diameter, and an approximation scheme with time for the smallest possible diameter on a given set of disks.
These authors also computed some lower and upper bounds on the smallest/largest area/perimeter convex hull, smallest/largest area bounding box, smallest/largest smallest enclosing circle, smallest/largest width and closest pair, where the input was imprecise, and modeled by convex regions which include line segments, squares or disks 39; diam. The running times of the presented algorithms on the convex hull problem vary from to . Their results on computing some bounds on the maximum area convex hull were later improved upon by Ju et al. jup.
Contribution
In this paper, we consider the problems of computing the largestarea triangle and smallestarea triangle under data imprecision. We are given a set of imprecise points modeled as disjoint parallel line segments, that is, every segment contains exactly one point . This gives a point set , and we want to find the largestarea triangle or smallestarea triangle in , and . But because is a set of imprecise points, we do not know where is, and the areas of these triangles could have different possible values for each instance . We are interested in computing a tight lower and upper bound on these values. Hence, the problem becomes to place a point on each line segment such that the resulting point set maximizes or minimizes the size of the largest or smallest possible area triangle. Therefore four different problems need to be considered (refer to Figure 1).

MaxMaxArea What is the largest possible area of ?

MinMinArea What is the smallest possible area of ?

MaxMinArea What is the largest possible area of ?

MinMaxArea What is the smallest possible area of ?
Results
We obtain the following results for triangles.

For a given set of equal length parallel line segments, MaxMaxArea can be solved in time^{2}^{2}2In a preliminary version of this paper, we claimed a faster method, which relied on the correctness of the Dobkin and Snyder algorithm for finding the largestarea inscribed triangle 45. That paper has since been shown incorrect kluv, and our present results reflect this. (Section 2.1).

For arbitrary length parallel line segments, MaxMaxArea can be solved in time (Section 2.2).

MinMinArea can be solved in time (Section 3).

MaxMinArea is NPhard (Section 4).

For arbitrary length parallel line segments with fixed points as the leftmost and rightmost segments, MinMaxArea can be solved in time (Section 5.2).

For arbitrary length parallel line segments MinMaxArea can be solved in time (Section 5.3).
We also discuss to what extent our results can be generalized to polygons with sides.^{3}^{3}3As said before, for the case , the problem becomes computing the smallest/largest diameter of which is studied in diam. As we discuss in Section 6, not all problems are wellposed anymore, but we can ask for the possible sizes of the largest convex shape with at most vertices. We obtain the following results.
Definitions
Without loss of generality, assume the parallel segments in are vertical. Let be the set of all endpoints of , where denotes the upper endpoint of , and denotes the lower endpoint of . Let and denote the convex hull and the boundary of the convex hull of , respectively. We define as the convex hull of , and , that is and are the first two layers of the onion decomposition of , as shown in Figure 2. A true object is an object such that all its vertices lie on distinct line segments in . In particular we use the terms true triangle, true convex hull, true chord and true edge throughout the paper. Note that an optimal solution to any of our problems is always a true object.
Boyce et al. 45 defined a rooted triangle (or more generally, a rooted polygon) as a triangle with one of its vertices fixed at a given point (in a context where the rest of the vertices are to be chosen from a fixed set of candidates). Here, we define a root as a given point on a specific line segment in . In this case we throw out the remainder of the root’s region and try to find the other two vertices in the remaining regions. For a given point on some line segment, we denote this segment by . Also and denote the leftmost and rightmost line segments, respectively.
2 MaxMaxArea problem
In this section, we will consider the following problem: given a set of parallel line segments, choose a set of points, where , such that the size of the largestarea triangle with corners at is as large as possible among all possible choices of (see Figure 1(a)). Observe that this is, in fact, equivalent to finding three points on three different elements of that maximize the area of the resulting triangle.^{4}^{4}4Note that a similar statement will be true for MinMinArea, but not for MaxMinArea and MinMaxArea. First we review several related previous results, then we discuss some difficulties that occur when dealing with imprecise points.
Boyce et al. 45 consider the problem of computing the largestarea gon whose vertices are restricted to a given set of points in the plane, and prove that the optimal solution only uses points on the convex hull of the given point set (if there exist at least points on the convex hull). Löffler and van Kreveld 39 proved that the maximumarea convex polygon on a given set of imprecise points (modeled as line segments) always selects its vertices from the convex hull of the input set. As a result, one might lead to conjecture that the maximumarea triangle selects its vertices from the endpoints of regions on the convex hull. This is not the case, as can be seen in Figure 3(a) (notice that the number of vertices of the convex hull is not fixed). Also, unlike in the precise context, the largestarea triangle is not inscribed in the largest possible convex hull of the given set of imprecise points, as illustrated in Figure 3(b). This problem is further complicated for larger values of , as illustrated in Figure 3(c); even for =4, we cannot find the area of the maximum strictly convex gon, as the angle at approaches and we can enlarge the area of the convex 4gon arbitrarily. We elaborate in Section 6.
Observation 1.
Let be a given set of imprecise points modeled as arbitrary length parallel line segments, and let be its set of endpoints. If the largestarea triangle on is not a true triangle in , then the segment that contributes two vertices to the largestarea triangle on , does not necessarily contribute a vertex to the largestarea true triangle on .
Proof.
The proof is done through providing a counterexample. Consider a set of one imprecise point and three points , and , as illustrated in Figure 4(a). The largestarea triangle is , but the largestarea true triangle is , where (resp. ) is located within the (gray) apex of the wedge which is constructed by emanating two rays at (resp. ) parallel to and (resp. and ). ∎
Observation 2.
Let be a given set of imprecise points modeled as parallel line segments. There is an optimal solution to the MaxMaxArea problem, such that all the vertices are chosen at endpoints of the line segments.
Proof.
Suppose there exist three points , and that form a true triangle, which has maximal area, and suppose that is not at an endpoint of . If is not at an endpoint of its segment, we can consider a line through and parallel to . If we sweep away from , it will intersect until it leaves in a point . Clearly the triangle has larger area than , and can be substituted for to give us a larger area true triangle, and thus cannot be the largestarea true triangle (if and are parallel, we can choose either endpoints and the area is the same). ∎
Observation 3.
If at most two distinct line segments appear on , there is an optimal solution to the MaxMaxArea problem, such that the two segments which appear on always appear on the largestarea true triangle.
Proof.
From the previous observation we know that the largestarea true triangle selects its vertices from the endpoints of the line segments. Now we will prove that if at most two distinct segments appear on , these segments always contribute to the largestarea true triangle. Suppose this is not true. Then there are two cases. First, suppose that there exist three points , and at the endpoints of three different segments, such that has maximal area, and (w.l.o.g) and , respectively, have the lowest and highest coordinates among the vertices of , and none of the vertices of are selected from the vertices of , as illustrated in Figure 4(b). We consider a line through and parallel to . If we sweep away from , it will intersect until leaves at a point , such that should belong to one of the two segments that currently appeared on . We also consider a line through and parallel to . If we sweep away from , it will intersect until leaves at a point , and thus and can be substituted for and to give us a larger area true triangle, a contradiction.
Second suppose there exist three points , and that form a true triangle, has maximal area, and selects only one of its vertices, e.g., , from . Then either is the leftmost or the rightmost vertex of the triangle . We will show that one of the other vertices of should also be on . We consider a line through and parallel to . If we sweep away from , it will intersect until leaves at a point , that belongs to the other segment that currently appears on , and thus can be substituted for to give us a larger area true triangle. Contradiction. ∎
From now on, we assume more than two distinct segments appear on . Because otherwise we can easily solve the problem in time; two distinct endpoints of the line segments appearing on determine the base of the largestarea true triangle.
2.1 Equallength parallel line segments
We show that for a set of equallength parallel line segments, the largestarea triangle selects its vertices from the vertices on and is almost always a true triangle. The only possible configuration of the line segments that makes the largestarea triangle a nontrue triangle is collinearity of all the upper (or lower) endpoints, in which case the largestarea true triangle will always select one vertex at the leftmost segment and one vertex at the rightmost one. Clearly, we can test whether this is the case in time. In the following we show that if the upper endpoints are not collinear, we can directly apply any existing algorithm for computing the largestarea triangle on a point set.
Lemma 1.
Let be a set of equallength parallel line segments (not all the upper endpoints collinear). The largestarea true triangle selects its vertices from the vertices on .
Proof.
In observation 2 we have proved that the vertices of largestarea true triangle are selected from the endpoints of their segments.
Now we prove that the vertices of largestarea true triangle are selected from the vertices on . Suppose this is false. Let be the largest possible area true triangle, such that at least one of its vertices, e.g., , is not located on , as illustrated in Figure 5(a). Then would be at the endpoint of , but it is not on the convex hull. Also cannot be the leftmost or the rightmost line segment, because otherwise at least one of the endpoints must appear on . First suppose does not have the lowest or highest coordinate among the vertices of . But then either is located completely inside , or it has an endpoint on (see Figure 5(a,b)).
We consider a line through and parallel to . If we sweep away from , will intersect until it leaves in a vertex . If , can be substituted for to give us a larger area true triangle, a contradiction.
Now suppose , as illustrated in Figure 5(a,b). Let and denote the other endpoints of and , respectively. But then there always exists another segment which shares a vertex on . Note that since the segments have equal length, , (but can coincide with ). Thus can be substituted for , can be substituted for and can be substituted for to give us a larger area true triangle, a contradiction.
Now suppose (w.l.o.g) has the lowest coordinate, as illustrated in Figure 5(c). Consider the supporting line of , . This crosses the upper and lower hull boundary at and , respectively. Then is interior to one half plane on . Because of a convexity argument, and because is strictly interior to the , there will be a point that lies in the opposite half plane from the one which contains and , such that either lies in the strip defined by and a line through parallel to , in which case , or does not lie in that strip and . Both give a contradiction.
∎
Note that relations between triangles refer to their areas.
Lemma 2.
Let be a set of equallength parallel line segments. Unless the upper (and lower) endpoints of are collinear, the largestarea triangle is always a true triangle.
Proof.
Suppose the lemma is false. Let be the largestarea triangle on a given set of imprecise points modeled as equallength parallel line segments, and let and be the line segments that have the largestarea triangle constructed on them, as illustrated in Figure 5(d). There cannot be any other line segments to the left of and to the right of , because otherwise we can construct a larger area triangle by using one of those line segments. Thus, all the other line segments must be located between and . Suppose be one of them. It is easy to observe that (or ) will have a larger area than , because with a fixed base length , has a height longer than the length of the given input line segments, but has a height smaller than the length of the input line segments. Contradiction. ∎
Recall that a rooted polygon is a polygon with one of its vertices fixed at a given point in a specific line segment.
Theorem 1.
Let be a set of imprecise points modeled as a set of disjoint parallel line segments with equal length. The solution of the problem MaxMaxArea can be found in time.
Proof.
We first compute . From Lemma 2 we know the largestarea triangle for a given set of equallength parallel line segments is always a true triangle. Then, we can apply the existing linear time algorithm to compute the largestarea inscribed triangle chandran. ∎
2.2 Arbitrary length parallel line segments
In this section, we consider the MaxMaxArea problem for a given set of arbitrary length parallel line segments. For simplicity we assume no two vertical line segments have the same coordinates.
Lemma 3.
At least two vertices of the largestarea true triangle are located on , and at most one of its vertices is located on , and all three are on .
Proof.
First we will prove that at least two vertices of the largest area true triangle are located on . Suppose this is not true, so the largestarea true triangle can have fewer vertices on .
In the beginning, we prove that it is not possible that none of the vertices of the largestarea true triangle are located on . Let be the largestarea true triangle that does not select any of its vertices from , and let and have the lowest and highest coordinates, respectively, as illustrated in Figure 6(a). We consider a line through (resp. ) and parallel to (resp. ). If we sweep away from (resp. ), it will intersect , until it leaves in a point (resp. ), and and can be substituted for and , respectively, to give us a larger area true triangle. Contradiction.
Again let be the largestarea true triangle that selects only one of its vertices, e.g., , on . We will show that at least one of the other vertices of must also be located on . Suppose the coordinate of is between the coordinates of and (since otherwise with the same argument we had above, at least another vertex will also be located on ). We consider a line through and parallel to . If we sweep away from , it will intersect until it leaves in a point , that does not belong to the regions of and . We can also do the same procedure for the point and find another point , and thus, and can be substituted for and , respectively, to give us a larger area true triangle. Contradiction. Thus, at least two vertices of the largestarea true triangle should be located on .
Second we will prove that if the third vertex of the largestarea true triangle is not located on , it must be located on . Suppose this is false.
Let be the largestarea true triangle, and (w.l.o.g) let be the vertex that is not located on . Suppose this is not true, that cannot be located interior to . Notice that and must be located on . We consider a line through and parallel to . If we sweep away from , it will intersect until it leaves in a point . If this point does not belong to or , we are done. Suppose . We continue sweeping until it leaves in a vertex . Suppose again that it belongs to one of or (since otherwise we have found a larger area true triangle and we are done). Note that we also did not find any other vertex during the sweeping away from .
Suppose that and are the perpendicular segments to the supporting line of from and , respectively, as illustrated in Figure 6(b). First suppose both of the and are located to the left (or right) of . Since and belong to the same segment, and from the slope of the supporting line of we understand that the intersection of the supporting lines of and would be to the right of the supporting line of . It follows that the triangle , since with a fixed base , the height is longer than . Contradiction.
Now suppose only one of the line segments or is located to the left (or right) of . Without loss of generality, suppose is located to the left of , as illustrated in Figure 6(c). Let be the next vertex of on the cyclic ordering of (note that always exists since and are disjoint). Obviously is always a true triangle. Since , and , we would have . Contradiction. ∎
Corollary 1.1.
Let be a convex polygon, constructed at the endpoints of a set of arbitrarylength parallel line segments. There exists an () such that the largestarea true triangle rooted at is the largestarea true triangle inscribed in .
We start solving the MaxMaxArea problem by considering the case where all the vertices of the largestarea true triangle are the vertices on . The case where one of the vertices of the optimal solution is located on will be considered later.
2.2.1 Algorithm: Largestarea true triangle inscribed in
We first compute , in a representation where vertices are ordered along its boundary in counterclockwise (ccw) direction. The idea is to find the largestarea true triangle with base on all the chords of . We start our algorithm from an arbitrary vertex as the root. We check which of the possible true chords , where , will form a largerarea true triangle. Let be the furthest vertex (in vertical distance) from true chord , then either , or one of the two previous or next neighbors of will construct the largestarea true triangle in the base . If is not true, at most four triangles , , and are candidates of constructing the largestarea true triangle on the base . Note that a chord always divides a convex polygon into two convex polygons. We look for the largestarea true triangle on the base on both halfs of simultaneously.
In the next step of the algorithm, we start looking for the furthest vertex of (if it is a true chord) linearly from and in counterclockwise direction. We stop looking on when we reach to the chord .
We repeat the above procedure in counterclockwise order, where in each step, we consider one vertex of as the root. We stop the algorithm when we return to , and report the largestarea true triangle we have found. This algorithm is outlined in Algorithm 1 and illustrated in Figure 8. It is easy to observe that Algorithm 1 takes time.
Now we give a lower bound for computing the largestarea triangle rooted at a given vertex .
Theorem 2.
There exists a lower bound for computing the largestarea true triangle rooted at a given vertex .
Proof.
Our reduction follows the set disjointness problem which has an
lower bound in the algebraic decision tree model
preparata1985computational: Given two sets , , determine whether or not .We map each to the line . Also each is mapped to the line . Consider the set of intersection points of these lines with the first and second quadrants of the unit circle, centered at the origin of the coordinate system, as illustrated in Figure 7. Clearly, the maximum size of the largestarea triangle rooted at can be . But a triangle of this size appears if and only if there exists two elements and , where .^{5}^{5}5We assume w.l.o.g that and do not include . Thus there exist two elements and , where , if and only if either the size of the largestarea triangle rooted at equals . ∎
Note that our algorithm runs in time, while points are considered as root .^{6}^{6}6Reducing this running time is an interesting open problem, even when the input is a set of points (see, e.g., mukhopadhyay2013all) . Also notice that this lower bound is only for the case where we do not know the sorted order of the points on , and the line segments are very short.
Lemma 4.
Algorithm 1 finds the largestarea true triangle inscribed in .
Proof.
Corollary 2.1.
Let be a set of imprecise points modeled as a set of parallel line segments with arbitrary length. The largestarea true triangle which selects its vertices from the vertices on can be found in time.
2.2.2 Algorithm: Largestarea true triangle
From Lemma 3 we know the combinatorial structure of the largestarea true triangle: it can be the largestarea true triangle inscribed in , or the largestarea true triangle that selects two neighboring vertices on and one vertex on , or the one that selects two nonneighboring vertices on and one vertex on . The largestarea true triangle is the largestarea triangle among them.
In the first case, from Corollary 2.1 the largestarea true triangle can be found in time.
In the second case, we consider all the true edges of as the base of a triangle. The third vertex of each triangle can be found by a binary search on the boundary of . Let be a true edge of . If a triangle on the base is not true, one of the next or previous neighbors of on the cyclic ordering of may construct the largestarea true triangle on (see Figure 9(a,b)). In fact if the next or previous neighbor of also belongs to or , then there always exists a vertex on that makes a larger true triangle on , as illustrated in Figure 9(b). Thus, in this case again, the largestarea true triangle can be computed in time.
In the third case, there are chords to be considered as the base of the largestarea true triangle. Since a chord of may decompose into two convex polygons, we should do a binary search on each half of , separately. This method costs time totally. But we can still do better.
Let be any vertex on ; we will search for the largestarea rooted triangle on . An axis system centered on will partition into four convex chains, so that the largestarea true triangle should be rooted at and two points on the other quadrants, as illustrated in Figure 9(c).
From Corollary 2.1 we know if one quadrant, or two consecutive quadrants include the other vertices of the largestarea true triangle, we can find the largestarea true triangle in time, since it will be constructed on the vertices of the boundary of a convex polygon.
Suppose two other vertices belong to two diagonal quadrants, e.g., quadrant one and quadrant three, as illustrated in Figure 9(d). Let the cyclic ordering of be counterclockwise, and let and be the first and second vertices of the third quadrant in the cyclic ordering of . Then we can find and on quadrant one, so that , and each of and construct the largestarea true triangle on the base , as we can see in Figure 9(d). We named and the starting points. The starting points determine the starting position of looking (in ccw direction) for and , so that , and each of and construct the largestarea true triangle on the base , etc.
Thus, for any fixed and any vertex on the third quadrant, we start looking for and from and (in ccw direction) on the first quadrant, respectively.
Note that for any vertex on , the rooted triangle at can also be a nontrue triangle. Suppose we are looking for and of vertex in quadrant three. If belongs to , we discard . Let (or ). Then one of the next or previous neighbors of should be the areamaximizing vertex on the base , and this point cannot belong to or .
Therefore, in the case where we are looking on diagonal quadrants, e.g., quadrant one and quadrant three, for any vertex , we first find the starting points for the first vertex in quadrant three in time, and then we only wrap around in at most one direction and never come back. Thus, for any , the largestarea true triangle can be found in time, and the largestarea true triangle can be found in time totally. The whole procedure of computing the largestarea true triangle is outlined in Algorithm 2.
Observation 4.
Let be a set of imprecise points modeled as parallel line segments with arbitrary length. The largestarea rooted true triangle can be found in time.
Proof.
Let be the root. In Corollary 1.1 we considered the case where is a vertex on the boundary of . If is a point inside , we set as the origin and compute the four possible quadrants of . It is easy to observe that the largestarea true triangle rooted at can be found in time.
∎
Theorem 3.
Let be a set of imprecise points modeled as a set of parallel line segments with arbitrary length. The solution of the problem MaxMaxArea can be found in time.
3 MinMinArea problem
In this section, we will consider the following problem: given a set of parallel line segments, choose a set of points, where , such that the size of the smallestarea triangle with corners at is as small as possible among all possible choices of (see Figure 1(b)). As in the case of MaxMaxArea, this problem is equivalent to finding three points on distinct elements of that minimize the area of the resulting triangle.
The problem of finding the smallestarea triangle in a set of precise points is 3SUMhard^{7}^{7}7The class of problems which is unknown to be solvable in time for some ., as it requires testing whether any triple of points is collinear. In our case, if we find three collinear points on three distinct segments, the smallestarea true triangle would have zero area.
Observation 5.
Let be a set of vertical line segments. Deciding whether there are three collinear points on three distinct line segments can be done in time.
Proof.
The idea is look at the vertical segments in the dual space, where each vertical segment is transformed to a strip. Then, if there exists a common point in the strips corresponding to three distinct line segments, this point denotes a line passing through those segments in the primal space. This can easily be checked by a topological sweep of the arrangement of strips in which a curve sweeps over the intersection points, e.g., from left to right in the dual space, while keeps track of the required information about the intersected strips by . Since a topological sweep of an arrangement can be done in time EDELSBRUNNER1989165, we can test whether there are three collinear points on three distinct segments in time. ∎
In the following we will show that when the smallestarea true triangle has nonzero area, it selects its vertices on the endpoints of the line segments.
Lemma 5.
Let be a set of imprecise points modeled as a set of parallel line segments. Suppose there is no zeroarea triangle in . The smallestarea true triangle selects its vertices on the endpoints of the line segments.
Proof.
Suppose the lemma is false. Let be the smallestarea true triangle, and suppose at least one of its vertices e.g., , is not located at the endpoints of (see Figure 10(a)). Consider a line through and parallel to . If we sweep towards , it will intersect until it leaves at a point . Thus can be substituted for to give us a smaller area true triangle, a contradiction. ∎
We now introduce some notation. Let be a set of imprecise points modeled as parallel line segments, and let be the set of all endpoints of . For a given point , we consider as a transformation of to a dual space, and as the arrangement of the lines that are the transformation of in dual space, as Edelsbrunner et al. Edel defined for a given set of points in the plane. Let (resp. ) denote the transformation of the upper (resp. lower) endpoint of in the dual space. partitions the plane into a set of convex regions, and has total complexity of .
3.1 Algorithm
From Lemma 5 we know that we only need to consider the endpoints of the line segments. For a given set of imprecise points with the endpoints in , we first construct . Let be the smallestarea triangle in the primal space. Each vertex in a face in belongs to two different segments, since the endpoints of a line segment are mapped to two parallel lines in the dual space, (see Figure 10(c)). For , we first consider the true edges of (which belong to distinct segments in the primal space). If edge is the first candidate for constructing the smallestarea triangle on , it should be immediately located above or below among all the lines, as our duality preserves the vertical distances. If does not determine a distinct segment in the primal space, we should continue our movement in both up and down directions until we reach a line in dual space which determines a distinct line segment in primal space. In this situation, we may need to cross among two neighboring faces of , as illustrated in Figure 10(d). Note that since we can use our procedure to determine if 3 points of distinct line segments in the primal space are collinear, this problem is also 3SUMhard.
Thus we can compute the smallestarea true triangle that can be constructed on each vertex . If it is smaller than previously computed optimal solution, , we remember it. If we store in a reasonable data structure (e.g. doubly connected edge list), the time required to find the answer is (Edel, Corollary 2.5).
Lemma 6.
Let be a set of imprecise points modeled as parallel line segments, and let be the arrangement of the transformation of (which consists of the endpoints of ). There exists a face in such that the smallestarea true triangle uses one of its vertices.
Proof.
The correctness proof of this lemma comes from these facts: all the vertices of belong to distinct segments in primal space, our duality preserves the vertical distances and it is order preserving, and we will find the smallestarea true triangle on each vertex of , even when we encounter to nondistinct segments. ∎
Theorem 4.
Let be a set of imprecise points modeled as parallel line segments. The solution of the problem MinMinArea can be found in time.
4 MaxMinArea problem
The problem we study in this section is the following: given a set of parallel line segments, choose a set of points, where , such that the size of the smallestarea triangle with corners at is as large as possible among all possible choices of (see Figure 1(c)). As we can see in Figure 11(a,b), the solution does not necessarily select its vertices on the endpoints of the line segments. We show this problem is hard.
4.1 MaxMinArea problem is NPhard
We reduce from SAT. Given a SAT instance, we choose a value and create a set of line segments such that if the SAT instance is satisfiable, there exists a point placement with a smallestarea triangle of area , but if the SAT instance is not satisfiable, every possible point placement will admit a triangle of area smaller than .
We define a variable gadget for each of the variables in a clause, and a clause gadget, that includes all of its variable gadgets. A variable gadget for a variable in a clause consists of a segment and two fixed points (degenerate line segments) on the bisector and close to the center of (see Figure 12).^{8}^{8}8For ease of construction, we draw the segments diagonal and the clauses horizontal, a simple rotation yields a construction for vertical segments. These fixed points determine two small triangles (the green and purple triangles) of area , and one of them must be part of any point placement. We choose small enough such that in the remainder of the construction, every other possible triangle either has an area larger than , or a zero area.
Let represent the value True and represent the value False, where and are endpoints of . We place these endpoints in such a way that if a clause is not satisfied, the corresponding endpoints will form a triangle with zero area. For example, if the clause is , the endpoints , and will be collinear. So, setting and to True and to False will result in a zero area triangle, as we can see in Figure 12(a). In order to ensure segments representing the same variable will be assigned the same value, we place a fixed point on every line through the True end of one and the False end of another such segment. For instance, if variable occurs in and , we place a fixed point on the segments connecting to , and one on the segment connecting to (see Figure 12(b)). If selects both of the values of True and False simultaneously, it will construct a zero area triangle. We will construct such structures for all the common variables of the clauses, see Figure 12(c).
We must take care when placing all the endpoints of the line segments in the variable gadgets and the fixed points, that there are no three collinear points other than those that are collinear by design. We must also make sure to not place any fixed points or endpoints of segments in the perpendicular strips which are determined by each line segment in the variable gadgets (see Figure 12(b)), as such a point would form a triangle of area less than with the two fixed points in the corresponding variable segment. After placing all the line segments and fixed points, the area of the smallest possible triangle will determine the value .
Let be the set of imprecise points including all the fixed points and all the segments in the variable gadgets. Now an assignment to the variables to satisfy the SAT instance can be made if and only if a solution for maximizing the area of the minimum possible area triangle of of area exists. In the following we show how to ensure that all coordinates in are polynomial, and we prove that the reduction takes polynomial time.
4.2 Correctness of polynomialtime reduction
We use an incremental construction method, such that when inserting a new fixed point or the endpoints of a line segment, we do the placement in such a way that the new point is not collinear with two other previously inserted fixed points or the endpoints of two other line segments. Also each new precise point or the endpoints of a new line segment should not be located in the strips which are determined by the endpoints of previously inserted line segments.
Suppose we have variables and clauses in the SAT instance. Since each variable can occur at most one time in each clause, we need to place fixed points on the lines connecting the common variables in the clause gadgets. Also we need to place other fixed points close to the center of the segments in the variable gadgets. Therefore we observe that a value for of suffices.
It is easy to observe that for a given set of points in the plane, we can insert the th point in time, such that no zeroarea triangle exists in the resulting set, and the new point is not placed in any of the strips (of the variable gadgets). We conclude that our reduction can be performed in time in total.
Theorem 5.
Given a set of parallel line segments, the problem of choosing a point on each line segment such that the area of the smallest possible triangle of the resulting point set is as large as possible is NPhard.
5 MinMaxArea problem
In this section, we will consider the following problem: given a set of parallel line segments, choose a set of points, where , such that the size of the largestarea triangle with corners at is as small as possible among all possible choices of (see Figure 1(d)).
In the following we first give some definitions, then we state our results. Let the top chain denote the lowest convex chain connecting the lower endpoint of the leftmost line segment to the lower endpoint of the rightmost line segment, and which passes over or through the lower endpoints of the other line segments. In other words, it is the top half of the convex hull of the lower endpoints of the segments. Similarly, we define the bottom chain as the highest convex chain connecting the upper endpoint of the leftmost line segment to the upper endpoint of the rightmost line segment, and which passes under or through the upper endpoints of the other line segments. These two convex chains can either be disjoint or intersect and enclose a convex body region (see Figure 13(a)). The convex body region can be found in time. If this region is empty, a single line segment will pass through all the segments, and the smallest largestarea triangle will have zero area by placing all points collinear. This case can be distinguished in linear time edelsb. From now on, we assume the convex body region has nonzero area. Note that one of the top chain or bottom chain can also be a single line segment. By extreme line segments we mean the leftmost and rightmost line segments.
We first make some observations in Section 5.1. Then in Section 5.2 we solve the special case where the extreme segments are single points. Finally we extend the solution to the general case in Section 5.3.
5.1 General Observations
We start with some observations. Suppose we have a set of line segments and we know what is the candidate point^{9}^{9}9For each , the point in set is the candidate point of . on each segment. It is easy to observe that if we add more line segments, the changes on the size of the area of the smallest largest triangle is nondecreasing.
Lemma 7.
Suppose we are given a set of line segments and we know the set which consists of the candidate points on to make the largestarea triangle as small as possible. Then we insert another line segment , such that has a point which is located on a line segment passing through two points of . Then, will be chosen as the candidate point of and this selection will not increase the area of the smallest largestarea triangle.
Proof.
Suppose the lemma is false. Then is increased the size of the smallest largestarea triangle. It follows that is a vertex of the smallest largestarea triangle (Also notice that the largestarea triangle selects all its vertices on the convex hull; no matter we want to minimize its area). Suppose and are the other vertices of the smallest largestarea triangle. Since is located on a line segment passing through two points of , it is located on a chord on an edge of . First suppose is located on a chord of . We consider a line through and parallel to . If we sweep away from , it will intersect the convex body region until it leaves it at a vertex . But then can be substituted for to give us a larger smallest largestarea triangle. Contradiction with the previous selection of the smallest largestarea triangle.
Now suppose is located on the boundary of . Again consider the line through and parallel to . If we sweep away from , it will intersect the convex body region until it leaves it at a vertex . But then again can be substituted for to give us a triangle which its area is either greaterthan or equals to the area of . It is again a contradiction with the previous selection of the smallest largestarea triangle. Thus cannot increase the size of the smallest largestarea triangle.
∎
We will observe later that the smallest largestarea triangle is always a true triangle.
Corollary 5.1.
Suppose we are given a set of line segments and we know the set which consists of the candidate points on to make the largestarea triangle as small as possible. If a new line segment intersects the convex hull of without sharing a vertex on it, then does not have a role in the construction of the smallest largestarea triangle.
5.2 Points as the extreme regions
In the case where the leftmost and rightmost line segments are fixed points, these fixed points always appear on the convex hull of . Also, for some line segments that intersect the convex hull of ^{10}^{10}10Note that consists of interior and boundary. without sharing a vertex on it, they share their candidate points somewhere on or within the convex hull (see Figure 13(b)). Let be the set of line segments from that share a vertex on the convex body region. In the following, we will prove that the smallest largestarea triangle of equals the smallest largestarea triangle of .
Observation 6.
Any intersects the convex body region.
Proof.
Suppose this is not the case. First suppose the convex body region has nonzero area. Then there exists a segment that does not intersect the convex body region. The segment has to be located completely above (or below) the convex body region. But then has to share a vertex on the top chain (or the bottom chain), contradiction.
∎
As an immediate consequence, we can throw away all the regions in . In the following, we show that the largestarea triangle which is inscribed in the convex body region is the smallest largestarea triangle of . In other words, we will prove that in the case where the leftmost and rightmost line segments are fixed points, the convex body region is the convex hull of the candidate points.
Lemma 8.
Suppose the leftmost and rightmost line segments are points (degenerate segments), and the convex body region has nonzero area. Only the upper endpoints on the bottom chain or the lower endpoints on the top chain are candidates for including the vertices of the smallest largestarea triangle of .
Proof.
Suppose the lemma is false. Let be the smallest largestarea triangle of , that selects one of its vertices, , at a point on one of the line segments of , so that is not a lower endpoint on the top chain, or an upper endpoint on the bottom chain, or a fixed point. W.l.o.g, assume shares a vertex on top chain. Let be the lower endpoint of (see Figure 13(b)). We will prove that we can substitute for without increasing the size of the smallest largestarea triangle.
We consider a line through and parallel to . If we sweep toward , it will intersect the top chain. Let be the first vertex that visits on the top chain. Suppose , because otherwise we are done. Suppose . Now we will prove that if we substituted for , the area of no other triangles with a vertex at would be increased.
If exactly one of or belongs to the bottom chain and the other one belongs to the top chain, or both and belong to bottom chain, obviously moving to will reduce the area of , and is smaller than , which contradicts the optimality of .
Now let both of and belong to the top chain, then the largestarea triangle that we want to minimize its area will never select its third vertex on top chain, unless one of , or is an intersection point of the top chain and bottom chain. Note that point cannot be a fixed point, because otherwise we have a contradiction. It follows that , and also , which contradicts the optimality of . Note that the smallest largestarea triangle has to be a true triangle (we will discuss it later).
Now suppose . Since is located above the convex body region, is the first visited point during sweeping toward . Thus must intersected an edge of the convex body, contradicting the fact that shares a vertex on the convex body. ∎
Corollary 5.2.
Suppose the leftmost and rightmost line segments are fixed points and the convex body region has nonzero area. Only the fixed points, the lower endpoints on top chain and the upper endpoints on bottom chain are candidates for including the smallest largestarea triangle’s vertices.
Lemma 9.
The smallest largestarea triangle of is equal to the smallest largestarea triangle of .
Proof.
From Lemma 8 and Observation 5.2 we know the smallest largestarea triangle selects its vertices from the endpoints of , and the convex body region is the convex hull of the candidate points on to minimize the size of the largestarea triangle. As we saw in Observation 6, the line segments in always intersect the convex body region and they do not have a role in the construction of the smallest largestarea triangle. Thus, from Lemma 7 and Corollary 5.1 we can throw away the set of line segments in . If the convex body region has nonzero area, obviously we cannot reduce the size of the largestarea triangle that is inscribed in it. Also from (48, Theorem 1.1) we know the largestarea triangle will select its vertices on the convex hull, and it does not the matter that we want to minimize its area. Consequently the smallest largestarea triangle of equals to the smallest largestarea triangle of .
∎
As an immediate consequence of Lemma 9, since all the vertices of are selected from distinct segments, the smallest largestarea triangle is always a true triangle.
5.2.1 Algorithm
Suppose we are given set of line segments. After sorting , we can compute the top and bottom chains in linear time. Also, we can compute , the convex body region and also its vertices, , in linear time. For each , we can choose to be an arbitrary point within the convex body region (or on its boundary). Obviously all such points can be found in linear time. Then we can apply any existing algorithm to compute the largestarea inscribed triangle of . This procedure is outlined in Algorithm 6.
The procedure LargestTriangle() is the algorithm presented in chandran which can compute the largest inscribed triangle in lineartime.
Theorem 6.
Let be a set of parallel line segments with two fixed points as the leftmost and rightmost line segments. The solution of MinMaxArea problem on can be found in time.
5.3 Line segments as the extreme regions
In this section we study the case where the leftmost and rightmost line segments are not fixed points. Note that the extreme line segments do not necessarily share a vertex at the endpoints or even on the optimal solution (see Figure 11(c,d)).
Two polygons that are constructed by the leftmost and rightmost line segments and the parts of the top chain and bottom chain which do not contribute to the boundary of the convex body region (hatched regions in Figure 14(a)) are called the tail regions. In this case, also includes the line segments which share vertices on the tail regions. In a similar fashion, consists of the line segments that have two intersection points with the tail regions without sharing a vertex on it, and also the line segments that are intersected by the convex body region without sharing a vertex on it.
Lemma 10.
Let be a given set of imprecise points. Let be the set of points that minimizes the size of the largestarea triangle. Then always intersects the line segments in .
Proof.
Suppose the lemma is false. Then there exists a line segment , such that is not intersected by . First notice that includes the convex body, and consequently it is intersected by all the line segments which are intersecting by the convex body without sharing a vertex on it. Thus must be a line segment which is intersecting a tail region, say the right tail, while it does not share any vertex on it. Notice that selects also some vertices on the leftmost and rightmost line segments. Two cases can happen. First, suppose selects an endpoint of . W.l.o.g., suppose it is selected the upper endpoint of , but then it must also includes all the vertices of the upper concave chain of the right tail (we discuss it in next lemma), and in which case it must intersect which gives a contradiction.
Now consider the case where selects a point somewhere on the middle of . In this case again it has to be intersected by . Contradiction. ∎
Consequently, with the same argument we had in Section 5.2 the candidate point of any line segment with two intersection points with a tail region (without sharing any vertex on it) can be chosen to be any point within or on the boundary of the convex hull of candidate points. For this, it suffices to find the candidate points of the leftmost and rightmost segments. Notice that with the same argument that we have proven in Lemma 8, all the vertices of the convex body and tail regions should be involved in the convex hull of the candidate points. In Lemma 11 we will prove that for the line segments in which share some vertex on the tail regions, there is no other interesting point to be candidate for a vertex of the smallest largestarea triangle.
Lemma 11.
Suppose the convex body region has nonzero area. For any line segment in only the shared vertices are candidates for the vertices of the smallest largestarea triangle.
Proof.
Suppose the lemma is false, then the smallest largestarea triangle selects a vertex on , such that shares some vertex on e.g., the right tail region. First suppose is located interior to the right tail region. W.l.o.g, suppose shares some vertex on the bottom chain. Let be the upper endpoint of and let be any point of with a lower coordinate than and interior to the right tail region (as illustrated in Figure 14(b)). We know that the convex hull of the candidate points has a vertex on , and is the largestarea true triangle among other possible triangles. Consider a line through and parallel to . If we sweep toward we will visit . It is easy to observe that removing vertices from the convex hull of a set of points may only decrease the area of the largestarea triangle that is inscribed in the convex hull (notice that the smallest largestarea triangle is the largest triangle which is inscribed in the convex hull of the candidate points). By the optimality of the area of we know that all the other triangles which are rooted at are not larger than . Thus we just omit the vertex of the convex hull, while the convex hull is still intersected by and by all the other segments which were intersected by the removed ear of the hull, since the removed ear is completely located within the right tail region. Thus could not be the smallest largestarea triangle. Contradiction.
Now suppose is located outside the tail region and w.l.o.g above it. Suppose shares a vertex on the bottom chain (obviously if it also shares , is a better choice with respect to and we are done). In which case again is intersected by the convex hull of the candidate points. Once again by removing the vertex of the convex hull, the convex hull is still intersected by and by
Comments
There are no comments yet.