Algorithm for finding the convex hull of a set of points in the plane
In computational geometry, Chan's algorithm,[1] named after Timothy M. Chan, is an optimal output-sensitive algorithm to compute the convex hull of a set of points, in 2- or 3-dimensional space.
The algorithm takes time, where is the number of vertices of the output (the convex hull). In the planar case, the algorithm combines an algorithm (Graham scan, for example) with Jarvis march (), in order to obtain an optimal time. Chan's algorithm is notable because it is much simpler than the Kirkpatrick–Seidel algorithm, and it naturally extends to 3-dimensional space. This paradigm[2] has been independently developed by Frank Nielsen in his Ph.D. thesis.[3]
Algorithm
Overview
A single pass of the algorithm requires a parameter which is between 0 and (number of points of our set ). Ideally, but , the number of vertices in the output convex hull, is not known at the start. Multiple passes with increasing values of are done which then terminates when (see below on choosing parameter ).
The algorithm starts by arbitrarily partitioning the set of points into subsets with at most points each; notice that .
For each subset , it computes the convex hull, , using an algorithm (for example, Graham scan), where is the number of points in the subset. As there are subsets of points each, this phase takes time.
During the second phase, Jarvis's march is executed, making use of the precomputed (mini) convex hulls, . At each step in this Jarvis's march algorithm, we have a point in the convex hull (at the beginning, may be the point in with the lowest y coordinate, which is guaranteed to be in the convex hull of ), and need to find a point such that all other points of are to the right of the line [clarification needed], where the notation simply means that the next point, that is , is determined as a function of and . The convex hull of the set , , is known and contains at most points (listed in a clockwise or counter-clockwise order), which allows to compute in time by binary search[how?]. Hence, the computation of for all the subsets can be done in time. Then, we can determine using the same technique as normally used in Jarvis's march, but only considering the points (i.e. the points in the mini convex hulls) instead of the whole set . For those points, one iteration of Jarvis's march is which is negligible compared to the computation for all subsets. Jarvis's march completes when the process has been repeated times (because, in the way Jarvis march works, after at most iterations of its outermost loop, where is the number of points in the convex hull of , we must have found the convex hull), hence the second phase takes time, equivalent to time if is close to (see below the description of a strategy to choose such that this is the case).
By running the two phases described above, the convex hull of points is computed in time.
Choosing the parameter m
If an arbitrary value is chosen for , it may happen that . In that case, after steps in the second phase, we interrupt the Jarvis's march as running it to the end would take too much time.
At that moment, a time will have been spent, and the convex hull will not have been calculated.
The idea is to make multiple passes of the algorithm with increasing values of ; each pass terminates (successfully or unsuccessfully) in time. If increases too slowly between passes, the number of iterations may be large; on the other hand, if it rises too quickly, the first for which the algorithm terminates successfully may be much larger than , and produce a complexity .
Squaring Strategy
One possible strategy is to square the value of at each iteration, up to a maximum value of (corresponding to a partition in singleton sets).[4] Starting from a value of 2, at iteration , is chosen. In that case, iterations are made, given that the algorithm terminates once we have
with the logarithm taken in base , and the total running time of the algorithm is
In three dimensions
To generalize this construction for the 3-dimensional case, an algorithm to compute the 3-dimensional convex hull by Preparata and Hong should be used instead of Graham scan, and a 3-dimensional version of Jarvis's march needs to be used. The time complexity remains .[1]
Pseudocode
In the following pseudocode, text between parentheses and in italic are comments. To fully understand the following pseudocode, it is recommended that the reader is already familiar with Graham scan and Jarvis march algorithms to compute the convex hull, , of a set of points,
.
Input: Set with points .
Output: Set with points, the convex hull of .
(Pick a point of which is guaranteed to be in : for instance, the point with the lowest y coordinate.)
(This operation takes time: e.g., we can simply iterate through .)
( is used in the Jarvis march part of this Chan's algorithm,
so that to compute the second point, , in the convex hull of .)
(Note: is not a point of .)
(For more info, see the comments close to the corresponding part of the Chan's algorithm.)
(Note: , the number of points in the final convex hull of , is not known.)
(These are the iterations needed to discover the value of , which is an estimate of .)
( is required for this Chan's algorithm to find the convex hull of .)
(More specifically, we want , so that not to perform too many unnecessary iterations
and so that the time complexity of this Chan's algorithm is .)
(As explained above in this article, a strategy is used where at most iterations are required to find .)
(Note: the final may not be equal to , but it is never smaller than and greater than .)
(Nevertheless, this Chan's algorithm stops once iterations of the outermost loop are performed,
that is, even if , it doesn't perform iterations of the outermost loop.)
(For more info, see the Jarvis march part of this algorithm below, where is returned if .)
fordo
(Set parameter for the current iteration. A "squaring scheme" is used as described above in this article.
There are other schemes: for example, the "doubling scheme", where , for .
If the "doubling scheme" is used, though, the resulting time complexity of this Chan's algorithm is .)
(Initialize an empty list (or array) to store the points of the convex hull of , as they are found.)
(Arbitrarily split set of points into subsets of roughly elements each.)
(Compute the convex hull of all subsets of points, .)
(It takes time.)
If , then the time complexity is .)
fordo
(Compute the convex hull of subset , , using Graham scan, which takes time.)
( is the convex hull of the subset of points .)
(At this point, the convex hulls of respectively the subsets of points have been computed.)
(Now, use a modified version of the Jarvis march algorithm to compute the convex hull of .)
(Jarvis march performs in time, where is the number of input points and is the number of points in the convex hull.)
(Given that Jarvis march is an output-sensitive algorithm, its running time depends on the size of the convex hull, .)
(In practice, it means that Jarvis march performs iterations of its outermost loop.
At each of these iterations, it performs at most iterations of its innermost loop.)
(We want , so we do not want to perform more than iterations in the following outer loop.)
(If the current is smaller than , i.e. , the convex hull of cannot be found.)
(In this modified version of Jarvis march, we perform an operation inside the innermost loop which takes time.
Hence, the total time complexity of this modified version is
If , then the time complexity is .)
fordo
(Note: here, a point in the convex hull of is already known, that is .)
(In this inner for loop, possible next points to be on the convex hull of , , are computed.)
(Each of these possible next points is from a different :
that is, is a possible next point on the convex hull of which is part of the convex hull of .)
(Note: depend on : that is, for each iteration , there are possible next points to be on the convex hull of .)
(Note: at each iteration , only one of the points among is added to the convex hull of .)
fordo
( finds the point such that the angle is maximized [why?],
where is the angle between the vectors and . Such is stored in .)
(Angles do not need to be calculated directly: the orientation test can be used [how?].)
(Note: at the iteration , and is known and is a point in the convex hull of :
in this case, it is the point of with the lowest y coordinate.)
(Choose the point which maximizes the angle [why?] to be the next point on the convex hull of .)
(Jarvis march terminates when the next selected point on the convext hull, , is the initial point, .)
if
(Return the convex hull of which contains points.)
(Note: of course, no need to return which is equal to .)
return
else
(If after iterations a point has not been found so that , then .)
(We need to start over with a higher value for .)
Implementation
Chan's paper contains several suggestions that may improve the practical performance of the algorithm, for example:
When computing the convex hulls of the subsets, eliminate the points that are not in the convex hull from consideration in subsequent executions.
The convex hulls of larger point sets can be obtained by merging previously calculated convex hulls, instead of recomputing from scratch.
With the above idea, the dominant cost of algorithm lies in the pre-processing, i.e., the computation of the convex hulls of the groups. To reduce this cost, we may consider reusing hulls computed from the previous iteration and merging them as the group size is increased.
Extensions
Chan's paper contains some other problems whose known algorithms can be made optimal output sensitive using his technique, for example:
Computing the lower envelope of a set of line segments, which is defined as the lower boundary of the unbounded trapezoid of formed by the intersections.
Hershberger[5] gave an algorithm which can be sped up to , where h is the number of edges in the envelope
Constructing output sensitive algorithms for higher dimensional convex hulls. With the use of grouping points and using efficient data structures, complexity can be achieved provided h is of polynomial order in .
^Nielsen, Frank (2000). "Grouping and Querying: A Paradigm to Get Output-Sensitive Algorithms". Discrete and Computational Geometry. Lecture Notes in Computer Science. Vol. 1763. pp. 250–257. doi:10.1007/978-3-540-46515-7_21. ISBN978-3-540-67181-7.
Kijang Sumatra Status konservasi Data Kurang (IUCN 3.1) Klasifikasi ilmiah Kerajaan: Animalia Filum: Chordata Kelas: Mammalia Ordo: Artiodactyla Subordo: Ruminantia Famili: Cervidae Subfamili: Cervinae Genus: Muntiacus Spesies: M. montanus Nama binomial Muntiacus montanus(Robinson & Kloss, 1918) Kijang Sumatra (Muntiacus montanus) adalah sejenis kijang yang berukuran sebesar anjing besar. Kijang Sumatra ditemukan pada tahun 1914, tetapi tidak terlihat lagi sejak 1930, sampai se...
This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: The Puritan song – news · newspapers · books · scholar · JSTOR (January 2015) (Learn how and when to remove this template message) 2012 single by BlurThe PuritanSingle by BlurA-sideUnder the WestwayReleased2 July 2012 (2012-07-02)GenrePost-B...
Stigmasterol Names IUPAC name Stigmasta-5,22-dien-3β-ol Systematic IUPAC name (1R,3aS,3bS,7S,9aR,9bS,11aR)-1-[(2R,3E,5S)-5-Ethyl-6-methylhept-3-en-2-yl]-9a,11a-dimethyl-2,3,3a,3b,4,6,7,8,9,9a,9b,10,11,11a-tetradecahydro-1H-cyclopenta[a]phenanthren-7-ol Other names Stigmasterin; Wulzen anti-stiffness factor Identifiers CAS Number 83-48-7 Y 3D model (JSmol) Interactive image ChEBI CHEBI:28824 N ChEMBL ChEMBL400247 Y ChemSpider 4444352 Y ECHA InfoCard 100.001.348 PubChem CI...
Theodoros Zagorakis Informasi pribadiNama lengkap Theodoros Zagorakis(Θεόδωρος Ζαγοράκης)Tanggal lahir 27 Oktober 1971 (umur 52)Tempat lahir Kavala, YunaniTinggi 1,78 m (5 ft 10 in)Posisi bermain Defensive midfielderKarier senior*Tahun Tim Tampil (Gol) 1988–19921993–19971998–20002000–20042004–20052005–2007 KavalaPAOKLeicester CityAEK AthensBolognaPAOK Total 114 0(6)155 (10)050 0(3)101 0(4)032 0(0)045 0(0)452 (23) Tim nasional1994–2007 Yunani...
List of events ← 1991 1990 1989 1992 in Afghanistan → 1993 1994 1995 Decades: 1970s 1980s 1990s 2000s 2010s See also:Other events of 1992List of years in Afghanistan The following lists events that happened during 1992 in Afghanistan. Incumbents President: until 16 April: Mohammad Najibullah 16 April-28 April: Abdul Rahim Hatif 28 April-28 June: Sibghatullah Mojaddedi starting 28 June: Burhanuddin Rabbani Chairman of the Council of Ministers: Fazal Haq Khaliqyar (until 15 April) P...
Ruling party of the Uzbek Soviet Socialist Republic For the banned 1994 Communist Party of Uzbekistan, see Communist Party of Uzbekistan (1994). Communist Party of Uzbekistan Коммунистическая партия УзбекистанаЎзбекистон Коммунистик ПартиясиOʻzbekiston Kommunistik PartiyasiFounded12 February 1925Dissolved3 November 1991Succeeded byPeople's Democratic Party of UzbekistanIdeologyCommunismMarxism–LeninismPolitical positio...
Artikel ini sebatang kara, artinya tidak ada artikel lain yang memiliki pranala balik ke halaman ini.Bantulah menambah pranala ke artikel ini dari artikel yang berhubungan atau coba peralatan pencari pranala.Tag ini diberikan pada Maret 2016. Markovo МарковоSelo[1]Peta lokasi Markovo MarkovoLokasi MarkovoTampilkan peta RusiaMarkovoMarkovo (Rusia)Tampilkan peta RusiaKoordinat: 64°40′50″N 170°24′46″E / 64.68056°N 170.41278°E / 64.68056; 170.412...
Fettuccine al Pesto alla genovese. Focaccia Masakan Liguria (cucina Ligure) adalah masakan yang berasal dari regione Liguria, Italia.[1] Seperti kebanyakan jenis masakan Italia lain, tradisi kuliner Liguria menggunakan bahan-bahan yang sederhana dan kualitas yang paling segar. Masakan Liguria menggunakan bahan herba-herba wangi, sayur-sayuran, minyak zaitun, dan makanan laut. Sejak dahulu regione ini telah dikenal sebagai tempat penghasil kue dan biskuit tradisional. Masakan khas Fari...
Cell phone model LG Secret (KF750) / CYON Secret (SU600/KU6000/LU6000)ManufacturerLG ElectronicsSloganStyle that lastsSeriesBlack Label SeriesModelKF750Compatible networksGSM 900/1800/1900 HSDPA/UMTSFirst released2008; 16 years ago (2008)Availability by regionEurope May 3, 2008, South Korea June 30, 2008PredecessorLG ShineRelatedOfficial Secret WebsiteForm factorSliderDimensions102.8 x 50.8 x 11.8 mmMass116gOperating systemJava MIDP 2.0Memory100 MB InternalRemovable sto...
Islands in the Philippines For other uses, see Sulu (disambiguation). This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Sulu Archipelago – news · newspapers · books · scholar · JSTOR (October 2010) (Learn how and when to remove this message) Sulu ArchipelagoNative name: سُوگْSulu ArchipelagoLocatio...
Questa voce o sezione sull'argomento partiti politici non cita le fonti necessarie o quelle presenti sono insufficienti. Puoi migliorare questa voce aggiungendo citazioni da fonti attendibili secondo le linee guida sull'uso delle fonti. Segui i suggerimenti del progetto di riferimento. Questa voce sull'argomento partiti politici è solo un abbozzo. Contribuisci a migliorarla secondo le convenzioni di Wikipedia. Segui i suggerimenti del progetto di riferimento. In politica, un indip...
جزيرة كوموران خريطة جزيرتي جزيرة يوس سودارسو وجزيرة كوموران معلومات جغرافية الموقع إندونيسيا، جنوب شرق آسيا الإحداثيات 8°16′41″S 138°44′46″E / 8.278178°S 138.746172°E / -8.278178; 138.746172 [1] المسطح المائي بحر آرافورا[2] المساحة 695 كم² الطول 40 كيلومتر العرض 30 ك�...
Émile De MotFonctionsSénateur1900-1909Bourgmestre de Bruxelles16 décembre 1899 - 24 décembre 1909Charles BulsAdolphe MaxDéputé de la Chambre des représentants de Belgique1892-1894BiographieNaissance 20 octobre 1835AnversDécès 23 novembre 1909 (à 74 ans)Région de Bruxelles-CapitaleNationalité belgeActivités Homme politique, avocatPère Jean André De Mot (d)Conjoint Pauline Ortsmodifier - modifier le code - modifier Wikidata Émile André Jean De Mot, né à Anvers le 20 octo...
Broadway theater in Manhattan, New York Selwyn Theatre redirects here. For the former theater in Boston (opened 1914), see Park Square Theatre (Boston). For the former theater in Boston (1867–1870), see Selwyn's Theatre. For the former theater in Chicago, see Harris and Selwyn Theaters. Todd Haimes TheatreSelwyn Theatre (1918–2000)American Airlines Theatre (2000–2024)Address227 West 42nd StreetManhattan, New York CityUnited StatesCoordinates40°45′24.6″N 73°59′17.0″W / ...
This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages) This article does not cite any sources. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Tollos – news · newspapers · books · scholar · JSTOR (December 2016) (Learn how and when to remove this message) This article...
Antonio PiccoloPiccolo con la maglia del Livorno nel 2013Nazionalità Italia Altezza180 cm Peso68 kg Calcio RuoloAllenatore (ex attaccante) Termine carriera2022 - giocatore CarrieraGiovanili -2005 Salernitana2005-2008 Piacenza Squadre di club1 2006-2008 Piacenza6 (0)2008-2009→ Foggia24 (2)2009-2011 Piacenza35 (5)[1]2011-2013 Livorno26 (2)2013-2016 Virtus Lanciano106 (25)2016-2017 Spezia50 (5)[2]2017-2020 Cremonese69 (15)2020...
Roth-HändleCompany typePrivateIndustryTobaccoFounded22 July 1897Defunct1985; 39 years ago (1985)FateAcquired by Reemtsma in 1985, currently a brandHeadquartersGermanyProductsCigarettesOwnerImperial BrandsParentReemtsmaFootnotes / referencesCarcinogenicity: IARC group 1 Roth-Händle is a former tobacco manufacturing company based in Lahr, Germany. The brand is now managed by Reemtsma, a subsidiary of Imperial Tobacco since 2002.[1] History Roth-Händle was l...