Maximum-Area Triangle in a Convex Polygon, Revisited
Vahideh Keikha, Maarten L\"offler, Ali Mohades, J\'er\^ome, Urhausen, Ivor van der Hoog

TL;DR
This paper critically examines and improves algorithms for finding maximum-area inscribed polygons in convex polygons, revealing flaws in previous methods and proposing more accurate algorithms with different time complexities.
Contribution
It demonstrates the failure of a 1979 linear-time algorithm for maximum-area inscribed triangles and introduces a corrected quadratic-time and an $O(n ext{log} n)$ divide-and-conquer algorithm.
Findings
The 1979 linear-time algorithm for maximum-area inscribed triangles fails in some cases.
A corrected quadratic-time algorithm is proposed for the problem.
The 1979 algorithm for maximum-area $k$-gon with $k=4$ also fails to find the optimal solution.
Abstract
We revisit the following problem: Given a convex polygon , find the largest-area inscribed triangle. We show by example that the linear-time algorithm presented in 1979 by Dobkin and Snyder for solving this problem fails. We then proceed to show that with a small adaptation, their approach does lead to a quadratic-time algorithm. We also present a more involved time divide-and-conquer algorithm. Also we show by example that the algorithm presented in 1979 by Dobkin and Snyder for finding the largest-area -gon that is inscribed in a convex polygon fails to find the optimal solution for . Finally, we discuss the implications of our discoveries on the literature.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Maximum-Area Triangle in a Convex Polygon, Revisited
Vahideh Keikha
Department of Mathematics and Computer Science, Amirkabir University of Technology, Tehran, Iran
Maarten Löffler
Department of Information and Computing Sciences, Utrecht University, Utrecht, The Netherlands
Ali Mohades
Department of Mathematics and Computer Science, Amirkabir University of Technology, Tehran, Iran
Jérôme Urhausen
Department of Information and Computing Sciences, Utrecht University, Utrecht, The Netherlands
Ivor van der Hoog
Department of Information and Computing Sciences, Utrecht University, Utrecht, The Netherlands
Abstract
We revisit the following problem: Given a convex polygon , find the largest-area inscribed triangle. We show by example that the linear-time algorithm presented in 1979 by Dobkin and Snyder [1] for solving this problem fails. We then proceed to show that with a small adaptation, their approach does lead to a quadratic-time algorithm. We also present a more involved time divide-and-conquer algorithm. Also we show by example that the algorithm presented in 1979 by Dobkin and Snyder [1] for finding the largest-area -gon that is inscribed in a convex polygon fails to find the optimal solution for . Finally, we discuss the implications of our discoveries on the literature.
1 Introduction
We revisit a classic problem in computational geometry: Given a convex polygon , find the largest-area inscribed triangle. Figure 1 illustrates the problem. In 1979, Dobkin and Snyder [1] presented a linear-time algorithm to solve this problem. In this note, we present an example of a polygon on which their algorithm fails. There exists, however, another linear-time algorithm for computing the largest inscribed triangle is presented by Chandran and Mount [2], originally intended to solve the parallel version of the problem. Since the initial posting of this manuscript on arXiv [3], two new linear-time algorithms for solving the problem have already been claimed by Kallus [4] and Jin [5].
The counter example is shown in Figure 12 and requires careful placement of the vertices of the polygon: our coordinates are integers in the range , and a range of this order of magnitude seems to be necessary. We remark that in [6] the authors implemented the presented algorithm in [2], however, for the correctness of the implication, they produced a set of random convex polygons with range of vertices in , although our counter example clarifies that the presented algorithm by Dobkin and Snyder [1] always works correctly on any random convex polygon in the range .
Our counter example was found by solving a system of quadratic equations. We carefully analyze the underlying geometry and give insight into the reason for the failure of the original algorithm, and use this insight to create a new algorithm to solve the problem.
The study of geometric containment problems was initiated by Michael Shamos [7], who considered the question of finding the longest line segment in a convex polygon, also known in computational geometry as the diameter of the polygon. Shamos presented a linear-time algorithm in his thesis [8], based on a technique which is now known under the name rotating calipers [9]. Dobkin and Snyder [1] also claimed a linear-time algorithm for computing the diameter, which was later found to be incorrect by Avis et al. [10].
Dobkin and Snyder [1] originally claimed to have a generic linear-time algorithm for finding the largest inscribed -gon inside a convex polygon (for constant ), but this claim was later retracted: Boyce et al. [11] observe that the algorithm by Dobkin and Snyder fails for and instead present a algorithm for finding the largest -gon. Aggarwal et al. [12] improve their result to time by using a matrix search method. However, both algorithms still rely on the correctness of the Dobkin and Snyder algorithm for triangles, which to this day remains uncontested. As we show here, this algorithm is also incorrect, and by extension, so are the solutions by Boyce et al. and Aggarwal et al.. In Section 8, we discuss the implications of our finding in more detail.
Furthermore, We also show by example that the presented algorithm [1] also fails to find the optimal solution for . Our counter example is a polygon on 16 vertices in the range [0, 26500]. Our counter example, combined with the work in [10] and [11] would suggest that the problem of finding the largest-area quadrilateral in linear time is still open. Although Boyce et al. [11] claimed one is presented by Shamos [7], but the cited manuscript cannot be found on-line.
1.1 Related work
The largest-area triangle problem falls in a broader class of geometric optimization problems, where the goal is to find some object inscribed inside another object. During the past 40 years, many optimization measures have been studied:
Chang et al. [13] studied the problem of computing the largest-area or largest-perimeter convex polygon that is inscribed in a simple polygon . They presented an time algorithm for the largest-area inscribed convex hull. They solved this problem by using the fact that a largest-area convex polygon must be the intersection of and a set of half-planes defined by chords of , where is smaller than the number of reflex vertices of . They also presented an time algorithm for the largest-perimeter inscribed convex hull. Obviously, when the given polygon is convex,the solution to both problems is unique and can be found in linear time. Cabello et al. [14] presented a randomized near-linear-time -approximation algorithm for this problem, with running time in time, and with probability at least , the result has an area of at least times the area of an optimal solution..
Daniels et al. [15] presented an time algorithm for finding the largest-area axis-parallel rectangle that is inscribed in a simple polygon. They also presented an lower bound for this problem. The running time also matches with the one of the best known algorithm for finding the largest-area axis-parallel rectangle that is inscribed in an orthogonal polygons.
Cabello et al. [16] studied the problem of finding the largest-area or largest-perimeter rectangle that is inscribed in a convex polygon. They presented an exact algorithm that runs in time, and a -approximation algorithm that runs in time; see also [17, 18, 19, 20].
DePano, Ke and O’Rourke [21] studied the problem of computing the largest-area square and equilateral triangle contained in a convex polygon.
Jin and Matulel [22] studied the problem of computing the largest-area parallelogram that is inscribed in a convex polygon , and presented an time algorithm, which is based on the fact that largest-area parallelogram must have all of its corners on the perimeter of .
Melissaratos and Souvaine [23] studied the problem of computing the largest-area or perimeter triangle that is inscribed in a non-convex polygon. They presented an time algorithm for these problems.
When the input is an (unstructured) set of points in the plane, rather than a convex polygon, we may ask a similar question: what is the largest-area triangle or -gon that uses only points of the given set as vertices? Clearly, we can attack this problem by first computing the convex hull of the given points. However, this takes time, and indeed Drysdale and Jaromczyk show that computing the largest-area or largest-perimeter -gon must take at least time for any , using a reduction from set disjointness [24].
1.2 Contribution
In this paper, we obtain the following results.
- •
We present a -vertex polygon on which the algorithm by Dobkin and Snyder for computing the largest-area triangle [1] fails. By extensions, the algorithm by Boyce et al. and Aggarwal et al. for computing the largest-area -gon [11, 12] also fail. In particular, the example disproves Lemma 2.5 of Dobkin and Snyder [1] and Lemma 3.2 of Boyce et al. [11] (Section 7.2).
- •
We analyze the geometry and present insight into the reason of the failure of these lemmas. We then use this insight to give a quadratic-time algorithm for computing the largest-area triangle in the same spirit as Dobkin and Snyder’s algorithm, which we prove is correct (Section 5).
- •
We then extend our analysis significantly and present a divide-and-conquer algorithm that works in time (Section 6).
- •
We present a -vertex polygon on which the algorithm by Dobkin and Snyder for computing the largest-area quadrangle [1] fails.
As an effect of the problem’s central nature in computational geometry, a number of follow-up results that depend on largest-area triangles or -gons, either directly by using the algorithm as a preprocessing step or indirectly by relying on false claimed properties, will have to be reevaluated [1, 11, 12, 25, 26]. We discuss several of these in some detail in Section 8.
2 Preliminaries
In this section, we first review several core concepts introduced by Dobkin and Snyder [1] and Boyce et al. [11], and then describe the algorithm by Dobkin and Snyder in detail. Although we are primarily concerned with triangles, we introduce some concepts more generally for -gons; as we discuss in Section 8, the question of finding the largest-area -gon inside a convex polygon is also impacted (and reopened) by our results.
2.1 Definitions
Let be a convex polygon with vertices. We say a convex polygon is -aligned if the vertices of are a subset of the vertices of . Note that there always exists a -aligned largest-area -gon inscribed in (assuming ). Boyce et al. [11] define a rooted polygon with root to be any -aligned polygon that includes . Let be a convex polygon. Two -aligning polygons are said to interleave, if between every two successive vertices of one, there is a vertex of the other (possibly coinciding with one of them) [11]. Dobkin and Snyder [1] define a stable triangle to be a rooted triangle , where is the root, such that any other -aligned triangle or has area smaller than (or equal to) . Henceforth, we will refer to such triangles as 2-stable, and to and as stable vertices. We also define a 3-stable triangle to be a (rooted or unrooted) -aligned triangle such that any other -aligned triangle or or has area smaller than (or equal to) . Note that in degenerate cases, there could be multiple (stable) triangles with equal area. In the remainder, we denote by the largest-area triangle, or, if it is not unique, any triangle with maximum area. Note that is 3-stable.
2.2 Dobkin and Snyder’s triangle algorithm
We will now recall the triangle algorithm [1], outlined in Algorithm 1 and illustrated in Figure 10111For Simplification of the implication, our algorithm is presented in C++ pseudo-code, it is easy to observe that it is equivalent to the original presented algorithm in [1]. The same is also hold for . .
Let . We assume that is given in a clockwise orientation. Assume an arbitrary vertex of is the root, assign this vertex and its two subsequent vertices in the clockwise order on the boundary of to variables and . We then “move forward” along the boundary of as long as this increases the area of . If we can no longer advance , we advance if this increases the area of , then try again to advance . If we cannot advance either or any further, we advance . We keep track of the largest-area triangle found, and stop when returns to the starting position. Since visits vertices and and each visit fewer than vertices, the algorithm runs in time (assuming we are given the cyclic ordering of the points on ).
Dobkin and Snyder [1] claim that Algorithm 1 computes the largest-area triangle inscribed in . Their argument hinges on the following key lemma.
Lemma 1** ([1, Lemma 2.5]).**
Let be a convex polygon. There exists an () such that the -anchored maximum triangle is the largest-area triangle inscribed in .
We claim that Lemma 2.5 [1] is false. In the lemma, the -anchored maximum triangle refers to the largest triangle found by the algorithm while . Note that this is not necessarily the same as the largest-area rooted triangle at . This essential observation lies at the heart of the following construction.
3 Counter-example to Algorithm 1
In Figure 12 we provide a polygon on vertices such that the largest-area inscribed triangle and the triangle computed by Algorithm 1 are not the same. We use the following points: . The largest-area triangle is ; however, Algorithm 1 reports triangle as the largest-area triangle.
We obtained by solving the following problem. Let be the globally maximum area triangle on , find six vertices , , , , and such that each of , and are 2-stable triangles with area strictly less than , and there is no other triangle on with area equal or larger than . This resulted in a set of nonlinear constraints (many of which are redundant by Lemma 8) which delineate a very small but non-empty solution space. We were able to find an integer solution with 4-digit integers, but none with 3-digit integers.
4 Some observations on the largest-area triangle
In this section, we argue that Algorithm 1 does work on convex polygons in which there exists only one 2-stable triangle per vertex. However, if there are multiple 2-stable triangles rooted at the same vertex, the algorithm only works if the first such triangle considered happens to be the largest one. We investigate how many 2- and 3-stable triangles there can be, both per vertex and in total.
4.1 The number of 2-stable triangles
Lemma 2**.**
Let be any vertex of . All 2-stable triangles rooted at are interleaving.
Proof.
Figure 4(b,c) illustrates the proof. Assume for the sake of contradiction that is a convex polygon and is a vertex on with several 2-stable triangles, such that there exists at least one 2-stable triangle rooted at that is not interleaving with another 2-stable triangle . W.l.o.g. both and are ordered counterclockwise.
First consider the case where occurs before and occurs before in counterclockwise order. Let and be the lines through that are parallel to the lines and respectively. As is 2-stable, has to be on the same side of than . Additionally has to be on the other side of than . It follows that has to be placed after in counterclockwise ordering, contradicting the assumption.
Second consider the case where and both occur before and in counterclockwise order. Let and be the lines through that are parallel to the lines and respectively. As is 2-stable, is on the other side of than . As is 2-stable, is on the same side of than . This forces to be placed before in counterclockwise ordering which again is a contradiction. ∎
Observation 3**.**
The number of 2-stable triangles rooted at any given vertex of a convex polygon is at most .
It is possible that for a given vertex on a convex polygon , each edge is an edge of a 2-stable triangle, as illustrated in Figure 6. Furthermore, Figure 5 shows that any of these triangles could be the largest one; that is, the sequence of areas of the -stable triangles rooted at is not necessarily increasing or decreasing. However, can participate in at most two 2-stable triangles, namely, using the vertices that are farthest from the line through and . So, the number of 2-stable triangles rooted at any vertex of is .
Furthermore, we can slightly alter the polygon in Figure 5(left) so that it becomes a polygon with -stable triangles, see Figure 5(right). If we replace with new vertices , all on the boundary of (ordered clock-wisely) and close to each other, and such that the other points are far enough from each other, the resulting polygon can have 2-stable triangles.
Implicitly, Algorithm 1 is based on the assumption that there is only a linear number of -stable triangles that are comparable in size and to the size of the largest-area triangle. We can alter the example in Figure 5(right) to make any of the -stable triangles the largest, but independent of such a change, Algorithm 1 will always report the maximum area triangle out of the first found 2-stable triangles among all the vertices as the largest-area triangle.
Clearly, Observation 3 shows that the total number of 2-stable triangles is at most quadratic.
Corollary 4**.**
The total number of 2-stable triangles on a convex polygon is bounded by .
In [3] we show that correcting the Dobkin and Snyder algorithm to find all the 2-stable triangles results in a quadratic time algorithm.
4.2 The number of 3-stable triangles
Lemma 5**.**
Two 3-stable triangles on a convex polygon are always interleaving.
Proof.
Let and be 3-stable triangles. Assume for the sake of contradiction that they are not interleaving. Following Lemma 2 we know that the two triangles do not have a common vertex. So either two vertices of are between two vertices of in counterclockwise order or the all three vertices of are between two vertices of in counterclockwise order. W.l.o.g. we can assume that the counterclockwise order or the vertices is either or . The proof is the same for both cases and can be seen in Figure 7. For the sake of simplicity we assume that the line is horizontal and that the vertices and lie below that line. Let and be the lines through that are parallel to the lines and respectively. The vertex is closer to than and is further away from than . However due to having an upward slope and having a downward slope, has to be before in cyclic ordering, which is a contradiction. ∎
Lemma 6**.**
The total number of 3-stable triangles on a given convex polygon is bounded by .
Proof.
Suppose is the convex polygon. Let given in the clockwise ordering. Let be the number of 3-stable triangles rooted at , and let and denote, respectively, the first and last 3-stable triangles rooted at , etc. Interleaving property of 3-stable triangles follows that if we move forward to , the second and third vertices of triangle can only be located after or on the second and third vertices of triangle . Also exactly one triangle rooted at can share both of the second and third vertices with one 3-stable triangle rooted at , otherwise contradict the convexity of . Note that the same argument is hold for all the successive vertices of .
If there is a triangle with a common second vertex with , then the third vertex of either coincides with the third vertex of , or moves forward on the clockwise ordering of . Thus the range of movement of the second vertex of 3-stable triangles rooted at is bounded by the second vertices of triangles and in the clockwise ordering, and the range of movement of the third vertex of 3-stable triangles rooted at is bounded by the third vertices of triangles and . Let denote the index of the second vertex of and so on.
Obviously we never passed through . Also for are ordered by their indices. Also since the 3-stable triangles are interleaving, the range of the indices we trace by the third vertex of any 3-stable triangles do not overlap (or overlap with at most one vertex). All together is bounded by , and thus the total number of 3-stable triangles is bounded by .
∎
5 A quadratic-time triangle algorithm
In this section, we present a quadratic-time algorithm to find the largest-area inscribed triangle. Let be a given convex polygon. Recall that the largest-area triangle is 3-stable. The idea of the algorithm is to find all 3-stable triangles in : for each vertex we find all 2-stable triangles rooted at in a single linear pass; because all 3-stable triangles are also 2-stable for some vertex, we find all 3-stable triangles.
In step of Algorithm 2, we let be the root, and start searching from and its two subsequent vertices and on . In contrast to Algorithm 1, each time we move , we reset and , but just like in Algorithm 1, each time we move , stays where it is. This means each step of the algorithm now takes linear time, and the total algorithm takes quadratic time.
5.1 Correctness
We will start the correctness proof of Algorithm 2 by the following lemma.
Lemma 7**.**
Algorithm 2 considers all 2-stable triangles.
Proof.
Suppose the lemma is false. Then, there exists at least one 2-stable triangle rooted at that the algorithm cannot find when . First assume that during the algorithm, at some point, will reach . While is at , will traverse some sequence of vertices of ; let be the first vertex of . If is not in , there are two cases: comes before , or comes after .
If comes before , then already passed before reached . This means that was at some point when passed . But now, and would both be -stable, but not interleaved, contradicting Lemma 2 (see Figure 8(left)).
If comes after , then already moved away from before reaches , say, when was at another vertex . But then, was -stable. However, is also -stable, contradicting the definition of -stability.
Now suppose we missed because did not reach before reaches . But then, passed both and , so when this happens and are not interleaved, a contradiction with Lemma 2 (see Figure 8(right)). ∎
Theorem 1**.**
Algorithm 2 will find the largest-area triangle in time.
Proof.
The correctness of the algorithm depends on three facts. First, the largest-area triangle is always a 3-stable triangle; second, in the above procedure we will find all 3-stable triangles; and third, the set of all 3-stable triangles is a subset of the set of all 2-stable triangles. The correctness of the first and third facts are obvious. In Lemma 2 we proved we will consider all the 2-stable triangles. Thus we can conclude the Algorithm 2 works correctly.
∎
6 A divide-and-conquer triangle algorithm
In this section, we will provide a more efficient algorithm for finding the largest-area inscribed triangle on a convex polygon. We will use the following previously established lemmas.
Lemma 8** ([11, Lemma 2.2]).**
A globally largest-area -gon and a largest-area rooted -gon interleave.
Lemma 9**.**
The largest-area rooted triangle can be found in linear time.
Proof.
The largest area triangle rooted at an arbitrary fixed vertex of can be found via one step of Algorithm 2. In the correctness proof of that algorithm we mentioned that we can find all the 2-stable triangles on any given root in linear time. The largest-area rooted triangle can also be found in linear time. ∎
6.1 Algorithm
In the first step of the algorithm we choose an arbitrary vertex on and compute the largest-area triangle rooted at . We call this triangle . decomposes the boundary of into three intervals that share their endpoints. Let be the median vertex on the largest of these intervals (largest in terms of complexity). We then compute the largest-area rooted triangle on , . We call and dividing triangles. The vertices of and subdivide into six intervals that share their endpoints; Figures 9a and 9b show two possible configurations.
Recall that, by Lemma 8, the largest-area triangle must interleave with both and . This implies that, once we fix the interval that contains one vertex of , the other two vertices are constrained to lie in two pairwise disjoint intervals. Depending on the configuration, there could be either one or two sets of three compatible intervals; if there are two, they must interleave.
As a result, we construct either one or two smaller polygons or and by directly connecting these intervals.
In the second step, we will repeat the above procedure again by finding another largest triangle rooted on an arbitrary vertex of (or ), and another largest triangle rooted on the median vertex of the largest sub-interval of (or ) induced by .
Recursively repeating this, we show that for some subproblem in step of the algorithm (note that in step there may be up to separate subproblems) if and are interleaving triangles in , we decompose the problem into two smaller subproblems, and if they are not interleaving, we get a single smaller subproblem. In all cases, the size of each subproblem is between and times the size of the previous subproblem, and in the case where we have two subproblems, the sum of their sizes equals the size of the previous subproblem plus .
We will repeat the procedure of constructing dividing triangles in each step on one or two smaller polygons, until our subproblems become triangles themselves; in this case we simply return the area of the triangle. This procedure is outlined in Algorithm 3.
6.2 Time complexity
We start analyzing the time complexity of the algorithm with the following lemma.
Lemma 10**.**
Let be a convex polygon with vertices. The (one or two) subproblems induced by have size at most .
Proof.
The dividing triangles and decompose the boundary of into six intervals. Let and be the two intervals incident to . Only one of or can include a vertex of the largest-area triangle, otherwise the largest-area triangle would no longer interleave both and . Consider the (between and ) vertices not part of or . Because of the choice of , both and contain at least a factor of these vertices, so each (see Figure 9b). Since one subproblem does not contain , and the other subproblem does not contain , each subproblem has size at most . ∎
Note that, if splits into two subproblems and , then .
So the recursive equation of the divide-and-conquer algorithm is
[TABLE]
where , by Lemma 10.
By using and considering the maximum part of the above equation, and using the method of Akra and Bazzi [27], the recursion can be written as
[TABLE]
and as is in , is bounded by .
6.3 Correctness
For the correctness proof of Algorithm 3 we will show that in each step of the recursion we always transfer all three vertices of the largest-area triangle to the same subproblem (or to both subproblems, if and only if or ).
Lemma 11**.**
*In each step of Algorithm 3, there is always at least one subproblem containing all three vertices of the largest-area triangle . *
Proof.
Let be a convex polygon, and consider the dividing triangles and . If or , clearly both subproblems of contain all three vertices of .
Otherwise, consider a subproblem and suppose it does not contain all three vertices , , and of ; say (w.l.o.g.) contains but not . We know must interleave both and . But then must be in . This is only possible if is a vertex of or . ∎
Theorem 2**.**
Algorithm 3 finds the largest-area triangle in time.
7 Largest-area quadrangle
Let be a convex polygon with vertices. In the reminder, we denote by the largest (by area) -aligned polygon with vertices. Also we denote for -aligned polygons with vertices. A polygon is -stable where it has stable vertices.
Note that all the vertices of are stable, but a -stable does not necessarily coincides with the , as illustrated in Figure 11.
Indeed the idea of the presented method [1] was based on starting with a rooted and moving the vertices of around the given polygon where keeping the cyclic ordering of and increasing the area, and updating the area while finding a larger -stable rooted polygon.
This procedure will result in keeping the sequence of the area of the potential solution only increasing. The authors [1] named this attribute as the unimodality of the area, but we illustrated in Figure 13 that keeping the unimodality will not result in finding the optimal solution necessarily.
7.1 Dobkin and Snyder’s algorithm for
We will now recall the quadrilateral algorithm [1], that is outlined in Algorithm 4 and illustrated in Figure 10.
Let . We assume that is given in a counter clockwise orientation. Assume an arbitrary vertex of is is the root of the algorithm, assign this vertex and its three subsequent vertices in the counter clockwise order on the boundary of to variables , and . We then “move forward” along the boundary of as long as this increases the area of .
If we can no longer advance , we advance if this increases the area of , then try again to advance . If we can no longer advance and , we advance if this increases the area of , then try again to advance and .
If we cannot advance either , or any further, we advance . We keep track of the largest-area quadrilateral found, and stop when returns to the starting position. Since visits vertices and , and each visit fewer than vertices, the algorithm runs in time (assuming we are given the cyclic ordering of the points on ).
Indeed, Algorithm 4 is based on an observation that the largest inscribed quadrilateral treats as a unimodal function, which is not correct. But, of course there is an quadrilateral with some vertices to be stable, that Algorithm 4 will find it in linear-time, but our counter example shows that the reported quadrilateral does not necessarily equal to . Furthermore, the reported quadrilateral is not even 4-stable.
7.2 Counter-example to Algorithm 4
In Figure 12 we provide a polygon on vertices such that and the largest-area inscribed quadrilateral computed by Algorithm 4 are not the same.
We use the following points: . The largest-area quadrilateral is ; however, Algorithm 4 reports as the largest-area quadrilateral, while starting the algorithm from an arbitrary root. The results of running Algorithm 4 while starting on root are demonstrated on Figure 13. Thus, the algorithm fails to find on any possible root.
8 Implications
Our discovery directly or indirectly affects the results of the following studies.
8.1 Largest-area -gon inscribed in a convex polygon
As mentioned, the Dynamic Programming method presented by Boyce et al. [1] for finding the largest-area -gon starts looking for the optimal answer from the largest-area rooted triangle. Aggarwal et al. [12] improve their result to time by using a matrix search method. The method that Boyce et al. [1] use to find the largest-area rooted triangle is again based on the assumption that there is only one stable triangle on each vertex of the polygon. So, they start their algorithm from a non-optimal answer. Also in their algorithm, they compute intervals and they look for one point per interval, and these intervals are computed according to the starting situation. So they fail to find the largest area -gon that is inscribed in a convex polygon.
In Lemma 9 we proved that the globally largest-area rooted triangle can be found in linear time. As such, it is relatively straightforward to correct their algorithm by changing the first step of their algorithm.
8.2 Largest-Area Triangle inscribed in a set of imprecise points
Keikha et al. [25] consider the question of finding bounds on the area of the largest-area triangle in a set of imprecise points: points that are known to be in a given region in space. Their algorithm for computing the largest-area triangle on a given set of imprecise points modeled by parallel line segments was based on the Dobkin and Snyder algorithm [1], and thus also fails to find the optimal answer. Two cases in particular are impacted. When the imprecise points are modeled as unit-length segments, their algorithm directly applies the largest-area triangle algorithm. This algorithm can easily be fixed by using our new divide-and-conquer algorithm instead, but this will result in a running time of , while a running time of was reported in [25]. In contrast, when the imprecise points are modeled as segments of arbitrary length, their solution does not directly apply the largest-triangle algorithm but is rather based on the stability of certain triangles. With a slightly extended analysis, the reported running time of can still be achieved.
8.3 Convex hull of a simple polygon
Bhattacharia et al. [26] applied the idea of unimodality of the vertical distance of a moving vertex on the boundary of a convex polygon from one of its edges to compute the convex hull of a simple polygon in linear time. Specifically, they use the fact that there is one vertex on a convex polygon with maximum distance from an edge of . Using this fact, they decompose their problem into two subproblems by computing two half convex chains, one chain starting from and ending at , and the other starting from and ending at . On each subproblem, they use a stack which stores some vertices, such that the triangles consisting of one vertex of and a fixed edge of are only increasing in the order in which they are stored in the stack. But as there is only one non-fixed vertex (for considering the area of a triangle with a fixed base) in each step of the algorithm [26], the application of the idea of changing the area of an inscribed triangle by moving only one of its vertices [1] is still correct. Therefore, the correctness of the results of [26] is not impacted by our discovery.
8.4 Critical Triangle
Kallus [28] applied the Pentagon Lemma [1] to compute the critical triangle in a convex compact subset of ; , where the critical triangle is an inscribed triangle with maximum area that the critical determinant of is equal to twice the area of . As the Pentagon Lemma [1] is still correct, the correctness of the results of [28] is not impacted by our discovery. They called is extensible if there is a domain containing but different from it that has the same critical determinant as . Otherwise, is inextensible.
9 Discussion
To summarize, we disproved the linear-time algorithm presented by Dobkin and Snyder [1] for computing the largest-area inscribed triangle by presenting a -vertex polygon, on which the algorithm fails to output the optimal solution. Dobkin and Schnyder’s algorithm also fails to find the largest-area 4-gon in a convex polygon. For and for , it was already known that their algorithm fails, so this now conclusively shows that the algorithm is wrong for all possible valies of k.
We also presented a divide-and-conquer algorithm for computing the largest inscribed -gon which runs in time. Our findings reopen the question of whether the largest-area quadrangle in a convex polygon can be found in linear time.
There remains a significant gap between the best know algorithm by Boyce et al. [11], which runs in time, and the lower bound of [12].
Acknowledgments
The authors would like to thank everybody who has discussed this discovery and its implications with them over the past months, in particular Bahareh Banyassady, Ahmad Biniaz, Prosenjit Bose, Yoav Kallus, Kshitiz Kumar, Manish Kumar Bera, Benjamin Raichel, Lena Schlipf, and the participants of Dagstughl Seminar 17171 on Computional Geometry, for their useful comments and insights. Maarten Löffler was partially supported by the Netherlands Organization for Scientific Research (NWO) under project no. 614.001.504.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] D. P. Dobkin, L. Snyder, On a general method for maximizing and minimizing among certain geometric problems, in: 20th Annual Symposium on Foundations of Computer Science (sfcs 1979), 1979, pp. 9–17. doi:10.1109/SFCS.1979.28.
- 2[2] S. Chandran, D. M. Mount, A parallel algorithm for enclosed and enclosing triangles, International Journal of Computational Geometry & Applications 02 (02) (1992) 191–214. ar Xiv:http://www.worldscientific.com/doi/pdf/10.1142/S 0218195992000123, doi:10.1142/S 0218195992000123. URL http://www.worldscientific.com/doi/abs/10.1142/S 0218195992000123
- 3[3] V. Keikha, M. Löffler, J. Urhausen, I. van der Hoog, Maximum-area triangle in a convex polygon, revisited, Co RR abs/1705.11035. ar Xiv:1705.11035. URL http://arxiv.org/abs/1705.11035
- 4[4] Y. Kallus, A linear-time algorithm for the maximum-area inscribed triangle in a convex polygon, Co RR abs/1706.03049. ar Xiv:1706.03049. URL http://arxiv.org/abs/1706.03049
- 5[5] K. Jin, Maximal Area Triangles in a Convex Polygon, Ar Xiv e-printsar Xiv:1707.04071.
- 6[6] O. Pârvu, D. Gilbert, Implementation of linear minimum area enclosing triangle algorithm, Computational and Applied Mathematics 35 (2) (2016) 423–438.
- 7[7] M. I. Shamos, Problems in computational geometry, unpublished manuscript, 1975.
- 8[8] M. I. Shamos, Computational geometry. ph.d. thesis. (May 1978) 1978.
