Peeling Sequences

Given a set of $n$ labeled points in general position in the plane, we remove all of its points one by one. At each step, one point from the convex hull of the remaining set is erased. In how many ways can the process be carried out? The answer obviously depends on the point set. If the points are in convex position, there are exactly $n!$ ways, which is the maximum number of ways for $n$ points. But what is the minimum number? It is shown that this number is (roughly) at least $3^n$ and at most $12.29^n$.


Introduction
A set of points in the plane is said to be in general position if no three of them are collinear.Let P be a set of n points in the plane in general position.Consider the following iterative process: remove points one by one until no point remains, under the provision that exactly one extreme point, that is, a vertex of the convex hull is removed in each step.If the points are in convex position, there are exactly n! ways to do this, which is clearly the maximum number of ways for removing n points.What is the minimum number?
A peeling sequence for P is any permutation of the points of P that can be obtained by writing the labels of the points removed one by one.We are interested in the minimum number of such permutations that can be obtained, over all point sets of size n.
Definitions.Given a point set P in general position the plane, let g(P ) count the number of peeling sequences for P ; and g(n) denote the minimum of g(P ) over all n-element point sets P in general position.It is easy to see that g(n) is an increasing integer sequence; it is now entry A358251 in [13].Observe that when n ≥ 3, the last three points can be removed in any order; there are 3! = 6 ways, whence g(n) is a multiple of 6 for every n ≥ 3.
In an earlier writing [4] the following bounds were obtained (all logarithms are in base 2): (i) every n-element point set in general position admits Ω(3 n ) peeling sequences; (ii) on the other hand, there are sets with 2 O(n log log n) peeling sequences.Recently, a further improved upper bound, 2 O(n log log log n) , was presented by the first named author [5].Here we significantly improve the upper bound; in particular, we show that it is of the form O(a n ) for some a > 1.
The problem can be naturally generalized to point sets in higher dimensions.A set of points in the d-dimensional space R d is said to be: (i) in general position if any at most d + 1 points are affinely independent; and (ii) in convex position if none of the points lies in the convex hull of the other points.Let d ≥ 2 and let P be a point set in R d in general position.We denote by g(P ) the number of peeling sequences of P and let g d (n) be the minimum of g(P ) over all n-element point sets P in general position in R d .In particular, g 2 (n) is the same as g(n).For any fixed d we obtain exponential upper and lower bounds for g d (n).
Our results.We first observe that every n-element point set has Ω(3 n ) peeling sequences.From the other direction, we show that if n is a power of 3, we can find suitable configurations with a small number of peeling sequences.
Theorem 1.Let n = 3 k , for some k ∈ N.There is a set of n points in general position in the plane with at most 27 n peeling sequences.
Corollary 1.For every n ∈ N, there is a set of n points in general position in the plane with at most 19683 n peeling sequences.
We next arrive at our main result which summarizes our best lower and upper bound, respectively.
Theorem 2. Every n-element point set in general position in the plane has Ω(3 n ) peeling sequences.On the other hand, for every n ≥ 3 there is a point set in general position with at most 12.29 n /100 peeling sequences.
The exponential lower bound from the planar case as well as the construction in the proof of Theorem 1 can be generalized to higher dimensions.Corollary 2. For every n ∈ N, there is a set of n points in general position in R d with at most (d + 1) (d+1) 2 n peeling sequences.
In this case we did not attempt to optimize the base of the exponential function.
Related work.The concept of "peeling" a convex hull has been associated to dynamic convex hull algorithms and convex hull determination [10].For a planar point set P , the convex layers of P are the convex polygons obtained by iterating the following procedure: compute its convex hull and remove its vertices from P [1,2].The process of peeling a point set has been shown very useful in obtaining robust estimators in statistics [2,11].A common estimator of a (unidimensional) sample is its arithmetic mean, however this estimator can be severely affected by outliers.A method that performs better is is to discard the highest and lowest α-fraction of the data and take the mean of the remainder.This is the α-trimmed mean.The median is the special case α = 1/2.The higher dimensional analog of trimming, called "peeling" by Tukey, consists of successively removing extreme points of the convex hull of the data until a certain fixed fraction of the points remains.
A quadratic algorithm for peeling (i.e., for convex layer decomposition) was initially proposed by Shamos [12].A faster algorithm, running in O(n log 2 n) is due to Overmars and Van Leeuwen [10].Finally, an optimal algorithm, running in O(n log n) time was obtained by Chazelle [2].Computing the convex layers and studying their structure in a random setting have been studied by Dalal [3].Har-Peled and Lidický [8] have studied the number of steps needed for peeling the integer grid G n with n points (with, say, n = k 2 ); note that G n is not in general position, however the peeling process can be executed on any point set.
It should be noted that while in the discussion above all the extreme points in a layer are removed in parallel (i.e., at the same time), in our study -of the function g(n) -the extreme points are removed sequentially one by one.
After some preliminaries in Section 2, we prove our main results, Theorems 1 and 2, in Section 3. Theorem 3 regarding higher dimensions can be found in Section 4. We conclude with some remarks in Section 5.

Lower bound and small values of n
As a warm-up we determine the values of g(•) for the first few values of n.Trivially, we have g(1) = 1, and g(2) = 2.
Proposition 1.The following exact values can be observed.
Proof.Let h denote the size of the convex hull of P .The case n = 3 is clear: there are 3! = 6 permutations and each of them is a valid peeling sequence.The remaining cases are illustrated in Fig. 1.Let now n = 4.If the points are in convex position, there are 4! = 24 permutations.If the points are not in convex position, let 4 be the interior point.Then any permutation that starts with 4 is invalid, however, all remaining 4! − 3! = 18 permutations are valid.
Let now n = 5.If h ≥ 4, there are at least 4 × g(4) = 72 permutations.The case h = 3 yields the smallest number, 24 + 18 + 18 = 60, of permutations; indeed, removing one of the extreme points yields a convex quadrilateral, while the other two removals can result in a triangle with a point inside.
Lower bound.It is clear that g(2) = 2. Assume now that n ≥ 3. Let P be any n-element point set in general position.By the assumption, conv(P ) has at least three extreme vertices, removal of each yields a set of n − 1 points in general position.Any two peeling sequences resulting from the removal of two different extreme vertices are clearly different.As such, g(•) satisfies the recurrence g(n) ≥ 3 • g(n − 1).Consequently, g(n) = Ω(3 n ).By Proposition 1 we also have g(n) ≥ 180 • 3 n−6 for every n ≥ 6.

First construction and analysis
Let Z = X ∪ Y be a finite point set in general position, where X ∩ Y = ∅.Consider any peeling sequence, say, π, of Z. Then π naturally induces two peeling sequences, one for X and one for Y .This implies, that g is a monotone increasing function.
Proof of Theorem 1.We construct the sets S k recursively for k ∈ N, such that the set S k contains n = 3 k points and g(S k ) ≤ 27 n .Moreover, S k is flat, that is, all points are very close (compared to the minimum distance in S k ) to a line; see Fig. 2. The set S 0 is just one point.Suppose that we already have a construction S k−1 with n/3 = 3 k−1 points.Take three rays with a common origin with angles 120 • between them.Place a copy of S k−1 along each ray.Let A, B, C denote the three copies of S k−1 , called blocks and let S k = A∪B∪C, a set of n = 3 k points.We can assume that no two points of S k have the same x-coordinate, otherwise we apply a rotation.Let S = S k be a flattened copy of S k , that is, apply the transformation (x, y) −→ (x, εy) to Let π be any peeling sequence of S, and let π be a prefix of it.We say that S yields S via π , written S π ⇒ S if applying π to S yields S .Observe that each ray "supports" n/3 points and the following invariant is maintained: (I) Let π be a prefix of π, and assume that S π ⇒ S , where S still has three active rays, i.e., none of A, B, or C, have been completely erased.Then S has exactly 3 extreme vertices, one from each of A, B, C.
Replace every element of A (resp.B, C) by the symbol a (resp.b, c).This sequence contains n/3 a's, b's and c's and we call it the simplified peeling sequence π * .It just tells us from which block points are peeled off at each step.
Consider now the subsequence π A of π consisting of the elements of A. Observe that π A is a peeling sequence of A. Clearly the same holds for B and C, or any other subset of S.
We can obtain all peeling sequences π of S in two steps: we first determine the simplified peeling sequence π * and then we expand it to a peeling sequence.There are less than 3 n simplified peeling sequences.Let π * be a simplified peeling sequence.Consider the last a, last b, and last c in ρ and take the first of them.Assume for simplicity that it is the a, and it is at position s.Clearly, n/3 ≤ s ≤ n.
Estimate now the number of ways π * can be expanded to a peeling sequence of S. Observe that A is erased before B and C, therefore, whenever an element of A was peeled off, there was exactly one element of A, B, and C on the convex hull (in particular, there were only three extreme points).So the point that was peeled off was determined by π * .That is, if π * is fixed, then there is one possible peeling order for the points of A, namely the decreasing order of distance from the origin.The same applies to the points of B and C that were peeled off by the time A is erased.
By the previous observations, for the elements of B (resp.C) we have at most g(B) = g(C) = g(S k−1 ) ≤ 27 n/3 = 3 n choices.Consequently, the induction step yields Proof of Corollary 1.For 3 k < n < 3 k+1 , let P n be any subset of S k+1 of size n.Then by monotonicity, we have g(n) ≤ g(P n ) ≤ g(P 3 k+1 ) ≤ 27 3n = 19683 n .
Remark.A construction similar to that in the proof of Theorem 1 was used by Edelsbrunner and Welzl [6] to prove the existence of n-element point sets with Ω(n log n) halving lines.

Second construction and analysis
Preliminaries.For 0 ≤ p ≤ 1, denote by the binary entropy function, where log stands for the logarithm in base 2. (By convention, 0 log 0 = 0.) We will use the following estimate in our calculation; see, e.g., [7,Lem. 3.6], or [9,Cor. 10.3].For any integer n ≥ 1 and 0 ≤ α ≤ 1/2, we have Also, note that for any integer n ≥ 1 and real x, where n/3 ≤ x ≤ n, we have Lemma 1.Let n ≥ 24 be a positive integer.Then Proof.For n = 24 the largest binomial coefficient is 24 12 and one can check that 24 12 ≤ 2 24 /6.Suppose that n > 24 and the statement holds for n − 1.We may assume that k ≥ 1 (since the inequality clearly holds for k = 0).Then A key fact in the argument is the following.
Proof.Let π be a peeling sequence of Z and let π * be its simplified peeling sequence, that is, in π we replace every element of x (resp.Y ) by x (resp.y).Clearly, there are n n 1 simplified peeling sequences.
Let π X be the subsequence of π, consisting of the elements of X. Observe that π X is a peeling sequence of X. Define π Y analogously, and clearly it is a peeling sequence of Y .Therefore, at most g(X)g(Y ) peeling sequences can have the same simplified peeling sequence, consequently, Proof of Theorem 2. Write a = 12.29.For every n we construct the sets S n recursively, such that S n contains n points and g(S n ) ≤ a n /100 for n ≥ 3.Moreover, S n is flat, just like in the previous construction.The set S 1 is just one point; S 2 is a point pair; and S 3 is a flat (obtuse) triangle.Suppose that n ≥ 4 and for every i < n we have already constructed S i satisfying the requirements.In order to do a better recursion, we choose a specific variant in the previous construction.Let n = n 1 + n 2 + n 3 , where n i = n/3 or n/3 .Take three rays r 1 , r 2 , r 3 with a common origin O and with angles 120 • between them, such that r 1 is horizontal.Place a copy of S n 1 on r 1 and call it B 1 , a copy of S n 2 on r 2 , close to O, and call it B 2 , and a copy of S n 3 on r 3 , far from O, and call it B 3 .Finally, let S n be a flattened copy of this set of n points.For simplicity we still denote the three corresponding components of S n by B 1 , B 2 , B 3 , respectively.Observe, that the projections of B 1 , B 2 , and B 3 are separated on the x-axis, they come in this order, and in S n all points are very close to their projections.We have thereby defined the set S n for every n and clearly it has n points.
We prove that g(S n ) ≤ a n /100 by induction on n.The induction basis is 3 ≤ n ≤ 35: Obviously g(P ) ≤ |P |! for every point-set P .By the special structure of S n , we have g(S n ) ≤ 3 n/3 ( 2n/3 )! ≤ a n /100 for every 3 ≤ n ≤ 35.Suppose now that n ≥ 36 and that g(S i ) ≤ a i /100 for every i, where 3 ≤ i ≤ n − 1.Let n = n 1 + n 2 + n 3 , where n i = n/3 or n/3 .Let B 1 , B 2 , B 3 , be its three blocks, B i is an affine copy of S n i .For any peeling sequence π of S n , we define its simplified peeling sequence π * so that we replace every element of B i by i.Now let π be a peeling sequence of S n and let π * be its simplified peeling sequence.Just like in the proof of Theorem 1, take the last 1, last 2, and last 3 in π * , and assume that the first of them is at position s.Since one of the blocks is peeled off in step s, we have n/3 ≤ s ≤ n.
Observe that until peeling step s+1, all three rays were active, so there was exactly one element of B 1 , B 2 , and B 3 on the convex hull.Therefore, the first s elements of π are determined by π * .We distinguish four cases based on the value of s.We estimate now the number of corresponding simplified peeling sequences, and the number of ways they can be expanded to a peeling sequence of S n .We denote the resulting upper bound estimates by σ 1 , σ 2 , σ 3 , σ 4 , and then show that 4 j=1 σ j ≤ a n /100.More precisely, we will prove that Case 1. n/3 ≤ s ≤ 5n/9 .Let σ 1 denote the number of corresponding peeling sequences of S n .Let T be the corresponding set of simplified peeling sequences.By (1), (2), and (3), we have = 2 14/9 • 2 10.855n/9 .
Let π * ∈ T .Suppose for simplicity, that at position s there is a 1.So block B 1 is finished first, and its peeling order is determined.For the other two blocks we have at most g(S n 2 )g(S n 3 ) possibilities.We have n 1 , n 2 , n 3 ≤ n/3 , therefore, by the induction hypothesis and Lemma 2 we have where the last inequality follows from the two inequalities: • a 2/3 ≤ 100, and 2 10.855/3 ≤ a.
Case 2. 5n/9 ≤ s ≤ 2n/3 .Let σ 2 denote the number of corresponding peeling sequences of S n .Let T be the corresponding set of simplified peeling sequences.By Lemma 1 we have Let π * ∈ T .Suppose again there is an 1 at position s, so block B 1 is finished first, and its peeling order is determined.Moreover, since 5n/9 ≤ s, at least n/9 points of B 2 or B 3 have already been removed, say, from B 2 .These removed points were the extreme points of B 2 in one direction, that is, a sub-block of B 2 has been removed.The remainder of B 2 after step s of the peeling process is a subset of (an affine image of) two sub-blocks of S n 2 , and by construction, both have size at most n/9 .By Lemma 2 this set has at most 2 2 n/9 g(S n/9 ) 2 peeling sequences.For B 3 we have at most g(S n/3 ) possibilities.Note that n/9 ≥ 4 and so the induction hypothesis applies.Therefore, The last inequality follows from the two inequalities: The last inequality follows from the three inequalities: a 14/9 ≤ 10 2 /2, (2a) 32/9 ≤ 10 6 /2, and 2 17/5 ≤ a.
Case 4. 7n/9 ≤ s ≤ n.Let σ 4 denote the number of corresponding peeling sequences and T the corresponding set of simplified peeling sequences.Obviously |T | ≤ 3 n .Let π * ∈ T and suppose again that block B 1 is finished first, so its peeling order is determined.Since 7n/9 ≤ s, three sub-blocks of B 2 or B 3 have been removed.The following estimate is implied.

Higher dimensions
In this section we prove Theorem 3 and its corollary.
Lower bound.Let P be any n-element point set in general position.By the assumption, conv(P ) has at least d + 1 extreme vertices, removal of each yields a set of n − 1 points in general position.Any two peeling sequences resulting from the removal of two different extreme vertices are clearly different.As such, g(•) satisfies the recurrence g(n) ≥ (d + 1) • g(n − 1).Consequently, g(n) = Ω((d + 1) n ).
Upper bound.We proceed similarly to the planar case.We construct the sets S k recursively for k ∈ N, such that the set S k contains n = (d + 1) k points and g(S k ) ≤ (d + 1) (d+1)n .Moreover, S k is thin, that is, all points are very close (compared to the minimum distance in S k ) to a line.
The set S 0 is just one point.Suppose that we already have a construction S k−1 with n/(d+1) = (d + 1) k−1 points.Take a regular simplex ∆ ⊂ R d centered at the origin and such that (1, 0, . . ., 0) is a vertex of ∆.Take the (d + 1) rays r 1 , . . ., r d+1 from the origin to its vertices.Place a copy of S k−1 along each ray.Let B 1 , . . ., B d+1 denote the copies of S k−1 , and let S k = ∪ d+1 i=1 B i , a set of n = (d + 1) k points.
We can assume that no two points of S k have the same x 1 -coordinate, otherwise we apply a rotation.Let S = S k be a flattened copy of S k , that is, apply the transformation (x 1 , x 2 , . . ., x d ) −→ (x 1 , εx 2 , . . ., εx d ) to S k .
Let π be any peeling sequence of S. Observe that each ray "supports" n/(d + 1) points and the following invariant is maintained (I) d Let π be a prefix of π, and assume that S π ⇒ S , where S still has d + 1 active rays, i.e., none of its blocks have been completely erased.Then S has exactly d + 1 extreme vertices, one from each block.
We obtain the simplified peeling sequence as before, replace every element of B i by i.To obtain all peeling sequences π of S, first we determine the simplified peeling sequence π * and then we expand it to a peeling sequence.There are less than (d + 1) n simplified peeling sequences.Let π * be a simplified peeling sequence.Consider the last i for every 1 ≤ i ≤ d + 1 and take the first of them.Assume for simplicity that it is 1, and it is at position s.Clearly, n/d ≤ s ≤ n.
Since B 1 was finished first, the peeling order of its points is determined.For the elements of B i , 2 ≤ i ≤ d + 1 we have at most g(B i ) = g(S k−1 ) ≤ (d + 1) n choices.Consequently, the induction step yields g(S k ) ≤ (d + 1) n g d (S k−1 ) ≤ (d + 1) (d+1)n , as required.
Proof of Corollary 2. For (d + 1) k < n < (d + 1) k+1 , let P n be any subset of S k+1 of size n.

Concluding remarks
Observe that the convex layer decomposition of a point set P -mentioned in Section 1 -yields a set of peeling sequences naturally derived from it: remove the points from one layer, one by one, before moving to the next layer.Indeed, this is so, since any point of the layer under removal is still extreme at that step.In general, if there are m layers and their sizes are h 1 , h 2 , . . ., h m counting from outside, where h 1 , . . ., h m−1 ≥ 3, h m ≥ 1, and m i=1 h i = n, then there are h 1 !h 2 !• • • h m !peeling sequences given by the convex layer decomposition.
Apart from the case of points in convex position, the set of peeling sequences corresponding to layer by layer removal of the points is a strict subset of the set of peeling sequences of P .It is worth noting that this subset can be much smaller than the whole set.For example, consider a point set with n/3 layers, where each layer is a triangle (and so the point set is the vertex set of n/3 nested triangles).Then there are 6 n/3 = 1.817 . . .n peeling sequences given by the convex layer decomposition, whereas the total number of peeling sequences is Ω(3 n ).
Our estimates on the growth rate of g(n) are now closer, but a substantial gap remains.A natural question is whether the trivial bound of Ω(3 n ) can be improved.Problem 1.Is there a constant δ > 0 such that g(n) = Ω((3 + δ) n )?

Theorem 3 .
Every n-element point set in general position in R d has Ω((d + 1) n ) peeling sequences.On the other hand, if n = (d + 1) k , where k ∈ N, there is a set of n points in general position in R d with at most (d + 1) (d+1)n peeling sequences.

Figure 2 :
Figure 2: Recursive construction (sketch): before and after a flattening step.
10 4, and 2 7/2 ≤ a.Case 3. 2n/3 ≤ s ≤ 7n/9 .Let σ 3 denote the number of corresponding peeling sequences and T the corresponding set of simplified peeling sequences.We have Let π * ∈ T .Suppose again that at position s there is an 1.So block B 1 is finished first, and its peeling order is determined.Moreover, since 2n/3 ≤ s, at least n/3 additional points have been removed, that is, two sub-blocks of B 2 or B 3 , of at least n/9 points, either two sub-blocks from one of them or one sub-block from each of them.We can argue similarly to the previous cases and get the following estimate.