Next Article in Journal
Stability Evaluation Method of Hole Wall for Bored Pile under Blasting Impact
Previous Article in Journal
New Elements of Analysis of a Degenerate Chenciner Bifurcation
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Counting Non-Convex 5-Holes in a Planar Point Set

Division of AI Computer Science and Engineering, Kyonggi University, Suwon 16227, Korea
*
Author to whom correspondence should be addressed.
Symmetry 2022, 14(1), 78; https://doi.org/10.3390/sym14010078
Submission received: 9 December 2021 / Revised: 23 December 2021 / Accepted: 28 December 2021 / Published: 5 January 2022
(This article belongs to the Section Mathematics)

Abstract

:
Let S be a set of n points in the general position, that is, no three points in S are collinear. A simple k-gon with all corners in S such that its interior avoids any point of S is called a k-hole. In this paper, we present the first algorithm that counts the number of non-convex 5-holes in S. To our best knowledge, prior to this work there was no known algorithm in the literature except a trivial brute force algorithm. Our algorithm runs in time O ( T + Q ) , where T denotes the number of 3-holes, or empty triangles, in S and Q that denotes the number of non-convex 4-holes in S. Note that T + Q ranges from Ω ( n 2 ) to O ( n 3 ) , while its expected number is Θ ( n 2 log n ) when the points in S are chosen uniformly and independently at random from a convex and bounded body in the plane.

1. Introduction

Let S be a set of n points in the plane that are in general position; that is, no three points in S are collinear. For each k 3 , a k-gon in S is a simple polygon with k corners that are members of S. A k-hole in S is an empty k-gon, that is, its interior does not contain any point in S, so is an empty k-gon. In this paper, we focus on the number of k-holes in S for a fixed k 3 , and address the problem of counting non-convex k-holes in a given set S, in particular for k = 5 .
The problem of counting or enumerating k-gons or k-holes has been studied for decades by many researchers. It is obvious that counting objects of a particular type is not as hard as enumerating them, since we can count them by enumeration. Dobkin et al. [1] in 1990 presented an algorithm that enumerates all convex k-holes in time O ( h 3 ( S ) + k · h k ( S ) ) , where h k ( S ) denotes the number of k-holes in S. This algorithm, in particular, for k = 3 , 4 takes time O ( h k ( S ) ) , proportional to the number of reported k-holes. Rote et al. [2] studied the problem of counting convex k-gons in S and presented an O ( n k 2 ) -time algorithm. This was improved to O ( k n 3 ) time for k 6 by Mitchell et al. [3] after Rote and Woeginger [4]. Mitchell et al. [3] also solved the problem of counting convex k-holes in the same time O ( k n 3 ) , and it was very recent that the second author improved this to O ( k h 3 ( S ) ) time [5]. The number h 3 ( S ) of empty triangles in S ranges between Ω ( n 2 ) and O ( n 3 ) , while the expected value of h 3 ( S ) is proven to be Θ ( n 2 ) if the points in S are uniformly chosen from a convex and bounded body in the plane [6,7].

1.1. Our Contribution and Approach

The problem of counting non-convex k-holes, however, has not received enough attention for a long time. Very recently, the authors showed how to count non-convex 4-holes in S in O ( h 3 ( S ) ) time [8].
In this paper, we continue our efforts, and present an algorithm that precisely counts non-convex 5-holes in a given set S. Our main contribution is summarized by the following theorem.
Theorem 1.
Let S be a set of n points, no three of which are collinear. The number of non-convex 5-holes in S can be computed in  O ( h 3 ( S ) + h ^ 4 ( S ) )  time, where  h 3 ( S )  denotes the number of empty triangles in S and  h ^ 4 ( S )  denotes the number of non-convex 4-holes in S.
To our best knowledge, prior to this work, there was no known algorithm that counts non-convex k-holes in a given set S of points for k 5 in the literature, except a trivial exhaustive enumeration algorithm taking O ( n k + 1 ) time. Our algorithm takes O ( h 3 ( S ) + h ^ 4 ( S ) ) time, where h ^ 4 ( S ) denotes the number of non-convex 4-holes in S. The number h ^ 4 ( S ) of non-convex 4-holes in S varies from 0 to O ( n 3 ) [9], while its expected number has been known to be Θ ( n 2 log n ) by Fabilia-Monroy et al. [10] when the points in S were chosen uniformly at random from a convex and bounded body. Hence, our algorithm is expected to run in O ( n 2 log n ) time for random points S, while its worst-case running time is bounded by O ( n 3 ) . See the below and Table 1 for more details on the known bounds on the number h k ( S ) of convex k-holes and the number h ^ k ( S ) of non-convex k-holes for each k 3 .
In order to count 5-holes in S, we start with a simple fact that any pentagon is decomposed into three triangles. Conversely, a 5-hole can be obtained by attaching three empty triangles that are adjacent side by side. Of these three triangles, the one adjacent to the other two is called a middle triangle of the pentagon. We give a classification of middle triangles of 5-holes into four types according to the relative positions of the other two triangles, and reveal a crucial relation between the number of diagonals of 5-holes and the types of middle triangles. This observation enables us several different ways of counting 5-holes with multiplicity, together with the structural properties of 3-holes (i.e., empty triangles) and 4-holes known by the previous paper [8]. In turn, we obtain a system of linear equations of a constant number of variables, and the number of non-convex 5-holes in S can be computed by solving the system.

1.2. Related Work

Combinatorial and algorithmic studies on k-gons and k-holes were initiated by Erdős and Szekeres [15] in 1935, and are still being continued by many researchers today.
In 1935, Erdős and Szekeres asked the least number N ( k ) for k 3 such that any set of N ( k ) points in general position in R 2 contains a convex k-gon [15,16]. This problem is known as the Erdős–Szekeres problem. It is proven that N ( 4 ) = 5 , N ( 5 ) = 9 [15], and N ( 6 ) = 17 [17]. The exact value of N ( k ) for k 7 is unknown. Erdős and Szekeres [15] also proved an upper bound N ( k ) 2 k 4 k 2 + 1 and conjectured that N ( k ) = 2 k 2 + 1 for each k 2 . Note that the conjecture holds for k 6 . Erdős and Szekeres later proved a matching lower bound N ( k ) 2 k 2 + 1 in 1961 [16]. Suk [18] in 2017 made a breakthrough N ( k ) 2 k + O ( k 2 / 3 log k ) . Currently, the best upper bound is N ( k ) 2 k + O ( k log k ) due to Holmsen et al. [19].
In 1978, Erdős also posed an empty version of the Erdős–Szekeres problem which asks the least number H ( k ) for k 3 such that any set of H ( k ) points in general position contains a convex k-hole [20]. Some known results on H ( k ) are as follows: H ( 3 ) = 3 and H ( 4 ) = 5 are easy to see, H ( 5 ) = 10 is proved by Harborth [21], H ( 6 ) is bounded [22,23], and Horton [13] proved that H ( k ) for k 7 is unbounded and undefined.
As a variant of the Erdős–Szekeres problem, the possible number of convex k-gons and k-holes in a set of n points has been studied extensively in the literature. Here, we introduce only results on the number of k-holes; for more results on k-gons, we refer to survey papers by Morris and Soltan [24,25].
It is not difficult to see that the maximum possible number of convex k-holes is achieved when the points in S are in a convex position so that h k ( S ) n k = Θ ( n k ) . Thus, most of the research has focused on their minimum possible numbers and expected numbers when the points in S are chosen uniformly from a certain convex shape in the plane. For the minimum and expected number of convex k-holes, currently, the best bounds are summarized in Table 1. Some important bounds are as follows. Note that h k ( S ) can be zero for any k 7 and some sets S of any size n by Horton [13]. Bárány and Füredi [6] showed that the minimum of h k ( S ) over all sets S of n points is Θ ( n 2 ) for k { 3 , 4 } and is between Ω ( n ) and O ( n 2 ) for k { 5 , 6 } . There has been constant effort to improve the hidden constants in the O ( · ) and Ω ( · ) . For more history, see Bárány and Valtr [11], Valtr [26], Dumistrescu [27], Pinchasi, Radoičić, and Sharir [28], and references therein. A recent breakthrough was due to Aichholzer et al. [14] who showed that the minimum possible number of convex 5-holes is at least Ω ( n log 4 / 5 n ) . Bárány and Füredi [6] showed that the expected value of h 3 ( S ) is Θ ( n 2 ) when the points in S are chosen uniformly from a unit square. Recently, Balko et al. [7] extended this result to any higher-dimensional space and any convex body of unit measure from which points are chosen uniformly at random.
Despite a huge amount of results on convex k-gons and k-holes, it was relatively recent that the first nontrivial bounds on the minimum and maximum numbers of non-convex k-gons and k-holes were proven. Aichholzer et al. [9] and Aichholzer et al. [12] established several new bounds on the maximum/minimum possible number of non-convex k-gons and k-holes for k 4 . Let h ^ k ( S ) be the number of non-convex k-holes in S, and let h ¯ k ( S ) : = h k ( S ) + h ^ k ( S ) be the number of k-holes in S, regardless of being convex or non-convex. Specifically, they showed that the minimum of h ¯ k ( S ) is between Ω ( n 2 ) and O ( n k + 1 2 log k 3 n ) and the maximum of h ^ k ( S ) is Θ ( n k 1 ) for each k 4 . Fabila-Monroy et al. [10] proved that the expected number of h ^ 4 ( S ) is 12 n 2 log n + o ( n 2 log n ) when the points in S are chosen uniformly from a convex and bounded body. This also improves the upper bound of the minimum number of h ¯ 4 ( S ) to O ( n 2 log n ) . Again, see Table 1 for the current best bounds on the minimum, maximum, and expected numbers of h ^ k ( S ) and h ¯ k ( S ) .

1.3. Organization of the Paper

The rest of the paper is organized as follows. Section 2 introduces some necessary preliminaries and facts on empty triangles and empty quadrilaterals, that is, 3-holes and 4-holes known in the literature, for further discussion on our algorithm that counts 5-holes. Section 3 is devoted to provide crucial properties of 5-holes in terms of their middle triangles. Our counting algorithm is described and analyzed in Section 4. We finally conclude this paper with remarks and open problems in Section 5.

2. Preliminaries

Throughout the paper, we consider a standard orthogonal coordinate system in the plane R 2 with the x- and y-coordinates, from which we may say that a point is to the left, to the right, below, or above another point in a normal sense. For any two points p , q R 2 , the line segment joining p and q will be denoted by p q ¯ .
A polygon with k corners is represented by a cyclic sequence of its corners p 1 p 2 p k . When we write any polygon by its corner sequence p 1 p 2 p k , it is imposed that the corners are traversed in counterclockwise order. A diagonal of a polygon is a segment between its two nonadjacent corners that does not stick out of the polygon. Any convex k-gon has k 2 = k ( k 1 ) / 2 distinct diagonals, while any non-convex k-gon has a strictly smaller number of those.
Let S be a given set of n points in general position in the plane so that no three points in S are collinear. For any k 3 , let h k : = h k ( S ) , h ^ k : = h ^ k ( S ) , and h ¯ k : = h ¯ k ( S ) for simplicity. For any p S , let S p be the cyclic array consisting of points in S \ { p } in counterclockwise order around p. The sorted cyclic arrays S p for all p S can be obtained in total O ( n 2 ) time by constructing the arrangement of n lines dual to the points in S and traversing the arrangement. See Dobkin et al. [1] and Rote et al. [2].

2.1. Empty Triangles and Their Structures

For any two distinct points p , q S , let T p q be the set of all points r S \ { p , q } such that the triangle p q r is empty, and we obtain p, q, and r in this order when we traverse the boundary of the triangle in the counterclockwise direction from p. Similarly, let T q p be the set of all points r S \ { p , q } such that the triangle q p r is empty, and we obtain q, p, and r in this order when we traverse the boundary of the triangle in the counterclockwise direction from q. Note that T p q and T q p are separated by the line through p and q, and that T p q T q p consists of all points r S such that the triangle constructed with p q ¯ and a third corner r is empty. See Figure 1 for an illustration.
The following is an immediate identity by a common counting technique.
Lemma 1.
It holds that  p S q S p | T p q | = 3 h 3 .
Proof. 
Consider any empty triangle a b c in S. Then, the triangle a b c is involved in exactly three sets T a b , T b c , and T c a in such a way that c T a b , a T b c , and b T c a . Hence, in the sum p S q S p | T p q | , each empty triangle is counted exactly three times, so we have the claimed equation.    □
The authors have proved the following in a previous paper [8].
Lemma 2 
(Sung and Bae [8]). For any pair  ( p , q ) S × S  with  p q , the points in  T p q  appear in the same counterclockwise order, both around p and q. For all such pairs  ( p , q ) , the points in  T p q  can be computed and sorted in this order in total  O ( h 3 )  time into a sorted array.
By an abuse of notation, we shall mean by T p q the sorted array of itself obtained by the above lemma. Additionally, for any positive integer i, let T p q [ i ] denote the i-th point in the array T p q . In Figure 1, the points in T p q and T q p and their indices are depicted.

2.2. Empty Quadrilaterals

Fix two points p , q S with p q , and any point r = T p q [ i ] in T p q . Consider the two directed rays emanating from r towards p and q, respectively, denoted by γ 1 and γ 2 , respectively. We associate with T p q [ i ] the following: Let A p q [ i ] be the largest index j 1 of T q p such that T q p [ j 1 ] lies on the right side of γ 1 , or A p q [ i ] = 0 if there is no point in T q p on the right side of γ 1 ; let B p q [ i ] be the largest index j 2 of T q p such that T q p [ j 2 ] lies on the right side of γ 2 , or B p q [ i ] = 0 if there is no point in T q p on the right side of γ 2 . See Figure 2 for an illustration. These values are essential to count the number of convex and non-convex 4-holes, as shown in the Ref. [8], in which all these values can be computed in O ( h 3 ) time.
Lemma 3 
(Sung and Bae [8]). Let  p , q S  with  p q  be fixed. For any  1 i | T p q | 1 , it holds that  A p q [ i + 1 ] A p q [ i ]  and  B p q [ i + 1 ] B p q [ i ] . The values of  A p q [ i ]  and  B p q [ i ]  for all  1 i | T p q |  can be computed in  O ( | T p q | + | T q p | )  time.
Consider an empty triangle p q r in S with r T p q . Any 4-hole with p q as a diagonal can be obtained by gluing p q r and another empty triangle q p s with s T q p along the side p q . The resulting 4-hole p s q r can be either convex or non-convex. The authors have shown the following. Let i be such that r = T p q [ i ] , and j be such that s = T q p [ j ] . Then the 4-hole p s q r is convex if, and only if A p q [ i ] < j B p q [ i ] . This directly provides a way of counting 4-holes having p q ¯ as a diagonal, being separately convex and non-convex.
Lemma 4 
(Sung and Bae [8]). Let  p , q S  with  p q  be fixed. Then,  p s q r  is a 4-hole for  r , s S  with a diagonal  p q ¯  if, and only if  r T p q  and  s T q p . Moreover, if  r = T p q [ i ]  and  s = T q p [ j ]  for indices  1 i | T p q |  and  1 j | T q p | , then the following hold:
(i) 
The 4-hole  p s q r  is convex if, and only if  A p q [ i ] < j B p q [ i ] .
(ii) 
The 4-hole  p s q r  is non-convex if, and only if  j A p q [ i ]  or  j > B p q [ i ] .
Therefore, the number of convex 4-holes  p s q r  for fixed  p , q S  and  r = T p q [ i ]  is exactly  B p q [ i ] A p q [ i ] , and the number of those that are non-convex is exactly  | T q p | ( B p q [ i ] A p q [ i ] ) .
The statements in Lemma 4 can also be verified in Figure 2. Consider the example depicted in Figure 2 in which i = 4 and r = T p q [ 4 ] . Then, any convex 4-hole of the form p s q r should choose s T q p to be between the two rays γ 1 and γ 2 , so if s = T q p [ j ] , then j must be between A p q [ 4 ] + 1 and B p q [ 4 ] . On the other hand, non-convex 4-holes are constructed by choosing s = T q p [ j ] with 1 j A p q [ 4 ] or B p q [ 4 ] < j | T q p | .
Lemma 4 provides a way of counting convex and non-convex 4-holes, by iterating all p , q S and r T p q .
Lemma 5.
It holds that
h 4 = 1 4 p S q S p 1 i | T p q | ( B p q [ i ] A p q [ i ] ) a n d h ^ 4 = 1 2 p S q S p | T p q | · | T q p | 1 i | T p q | ( B p q [ i ] A p q [ i ] ) .
Proof. 
The above equations immediately follow from Lemma 4.    □

3. Middle Triangles of Empty Pentagons

It is obvious and well-known that any simple k-gon, being either convex or non-convex, can be decomposed into exactly k 2 triangles by cutting it along two non-crossing diagonals. Such a decomposition is called a triangulation of a polygon. Any pentagon, hence, admits a triangulation of exactly three triangles. This implies that any simple pentagon has at least two diagonals. More generally, we observe the following.
Lemma 6.
Let P be any simple pentagon. The number of diagonals of any simple pentagon is between two and five. Moreover, a simple pentagon has five diagonals if, and only if it is convex.
Proof. 
As discussed above, any simple pentagon admits a triangulation of three triangles. Therefore, there must be at least two diagonals.
For each corner v of any simple pentagon, it is adjacent to two other corners, so there are, at most, two corners that can be joined with v by diagonals. This implies that the maximum number of diagonals of a simple pentagon is five, and this can be achieved only when it is convex.    □
In any triangulation of a pentagon P, there must be a triangle bounded by two diagonals of the pentagon P. Such a triangle in P is called a middle triangle of P. In general, a simple pentagon has at least one middle triangle as it has a triangulation, while it may not be unique.
Consider an empty pentagon, or a 5-hole, P in the given set S of points. Let p q r be a middle triangle of P such that q r ¯ and r p ¯ are diagonals of P and p q ¯ is a side of P. Then, p q r is an empty triangle in S and P can be written as P = p q x r y where x , y S are the other two corners of P. The two triangles p r y and q x r are also empty, and hence we have that x T r q and y T p r .
Assume without loss of generality that p q ¯ is horizontal and r is above the line extending p q ¯ . Let y be the directed line through p and towards r, and x be the directed line through q and towards r. Observe that y lies in the left side of y and x lies in the right side of x , since P is a simple pentagon. Let X be the half-plane on the left side of x and Y be the half-plane on the right side of y . Hence, we have x X and y Y .
These regions X and Y are further partitioned as follows: The region X is partitioned into three regions X + , X 0 , and X by two lines x and such that X + = X Y , X is the region below , and X 0 = X \ ( X + X ) . Analogously, Y is partitioned into three regions Y + , Y 0 , and Y by y and such that Y + = X + = X Y , Y is the region below , and Y 0 = Y \ ( Y + Y ) . See Figure 3 for an illustration.
We classify each middle triangle p q r of a 5-hole P = p q x r y into one of the following four types, depending on the locations of x and y. We say that the middle triangle p q r of P is of:
(a)
type 00 if x X 0 and y Y 0 ,
(b)
type 0 if either x X 0 and y Y , or x X and y Y 0 ,
(c)
type 0 + if either x X 0 and y Y + , or x X + and y Y 0 , or
(d)
type + , otherwise, if x X + X and y Y + Y .
We observe fundamental properties of a 5-hole that has a middle triangle of each specific type.
Lemma 7.
Let  P = p q x r y  be any 5-hole in S such that  p q r  is a middle triangle of P. Let d be the number of diagonals and m be the total number of middle triangles of P. Then, the following holds according to the type of  p q r .
(a) 
If  p q r  is of type 00, then either  d = 5  or  d = 4 .
  • If  d = 5 , then  m = 5  and the other four middle triangles are all of type 00.
  • If  d = 4 , then  m = 3  and the other two middle triangles are all of type  0 .
(b) 
If  p q r  is of type  0 , then either  d = 4  or  d = 3 .
  • If  d = 4 , then  m = 3  and the other two middle triangles are of type  0  and 00, respectively.
  • If  d = 3 , then  m = 2  and the other middle triangle is of type  0 + .
(c) 
If  p q r  is of type  0 + , then  d = 3  and  m = 2 . The other middle triangle is of type  0 .
(d) 
If  p q r  is of type  + , then  d = 2  and  m = 1 .
Proof. 
Consider each of the four types of the middle triangle p q r of 5-hole P = p q x r y . See Figure 4 for illustrations.
(a)
Suppose that p q r is of type 00, so we have x X 0 and y Y 0 . In this case, by Lemma 4, both 4-holes p q r y and p q x r are convex, so both y q ¯ and x p ¯ are diagonals of 5-hole P = p q x r y . There are two cases: either x y ¯ is a diagonal or not.
  • If x y ¯ is a diagonal, then there are d = 5 diagonals of P, including r p ¯ and r q ¯ , and m = 5 middle triangles of P: p q r , q x y , x r p , r y q and y p x . Observe that all these five middle triangles are of type 00. See the left figure of Figure 4a.
  • If x y ¯ is not a diagonal, then P has four diagonals, and three middle triangles: p q r , x r p , and r y q . Observe that x r p and r y q are of type 0 , while p q r is of type 00. See the right figure of Figure 4a.
(b)
Suppose that p q r is of type 0 , so either x X 0 and y Y , or x X and y Y 0 . We assume the former case without loss of generality since the other case is symmetric. In this case, by Lemma 4, 4-hole p q x r is convex while 4-hole p q r y is non-convex, so x p ¯ is a diagonal of P but y q ¯ is not. There are two cases: either x y ¯ is a diagonal or not.
  • If x y ¯ is a diagonal of P, then P has four diagonals and three middle triangles: p q r , x r p , and y p x . Observe that p q r and y p x are of type 0 , while x r p is of type 00 type. See the left figure of Figure 4b.
  • If x y ¯ is not a diagonal of P, then P has three diagonals and two middle triangles p q r and x r p . Observe that x r p is of type 0 + , while p q r is of type 0 . See the right figure of Figure 4b.
(c)
Suppose that p q r is of type 0 + , so either x X 0 and y Y + , or x X + and y Y 0 . We assume the former case without loss of generality, since the other case is symmetric. Similarly to the above case, the 4-hole p q x r is convex while the 4-hole p q r y is non-convex, so x p ¯ is a diagonal of P but y q ¯ is not. In this case, however, x y ¯ is always not a diagonal of P, since both x and y lie in a common side of the line through q and r. Thus, P has three diagonals and two middle triangles p q r and x r p . Observe that x r p is of type 0 , while p q r is of type 0 + . See Figure 4c.
(d)
Suppose that p q r is of type + , so x X + X and y Y + Y . Then, none of the segments x p ¯ and y q ¯ can be a diagonal of P, as both 4-holes p q x r and p q r y are non-convex by Lemma 4. Additionally, observe that the segment x y ¯ cannot be a diagonal of P, either, by the following reason: if x X + or y Y + , then corner r of P is a reflex vertex and, otherwise, if x X and y Y , then both p and q are reflex vertices of P. See Figure 4d. Therefore, the pentagon P has exactly two diagonals p r ¯ and q r ¯ , and only one middle triangle p q r of type + .
This completes the proof of the lemma.    □
From Lemma 7 and its proof, we further observe the following properties of 5-holes, depending on the number of its diagonals.
Lemma 8.
Let P be any 5-hole in S and d be the number of its diagonals.
(i) 
If  d = 5 , then P is convex and has five middle triangles of type 00.
(ii) 
If  d = 4 , then P has three middle triangles, two of which are of type  0  and the third of which is of type 00.
(iii) 
If  d = 3 , then P has two middle triangles, one of which is of type  0 +  and the other of which is of type  0 .
(iv) 
If  d = 2 , then P has a unique middle triangle of type  + .
Proof. 
Let P = p q x r y be any 5-hole such that p q r is a middle triangle, and let d be the number of its diagonals. By Lemma 6, we have 2 d 5 . We consider each case of d = 2 , 3 , 4 , 5 .
First, assume that d = 5 . By Lemma 7, the middle triangle p q r is of type 00, as, otherwise, there is no possibility that P has d = 5 diagonals. Again by Lemma 7 (a), we know that P has five middle triangles all of which are of type 00.
Second, assume that d = 4 . Then, by Lemma 7, we have that p q r is either of type 00 or type 0 . In the former case, Lemma 7 (a) states that P has two more middle triangles all of which are of type 0 . In the latter case, Lemma 7 (b) states that P has two more middle triangles, one of which is of type 00, and the other, which is of type 0 . We hence conclude that a 5-hole P with d = 4 diagonals has three middle triangles, two of which are of type 0 and the third of which is of type 00, in either case.
Next, assume that d = 3 . Then, by Lemma 7, we have that p q r is either of type 0 or type 0 + . In the former case, Lemma 7 (b) states that P has one more middle triangle of type 0 + . In the latter case, Lemma 7 (c) states that P has one more middle triangle of type 0 . Thus, a 5-hole P with d = 3 diagonals has two middle triangles, one of which is of type 0 , and the other of which is of type 0 + .
Finally, assume that d = 2 . In this case, from Lemma 7, we know that p q r must be of type + , and it is the unique middle triangle.    □
The above lemma suggests a natural way of classification of pentagons according to the number of diagonals and middle triangles. In the following section, we describe our algorithm that counts the number of 5-holes with d diagonals separately for d { 2 , 3 , 4 , 5 } in a given set S of points, so it separately counts convex and non-convex 5-holes in S.

4. Counting Empty Pentagons

Let S be a given set of n points in general position, as declared above. For d { 2 , 3 , 4 , 5 } , denote by z d the number of 5-holes in S that have d diagonals. By Lemma 6, the number of convex 5-holes in S is h 5 = h 5 ( S ) = z 5 , and the number of non-convex 5-holes is h ^ 5 = h ^ 5 ( S ) = z 2 + z 3 + z 4 .
In this section, we describe an algorithm that precisely computes z d for each d { 2 , 3 , 4 , 5 } . Our algorithm indeed counts the number of middle triangles of 5-holes in S in several different ways, resulting in a sufficient number of linear equations on { z 2 , z 3 , z 4 , z 5 } . Hence, we can finally solve the system of linear equations to specify the values of z d for all d { 2 , 3 , 4 , 5 } .
More specifically, for each empty triangle p q r , we count the number of 5-holes that have p q r as a middle triangle of a specific type. This can be done by attaching two other empty triangles to p q r along shared sides.

4.1. Attaching Two Empty Triangles to a Middle Triangle

As discussed in Section 3, any 5-hole can be partitioned into three empty triangles, one of which is a middle triangle. Conversely, we can construct all 5-holes by considering all possible ways of attaching two empty triangles to a tentative middle triangle along shared sides.
For our purposes, we consider each pair ( p , q ) S × S with p q . For each i { 1 , , | T p q | } , let r = T p q [ i ] . Then, consider the empty triangle p q r and all the pairs of empty triangles r q x and p r y that share sides q r ¯ and p r ¯ , respectively. Note that x T r q and y T p r by definition. The union p q r r q x p r y is clearly a 5-hole p q x r y such that p q r is a middle triangle, unless r q x and p r y overlap. This simply implies that the number of those 5-holes p q x r y is | T r q | · | T p r | , minus the number of pairs ( x , y ) T r q × T p r such that r q x and p r y overlap.
We can even think of those 5-holes p q x r y such that p q r is a middle triangle of a specific type. Specifically, for each p , q S and r T p q , we define Z 00 ( p , q ; r ) to be the number of pairs ( x , y ) T p r × T r q such that x X 0 and y Y 0 ; Z 0 + ( p , q ; r ) to be the number of those pairs ( x , y ) such that either x X 0 and y Y + , or x X + and y Y 0 ; Z 0 ( p , q ; r ) to be the number of those pairs ( x , y ) such that either x X 0 and y Y , or x X and y Y 0 ; and Z + ( p , q ; r ) to be the number of those pairs ( x , y ) such that either x X + X and y Y + Y , where the six regions X + , X 0 , X , Y + , Y 0 , Y are as defined in Section 3. See Figure 3.
These quantities are indeed the potential number of 5-holes p q x r y for fixed p , q S and r T p q such that the triangle p q r is a middle triangle of each specified type, while they count all those pairs ( x , y ) without considering whether r q x and p r y overlap or not.
One good point for the quantities is that they can be computed quite easily. Let X , X 0 , X + = Y + , Y 0 , Y be the five regions defined for a fixed p , q , r as in Section 3; see Figure 3. From the definition of the arrays A q r , B q r , A r p , B r p , we observe that the following relation between the region where x or y lies and their indices in T r q and T p r , respectively. See Figure 5 for an illustration.
Lemma 9.
Let  P = p q x r y  be any 5-hole in S such that  p q r  is a middle triangle of P. Denote by  i p  and  i q  the indices such that  p = T q r [ i p ]  and  q = T r p [ i q ] , and by  j x and j y  the indices such that  x = T r q [ j x ]  and  y = T p r [ j y ] . We then have
x X i f f 1 j x A q r [ i p ] x X 0 i f f A q r [ i p ] < j x B q r [ i p ] x X + i f f B q r [ i p ] < j x | T r q | a n d y Y i f f B r p [ i q ] < j y | T p r | y Y 0 i f f A r p [ i q ] < j y B r p [ i q ] y Y + i f f 1 j y A r p [ i q ] .
Proof. 
Recall the definition of A q r [ i p ] and B q r [ i p ] : A q r [ i p ] is the largest index j 1 of T r q such that T r q [ j 1 ] lies on the right side of the directed line through p towards q; B q r [ i p ] is the largest index j 2 of T r q such that T r q [ j 2 ] lies on the right side of the directed line through p towards r.
Hence, we have x X if, and only if 1 j x j 1 = A q r [ i p ] ; x X 0 if, and only if A q r [ i p ] = j 1 < j x j 2 = B q r [ i p ] ; x X + if, and only if B q r [ i p ] = j 2 < j x | T r q | . This proves the first part of the lemma. The second part for the range of j y can be seen in a symmetric and analogous way.    □
Lemma 9 directly implies the following.
Lemma 10.
For any  p , q S  with  p q  and  r T p q , the following equations hold:
Z 00 ( p , q ; r ) = ( B q r [ i p ] A q r [ i p ] ) · ( B r p [ i q ] A r p [ i q ] ) , Z 0 ( p , q ; r ) = ( B q r [ i p ] A q r [ i p ] ) · ( | T p r | B r p [ i q ] ) + A r q [ i p ] · ( B r p [ i q ] A r p [ i q ] ) , Z 0 + ( p , q ; r ) = ( B q r [ i p ] A q r [ i p ] ) · A r p [ i q ] + ( | T r q | B q r [ i p ] ) · ( B r p [ i q ] A r p [ i q ] ) , a n d Z + ( p , q ; r ) = | T r q | ( B q r [ i p ] A q r [ i p ] ) · | T p r | ( B r p [ i q ] A r p [ i q ] ) ,
where  i p  and  i q  denote the indices in arrays  T q r  and  T r p , respectively, such that  p = T q r [ i p ]  and  q = T r p [ i q ] .
Proof. 
By Lemma 9, we get the number of points x T r q in each of the three regions X , X 0 , and X + as follows. The number of x T r q such that x X is exactly A q r [ i p ] ; the number of x T r q such that x X 0 is exactly B q r [ i p ] A q r [ i p ] ; and the number of x T r q such that x X + is exactly | T r q | B q r [ i p ] .
Similarly, the number of y T p r such that y Y is exactly | T p r | B r p [ i q ] ; the number of y T p r such that y Y 0 is exactly B r p [ i q ] A r p [ i q ] ; and the number of y T p r such that y Y + is exactly A r p [ i q ] .
This directly implies the lemma.    □
Remember that the four quantities Z 00 ( p , q ; r ) , Z 0 ( p , q ; r ) , Z 0 + ( p , q ; r ) , and Z + ( p , q ; r ) count the number of pairs ( x , y ) with x T r q and y T p r without considering whether the corresponding triangles q x r and p r y overlap or not. In the following, we characterize a necessary and sufficient condition when the two triangles overlap. For any ordered triple ( a , b , c ) of distinct points in the plane, we say that ( a , b , c )  makes a left turn if c lies on the left side of the directed line through a towards b.
Lemma 11.
Let  p , q S  and  r T p q  be fixed. Let  x T r q  and  y T p r . The triangles  q x r  and  p r y  overlap if, and only if  x X + , y Y + , and ( x , r , y )  makes a left turn.
Proof. 
First, we observe that if q x r and p r y overlap, then x X + and y Y + . Assume for this purpose that x X 0 X . Then, the triangle q x r and the point y are separated by the line through p and r. This implies that q x r and p r y cannot overlap. Symmetrically, we have that q x r and p r y cannot overlap if y Y 0 Y . Hence, if q x r and p r y overlap, then x X + and y Y + .
Then, suppose that x X + and y Y + . For any x X + and y Y + , it holds that y q x r and x p r y since q x r and p r y are empty triangles. This implies that q x r and p r y overlap if, and only if ( x , r , y ) makes a left turn. See Figure 6. This concludes the lemma.    □
The above lemma implies the following: On one hand, the three quantities Z 00 ( p , q ; r ) , Z 0 ( p , q ; r ) , and Z 0 + ( p , q ; r ) are indeed the number of 5-holes of the form p q x r y with x T r q and y T p r such that p q r is a middle triangle of type 00, 0 , and 0 + , respectively. On the other hand, the quantity Z + ( p , q ; r ) , however, may not be the same as the number of 5-holes of the form p q x r y with x T r q and y T p r such that p q r is a middle triangle of type + , since it may count the cases of pairs ( x , y ) that cause an overlap of q x r and p r y . We let χ ( p , q ; r ) be the number of such pairs ( x , y ) , so Z + ( p , q ; r ) χ ( p , q ; r ) is equal to the number of 5-holes p q x r y such that p q r is a middle triangle of type + .
Lemma 12.
Let  p , q S  and  r T p q  be fixed. The value of  χ ( p , q ; r )  can be precisely computed in time  O ( | T r q | B q r [ i p ] + A r p [ i q ] + 1 ) , provided that the indices  i p  and  i q  such that  p = T q r [ i p ]  and  q = T r p [ i q ]  are known.
Proof. 
Here, we describe an algorithm that computes χ ( p , q ; r ) . This can be done by linearly scanning two sorted arrays T r q and T p r in limited ranges.
More precisely, we initially set an index variable j x to be B q r [ i p ] + 1 , and another j y to be 1. Additionally, prepare a counter-variable c, initially being zero. We perform the following while j x | T r q | and j y A r p [ i q ] : If ( T r q [ j x ] , r , T p r [ j y ] ) makes a left turn, then increase c by | T r q | j x + 1 and increase j y by 1; otherwise, if ( T r q [ j x ] , r , T p r [ j y ] ) makes a right turn, then increase j x by 1.
Since either j x or j y increases by one after every iteration, the total running time is bounded by O ( | T r q | B q r [ i p ] + A r p [ i q ] ) plus a constant O ( 1 ) ; hence, O ( | T r q | B q r [ i p ] + A r p [ i q ] + 1 ) , as claimed. Note that | T r q | B q r [ i p ] + A r p [ i q ] can be zero.
The correctness of this algorithm is guaranteed by Lemma 11 and the observation that if ( T r q [ j x ] , r , T p r [ j y ] ) makes a left turn, then so does ( T r q [ j x ] , r , T p r [ j y ] ) for all j x j x | T r q | .    □
Now, consider the sum of each of these values over all p , q S and r T p q . Define
Z 00 : = p S q S p r T p q Z 00 ( p , q ; r ) , Z 0 : = p S q S p r T p q Z 0 ( p , q ; r ) , Z 0 + : = p S q S p r T p q Z 0 + ( p , q ; r ) , Z + : = p S q S p r T p q Z + ( p , q ; r ) , and χ : = p S q S p r T p q χ ( p , q ; r ) .
We then have the following system of linear equations for z 2 , z 3 , z 4 , z 5 .
Lemma 13.
It holds that
Z 00 = z 4 + 5 z 5 , Z 0 = z 3 + 2 z 4 , Z 0 + = z 3 , a n d Z + = z 2 + χ .
Proof. 
The lemma can be shown directly from Lemmas 8, 10 and 11.
By Lemma 11, for each p , q S and r T p q , Z 00 ( p , q ; r ) , Z 0 ( p , q ; r ) , and Z 0 + ( p , q ; r ) count the number of 5-holes such that p q r is a middle triangle of type 00, 0 , and 0 + , respectively. This implies that their sums Z 00 , Z 0 , and Z 0 + count all middle triangles of type 00, 0 , and 0 + , respectively, of all 5-holes in S.
Consider every 5-hole in S. Then, Lemma 8 implies the following:
(a)
Every 5-hole with five diagonals contributes 5 counts in Z 00 , every 5-hole with four diagonals contributes 1 count in Z 00 , and none of those with three or less diagonals contributes in Z 00 .
(b)
Every 5-hole with four diagonals contributes 2 counts in Z 0 , every 5-hole with three diagonals contributes 1 count in Z 0 , and the others contribute nothing in Z 0 .
(c)
Every 5-hole with three diagonals contributes 1 count in Z 0 + and the others contribute nothing in Z 0 + .
(d)
Every 5-hole with two diagonal contributes 1 count in Z + .
Therefore, the first three equations are derived by Lemma 11, as discussed above.
In order to conclude the fourth equation, Lemma 11 implies that Z + ( p , q ; r ) χ ( p , q ; r ) is exactly the number of 5-holes such that p q r is a middle triangle of type + . Therefore, we have Z + = z 2 + χ .    □

4.2. Algorithm

Now, we are ready to describe our algorithm that precisely computes the values of z 2 , z 3 , z 4 , and z 5 . A high-level description of our algorithm is shown in Algorithm 1. Our algorithm consists of two phases: the preprocessing phase and the main computation phase. In the main computation phase, it computes the values of Z 00 , Z 0 , Z 0 + , Z + , and χ as defined above, and solve the system of equations shown in Lemma 13 to obtain the values of z 2 , z 3 , z 4 , and z 5 . In the preprocessing phase, we prepare some data structures for efficient processing of the main computation phase.
Algorithm 1 Count5Holes
1:
Compute all empty triangles in S and sorted arrays S p for all p S .
2:
Compute sorted arrays T p q , A p q , and B p q for all p , q S with p q .
3:
Build the dictionary D.
4:
Compute Z 00 , Z 0 , Z 0 + , Z + , and χ .
5:
Let z 2 Z + χ , z 3 Z 0 + , z 4 ( Z 0 z 3 ) / 2 and z 5 ( Z 00 z 4 ) / 5 .
6:
return ( z 2 , z 3 , z 4 , z 5 )
In the preprocessing phase, we start with enumerating all empty triangles in S by the algorithm of Dobkin et al. [1]. As discussed above, their algorithm takes O ( h 3 ) time. In the same time bound, we can specify the sorted arrays T p q by Lemma 2.
Additionally, we build a dictionary structure D on the set of all empty triangles that maps each empty triangle p q r to a triple ( i p , i q , i r ) of indices such that p = T q r [ i p ] , q = T r p [ i q ] , and r = T p q [ i r ] . The dictionary structure D can be implemented by a hash table with a perfect hash function since the set of keys is static, and hence, the access to any key entry can be done in O ( 1 ) time [29,30]. Using the dictionary D, one can know in O ( 1 ) time the position of each point of any empty triangle p q r in the sorted arrays T q r , T r p and T p q , respectively. The following lemma shows how to prepare the dictionary structure.
Lemma 14.
The dictionary D can be built in  O ( h 3 )  time.
Proof. 
After computing all empty triangles in S, we initialize D on the set of all empty triangles that maps each triangle to a triple ( 0 , 0 , 0 ) .
In order to update the triples of indices correctly, we iterate all pairs ( p , q ) S × S with p q and linearly scan the sorted array T p q . For each i { 1 , , | T p q | } , access the entry of p q r where r = T p q [ i ] and update the corresponding index i r in the triple to be the value of i. By Lemma 1, it takes O ( h 3 ) time. □
Then, we compute the values of A p q [ i ] and B p q [ i ] for all i { 1 , , | T p q | } and all pairs ( p , q ) by Lemma 3.
In summary, in the preprocessing phase, we build sorted arrays T p q with associated arrays A p q and B p q for all pairs ( p , q ) S × S with p q , and the dictionary D. All these data structures are built in total O ( h 3 ) time.
Now, we describe the main computation step, in which we compute the values of Z 00 , Z 0 , Z 0 + , Z + , and χ . This can be done simply by iterating all p S , q S p , and i { 1 , , | T p q | } and compute the values of Z 00 ( p , q ; r ) , Z 0 ( p , q ; r ) , Z 0 + ( p , q ; r ) , Z + ( p , q ; r ) and χ ( p , q ; r ) by Lemmas 10 and 12. In conclusion, Z 00 , Z 0 , Z 0 + , and Z + can be computed in O ( h 3 ) time, while χ can be computed in O ( h 3 + h ^ 4 ) time.
Lemma 15.
The values of  Z 00 , Z 0 , Z 0 + , and  Z +  can be computed in  O ( h 3 )  time, after the preprocessing phase is done.
Proof. 
For a fixed triple ( p , q , r ) with p S , q S p and r T p q , it takes O ( 1 ) time to specify the triple of indices ( i p , i q , i r ) such that p = T q r [ i p ] , q = T r p [ i q ] , and r = T p q [ i r ] by the dictionary D. Hence, we can compute in O ( 1 ) time the values of Z 00 ( p , q ; r ) , Z 0 ( p , q ; r ) , Z 0 + ( p , q ; r ) , and Z + ( p , q ; r ) by Lemma 10, using the arrays T r q , A q r , B q r , T p r , A r p , and B r p obtained from the preprocessing phase.
Finally, observe that we have O ( h 3 ) of such triples ( p , q , r ) , since it forms an empty triangle p q r . Hence, the values of Z 00 , Z 0 , Z 0 + , and Z + can be computed in O ( h 3 ) time. □
Lemma 16.
The value of χ can be precisely computed in  O ( h 3 + h ^ 4 )  time.
Proof. 
We compute χ ( p , q ; r ) for all r T p q and all pairs p , q S , and their sum χ . By definition, we have
χ = p S q S p r T p q χ ( p , q ; r ) = p q r : empty ( χ ( p , q ; r ) + χ ( q , r ; p ) + χ ( r , p ; q ) ) .
By Lemma 12, and in order to compute χ ( p , q ; r ) + χ ( q , r ; p ) + χ ( r , p ; q ) for a fixed empty triangle p q r , we spend time
O ( ( | T r q | B q r [ i p ] + A r p [ i q ] ) + ( | T p r | B r p [ i q ] + A p q [ i r ] ) + ( | T q p | B p q [ i r ] + A q r [ i p ] ) + 1 ) ,
which is equal to
O ( | T q p | + | T p r | + | T r q | ( B p q [ i r ] A p q [ i r ] ) ( B r p [ i q ] A r p [ i q ] ) ( B q r [ i p ] A q r [ i p ] ) + 1 )
by rearranging the terms. Thus, the total running time is the sum of the above terms over all empty triangles p q r .
First, observe that if we expand the sum
S 1 : = p q r : empty ( | T q p | + | T p r | + | T r q | ) ,
then the term | T q p | for any p , q S with p q appears exactly | T p q | times. This is because each occurrences of the term | T q p | corresponds to an empty triangle of the form p q r for some r T p q . Hence, we have that
S 1 = p S q S p | T p q | · | T q p | .
Now, consider the sum
S 2 : = p q r : empty ( ( B p q [ i r ] A p q [ i r ] ) + ( B r p [ i q ] A r p [ i q ] ) + ( B q r [ i p ] A q r [ i p ] ) ) .
If we expand this sum S 2 , then the term B p q [ i ] A p q [ i ] appears exactly once for any p , q S with p q and any 1 i | T p q | . This implies that
S 2 = p S q S p 1 i | T p q | ( B p q [ i ] A p q [ i ] ) .
Putting it all together, The total running time to compute the value of χ is
O S 1 S 2 + p q r : empty 1 = O p S q S p | T p q | · | T q p | p S q S p 1 i | T p q | ( B p q [ i ] A p q [ i ] ) + h 3 = O p S q S p | T p q | · | T q p | 1 i | T p q | ( B p q [ i ] A p q [ i ] ) + h 3 = O ( h 3 + h ^ 4 ) ,
where h ^ 4 denotes the number of non-convex 4-holes in S, by Lemma 5. □
Finally, we apply Lemma 13 to compute each of z 2 , z 3 , z 4 , and z 5 , as described in Line 6 of Algorithm 1.
The running time of our algorithm is bounded by O ( h 3 + h ^ 4 ) , as follows: We spend O ( h 3 ) time for the preprocessing step. To compute Z 00 , Z 0 , Z 0 + , and Z + , it takes O ( h 3 ) time by Lemma 15, while we spend O ( h 3 + h ^ 4 ) time to compute χ , as analyzed in Lemma 16. The last step computing z 2 , z 3 , z 4 , and z 5 takes only O ( 1 ) time.
Therefore, we conclude Theorem 1 stated in Section 1.

5. Concluding Remarks

In this paper, we presented the first algorithm that counts non-convex 5-holes in a given set S of n points in general position. Our counting algorithm took O ( h 3 ( S ) + h ^ 4 ( S ) ) time, proportional to the number of empty triangles and non-convex 4-holes in S. Note that Ω ( n 2 ) h 3 ( S ) O ( n 3 ) and 0 h ^ 4 ( S ) O ( n 3 ) , while their expected numbers were Θ ( n 2 ) and Θ ( n 2 log n ) , respectively, when S was randomly chosen from a convex and bounded body in the plane. See Table 1 for more details.
One natural question is about the extension of our algorithmic results to non-convex k-holes for k 6 . It seems to us that it is not urgent to generalize our algorithmic approach even to the case of 6-holes. Specifically, a pentagon was decomposed into three triangles in such a way that two were attached to the middle one, while a polygon with k 6 corners was decomposed into k 2 4 triangles, and the number of methods to attach k 2 triangles grew exponentially in k. Moreover, the number of cases in which these attached triangles overlapped also grew rapidly as k increased.
Another open question is about the true computational complexity of counting convex or non-convex k-holes. Both variants of the maximum-width empty annulus problem had a lower bound of Ω ( n log n ) by reducing from the maximum gap problem. There was a huge gap between the lower bound Ω ( n log n ) and the running times of our algorithms. Thus, can one find an algorithm that counts k-holes for k = 3 , 4 , 5 in o ( n 3 ) time in the worst case, or prove a better lower bound of ω ( n log n ) ? In particular, we are unaware of any algorithm that counts the number h 3 ( S ) of empty triangles faster than O ( h 3 ( S ) ) = O ( n 3 ) .

Author Contributions

Conceptualization, Y.-H.S. and S.W.B.; methodology, Y.-H.S. and S.W.B.; validation, S.W.B.; formal analysis, S.W.B.; investigation, Y.-H.S.; writing—original draft preparation, Y.-H.S.; writing—review and editing, S.W.B.; visualization, S.W.B.; supervision, S.W.B.; project administration, S.W.B.; funding acquisition, S.W.B. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by Kyonggi University Research Grant 2021.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Dobkin, D.P.; Edelsbrunner, H.; Overmars, M.H. Searching for empty convex polygons. Algorithmica 1990, 5, 561–571. [Google Scholar] [CrossRef] [Green Version]
  2. Rote, G.; Wang, Z.; Woeginger, G.; Zhi, B. Counting k-subsets and convex k-gons in the plane. Inform. Proc. Lett. 1991, 38, 149–151. [Google Scholar] [CrossRef]
  3. Mitchell, J.; Rote, G.; Sundaram, G.; Woeginger, G. Counting convex polygons in planar point sets. Inform. Proc. Lett. 1995, 56, 45–49. [Google Scholar] [CrossRef]
  4. Rote, G.; Woeginger, G. Counting convex k-gons in planar point sets. Inform. Proc. Lett. 1992, 41, 191–194. [Google Scholar] [CrossRef]
  5. Bae, S.W. Faster counting empty convex polygons in a planar point set. Inform. Proc. Lett. 2022, 175, 106221. [Google Scholar] [CrossRef]
  6. Bárány, I.; Füredi, Z. Empty simplices in Euclidean space. Canad. Math. Bull. 1987, 30, 436–445. [Google Scholar] [CrossRef] [Green Version]
  7. Balko, M.; Scheucher, M.; Valtr, P. Holes and Islands in Random Point Sets. In Proceedings of the 36th International Symposium on Computational Geometry (SoCG 2020), Zurich, Switzerland, 23–26 June 2020; Cabello, S., Chen, D.Z., Eds.; LIPIcs. Schloss Dagstuhl–Leibniz-Zentrum für Informatik: Dagstuhl, Germany, 2020; Volume 164, pp. 14:1–14:16. [Google Scholar]
  8. Sung, Y.H.; Bae, S.W. Counting Convex and Non-convex 4-Holes in a Point Set. Trans. Fundam. Electron. Commun. Comput. Sci. 2021, E104.A, 1094–1100. [Google Scholar] [CrossRef]
  9. Aichholzer, O.; Fabila-Monroy, R.; González-Aguilar, H.; Hackl, T.; Heredia, M.A.; Huemer, C.; Urrutia, J.; Vogtenhuber, B. 4-Holes in point sets. Comput. Geom. Theory Appl. 2014, 47, 644–650. [Google Scholar] [CrossRef] [Green Version]
  10. Fabila-Monroy, R.; Huemer, C.; Mitsche, D. Empty Non-convex and Convex Four-gons in Random Point Sets. Stud. Sci. Math. Hung. 2015, 52, 52–64. [Google Scholar] [CrossRef] [Green Version]
  11. Bárány, I.; Valtr, P. Planar point sets with a small number of empty convex polygons. Stud. Sci. Math. Hung. 2005, 41, 243–269. [Google Scholar] [CrossRef]
  12. Aichholzer, O.; Fabila-Monroy, R.; González-Aguilar, H.; Hackl, T.; Heredia, M.A.; Huemer, C.; Urrutia, J.; Valtr, P.; Vogtenhuber, B. On k-gons and k-holes in point sets. Comput. Geom. Theory Appl. 2015, 48, 528–537. [Google Scholar] [CrossRef] [Green Version]
  13. Horton, J. Sets with no empty convex 7-gons. Canad. Math. Bull. 1983, 26, 482–484. [Google Scholar] [CrossRef]
  14. Aichholzer, O.; Balko, M.; Hackl, T.; Kynčl, J.; Parada, I.; Scheucher, M.; Valtr, P.; Vogtenhuber, B. A superlinear lower bound on the number of 5-holes. J. Comb. Theory Ser. A 2020, 173, 105236. [Google Scholar] [CrossRef] [Green Version]
  15. Erdős, P.; Szekeres, G. A combinatorial problem in geometry. Compos. Math. 1935, 2, 463–470. [Google Scholar]
  16. Erdős, P.; Szekeres, G. On some extremum problems in elementary geometry. Ann. Univ. Sci. Bp. Eötvös Sect. Math. 1961, 3–4, 53–62. [Google Scholar]
  17. Szekeres, G.; Peters, L. Computer solution to the 17-point Erdős–Szekeres problem. ANZIAM J. 2006, 48, 151–164. [Google Scholar] [CrossRef] [Green Version]
  18. Suk, A. On the Erdős–Szekeres Convex Polygon Problem. J. Am. Math. Soc. 2021, 30, 1047–1053. [Google Scholar] [CrossRef]
  19. Holmsen, A.F.; Mojarrad, H.N.; Pach, J.; Tardos, G. Two extensions of the Erdős–Szekeres Problem. J. Eur. Math. Soc. 2021, 22, 3981–3995. [Google Scholar] [CrossRef]
  20. Erdős, P. Some more problems on elementary geometry. Austral. Math. Soc. Gaz. 1978, 5, 52–54. [Google Scholar]
  21. Harborth, H. Kovexe Fünfecke in ebenen Punktmengen. Elem. Math. 1978, 33, 116–118. [Google Scholar]
  22. Nicolás, C.M. The Empty Hexagon Theorem. Discret. Comput. Geom. 2007, 38, 389–397. [Google Scholar] [CrossRef]
  23. Gerken, T. Empty Convex Hexagons in Planar Point Sets. Discret. Comput. Geom. 2008, 39, 239–272. [Google Scholar] [CrossRef]
  24. Morris, W.; Soltan, V. The Erdős–Szekeres Problem. In Open Problems in Mathematics; Nash, J.F., Jr., Rassias, M.T., Eds.; Springer International Publishing: Cham, Switzerland, 2016; pp. 351–375. [Google Scholar]
  25. Morris, W.; Soltan, V. The Erdős–Szekeres problem on points in convex position—A survey. Bull. Am. Math. Soc. 2000, 33, 437–458. [Google Scholar] [CrossRef] [Green Version]
  26. Valtr, P. On the minimum number of empty polygons in planar point sets. Stud. Sci. Math. Hung. 1995, 30, 155–163. [Google Scholar]
  27. Dumistrescu, A. Planar Sets with Few Empty Convex Polygons. Stud. Sci. Math. Hung. 2000, 36, 93–109. [Google Scholar]
  28. Pinchasi, R.; Radoičić, R.; Sharir, M. On empty convex polygons in a planar point set. J. Comb. Theory Ser. A 2006, 113, 385–419. [Google Scholar] [CrossRef] [Green Version]
  29. Fredman, M.L.; Komlós, J. On the Size of Separating Systems and Families of Perfect Hash Functions. SIAM J. Algebr. Discret. Methods 1984, 5, 61–68. [Google Scholar] [CrossRef]
  30. Belazzougui, D.; Botelho, F.C.; Dietzfelbinger, M. Hash, Displace, and Compress. In European Symposium on Algorithms; Lecture Notes in Computer Science; Fiat, A., Sanders, P., Eds.; Springer: Berlin/Heidelberg, Germany, 2009; Volume 5757, pp. 682–693. [Google Scholar]
Figure 1. Points in T p q and T q p make all empty triangles with base p q ¯ . Points in T p q are depicted by blue dots with their indices in the array T p q , and those in T q p are by red dots with their indices in array T q p .
Figure 1. Points in T p q and T q p make all empty triangles with base p q ¯ . Points in T p q are depicted by blue dots with their indices in the array T p q , and those in T q p are by red dots with their indices in array T q p .
Symmetry 14 00078 g001
Figure 2. Points in T p q are depicted by blue dots with their indices in T p q , and those in T q p are by red dots with their indices in T q p . Here, r = T p q [ 4 ] , A p q [ 4 ] = 2 , and B p q [ 4 ] = 6 .
Figure 2. Points in T p q are depicted by blue dots with their indices in T p q , and those in T q p are by red dots with their indices in T q p . Here, r = T p q [ 4 ] , A p q [ 4 ] = 2 , and B p q [ 4 ] = 6 .
Symmetry 14 00078 g002
Figure 3. The regions around the middle triangle p q r of a 5-hole p q x r y . The corner x lies either in X + , X 0 , or X and the corner y lies either in Y + , Y 0 , or Y .
Figure 3. The regions around the middle triangle p q r of a 5-hole p q x r y . The corner x lies either in X + , X 0 , or X and the corner y lies either in Y + , Y 0 , or Y .
Symmetry 14 00078 g003
Figure 4. All possible shapes of the pentagon P = p q x r y , depending on the type of the middle triangle p q r . In each case, all the diagonals of P are depicted by dotted segments.
Figure 4. All possible shapes of the pentagon P = p q x r y , depending on the type of the middle triangle p q r . In each case, all the diagonals of P are depicted by dotted segments.
Symmetry 14 00078 g004
Figure 5. Points in T r q and T p r are depicted in green and purple, respectively. Numbers are indices of corresponding points in the arrays T r q and T p r .
Figure 5. Points in T r q and T p r are depicted in green and purple, respectively. Numbers are indices of corresponding points in the arrays T r q and T p r .
Symmetry 14 00078 g005
Figure 6. Illustration to Lemma 11 when x X + and y Y + . (Left) q x r and p r y do not overlap if ( x , r , y ) makes a right turn. (Right) q x r and p r y do overlap if ( x , r , y ) makes a left turn.
Figure 6. Illustration to Lemma 11 when x X + and y Y + . (Left) q x r and p r y do not overlap if ( x , r , y ) makes a right turn. (Right) q x r and p r y do overlap if ( x , r , y ) makes a left turn.
Symmetry 14 00078 g006
Table 1. The current best bounds on the minimum, maximum, and expected numbers of convex and non-convex k-holes, denoted by h k ( S ) and h ^ k ( S ) , and their total number h ¯ k ( S ) in a set S of n points in general position. For the expected number of k-holes, the n points in S are assumed to be chosen uniformly and independently at random from a convex and bounded body.
Table 1. The current best bounds on the minimum, maximum, and expected numbers of convex and non-convex k-holes, denoted by h k ( S ) and h ^ k ( S ) , and their total number h ¯ k ( S ) in a set S of n points in general position. For the expected number of k-holes, the n points in S are assumed to be chosen uniformly and independently at random from a convex and bounded body.
MinimumMaximumExpected
k = 3 h 3 n 2 O ( n ) , 1.6196 n 2 + o ( n ) [11] n 3 = Θ ( n 3 ) [easy] Θ ( n 2 ) [6]
k = 4 h 4 1 2 n 2 O ( n ) , 1.9397 n 2 + o ( n ) [11] n 4 = Θ ( n 4 ) [easy] Θ ( n 2 ) [10]
h ^ 4 0[easy] Θ ( n 3 ) [9] Θ ( n 2 log n ) [10]
h ¯ 4 Ω ( n 2 ) , O ( n 2 log n ) [9,10,12] n 4 = Θ ( n 4 ) [9] Θ ( n 2 log n ) [10]
k 5 h k Ω ( n log 4 / 5 n ) , O ( n 2 ) k = 5 Ω ( n ) , O ( n 2 ) k = 6 0 k 7 [11,13,14] n k = Θ ( n k ) [easy] O ( n 2 ) [7]
h ^ k 0[easy] Θ ( n k 1 ) [12] O ( n k 1 ) [12]
h ¯ k Ω ( n 2 ) , O ( n k + 1 2 log k 3 n ) [12] n k = Θ ( n k ) [12] O ( n k 1 ) [12]
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Sung, Y.-H.; Bae, S.W. Counting Non-Convex 5-Holes in a Planar Point Set. Symmetry 2022, 14, 78. https://doi.org/10.3390/sym14010078

AMA Style

Sung Y-H, Bae SW. Counting Non-Convex 5-Holes in a Planar Point Set. Symmetry. 2022; 14(1):78. https://doi.org/10.3390/sym14010078

Chicago/Turabian Style

Sung, Young-Hun, and Sang Won Bae. 2022. "Counting Non-Convex 5-Holes in a Planar Point Set" Symmetry 14, no. 1: 78. https://doi.org/10.3390/sym14010078

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop