ArticleslgStudy

computer science

Convex hull algorithms

Convex hull algorithms is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Convex hull algorithms rather than just read about it. In short: Algorithms that construct convex hulls of various objects have a broad range of applications in mathematics and computer science. In computational geometry, numerous algorithms are proposed for computing the convex hull of a finite set of points, with various computational complexities.

Key takeaways

  • Convex hull algorithms belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Convex hull algorithms to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Convex hull algorithms from memory before moving on to harder problems.

Reference excerpt

Algorithms that construct convex hulls of various objects have a broad range of applications in mathematics and computer science. In computational geometry, numerous algorithms are proposed for computing the convex hull of a finite set of points, with various computational complexities. Computing the convex hull means that a non-ambiguous and efficient representation of the required convex shape is constructed. The complexity of the corresponding algorithms is usually estimated in terms of n, the number of input points, and sometimes also in terms of h, the number of points on the convex hull.

Planar case Consider the general case when the input to the algorithm is a finite unordered set of points on a Cartesian plane. An important special case, in which the points are given in the order of traversal of a simple polygon's boundary, is described later in a separate subsection. If not all points are on the same line, then their convex hull is a convex polygon whose vertices are some of the points in the input set. Its most common representation is the list of its vertices ordered along its boundary clockwise or counterclockwise. In some applications it is convenient to represent a convex polygon as an intersection of a set of half-planes.

Lower bound on computational complexity For a finite set of points in the plane, the lower bound on the computational complexity of finding the convex hull represented as a convex polygon is easily shown to be the same as for sorting using the following reduction. For the set x1,…,xn numbers to sort consider the set (x1,x12),…,(xn,xn2) of points in the plane. Since they lie on a parabola, which is a convex curve, it is easy to see that the vertices of the convex hull, when traversed along the boundary, produce the sorted order of the numbers x1,…,xn. Clearly, linear time is required for the described transformation of numbers into points and then extracting their sorted order. Therefore, in the general case the convex hull of n points cannot be computed more quickly than sorting. The standard Ω(nlog⁡n) lower bound for sorting is proven in the decision tree model of computing, in which only numerical comparisons but not arithmetic operations can be performed; however, in this model, convex hulls cannot be computed at all. Sorting also requires Ω(nlog⁡n) time in the algebraic decision tree model of computation, a model that is more suitable for convex hulls, and in this model convex hulls also require Ω(nlog⁡n) time. However, in models of computer arithmetic that allow numbers to be sorted more quickly than O(nlog⁡n) time, for instance by using integer sorting algorithms, planar convex hulls can also be computed more quickly: the Graham scan algorithm for convex hulls consists of a single sorting step followed by a linear amount of additional work.

Optimal output-sensitive algorithms As stated above, the complexity of finding a convex hull as a function of the input size n is lower bounded by Ω(nlog⁡n). However, the complexity of some convex hull algorithms can be characterized in terms of both input size n and the output size h (the number of points in the hull). Such algorithms are called output-sensitive algorithms. They may be asymptotically more efficient than Θ(nlog⁡n) algorithms in cases when h=o(n). The lower bound on worst-case running time of output-sensitive convex hull algorithms was established to be Ω(nlog⁡h) in the planar case. There are several algorithms which attain this optimal time complexity. The earliest one was introduced by Kirkpatrick and Seidel in 1986 (who called it "the ultimate convex hull algorithm"). A much simpler algorithm was developed by Chan in 1996, and is called Chan's algorithm.

Algorithms Known convex hull algorithms are listed below, ordered by the date of first publication. Time complexity of each algorithm is stated in terms of the number of inputs points n and the number of points on the hull h. Note that in the worst case h may be as large as n.

Gift wrapping, a.k.a. Jarvis march — O(nh) One of the simplest (although not the most time efficient in the worst case) planar algorithms. Created independently by Chand & Kapur in 1970 and R. A. Jarvis in 1973. It has O(nh) time complexity, where n is the number of points in the set, and h is the number of points in the hull. In the worst case the complexity is O(n2). Graham scan — O(n log n) A slightly more sophisticated, but much more efficient algorithm, published by Ronald Graham in 1972. If the points are already sorted by one of the coordinates or by the angle to a fixed vector, then the algorithm takes O(n) time. Quickhull Created independently in 1977 by W. Eddy and in 1978 by A. Bykat. Just like the quicksort algorithm, it has the expected time complexity of O(n log n), but may degenerate to O(n2) in the worst case. Divide and conquer, a.k.a. merge hull — O(n log n) Another O(n log n) algorithm, published in 1977 by Preparata and Hong. This algorithm is also applicable to the three dimensional case. Chan calls this "one of the best illustrations of the power of the divide-and-conquer paradigm". Monotone chain, a.k.a. Andrew's algorithm — O(n log n) Published in 1979 by A. M. Andrew. The algorithm can be seen as a variant of Graham scan which sorts the points lexicographically by their coordinates. When the input is already sorted, the algorithm takes O(n) time. Incremental convex hull algorithm — O(n log n) Published in 1984 by Michael Kallay. Kirkpatrick–Seidel algorithm — O(n log h) The first optimal output-sensitive algorithm. It modifies the divide and conquer algorithm by using the technique of marriage-before-conquest and low-dimensional linear programming. Published by Kirkpatrick and Seidel in 1986. Chan's algorithm — O(n log h) A simpler optimal output-sensitive algorithm created by Chan in 1996. It combines gift wrapping with the execution of an O(n log n) algorithm (such as Graham scan) on small subsets of the input.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Convex hull algorithms

Start with the simplest possible case. Write down what Convex hull algorithms claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Convex hull algorithms before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Convex hull algorithms ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Convex hull algorithms

In research
Convex hull algorithms appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Convex hull algorithms in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Convex hull algorithms is common in secondary-school and first-year university syllabi. It links to neighbouring topics Convex hull algorithms, so understanding it makes those chapters shorter.
In everyday life
Look for Convex hull algorithms outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Convex hull algorithms” →

How to study Convex hull algorithms in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Convex hull algorithms means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Convex hull algorithms out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Convex hull algorithms in simple terms?

Algorithms that construct convex hulls of various objects have a broad range of applications in mathematics and computer science. In computational geometry, numerous algorithms are proposed for computing the convex hull of a finite set of points, with various computational complexities.

Why does Convex hull algorithms matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Convex hull algorithms?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Convex hull algorithms.

Tags

  • Convex hull algorithms

Keep exploring