Skip to main content

A Faster Convex-Hull Algorithm via Bucketing

  • Conference paper
  • First Online:
Analysis of Experimental Algorithms (SEA 2019)

Abstract

In the convex-hull problem, in two-dimensional space, the task is to find, for a given sequence S of n points, the smallest convex polygon for which each point of S is either in its interior or on its boundary. In this paper, we propose a variant of the classical bucketing algorithm that (1) solves the convex-hull problem for any multiset of points, (2) uses \(O(\sqrt{n}\,)\) words of extra space, (3) runs in O(n) expected time on points drawn independently and uniformly from a rectangle, and (4) requires \(O(n \lg {} n)\) time in the worst case. Also, we perform experiments to compare bucketing to other alternatives that are known to work in linear expected time. In our tests, in the integer-coordinate setting, bucketing was a clear winner compared to the considered competitors (plane-sweep, divide & conquer, quickhull, and throw-away).

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 69.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 89.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Akl, S.G., Meijer, H.: On the average-case complexity of “bucketing” algorithms. J. Algorithms 3(1), 9–13 (1982). https://doi.org/10.1016/0196-6774(82)90003-7

    Article  MathSciNet  Google Scholar 

  2. Akl, S.G., Toussaint, G.T.: A fast convex hull algorithm. Inf. Process. Lett. 7(5), 219–222 (1978). https://doi.org/10.1016/0020-0190(78)90003-0

    Article  MathSciNet  MATH  Google Scholar 

  3. Allison, D.C.S., Noga, M.T.: Some performance tests of convex hull algorithms. BIT 24(1), 2–13 (1984). https://doi.org/10.1007/BF01934510

    Article  MathSciNet  MATH  Google Scholar 

  4. Andrew, A.M.: Another efficient algorithm for convex hulls in two dimensions. Inf. Process. Lett. 9(5), 216–219 (1979). https://doi.org/10.1016/0020-0190(79)90072-3

    Article  MATH  Google Scholar 

  5. Asano, T., Edahiro, M., Imai, H., Iri, M., Murota, K.: Practical use of bucketing techniques in computational geometry. In: Toussaint, G.T. (ed.) Computational Geometry. North-Holland (1985)

    Google Scholar 

  6. Bentley, J.L., Kung, H.T., Schkolnick, M., Thompson, C.D.: On the average number of maxima in a set of vectors and applications. J. ACM 25(4), 536–543 (1978). https://doi.org/10.1145/322092.322095

    Article  MathSciNet  MATH  Google Scholar 

  7. Bentley, J.L., Shamos, M.I.: Divide and conquer for linear expected time. Inf. Process. Lett. 7(2), 87–91 (1978). https://doi.org/10.1016/0020-0190(78)90051-0

    Article  MathSciNet  MATH  Google Scholar 

  8. Berberich, E., Hagen, M., Hiller, B., Moser, H.: Experiments. In: Müller-Hannemann, M., Schirra, S. (eds.) Algorithm Engineering: Bridging the Gap between Algorithm Theory and Practice. Springer-Verlag (2010)

    Google Scholar 

  9. Brönnimann, H., Iacono, J., Katajainen, J., Morin, P., Morrison, J., Toussaint, G.: Space-efficient planar convex hull algorithms. Theoret. Comput. Sci. 321(1), 25–40 (2004). https://doi.org/10.1016/j.tcs.2003.05.004

    Article  MathSciNet  MATH  Google Scholar 

  10. Bykat, A.: Convex hull of a finite set of points in two dimensions. Inf. Process. Lett. 7(6), 296–298 (1978). https://doi.org/10.1016/0020-0190(78)90021-2

    Article  MathSciNet  MATH  Google Scholar 

  11. Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms. The MIT Press, 3rd edn. (2009)

    Google Scholar 

  12. Devroye, L., Toussaint, G.T.: A note on linear expected time algorithms for finding convex hulls. Computing 26(4), 361–366 (1981). https://doi.org/10.1007/BF02237955

    Article  MathSciNet  MATH  Google Scholar 

  13. Devroye, L.: Expected time analysis of algorithms in computational geometry. In: Toussaint, G.T. (ed.) Computational Geometry. North-Holland (1985)

    Google Scholar 

  14. Devroye, L.: Lecture Notes on Bucket Algorithms. Birkhäuser Boston, Inc. (1986)

    Google Scholar 

  15. Dvor̆ák, S., D̆urian, B.: Stable linear time sublinear space merging. Comput. J. 30(4), 372–375 (1987). https://doi.org/10.1093/comjnl/30.4.372

    Article  Google Scholar 

  16. Eddy, W.F.: A new convex hull algorithm for planar sets. ACM Trans. Math. Software 3(4), 398–403 (1977). https://doi.org/10.1145/355759.355766

    Article  MATH  Google Scholar 

  17. Gamby, A.N., Katajainen, J.: Convex-hull algorithms: Implementation, testing, and experimentation. Algorithms 11(12) (2018). https://doi.org/10.3390/a11120195

    Article  MathSciNet  Google Scholar 

  18. Gamby, A.N., Katajainen, J.: Convex-hull algorithms in C++. CPH STL report 2018–1, Dept. Comput. Sci., Univ. Copenhagen (2018–2019), http://www.diku.dk/~jyrki/Myris/GK2018S.html

  19. Graham, R.L.: An efficient algorithm for determining the convex hull of a finite planar set. Inf. Process. Lett. 1(4), 132–133 (1972). https://doi.org/10.1016/0020-0190(72)90045-2

    Article  MATH  Google Scholar 

  20. Green, P.J., Silverman, B.W.: Constructing the convex hull of a set of points in the plane. Comput. J. 22(3), 262–266 (1979). https://doi.org/10.1093/comjnl/22.3.262

    Article  MATH  Google Scholar 

  21. Hagerup, T.: Sorting and searching on the word RAM. In: Morvan, M., Meinel, C., Krob, D. (eds.) STACS 1998. LNCS, vol. 1373, pp. 366–398. Springer, Heidelberg (1998). https://doi.org/10.1007/BFb0028575

    Chapter  Google Scholar 

  22. Han, Y.: Deterministic sorting in \({O}(n \log \log n)\) time and linear space. J. Algorithms 50(1), 96–105 (2004). https://doi.org/10.1016/j.jalgor.2003.09.001

    Article  MathSciNet  MATH  Google Scholar 

  23. Hoare, C.A.R.: Quicksort. Comput. J. 5(1), 10–16 (1962). https://doi.org/10.1093/comjnl/5.1.10

    Article  MathSciNet  MATH  Google Scholar 

  24. Katajainen, J.: Class templates for fixed-precision arithmetic. Work in progress (2017–2019)

    Google Scholar 

  25. Kirkpatrick, D.G., Seidel, R.: The ultimate planar convex hull algorithm? SIAM J. Comput. 15(1), 287–299 (1986). https://doi.org/10.1137/0215021

    Article  MathSciNet  MATH  Google Scholar 

  26. Musser, D.R.: Introspective sorting and selection algorithms. Software Pract. Exper. 27(8), 983–993 (1997)

    Google Scholar 

  27. Nevalainen, O., Raita, T.: An internal hybrid sort algorithm revisited. Comput. J. 35(2), 177–183 (1992). https://doi.org/10.1093/comjnl/35.2.177

    Article  MATH  Google Scholar 

  28. Overmars, M.H., van Leeuwen, J.: Further comments on Bykat’s convex hull algorithm. Inf. Process. Lett. 10(4–5), 209–212 (1980). https://doi.org/10.1016/0020-0190(80)90142-8

    Article  MATH  Google Scholar 

  29. Preparata, F.P., Hong, S.J.: Convex hulls of finite sets of points in two and three dimensions. Commun. ACM 20(2), 87–93 (1977). https://doi.org/10.1145/359423.359430

    Article  MathSciNet  MATH  Google Scholar 

  30. Scowen, R.S.: Algorithm 271: Quickersort. Commun. ACM 8(11), 669–670 (1965). https://doi.org/10.1145/365660.365678

    Article  Google Scholar 

  31. Shewchuk, J.R.: Adaptive precision floating-point arithmetic and fast robust predicates for computational geometry (1996), http://www.cs.cmu.edu/~quake/robust.html

  32. Singleton, R.C.: Algorithm 347: An efficient algorithm for sorting with minimal storage [M1]. Commun. ACM 12(3), 185–187 (1969). https://doi.org/10.1145/362875.362901

    Article  Google Scholar 

  33. Williams, J.W.J.: Algorithm 232: Heapsort. Commun. ACM 7(6), 347–348 (1964). https://doi.org/10.1145/512274.512284

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Jyrki Katajainen .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Gamby, A.N., Katajainen, J. (2019). A Faster Convex-Hull Algorithm via Bucketing. In: Kotsireas, I., Pardalos, P., Parsopoulos, K., Souravlias, D., Tsokas, A. (eds) Analysis of Experimental Algorithms. SEA 2019. Lecture Notes in Computer Science(), vol 11544. Springer, Cham. https://doi.org/10.1007/978-3-030-34029-2_30

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-34029-2_30

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-34028-5

  • Online ISBN: 978-3-030-34029-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics