Abstract
Finding a maximum distance of points in E2 or in E3 is one of those. It is a frequent task required in many applications. In spite of the fact that it is an extremely simple task, the known “Brute force” algorithm is of O(N2) complexity. Due to this complexity the run-time is very long and unacceptable especially if medium or larger data sets are to be processed. An alternative approach is convex hull computation with complexity higher than O(N) followed by diameter computation with O(M2) complexity. The situation is similar to sorting, where the bubble sort algorithm has O(N2) complexity that cannot be used in practice even for medium data sets.
This paper describes a novel and fast, simple and robust algorithm with O(N) expected complexity which enables to decrease run-time needed to find the maximum distance of two points in E2. It can be easily modified for the Ek case in general. The proposed algorithm has been evaluated experimentally on larger different datasets in order to verify it and prove expected properties of it.
Experiments proved the advantages of the proposed algorithm over the standard algorithms based on the “Brute force”, convex hull or convex hull diameters approaches. The proposed algorithm gives a significant speed-up to applications, when medium and large data sets are processed. It is over 10 000 times faster than the standard “Brute force” algorithm for 106 points randomly distributed points in E2 and over 4 times faster than convex hull diameter computation. The speed-up of the proposed algorithm grows with the number of points processed.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
WEB ref’s http://softsurfer.com/Archive/algorithm_0109/algorithm_0109.htm#Convex_Hull_Algorithms (retrieved 2012-08-21).
References
Barber, C.B., Dobkin, D.P., Huhdanpaa, H.: The quickhull algorithm for covex hulls. ACM Trans. Math. Softw. 22(4), 469–483 (1996)
Dobkin, D.P., Snyder, L.: On a general method of maximizing and minimizing among certain geometric problems. In: Proceedings of the 20th Annual Symposium on the Foundations of Computer Science, pp. 9–17 (1979)
Hilyard, J., Teilhet, S.: C# Coockbook. OReilly, Newton (2007)
Mehta, D.P., Sahni, S.: Handbook of Data Structures and Applications. CRC Press, Boca Raton (2005)
O’Rourke, J.: Computational Geometry in C. Cambridge University Press, Cambridge (1998)
Sahni, S.: Data Structures and Applications in C++. McGraw-Hill, New York (1998)
Sedgwick, R.: Algorithms in Java. Addison Wesley Professional, Boston (2002)
Shamos, M.I.: Computational geometry. Ph.D. thesis, Yale University (1978)
Skala,V., Majdisova, Z., Smolik, M.: Space subdivision to speed-up convex hull construction in E3. Adv, Softw. Eng. 91, 12–22 (2016a). ISSN 0965-9978
Skala, V., Smolik, M., Majdisova, Z.: Reducing the number of points on the convex hull calculation using the polar space subdivision in E2. In: SIBGRAPI 2016, pp. 40–47. IEEE (2016b). ISBN 978-1-5090-3568-7, ISSN 2377-5416
Skiena, S.S.: “Convex Hull.” §8.6.2 in The Algorithm Design Manual, pp. 351–354. Springer, New York (1997)
Snyder, W.E., Tang, D.A.: Finding the extrema of a region. IEEE Trans. Pattern Anal. Mach. Intell. PAMI-2, 266–269 (1980)
Wirth, N.: Algorithms + Data Structures = Program. Prentice Hall, Upper Saddle River (1976)
Yao, A.C.-C.: A lower bound to finding convex hulls. J. ACM 28, 780–787 (1981)
Kirkpatrick, D.K., Seidel, R.: Ultimate planar convex hull algorithm? SIAM J. Comput. 15, 287–299 (1986)
Chan, T.: Optimal output-sensitive convex hull algorithms in two and three dimensions. Discrete Comput. Geom. 16(3), 361–368 (1996)
Avis, D., Bremner, D., Seidel, R.: How good are convex hull algorithms? Comput. Geom.: Theory Appl. 7(5-6), 265–301 (1997)
Acknowledgments
The authors would like to thank their colleagues at the University of West Bohemia, Plzen, for their discussions and suggestions, and anonymous reviewers for their valuable comments and hints provided. The research was supported by projects Czech Science Foundation (GACR) No. GA17-05534S and partially by SGS 2019-016.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this paper
Cite this paper
Skala, V., Smolik, M. (2019). Simple and Fast Oexp(N) Algorithm for Finding an Exact Maximum Distance in E2 Instead of O(N^2) or O(N lgN). In: Misra, S., et al. Computational Science and Its Applications – ICCSA 2019. ICCSA 2019. Lecture Notes in Computer Science(), vol 11619. Springer, Cham. https://doi.org/10.1007/978-3-030-24289-3_27
Download citation
DOI: https://doi.org/10.1007/978-3-030-24289-3_27
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-24288-6
Online ISBN: 978-3-030-24289-3
eBook Packages: Computer ScienceComputer Science (R0)