Abstract 1 Introduction 2 Preliminaries 3 Creating a universal lower bound 4 Analysing Kirkpatrick-McQueen-Seidel 5 Showing Universal Optimality References

A Combinatorial Proof of Universal Optimality for Computing a Planar Convex Hull

Ivor van der Hoog ORCID IT University of Copenhagen, Denmark Eva Rotenberg ORCID IT University of Copenhagen, Denmark Daniel Rutschmann ORCID IT University of Copenhagen, Denmark
Abstract

For a planar point set P, its convex hull is the smallest convex polygon that encloses all points in P. The construction of the convex hull from an array IP containing P is a fundamental problem in computational geometry. By sorting IP in lexicographical order, one can construct the convex hull of P in O(nlogn) time which is worst-case optimal. Standard worst-case analysis, however, has been criticized as overly coarse or pessimistic, and researchers search for more refined analyses.

For an algorithm A, worst-case analysis fixes n, and considers the maximum running time of A across all size-n point sets P and permutations IP of P. Output-sensitive analysis fixes n and k, and considers the maximum running time across all size-n points sets P with k hull points and permutations IP of P. Universal analysis provides an even stronger guarantee. It fixes a point set P and considers the maximum running time across all permutations IP of P.

Kirkpatrick, McQueen, and Seidel [SICOMP’86] consider output-sensitive analysis. If the convex hull of P contains k points, then their algorithm runs in O(nlogk) time. Afshani, Barbay, Chan [FOCS’07] prove that the algorithm by Kirkpatrick, McQueen, and Seidel is also universally optimal. Their proof restricts the model of computation to any algebraic decision tree model where the test functions have at most constant degree and at most a constant number of arguments. They rely upon involved algebraic arguments to construct a lower bound for each point set P that matches the universal running time of [SICOMP’86].

We provide a different proof of universal optimality. Instead of restricting the computational model, we further specify the output. We require as output (1) the convex hull, and (2) for each internal point of P a witness for it being internal. Our argument is shorter, perhaps simpler, and applicable in more general models of computation.

Keywords and phrases:
Convex hull, Combinatorial proofs, Universal optimality
Copyright and License:
[Uncaptioned image] © Ivor van der Hoog, Eva Rotenberg, and Daniel Rutschmann; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Computational geometry
; Theory of computation Design and analysis of algorithms
Funding:
This work was supported by the Carlsberg Foundation Fellowship CF21-0302 “Graph Algorithms with Geometric Applications”, the VILLUM Foundation grant (VIL37507) “Efficient Recomputations for Changeful Problems”, and the European Union’s Horizon 2020 research and innovation programme under the Marie Skłodowska-Curie grant agreement No 899987.
Editors:
Anne Benoit, Haim Kaplan, Sebastian Wild, and Grzegorz Herman

1 Introduction

Convex hulls are a central topic in computational geometry. By sorting a point set P in lexicographical order, one can construct its convex hull in O(nlogn) time, which is worst-case optimal. Traditional worst-case analysis often faces criticism for being overly coarse or pessimistic. To address these concerns, researchers introduced more nuanced complexity measures that account not only for the input size but also for additional parameters that capture the difficulty of the instance. A classical example is output-sensitive analysis, where the running time analysis depends on the output size [7]. Other algorithms measure their performance by the spread of the point set, defined as the ratio of the maximum to minimum pairwise distances among the points [4]. More examples include algorithmic complexity parametrized on various geometric characteristics of P, such as the ratio of circumradii to inradii or the number of reflex angles in an input polygon [8, 3].

This paper improves upon the work by Afshani, Barbay, and Chan [1] (see also their journal version [2]). They observe that, for geometric problems, the worst-case algorithmic analysis contains a double maximum. They only consider correct algorithms, which we formally define in the preliminaries. For now, denote by n all point sets of size n and for any Pn by 𝕀P all size-n arrays that contain the points of P in some order. For an algorithm A, denote by ρ(A,IP) its runtime when the input is IP. Then, for a fixed correct algorithm A and input size n, the worst-case running time is:

worst-case(A,n):=maxPnmaxIP𝕀Pρ(A,IP).

An algorithm A is worst-case optimal if there exists no algorithm A whose worst-case running time is asymptotically smaller than that of A. Prior works perform a finer-grained analysis by restricting the first maximum. For example, output-sensitive running time is defined as:

output-sensitive(A,n,k):=maxPn and P has k points on the convex hullmaxIP𝕀Pρ(A,IP).

Afshani, Barbay, and Chan [1] obtain an even stronger quality guarantee by eliminating the first maximum all-together. They call their notion of optimality instance-optimality in the order-oblivious setting. Recently, this notion has been called universal optimality [5, 6, 9]. For a fixed point set P, we define the universal running time of an algorithm A as:

universal(A,P):=maxIP𝕀Pρ(A,IP).

An algorithm A is universally optimal if for all point sets P, there exists no algorithm A whose universal running time is asymptotically smaller than that of A. Observe that any universally optimal algorithm is automatically output-sensitive.

Contribution.

Afshani, Barbay, Chan prove that the algorithm by Kirkpatrick, McQueen, and Seidel [7] is universally optimal.111We note that the paper has only Kirkpatrick and Seidel as authors. However, a footnote remarks that McQueen suggests an adaption to the algorithm. Only with this adaption, the algorithm becomes universally optimal. Their proof restricts the model of computation to any algebraic decision tree model where the test functions have at most constant degree and have at most a constant number of arguments. They present an involved algebraic argument to construct a lower bound for each point set P that matches the universal running time of [7].

Here, we give a different proof. Rather than restricting the model of computation, we give a more extensive but natural specification of the output. We call a point of P internal if it does not appear on the boundary of the convex hull. We require that any algorithm computes (1) the convex hull and (2) for each internal point a witness for its being internal. For a point set P, we apply a simple combinatorial counting argument over all outputs to obtain a lower bound that matches the universal running time of [7]. Our argument is shorter, arguably simpler, and holds in more general models of computation.

2 Preliminaries

We follow [1] and assume that the input points lie in general position. I.e., P contains no duplicates and no collinear triples. For any integer n, we denote by n all planar point sets of n points that lie in general position. We denote by 𝕀P all arrays of size n that store P.

Definition 1.

For a planar point set P, its convex hull CH(P) is the minimum convex region that contains all points in P.

Definition 2.

For a planar point set P, its convex hull vertices ch(P) are the points in P that lie on the boundary of CH(P).

The Convex Hull Problem.

Our input is an array IP𝕀P of n points P in general position. Convex hull algorithms output ch(P) in cyclical ordering. For our analysis, we further require that the output contains, for all points in Pch(P), a witness that they are internal:

Definition 3.

For any pP, a triangle t (whose corners lie in P) is a witness of p if p is contained in the interior of t.

Observation 4.

A point pP does not lie on the boundary of CH(P) if and only if there exists at least one witness of p.

Requiring the output to contain witnesses is a natural condition as it is effectively asking the algorithm A to verify its correctness. The concept of certification and verifiability is central to the design of algorithms. Without this requirement, there are oblivious decision trees (defined below) that compute the convex hull in O(klogn) time.

Formalising output.

Our output consists of two lists: A hull list H encodes ch(P) in cyclical order, and a witness list W defines for each point in Pch(P) a witness. Formally, a hull list H=(h1,,hk) of IP is a sequence of integers such that the points IP[hi], for i[k], are precisely the k points on the boundary of CH(P) in their cyclical ordering. We require that IP[h1] is the leftmost point of ch(P). A witness list (we refer ahead to Figure 1) of IP is a sequence W=(ai,bi,ci)i=1n of integer triples such that:

  • ai=bi=ci=1 if IP[i] lies on CH(P), and otherwise

  • the triangle (IP[ai],IP[bi],IP[ci]) is a witness of IP[i].

Algorithms.

We define an algorithm for convex hull construction as any comparison-based algorithm that receives any ordered set of planar points IP and outputs a hull list and witness list of IP. Given a fixed input IP and an algorithm A, the running time ρ(A,IP) is the number of instructions used by A to terminate on the input IP.

Decision trees.

For n, we define an abstract decision tree T as a tree whose inner nodes have two children. The inner nodes contain no additional information. Its leaves contain two ordered lists. The first is an arbitrary list of integers and the second is a list of n integer triples. We define an oblivious decision tree T as any abstract decision tree such that for any point set Pn, and any IP𝕀P, there exists a root-to-leaf path in T where the two lists at the leaf are a hull list and witness list of IP, respectively. We denote by 𝒯nO the set of all oblivious decision trees for n.

Definition 5.

A comparison-based algorithm A is correct if for any input IP it outputs a correct hull and witness list. Observe that any correct comparison-based algorithm A for convex hull construction has, for each n, a corresponding oblivious decision tree in 𝒯nO.

Worst-case optimality.

Let 𝒜 denote the set of all correct algorithms. For an algorithm A𝒜 the worst-case running time is defined as

worst-case(A,n):=maxPnmaxIP𝕀Pρ(A,IP).

An algorithm is worst-case optimal if there exists a constant c such that, for all n large enough, worst-case(A,n)cminA𝒜worst-case(A,n).

Observation 6.

For any algorithm A and n, the worst-case running time of A is lower bounded by the minimum height among all decision trees in 𝒯nO. Formally, A𝒜,n,

worst-case(A,n)=maxPnmaxIP𝕀Iρ(A,IP)minT𝒯nOHeight(T).

Universal optimality.

Afshani, Barbay and Chan [1] introduce a strictly stronger notion of algorithmic optimality which they call instance optimality in the order-oblivious setting. We will instead use the equivalent modern term universal optimality [5, 6, 9]. Intuitively, an algorithm is universally optimal if it is worst-case optimal for every fixed point set P. Formally, we define the universal running time of an algorithm A and point set P as

universal(A,P):=maxIP𝕀Pρ(A,IP).

An algorithm is universally optimal if there exists a constant c such that for all P, universal(A,P)cminA𝒜universal(A,P). To show universal optimality, we introduce the concept of clairvoyant decision trees. For a fixed point set P, a clairvoyant decision tree T is an abstract decision tree such that for any input IP𝕀P, there exists a root-to-leaf path in T such that the two lists at the leaf are a hull list and witness list of IP, respectively. We denote by 𝒯PC the set of all clairvoyant decision trees for a fixed planar point set P.

Observation 7.

For any planar point set P in general position, for any algorithm A, the universal running time of A is lower bounded by the minimum height amongst all clairvoyant decision trees in 𝒯PC. Formally, for all planar point set P in general position, for all A𝒜,

universal(A,P)=maxIP𝕀Iρ(A,IP)minT𝒯PCHeight(T).

Prior work.

Kirkpatrick, McQueen, and Seidel [7] give an efficient algorithm to compute for any point set P its convex hull. We present this algorithm in Section 4 and observe that it naturally produces a hull list and a witness list. Afshani, Barbay, and Chan [1] show that the algorithm in [7] is universally optimal in a somewhat restricted model of computation which we define below. We note for the reader that this definition is not vital to our analysis.

Definition 8 (Definition 3.1 [1]).

A function f:(d)c is multilinear if the restriction of f is a linear function from Rd to R when any (c1) of the c arguments are fixed. Equivalently, f is multilinear if f((x11,,x1d),,(xc1,,xcd)) is a multivariate polynomial function that never multiplies coordinates of the same point.

In the multilinear decision tree model [1], algorithms can access the input points only through tests of the form f(p1,,pc)>0 for a multilinear function f with c constant.

Theorem 9 (Theorem 3.5+3.6 in [1]).

The algorithm in [7] is universally optimal for dimension d=2 in the multilinear decision tree model.

We instead show universal optimality by a counting all possible hull and witness lists:

Theorem 10.

If we define 𝒜 as the set of all correct comparison-based convex hull algorithms (Definition 5) then the algorithm in [7] for d=2 is universally optimal.

Figure 1: For W=((1,1,1),(1,1,1),(1,1,1),(0,1,2),(0,1,2),(0,1,2)) there are 36 IP𝕀P for which W is a witness list (any array that assigns (α,β,γ) to the first three cells). For W=((1,1,1),(1,1,1),(1,1,1),(0,4,5),(1,3,5),(2,3,4)) there are only 6.

3 Creating a universal lower bound

Let P be a point set of n points in general position. We use our definition of hull lists and witness lists to show a universal lower bound. That is, we define a quantity Q such that for all algorithms A𝒜, Universal(A,P)Q. To this end, we explore the definition of a witness list. Recall that 𝕀P is the set of all n! arrays that contain P. Consider any list W=(ai,bi,ci)i=1n of integer triples.

For a fixed W, there can be many IP𝕀P for which W is a witness list. For example, let P be a point set containing n3 points in a small ball around (0,0), and the three corners (α,β,γ) of a unit equilateral triangle centred at (0,0) (we refer to Figure 1). Let:

W=((1,1,1),(1,1,1),(1,1,1),(0,1,2),(0,1,2),,(0,1,2)).

Any IP𝕀P which contains (α,β,γ) in the first three positions has W as a witness list. Specifically, there are 3!(n3)! arrays IP𝕀P which have W as a witness list. There does not exist any other witness list W where more than 3!(n3)! arrays in 𝕀P have W as a witness list. We use this maximum quantity for our lower bound:

Definition 11.

Let P be a point set and W=(ai,bi,ci)i=1nn×3. We define

V(P,W):={IP𝕀P|W is a witness list of IP}.

We consider the maximal number of input arrays that can have the same witness list:

Vmax(P):=maxWn×3|V(P,W)|.
Theorem 12.

Let P be a point set of n points and A be any algorithm in 𝒜, then

universal(A,P)Ω(n+|ch(P)|logn+logn!Vmax(P)).

Proof.

Any algorithm must spend Ω(n) time to read the input. Denote by the minimum height across all clairvoyant decision trees in 𝒯PC. By Observation 7, Ω() is a universal lower bound. What remains is to bound . Let k=|ch(P)|. Let T be an arbitrary clairvoyant decision tree in 𝒯PC. Recall that each leaf of T stores a hull list and a witness list.

For any input IP𝕀P, there is a unique hull list of IP. It follows that the number of distinct hull lists, and therefore the number of distinct leaves of T, across all IP is at least n!(nk)!. Hence, log(n!(nk)!)Ω(klogn). For any input I𝕀P, there is at least one leaf in T containing a witness list W of I. Therefore,

n!=|𝕀P|L|V(P,W)|(# leaves of T)Vmax(P)logn!Vmax(P).

4 Analysing Kirkpatrick-McQueen-Seidel

Kirkpatrick and Seidel present an output-sensitive algorithm for computing the convex hull for a planar point set [7]. McQueen suggests a modification to the algorithm by Kirkpatrick and Seidel in Footnote 2 of [7]. The modified algorithm, depicted in Algorithm 1, is universally optimal. We first describe their algorithm. Next, we construct a geometric object that we will call a quadrangle tree and use it to analyse the running time of Algorithm 1.

High-level overview.

Their algorithm is recursive and it constructs the upper convex hull of P. The original input consists of an unordered array IP, from which they find the leftmost and rightmost vertex of P in linear time. Each recursive call has as input some set SP and two points p,prS such that (p,pr) is an edge of CH(S) (Figure 2) – we assume that the line segment between the leftmost and rightmost vertex lies on CH(P). Otherwise, this line segment splits the problem into two independent convex hull construction problems.

Given (S,p,pr), the algorithm first finds a point mS with the median x-coordinate in linear time. It then finds in linear time an edge (pi,pj) of CH(P)S with (pi,pj)(p,pr) such that m lies inside or on the quadrangle Q=(p,pr,pj,pi) (Q may also be a triangle, for example when pi=p). The algorithm partitions S in linear time into three sets:

  • S1 consists of all points of S that lie above or on the line ppi,

  • S2 consists of all points of S that lie above or on the line prpj, and

  • S=SS1S2. S lies within Q and, therefore, its points are not on the convex hull. Through Q we assign these points a witness in O(|S|) time at no asymptotic overhead.

The algorithm recurses on S1 and S2, using the segments (p,pi) and (pr,pj), respectively.

Figure 2: (a) The input are the points and the grey segment. We compute the point m with median x-coordinate and the edge (pi,pj). (b) Given Q=(p,pr,pj,pi), we partition the points into three sets: S1,S,S2. (c + d) We recurse on S1 and S2 using their respective edges of Q.
Algorithm 1 Kirkpatrick-McQueen-Seidel(unordered point set S, edge (p,pr) of CH(S)) [7].

4.1 Runtime analysis

We propose a novel fine-grained runtime analysis of this algorithm. To this end, we define what we will call the quadrangle tree (we refer to Figure 3 (a)).

Definition 13.

A rooted convex polygon (C,p,q) is a convex polygon C together with an edge pq of C. Given distinct vertices of r,s of C the line rs splits C into two pieces (one piece is empty if rs is an edge of C). Let Crs denote the piece that does not contain pq.

Definition 14.

A quadrangle tree 𝒬 of a rooted convex polygon (C,p,q) is a binary tree in which every node stores a quadrangle spanned by (up to) four vertices of C, such that:

  • The quadrangle at the root node is spanned by p,q,s,r where rs is an edge of C.
    We allow for p=r and/or q=s.

  • If qr, then the root has a child node whose subtree is a quadrangle tree of (Cpr,p,r).

  • If sp, then the root has a child node whose subtree is a quadrangle tree of (Cqs,q,s).

Given a point set P and a quadrangle tree 𝒬, the population of the root node are all points in P that lie on or inside the quadrangle pqrs, except for those that lie on the line pq. Observe that, since we assume that P lies in general position, the population of the root node equals all points in the interior of pqrs plus: r if pr and s if qs.

Observation 15.

Given the input array IP, the algorithm by Kirkpatrick, McQueen and Seidel finds the leftmost and rightmost vertices of P in linear time. For each point set P Algorithm 1 constructs, independent of the input ordering IP𝕀P, a quadrangle tree 𝒬 where each call of Kirkpatrick-McQueen-Seidel(S, (p,pr)) uniquely corresponds to a node (C,p,q) in 𝒬 with C=CH(S), p=p and q=pr.

Figure 3: (a) From a rooted polygon (C,p,q) we construct a quadrangle tree 𝒬 with six nodes: ρ,α,β,γ,τ. For each node in the tree, the red coloured vertices indicate its population.
(b) We assign all points pP a colour based on r(p). For example, for all pink points p the node r(p) equals α𝒬. We illustrate a partial order over the points in P where for all p,q with r(p)=r(q) the point p𝒬q if and only if p lies further from the line supporting the grey segment.
(c) We create an ordered downdraft φ by mapping each point in Pch(P) to a point in P. For all points q where multiple points in P map to q, we create a linear order over φ1({q}).

Ordered downdrafts.

For a point set P and a quadrangle tree 𝒬 of CH(P), we create an ordered downdraft. Intuitively, this is a mapping φ:Pch(P)P such that for each pPch(P), the point φ(p) lies deeper in the quadrangle tree, or, in the same node as p but farther from the corresponding root edge. This is our most technically involved definition.

Definition 16 (Figure 3(b)).

We define for any quadrangle tree 𝒬 of CH(P) a partial order 𝒬 on P. For pP, let r(p) be the node in 𝒬 within whose population p lies. Let Hr(p) be the halfplane defined by the rooted edge of r(p). For p,qP, we say that p𝒬q if

  • r(p) is a strict ancestor of r(q), or

  • r(p)=r(q), and q lies deeper inside the halfspace Hr(p) than p.

Given a quadrangle tree 𝒬, we define a downdraft φ as a map that maps each point in Pch(P) to a point in P. Specifically, it maps the point either to a quadrangle lower in the tree, or to a point in the same quadrangle that is strictly further away from the root edge.

Definition 17.

Let P be a point set and 𝒬 be a quadrangle tree for ch(P). A downdraft for (P,𝒬) is a map φ:(Pch(P))P such that pP, we have p𝒬φ(p).

Given any downdraft φ and point qP, the fiber φ1({q}) is the set of all points pP that get mapped to q.

Definition 18 (Figure 3(c)).

An ordered downdraft φ¯=(φ,φ¯) of (P,𝒬) is a downdraft φ of (P,𝒬) plus a total order φ¯ on each fiber φ1({p}) for pP. We define:

OD(P,𝒬) to be the set of all ordered downdrafts of (P,𝒬).

4.2 A universal upper bound

Let A denote the Kirkpatrick-McQueen-Seidel algorithm. Recall that Algorithm 1 naturally creates a quadrangle tree 𝒬 of CH(P), where each call of A(S, (p,pr)) uniquely corresponds to a node (C,p,q) in 𝒬 with C=CH(S), p=p and q=pr. We show a universal upper bound for the running time of A by counting the number of ordered downdrafts of 𝒬.

Theorem 19.

Let P be a planar point set in general position with n points. Let 𝒬 be the corresponding quadrangle tree from Observation 15 and let A denote the algorithm by Kirkpatrick, McQueen and Seidel which as input receives some IP𝕀P (and the leftmost and rightmost point in P). Then there exists a constant c such that

IP𝕀P,ρ(A,IP)c(n+lognn|OD(P,𝒬)|).

In Section 5, we show that Algorithm 1 is universally optimal by combining the upper bound from Theorem 19 with the lower bound from Theorem 12.

The proof.

Every node in 𝒬 corresponds to a call A(S,(p,pr)) with ppr. The quadrangle at this node is pprpjpi, and its child nodes correspond to the calls A(S1,(p,pi)) and A(S2,(pj,pr)). We denote the subtree of this node by 𝒬(S). We put 𝒬=𝒬(P).

Lemma 20.

Let S,S1,S2 be the sets in some recursive call of Algorithm 1. Then

|OD(S,𝒬(S))||S||S(S1S2)||OD(S1,𝒬(S1))||OD(S2,𝒬(S2))|.

Proof.

First, we show the following upper bound:

|OD(S,𝒬(S))||S||S(S1S2)||OD(S1S2,𝒬(S))|.

Indeed, any ordered downdraft in OD(S,𝒬(S)) can be obtained from an ordered downdraft in OD(S1S2,𝒬(S)) by placing each element of S(S1S2) in some fiber, and by placing it at some point in the ordering of the fiber. Within a fiber, an element of S can be placed in at most |S| different ways.

Finally, note that all points in S1CH(P) lie in the left child of 𝒬(S) and all points in S2CH(P) lie in its right child. Thus, any downdraft over (S1S2,𝒬(S)) may be obtained by constructing downdrafts over (S1,𝒬(S1)) and (S2,𝒬(S2)) independently, and thus

|OD(S1S2,𝒬(S))|=|OD(S1,𝒬(S1))||OD(S2,𝒬(S2))|.

For any call A(S,(p,pr)) made during the execution of the Kirkpatrick-McQueen-Seidel algorithm, let T(S) denote total running time spent on this call (including recursion). Since both median finding and bridge finding take O(|S|) time, there is an absolute constant c such that:

T(S)T(S1)+T(S2)+c|S|.For this constant c, we show: 
Lemma 21.

Denote for any call A(S,(p,pr)) by T(S) the time spent on executing the call (including all time spent during recursion). Then

T(S)c(|S|+|S|log|S|log|OD(S,𝒬(S))|).

Proof.

We use induction over |S|. If p=pr, then |S|=1 and T(S)c. Otherwise, let n=|S|,n1=|S1|,n2=|S2|. By induction,
T(S) T(S1)+T(S2)+c|S| c(n1+n2+n1logn1+n2logn2log|OD(S1,𝒬(S1))|log|OD(S2,𝒬(S2))|+n) c(n1log(2n1)+n2log(2n2)log|OD(S1,𝒬(S1))|log|OD(S2,𝒬(S2))|+n)

Since, S1,S2 are computed via the median x-coordinate, n1,n2n2. By Lemma 20,

log|OD(S1,𝒬(S1))|log|OD(S2,𝒬(S2))|log|OD(S,𝒬(S))|+(nn1n2)logn

Therefore,

T(S) c(n1logn+n2lognlog|OD(S,𝒬(S))|+(nn1n2)logn)+n)
=c(n+nlognlog|OD(S,𝒬(S))|))

We now apply Lemma 21 to the first call A(P,(p,pr)) of Algorithm 1. Note that per definition, 𝒬(P)=𝒬 and |P|=n. Lemma 21 guarantees that, regardless of the order IP we receive the input P in, the running time is at most

c(n+nlognlog|OD(P,𝒬)|))=c(n+lognn|OD(P,𝒬)|),

which proves Theorem 19.

5 Showing Universal Optimality

In Section 3, we showed for each point set P a universal lower bound (Theorem 12). This bound uses the quantity Vmax(P). This quantity is the maximum m, for which there exists a list W=(ai,bi,ci)i=1nn×3 with m inputs IP𝕀P for which W is a witness list of IP.

In Section 4, we showed an upper bound for Algorithm 1 (Theorem 19). For each input IP, the execution of Algorithm 1 on IP (together with an edge between the leftmost and rightmost vertex in IP) defines a quadrangle tree 𝒬. Our upper bound uses the quantity |OD(P,𝒬)|. This quantity counts the maximum number of ordered downdrafts of (P,𝒬).

Here, we show that Algorithm 1 is universally optimal by correlating these two quantities. We achieve this through two intermediate quantities: the number of corner assignments of W and the number of hull lists of P.

Definition 22.

Let W=(ai,bi,ci)i=1n. A corner assignment picks a corner for each of the n triangles in W. Formally, it is a map C:[n][n] such that C(i){ai,bi,ci} for all i[n]. Let CA(W) denote the set of all corner assignments of W. Note that |CA(W)|=3n.

Definition 23.

We define HL(P) as the set of all lists of k=|ch(P)| integers such that HHL(P) there exists an input IP𝕀P where H is a hull list of IP. Note that |HL(P)|=n!(nk)!nk.

Lemma 24.

Let W be an arbitrary witness for P. Let 𝒬 be an arbitrary quadrangle tree for P. There exists an injective map

Φ:V(P,W)OD(P,𝒬)×CA(W)×HL(P).

Proof.

Fix IPV(P,W). By our canonical ordering of the hull lists, there exists exactly one HHL(P) for which H is a hull list of IP. We define our map Φ by additionally constructing for IP a corner assignment C and ordered downdraft φ¯.

For i[n], observe that if Ip[i] is not in ch(P) then Ip[i] lies strictly inside the triangle formed by (IP[ai],IP[bi],IP[ci]). Therefore, at least one of IP[i]𝒬IP[ai],IP[i]𝒬IP[bi] or IP[i]𝒬IP[ci] holds. We construct the corner assignment C by arbitrarily choosing for each i[n], the value C(i){ai,bi,ci} such that IP[i]𝒬IP[C(i)]. We then construct a downdraft φ by setting φ(IP[i])=IP[C(i)]. To obtain an ordered downdraft, we order for all qP each fiber φ1({q}) via the following rule:

IP[i],IP[j]φ1({q}):IP[i]φ¯IP[j]i<j

Then φ¯ is an ordered downdraft and we have defined the map Φ(IP)=(φ¯,C,H).

We now show that this map Φ is injective. Suppose that IP and IP are elements of V(P,W) such that Φ(IP)=(φ¯,C,H)=Φ(IP). Observe that, per definition, the hull list HΦ(IP)=Φ(IP) is a sequence of integers with the following property: if u is the x’th point on ch(P) then IP[H[x]]=IP[H[x]]=u. Suppose for the sake of contradiction that there exist integers i,i[n] with ii such that u=IP[i]=IP[i]. We pick the pair (i,i) such that u is maximal in the partial order 𝒬.

First, consider the case where u is a point on ch(P). Let u be the x’th element in the canonical ordering of ch(P). Then u=IP[H[x]]=IP[H[x]]. However, we chose u such that u=IP[i]=IP[i] and so i=i, a contradiction.

Alternatively, suppose that uch(P). By maximality of our choice of u, it follows that for all points v with u𝒬v, there exists a unique integer j such that v=IP[j]=IP[j]. We define v:=φ(u). By the definition of a downdraft, u𝒬v and so there is a unique integer j[n] with v=φ(u)=IP[j]=IP[j].

We observe that the objects IP,IP,φ and C are all maps. In Figure 4 we illustrate the diagram corresponding to these maps. Recall that H is the hull list of both Φ(IP) and Φ(IP). The left diagram in Figure 4 commutes. Indeed, by our definition of the downdraft φ, we chose φ such that φ(Ip[x])=IP[C(x)] for all x[n]H.

Consider chasing the left square of this diagram from v=φ(u) (see Figure 4, right). From v, we may first apply IP1 to obtain j. We then apply C1 to j to get a set of indices X:=C1(IP1({v})). Conversely, we may chase this diagram from v by first applying φ1 to obtain a set of points, and then applying IP1 to obtain a set of indices. Since the diagram commutes, also IP1(φ1({v}))=X. Next, we focus on the right square of the diagram. Since v=IP[j], we have C1(IP1({v}))=X. We may chase the right square from v by first applying φ1 to obtain a set of points, and then applying IP1. Since this diagram commutes, it follows that IP1(φ1({v}))=X too. We now use this set X to obtain a contradiction:

Figure 4: (left) the commuting diagram corresponding to (IP,IP,φ,C). (right) In our proof, we chase this diagram from v encountering the integer j, the set X, and the fiber φ1({v}).

We assumed that (φ¯,C,H)=Φ(IP)=Φ(IP). Recall that φ¯ induces a total order on φ1({v}). Per definition of Φ(IP), all points pφ1({v}) are ordered by their index x defined via p=IP[x]. The rank of a value u with respect to an ordered set is its index in the order. We can consider the rank of u in two sets: X and φ1({v}). Recall that we ordered for all qP each fiber φ1({q}) via the following rule:

IP[a],IP[b]φ1({q}):IP[a]φ¯IP[b]a<b

It follows that the rank of u satisfies:

Rankφ¯(u,φ1({v}))=Rank<(i,IP1(φ1({v})))=Rank<(i,X)

Similarly,

Rankφ¯(u,φ1({φ(u)}))=Rank<(i,C1({j}))=Rank<(i,X).

Since i and i both have the same rank in X, it follows that i=i, contradiction. This shows that IP=IP, so our constructed map Φ is injective. The above lemma immediately implies the following relation between Vmax(P) and OD(P,𝒬):

Corollary 25.

For every quadrangle tree 𝒬 for P,

Vmax|OD(P,𝒬)|3nnk.

Finally, we are ready to show universal optimality of Algorithm 1:

Theorem 10. [Restated, see original statement.]

If we define 𝒜 as the set of all correct comparison-based convex hull algorithms (Definition 5) then the algorithm in [7] for d=2 is universally optimal.

Proof.

Let 𝒬 denote the quadrangle tree that corresponds to executing Algorithm 1. We apply Theorem 19 to note that there exists a constant c such that:

maxIP𝕀Pρ(A,IP)c(n+lognn|OD(P,𝒬)|).

By Corollary 25,

lognn|OD(P,𝒬)|log3nnknnVmax=nlog(3)+klogn+lognnVmax

Since log(3)2 and lognn2n+logn!, this yields

lognn|OD(P,𝒬)|4n+klogn+logn!Vmax

We may now apply the universal lower bound from Theorem 12 to obtain the theorem.

References

  • [1] Peyman Afshani, Jérémy Barbay, and Timothy Chan. Instance-optimal geometric algorithms. In IEEE Symposium on Foundations of Computer Science (FOCS), pages 129–138. Association for Computing Machinery, 2009. doi:10.1109/FOCS.2009.34.
  • [2] Peyman Afshani, Jérémy Barbay, and Timothy M. Chan. Instance-optimal geometric algorithms. Journal of the ACM (JACM), 64(1), March 2017. doi:10.1145/3046673.
  • [3] Mark de Berg, Matthew Katz, A Frank Van der Stappen, and Jules Vleugels. Realistic input models for geometric algorithms. In Symposium on Computational geometry (SoCG), pages 294–303, 1997. doi:10.1145/262839.262986.
  • [4] Jeff Erickson. Dense point sets have sparse delaunay triangulations or “… but not too nasty”. Discrete & Computational Geometry, 33:83–115, 2005. doi:10.5555/3115459.3115691.
  • [5] Bernhard Haeupler, Richard Hladík, Václav Rozhoň, Robert E Tarjan, and Jakub Tetĕk. Universal optimality of dijkstra via beyond-worst-case heaps. In Symposium on Foundations of Computer Science (FOCS), pages 2099–2130. IEEE, 2024. doi:10.1109/FOCS61266.2024.00125.
  • [6] Bernhard Haeupler, Richard Hladík, John Iacono, Václav Rozhoň, Robert E. Tarjan, and Jakub Tětek. Fast and simple sorting using partial information. In ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 3953–3973, 2025. doi:10.1137/1.9781611978322.134.
  • [7] David G Kirkpatrick and Raimund Seidel. The ultimate planar convex hull algorithm? SIAM Journal on Computing, 15(1):287–299, 1986. doi:10.1137/0215021.
  • [8] Jiří Matoušek, János Pach, Micha Sharir, Shmuel Sifrony, and Emo Welzl. Fat triangles determine linearly many holes. SIAM Journal on Computing, 23(1):154–169, 1994. doi:10.1109/SFCS.1991.185347.
  • [9] Ivor van der Hoog, Eva Rotenberg, and Daniel Rutschmann. Simpler optimal sorting from a directed acyclic graph. In Symposium on Simplicity in Algorithms (SOSA), pages 350–355. SIAM, 2025. doi:10.1137/1.9781611978315.26.