Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1
Divide and Conquer For Convex Hull

Divide and Conquer For Convex Hull

Ratings: (0)|Views: 200 |Likes:
Journal of Computing, eISSN 2151-9617, http://www.journalofcomputing.org/, Call For Computer Science Papers
Journal of Computing, eISSN 2151-9617, http://www.journalofcomputing.org/, Call For Computer Science Papers

More info:

Categories:Types, Research
Published by: Journal of Computing on Apr 29, 2013
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less





Divide and Conquer For Convex Hull
Ngonidzashe Zanamwe
— The divide and concqur approach has many applications in computer science. With this approach a large problem isbroken down into small and manageable subproblems and each is solved then the solutions are combined to give the grandsolution to the problem. The problem of finding the convex hull of a polygon can be viewed as one problem that can be solvedusing the divide and conqurer approach. This paper therefore presents a discussion on the divide and conquer for the ConvexHull. The paper looks at generic divide and conquer approach before using the approach in finding the convex hull of a polygon. The paper presents a step by step procedure for finding the convex hull using the divide and conqurer approach. Also, thepaper discusses running times of the Convex Hull divide-and-conquer algorithm, advantages and disadvantages of the divideand conquers approach for convex hull. The paper concludes by giving other algorithms for solving the convex hull problemapart from the divide and conquer.
Index Terms
—divide and conqurer, convex hull, polygon, divide and conqurer for convex hull.
1 I
HIS paper presents a discussion on the divide andconquer for Convex Hull (hereinafter referred to asCH). The paper begins by looking at the divide andconquer in general before focusing on its applications incomputational geometry, notably to the CH problem.This paper looks at two distinct ways of computing theconvex hull using the divide and conquer approach. Also,the paper discusses running times of Convex Hull divide-and-conquer algorithm, advantages and disadvantages ofthe divide and conquers approach for convex hull. Thepaper concludes by giving other algorithms for solvingthe convex hull problem apart from the divide and con-quer approach.
1.1 Divide and Conquer algorithms
Naher and Schmitt [1] note that divide and conquer algo-rithms solve problems by dividing them into instances,solving each instance recursively and merging the corre-sponding results to a complete solution. Further, [1] as-serts that all instances have exactly the same structure asthe original problem and can be solved independentlyfrom each other, and so can easily be distributed over anumber of parallel processes or threads. The divide andconquer approach is presented in Fig. 1 below.
Figure 1: The divide and conquer approach
The above diagram shows that if one is faced with a prob-lem of size
, one begins by dividing it into two sub-problems of size
each and then finds a solution toeach sub-problem then merges the solutions to sub-problems. Similar assertions were made by [5], hepresents the following divide and conquer algorithm:if trivial (small), solve it “brute force”else{
into a number of sub-problems;
each sub-problem recursively;
solutions to sub-problems;}
1.2 Polygon
A polygon is defined as a closed shape with more thantwo sides or line segments. A simple polygon has no twoconsecutive edges that are intersecting.
Ngonidzashe Zanamwe is with the University of Zimbabwe, Zimbabwe
JOURNAL OF COMPUTING, VOLUME 5, ISSUE 3, MARCH 2013, ISSN (Online) 2151-9617https://sites.google.com/site/journalofcomputingWWW.JOURNALOFCOMPUTING.ORG1
1.3 Convexity
A convex is a polygon in which any line joining twopoints within the polygon lies within the polygon. Alex-ander Kolesnikov [7] gives similar definitions of convexi-ty, the first is that, a subset set S of the plane is calledconvex if and only if for any pair of points P, Q
S theline segment PQ is completely contained in S. The secondgoes as, a set S is convex if it is exactly equal to the inter-section of all the half planes containing it. The figuresbelow show convex and non-convex shapes.
Figure 2: The convex and non-convex shapes
1.3. Convex Hull
Mohammed Nadeem Ahmed and Raghavendra Kyatha[2] establish that the Convex Hull of a set Q of points isthe smallest convex polygon P, for which each point in Qis either on the boundary of P or in its interior. In linewith the above, [4] asserts that the convex hull of a set
of points, denoted
) is the smallest polygon
forwhich each point of
is either on the boundary or in theinterior of
. Similarly, [7] establishes that the convex hullCH(P) of a finite point set P is the smallest convex poly-gon that contains P. Figure 3 below shows a convex hullP.
Figure 3: Convex Hull P
1.4 Intuition:
If each point is represented by a nail sticking out from aboard and you take a rubber band and lower it over thenails, so as to completely encompass the set of nails, andthen let the rubber band naturally contract, the rubberband will give you the edges of the convex hull of the setof points, and those nails that correspond to a change inslope of the rubber band represent the extreme points ofthe convex hull [4].
1.5 Convex Hull Problem
From the above definition it can thus be said that a con-vex hull problem is one where given a set of points orcoordinates one is asked to come up with the smallestpolygon in which all points are either inside or on theedge of the polygon.
1.6 Finding the convex hull using divide andconquer 
Souvaine [3]establishes that in order to find the convexhull using a divide-and-conquer approach, one has tofollow these steps:sort points (
 , p
 , . . . , p
) by their x-coordinaterecursively find the convex hull of
 recursively find the convex hull of
merge the two convex hullsA more detailed algorithm for finding a Convex Hull ispresented in [6]. The algorithm is as follows:Hull(S) :If |S| <= 3, then compute the convex hull by brute forcein O(1) time and return.Otherwise, partition the point set S into two sets A and B,where A consists of half the points with the lowest x co-ordinates and B consists of half of the points with thehighest x coordinates.Recursively compute HA = Hull(A) and HB = Hull(B).Merge the two hulls into a common convex hull, H, bycomputing the upper and lower tangents for HA and HBand discarding all the points lying between these twotangents.
2. A
There are two approaches to computing the convex hulland the approaches are here named approach A and ap-proach B. The next section explores these approaches ingreater detail beginning with approach A.
2.1 Approach A
This approach involves a number of steps which include,sorting the points, dividing the set of points into two sets,recursive computation of convex hulls for each subset ofpoints and merging the convex hulls. Below is a detailedexplanation of each of the above steps.
2.1.1 Sorting the points or coordinates
This involves sorting the points in increasing order oftheir
-coordinates with ties resolved by increasing orderof y coordinates. For example if one is given the followingset of points S: (2,12), (4,17), (10,19), (12,15), (15,19), (7,20),(18,20), (16,10), (18,2), (14,7), (20,11), (8,9), (4,6) and (9,1). Ifthese points are sorted according to be explanation givenabove, we end up with the following arrangement,P1(2,12), P2(4,6), P3(4,17), P4(7,20), P4(8,9), P6(9,1),P7(10,19), P8(12,15), P9(14,7), P10(15,19), P11(16,10),P12(18,2) , P13(18,20), and P14(20,11). The points areshown in the figure 4 below:
JOURNAL OF COMPUTING, VOLUME 5, ISSUE 3, MARCH 2013, ISSN (Online) 2151-9617https://sites.google.com/site/journalofcomputingWWW.JOURNALOFCOMPUTING.ORG2
Figure 4: The Points
2.1.2 Dividing points
This step involves partitioning the point set S into twosets A and B, where A consists of half the points with thelowest
coordinates and B consists of half of the pointswith the highest
coordinates. For instance, in our exam-ple set A will consist points P1 through P7 whereas set Bwill consist points P8 to P14. This partition is illustratedin figure 5 below.
Figure 5: The Partition
Each subset in the above figure has 7 elements. We nowsubdivide each subset into two subsets one with four el-ements and the other with three elements. The algorithmabove stipulates that once the number of points in eachpartition is 3 or less you construct the convex hull, other-wise continue dividing. The final partitions are in figure 6below.
Figure 6: Final Partitions
2.1.3 Computation of convex hulls
This involves constructing convex hulls by joining allpoints in each subset in the diagram above. For instance, join P2, P3 and P4 to form triangle P2P3P4, then join P5,P6 and P7 to form triangle P5P6P7, join P8P9, join P10P11and lastly join P12, P13 and P14 to form triangleP12P13P14. This goes on until the points in the last parti-tion are joined as shown in the shown in the diagram be-low. The computed convex hulls are shown in figure 7below.
Figure 7: Computed Convex Hull
The convex hulls in the figure above must be combinedby removing the partitions in the reverse order in whichthey were placed; this implies that, remove lines
first. If we remove L
, we then join P1 to hull P2P3P4.If we remove L
, we then join the two lines as illustratedin Figure 8 below.
Figure 8: Two Lines Joined
The next stage is to remove lines L
and L
, if we removeL
, then we join P4 to P7 and P2 to P6. If we remove L
,then we join P10 to P13 and P9 to P12. After that, we re-move all non-convex edges such as P5P6, P2P3, P10P11and so on. This leaves one with two convex hulls HA andHB as shown in figure 9 below.
JOURNAL OF COMPUTING, VOLUME 5, ISSUE 3, MARCH 2013, ISSN (Online) 2151-9617https://sites.google.com/site/journalofcomputingWWW.JOURNALOFCOMPUTING.ORG3

Activity (2)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->