SlideShare a Scribd company logo
1 of 63
MBA Admission in India 
By: 
admission.edhole.com
Convex Hulls in Two Dimensions 
 Definitions 
 Basic algorithms 
Gift Wrapping (algorithm of Jarvis) 
Graham scan 
Divide and conquer 
Convex Hull for line intersections 
General solution 
Random lines 
admission.edhole.com
Convex Hulls 
admission.edhole.com
Convexity 
A set S is convex if x Î S and y Î S implies 
the segment xy Î S 
x y 
admission.edhole.com
Segment 
The segment xy is the set of all points of the form 
α x + β y with α ≥ 0, β ≥ 0 and α + β = 1 
Thus for, End Point x : α = 1 and β = 0, 
End Point y : α = 0 and β = 1, 
Mid Point : α = 1/2 and β = 1/2 
x(1,0) y(4,0) 
admission.edhole.com
Convex Combination 
A convex combination of points 
x1 , … , xk is a sum of the form α1 x1 + … + αk xk 
with αi ³ 0 for all i and α1+ … + αk = 1 
Example: 
1. Line segment 
2. Triangle 
3. Tetrahedron 
admission.edhole.com
Convex Hull 
Convex hull of a set of points S is the set of all convex 
combinations of points of S 
Convex hull of S is denoted by conv S, 
sometimes the notation 
(S) is also used 
admission.edhole.com
Some other definitions of Convex Hull 
Convex Hull of a finite set of points S in the plane 
is the smallest convex polygon P that encloses S 
which means that there is no other polygon P’ such 
that S Í P’ Ì P 
Intersection of all convex sets containing the points 
in S 
admission.edhole.com
The convex hull of a set of points S in the plane is the 
union of all the triangles determined by points in S 
Informal definition: Convex hull of a set of points in 
plane is the shape taken by a rubber band stretched 
around the nails pounded into the plane at each point 
Now we define the convex hull problem: 
- The problem is to construct the boundary of a convex 
hull in two dimensions given a finite set S of n points 
- Four outputs can be distinguished for the above 
problem: 
1. all the points on the hull, in arbitrary order; 
2. the extreme points, in arbitrary order; 
3. all the points on the hull, in boundary traversal 
order; 
4. the extreme points, in boundary traversal order; 
admission.edhole.com
Extreme Points 
The extreme points of a set S 
of points in the plane are the 
vertices of the convex hull at 
which the interior angle is 
less than π 
Also a point is extreme iff 
there exists a line through 
that point that other wise 
does not touch the convex 
hull 
admission.edhole.com
Algorithms to find Extreme Points 
A] Using Non Extreme Points 
Identifying non extreme points implies identifying 
extreme points 
A point is non extreme iff it is inside some (closed) 
triangle whose vertices are the points of the set and is 
not itself a corner of that triangle. 
Thus given a triangle: 
 If a point is interior to triangle it is non extreme 
 Corners of the triangle might be extreme 
Thus as the output we will get the extreme points in 
some arbitrary order. 
admission.edhole.com
Algorithm: Interior Points 
for each i do 
for each j ≠ i do 
for each k ≠ i ≠ j do 
for each l ≠ k ≠ i ≠ j do 
if pl Î Δ(pi ,pj , pk) 
then pl is nonextreme 
• There are four nested loops in this algorithm 
• Hence the order is O(n4) 
• For each of the n3 triangles, the test for extremeness costs n 
• It is important to find a faster algorithm 
admission.edhole.com
B] Extreme Edges 
An edge is extreme if every point of S is on or 
to one side of the line determined by the edge 
If we treat the edge as directed and let the left 
side of edge be inside then – the directed edge 
is not extreme if there is some point that is not 
left of it or on it 
The output of this algorithm will be all the 
points on the convex hull in arbitrary order 
admission.edhole.com
Algorithm: Extreme Edges 
for each i do 
for each j ≠ i do 
for each k ≠ i ≠ j do 
if pk is not left or on (pi ,pj) 
then (pi ,pj) is not extreme 
• There are three nested loops in this algorithm 
• Hence the order is O(n3) 
• For each of the n2 pair of points, the test for extremeness costs n 
• The vertices that are extreme can now be found 
admission.edhole.com
C] Gift Wrapping (a more realistic hull algorithm) 
A minor variation of Extreme Edge algorithm can accelerate it by 
factor n as well as output the points in order 
The idea is to use one extreme edge as an anchor for finding the next 
Suppose the algorithm found an extreme edge whose unlinked 
endpoint is x 
θ 
y 
x 
e 
• For each y of set S we compute the 
angle θ 
• The point that yields the smallest θ 
must determine an extreme edge 
• The output of this algorithm is all the 
points on the hull in boundary 
traversal order 
admission.edhole.com
Idea: Think of wrapping 
a gift. Put the paper in 
contact with the gift and 
continue to wrap around 
from one surface to the 
next until you get all the 
way around. 
admission.edhole.com
Algorithm: Gift Wrapping 
Find the lowest point (smallest y coordinate) 
Let i0 be its index, and set i ← i0 
repeat 
for each j ≠ i do 
compute counterclockwise angle θ from previous hull edge 
Let k be the index of the point with the smallest θ 
Output (pi ,pk) as a hull edge 
i ← k 
until i = i0 
• We use the lowest point as the anchor 
• The order is O(n2) 
• The cost is O(n) for each hull edge 
• The point set is wrapped by a string that bends the that bends with 
minimum angle from previous to next hull edge 
admission.edhole.com
Jarvis March - Example 
p0 
p1 
p3 
p4 
p5 
p2 
p6 
p7 
p8 
p9 
p11 
p12 
p10 
admission.edhole.com
Jarvis March - Example 
p0 
p1 
p3 
p4 
p5 
p2 
p6 
p7 
p8 
p9 
p11 
p12 
p10 
admission.edhole.com
Jarvis March - Example 
p0 
p1 
p3 
p4 
p5 
p2 
p6 
p7 
p8 
p9 
p11 
p12 
p10 
admission.edhole.com
Jarvis March - Example 
p0 
p1 
p3 
p4 
p5 
p2 
p6 
p7 
p8 
p9 
p11 
p12 
p10 
admission.edhole.com
Jarvis March - Example 
p0 
p1 
p3 
p4 
p5 
p2 
p6 
p7 
p8 
p9 
p11 
p12 
p10 
admission.edhole.com
Jarvis March - Example 
p0 
p1 
p3 
p4 
p5 
p2 
p6 
p7 
p8 
p9 
p11 
p12 
p10 
admission.edhole.com
Jarvis March - Example 
p0 
p1 
p3 
p4 
p5 
p2 
p6 
p7 
p8 
p9 
p11 
p12 
p10 
admission.edhole.com
Gift Wrapping 
O(n |H(S)| ) 
admission.edhole.com
Graham scan 
O(n log n) 
admission.edhole.com
Computer Graphics 27 
Step 1 
Find a point, P, interior to the convex hull 
(CH) by taking the average of the coordinates 
of all the given points. 
Another strategy might be to simply choose 
yMin. 
P 
admission.edhole.com
Computer Graphics 28 
Step 2 
Translate the interior point, P, and all the 
others, so the interior point is at the origin. 
P 
X 
Y 
admission.edhole.com
Step 3 
Find the angle between the line connecting P 
to each of the points and the positive X-axis. 
Sort the points according to the magnitude of 
the angle. 
The sorting determines the order that the 
algorithm will process Y 
the points. 
P 
X 
admission.edhole.com 
Computer Graphics 29
Step 4 
If two points have the same angle, delete the 
point with the smaller amplitude (This step 
creates a new set of points S’). 
Starting from the lowest Y-Axis coordinate 
CCW, label the points P0, P1, P2, ... 
P0 
P2 
P3 
P1 
P4 
P5 
admission.edhole.com 
Computer Graphics 30
P3 
Computer Graphics 31 
Step 5 
Let labels Pa, Pb, Pc refer to P0, P1, P2 
respectively. 
P0 
P1 
P2 
P5 
Pa 
Pb 
Pc 
P4 
admission.edhole.com
Step 6 
If the interior angle formed by Pa, Pb, Pc is 
greater than or equal to 180° then: 
Eliminate the point labeled with Pb. Set point 
Pb to point Pa. Set point Pa to the previous 
point in the sequence (in this case P5). 
P3 
P4 P3 
Computer Graphics 32 
P5 
Pa 
Pb 
Pc 
q 
eliminate 
P4 
Pb 
Pc 
Pa P5 
admission.edhole.com
Step 6 - Cont. 
If the interior angle formed by Pa, Pb, Pc from 
before is less than 180° then: 
No points are eliminated. Each of Pa, Pb and 
Pc are advanced forward one point. 
P3 
P4 Pc 
Computer Graphics 33 
P5 
Pa 
Pb 
Pc 
P4 
q 
P5 
P0 
Pb 
Pa 
P3 
admission.edhole.com
Step 7 
The Algorithm continues by repeating step 6 
until Pb=P0. At this point, the algorithm stops 
and only the points of the convex hull remain. 
admission.edhole.com 
Computer Graphics 34
Computer Graphics 35 
Efficiency 
Assume n is the number of points in S. 
Step 1 can be done in O(n) operations. 
Step 2 can be done in O(n) operations. 
Step 3 can be done in O(n·Log(n)) 
operations. 
Step 4 can be done in O(n) operations. 
Step 5 can be done in O(1) operations. 
admission.edhole.com
Efficiency - Cont. 
Note that each application of step 6 either 
eliminates a point (and partially moves 
backward) or moves forward (advancing Pc). 
This means that after 2n iterations at the 
most, we’ll end up with the CH. 
In conclusion, the algorithm will take 
O(n·Log(n)) operations. 
This is the Lower Bound complexity. 
Otherwise we could sort better than 
admissioOn(.ne·Ldohgo(lne).)c. om 
Computer Graphics 36
Graham Scan - Example 
p0 
p1 
p3 
p4 
p5 
p2 
p6 
p7 
p8 
p11 
p12 
p10 
p9 
admission.edhole.com
Graham Scan - Example 
p0 
p1 
p3 
p4 
p5 
p2 
p6 
p7 
p8 
p11 
p12 
p10 
p9 
admission.edhole.com
Graham Scan - Example 
p0 
p1 
p3 
p4 
p5 
p2 
p6 
p7 
p8 
p11 
p12 
p10 
p9 
admission.edhole.com
Graham Scan - Example 
p0 
p1 
p3 
p4 
p5 
p2 
p6 
p7 
p8 
p11 
p12 
p10 
p9 
admission.edhole.com
Graham Scan - Example 
p0 
p1 
p3 
p4 
p5 
p2 
p6 
p7 
p8 
p11 
p12 
p10 
p9 
admission.edhole.com
Graham Scan - Example 
p0 
p1 
p3 
p4 
p5 
p2 
p6 
p7 
p8 
p11 
p12 
p10 
p9 
admission.edhole.com
Graham Scan - Example 
p0 
p1 
p3 
p4 
p5 
p2 
p6 
p7 
p8 
p11 
p12 
p10 
p9 
admission.edhole.com
Graham Scan - Example 
p0 
p1 
p3 
p4 
p5 
p2 
p6 
p7 
p8 
p9 
p11 
p12 
p10 
admission.edhole.com
Graham Scan - Example 
p0 
p1 
p3 
p4 
p5 
p2 
p6 
p7 
p8 
p9 
p11 
p12 
p10 
admission.edhole.com
Graham Scan - Example 
p0 
p1 
p3 
p4 
p5 
p2 
p6 
p7 
p8 
p9 
p11 
p12 
p10 
admission.edhole.com
Graham Scan - Example 
p0 
p1 
p3 
p4 
p5 
p2 
p6 
p7 
p8 
p9 
p11 
p12 
p10 
admission.edhole.com
Graham Scan - Example 
p0 
p1 
p3 
p4 
p5 
p2 
p6 
p7 
p8 
p9 
p11 
p12 
p10 
admission.edhole.com
Graham Scan - Example 
p0 
p1 
p3 
p4 
p5 
p2 
p6 
p7 
p8 
p9 
p11 
p12 
p10 
admission.edhole.com
Convex Hull - Divide and 
Conquer 
Algorithm: 
 Find a point with a median x 
coordinate (time: O(n)) 
 Compute the convex hull of each half 
(recursive execution) 
 Combine the two convex hulls by 
finding common tangents. 
Can be done in O(n) 
2 ) ( n O n T n T + ÷ø 
( ) 
ö 2 
çè 
= æ 
Complexity: O(nlogn) 
admission.edhole.com
Convex Hull of Line Intersections. 
Motivation 
 The database contains roads and the 
intersections of Tel-Aviv 
 First intersections for an incoming guest 
are “important”. 
 We need to find important intersections, 
i.e. the convex hull 
 We don’t want to check all intersections. 
admission.edhole.com
Convex Hull of Line Intersections 
 Applying one of the previous algorithms 
give O(n2 log n) time 
 Can we do better? 
admission.edhole.com
Algorithm of Atallah 
1. Sort the n input lines by decreasing 
slope. Li = aix+bi 
2. Let qi be the intersection point 
between Li and Li+1. Q = {q1,…,qn} 
3. Compute CH(Q). It is output of the 
algorithm 
admission.edhole.com
Algorithm of Atallah 
The algorithm takes O(n log n) time 
admission.edhole.com
Correctness 
Lj 
Lk 
Li 
v 
w 
p 
admission.edhole.com
Correctness 
p – corner point => p in Q 
Suppose that p = Li Ç Lj , i<j 
If i + 1 = j or i = n-1 and j =0 than p in Q 
Otherwise there exists k such that ai < ak < 
aj 
Since q ¹ pn-1 , one of the following is true 
1. j ¹ n-1 
2. i ¹ 0 
admission.edhole.com
Correctness (j ¹ n-1) 
Lj 
Lk 
Li 
v 
w 
Ln-1 
s 
p 
admission.edhole.com
Lj 
Lk 
Li 
v 
w 
Ln-1 
s 
p 
admission.edhole.com
Random Lines 
Each line is defined by the point with 
polar coordinates 
The angles are distributed uniformly in 
[0, 2π] 
The distances have common arbitrary 
distribution R with final E(R) 
admission.edhole.com
Random Lines 
The angles are distributed uniformly in 
[0, 2π] 
The distances have common arbitrary 
distribution R with final E(R) 
admission.edhole.com
Random Lines. Results 
Devroye and Toussaint proved that for 
this case the expected number of points 
in the convex hull is O(1) 
admission.edhole.com
Random Lines 
Algorithm 
 Find the points in the convex hull using 
Atallah algorithm 
 Gift wrapping 
admission.edhole.com
Random Lines 
The sorting in the algorithm of Atallah 
requires expected linear time 
Gift wrapping works in expected linear 
time 
admission.edhole.com

More Related Content

What's hot

Convex Hull Algorithm Analysis
Convex Hull Algorithm AnalysisConvex Hull Algorithm Analysis
Convex Hull Algorithm AnalysisRex Yuan
 
Efficient Edge-Skeleton Computation for Polytopes Defined by Oracles
Efficient Edge-Skeleton Computation for Polytopes Defined by OraclesEfficient Edge-Skeleton Computation for Polytopes Defined by Oracles
Efficient Edge-Skeleton Computation for Polytopes Defined by OraclesVissarion Fisikopoulos
 
Admmission in India
Admmission in IndiaAdmmission in India
Admmission in IndiaEdhole.com
 
Arithmetic by aniket bhute
Arithmetic by aniket bhuteArithmetic by aniket bhute
Arithmetic by aniket bhuteAniket Bhute
 
Admission in india
Admission  in indiaAdmission  in india
Admission in indiaEdhole.com
 
Conctructing Polytopes via a Vertex Oracle
Conctructing Polytopes via a Vertex OracleConctructing Polytopes via a Vertex Oracle
Conctructing Polytopes via a Vertex OracleVissarion Fisikopoulos
 
A New Approach to Output-Sensitive Voronoi Diagrams and Delaunay Triangulations
A New Approach to Output-Sensitive Voronoi Diagrams and Delaunay TriangulationsA New Approach to Output-Sensitive Voronoi Diagrams and Delaunay Triangulations
A New Approach to Output-Sensitive Voronoi Diagrams and Delaunay TriangulationsDon Sheehy
 
Lap2009c&p104-ode2.5 ht
Lap2009c&p104-ode2.5 htLap2009c&p104-ode2.5 ht
Lap2009c&p104-ode2.5 htA Jorge Garcia
 
Lesson20 Tangent Planes Slides+Notes
Lesson20   Tangent Planes Slides+NotesLesson20   Tangent Planes Slides+Notes
Lesson20 Tangent Planes Slides+NotesMatthew Leingang
 
Theory of Automata and formal languages Unit 3
Theory of Automata and formal languages Unit 3Theory of Automata and formal languages Unit 3
Theory of Automata and formal languages Unit 3Abhimanyu Mishra
 
Algorithms of graph
Algorithms of graphAlgorithms of graph
Algorithms of graphgetacew
 
Output-Sensitive Voronoi Diagrams and Delaunay Triangulations
Output-Sensitive Voronoi Diagrams and Delaunay Triangulations Output-Sensitive Voronoi Diagrams and Delaunay Triangulations
Output-Sensitive Voronoi Diagrams and Delaunay Triangulations Don Sheehy
 
Analysis of algorithn class 3
Analysis of algorithn class 3Analysis of algorithn class 3
Analysis of algorithn class 3Kumar
 

What's hot (19)

Convex Hull Algorithm Analysis
Convex Hull Algorithm AnalysisConvex Hull Algorithm Analysis
Convex Hull Algorithm Analysis
 
Efficient Edge-Skeleton Computation for Polytopes Defined by Oracles
Efficient Edge-Skeleton Computation for Polytopes Defined by OraclesEfficient Edge-Skeleton Computation for Polytopes Defined by Oracles
Efficient Edge-Skeleton Computation for Polytopes Defined by Oracles
 
Admmission in India
Admmission in IndiaAdmmission in India
Admmission in India
 
Arithmetic by aniket bhute
Arithmetic by aniket bhuteArithmetic by aniket bhute
Arithmetic by aniket bhute
 
Admission in india
Admission  in indiaAdmission  in india
Admission in india
 
Aho corasick-lecture
Aho corasick-lectureAho corasick-lecture
Aho corasick-lecture
 
Conctructing Polytopes via a Vertex Oracle
Conctructing Polytopes via a Vertex OracleConctructing Polytopes via a Vertex Oracle
Conctructing Polytopes via a Vertex Oracle
 
A New Approach to Output-Sensitive Voronoi Diagrams and Delaunay Triangulations
A New Approach to Output-Sensitive Voronoi Diagrams and Delaunay TriangulationsA New Approach to Output-Sensitive Voronoi Diagrams and Delaunay Triangulations
A New Approach to Output-Sensitive Voronoi Diagrams and Delaunay Triangulations
 
Lecture13
Lecture13Lecture13
Lecture13
 
Data structure
Data structureData structure
Data structure
 
Lap2009c&p104-ode2.5 ht
Lap2009c&p104-ode2.5 htLap2009c&p104-ode2.5 ht
Lap2009c&p104-ode2.5 ht
 
Lecture25
Lecture25Lecture25
Lecture25
 
Lesson20 Tangent Planes Slides+Notes
Lesson20   Tangent Planes Slides+NotesLesson20   Tangent Planes Slides+Notes
Lesson20 Tangent Planes Slides+Notes
 
Tangent plane
Tangent planeTangent plane
Tangent plane
 
Theory of Automata and formal languages Unit 3
Theory of Automata and formal languages Unit 3Theory of Automata and formal languages Unit 3
Theory of Automata and formal languages Unit 3
 
Algorithms of graph
Algorithms of graphAlgorithms of graph
Algorithms of graph
 
smtlecture.5
smtlecture.5smtlecture.5
smtlecture.5
 
Output-Sensitive Voronoi Diagrams and Delaunay Triangulations
Output-Sensitive Voronoi Diagrams and Delaunay Triangulations Output-Sensitive Voronoi Diagrams and Delaunay Triangulations
Output-Sensitive Voronoi Diagrams and Delaunay Triangulations
 
Analysis of algorithn class 3
Analysis of algorithn class 3Analysis of algorithn class 3
Analysis of algorithn class 3
 

Viewers also liked

School Spirit
School SpiritSchool Spirit
School Spiritbjcrowley
 
unit 13 assignment 4 Edit
unit 13 assignment 4 Editunit 13 assignment 4 Edit
unit 13 assignment 4 Edithadilasharif
 
Unit 3 task 3 table 2-
Unit 3 task 3 table 2-Unit 3 task 3 table 2-
Unit 3 task 3 table 2-hadilasharif
 
Insights Newsletter October 2010
Insights Newsletter October 2010Insights Newsletter October 2010
Insights Newsletter October 2010Dennis Strong, CMC
 
Will/Skill Matrix
Will/Skill MatrixWill/Skill Matrix
Will/Skill Matrixraizo
 
SimpleTick Solution Providers
SimpleTick Solution ProvidersSimpleTick Solution Providers
SimpleTick Solution ProvidersSimpleTick
 
Getting Started Socially, for Hospitality Professionals
Getting Started Socially, for Hospitality ProfessionalsGetting Started Socially, for Hospitality Professionals
Getting Started Socially, for Hospitality ProfessionalsLauren Teague
 
Joshua Benton at the Canadian Journalism Foundation, Jan. 18, 2011
Joshua Benton at the Canadian Journalism Foundation, Jan. 18, 2011Joshua Benton at the Canadian Journalism Foundation, Jan. 18, 2011
Joshua Benton at the Canadian Journalism Foundation, Jan. 18, 2011jbenton
 
Vishnupriya
Vishnupriya Vishnupriya
Vishnupriya vgprasad
 
Itinerarios para personas emprendedoras
Itinerarios para personas emprendedoras Itinerarios para personas emprendedoras
Itinerarios para personas emprendedoras Coaching Para Emprender
 
No son las conspiraciones, es el déficit fiscal
No son las conspiraciones, es el déficit fiscalNo son las conspiraciones, es el déficit fiscal
No son las conspiraciones, es el déficit fiscalEduardo Nelson German
 
Hisocial review. facebook coupon app
Hisocial review. facebook coupon appHisocial review. facebook coupon app
Hisocial review. facebook coupon appHisocial
 
Insights Newsletter August 2010
Insights Newsletter August 2010Insights Newsletter August 2010
Insights Newsletter August 2010Dennis Strong, CMC
 
Comunicación asertiva lucia de los angeles perea islas (1)
Comunicación asertiva lucia de los angeles perea islas (1)Comunicación asertiva lucia de los angeles perea islas (1)
Comunicación asertiva lucia de los angeles perea islas (1)Lucy Perea
 

Viewers also liked (20)

Capabilities 2012 slide share
Capabilities 2012   slide shareCapabilities 2012   slide share
Capabilities 2012 slide share
 
School Spirit
School SpiritSchool Spirit
School Spirit
 
unit 13 assignment 4 Edit
unit 13 assignment 4 Editunit 13 assignment 4 Edit
unit 13 assignment 4 Edit
 
Unit 3 task 3 table 2-
Unit 3 task 3 table 2-Unit 3 task 3 table 2-
Unit 3 task 3 table 2-
 
Insights Newsletter October 2010
Insights Newsletter October 2010Insights Newsletter October 2010
Insights Newsletter October 2010
 
Will/Skill Matrix
Will/Skill MatrixWill/Skill Matrix
Will/Skill Matrix
 
Summary of act ii
Summary of act iiSummary of act ii
Summary of act ii
 
edit of review
edit of reviewedit of review
edit of review
 
SimpleTick Solution Providers
SimpleTick Solution ProvidersSimpleTick Solution Providers
SimpleTick Solution Providers
 
Getting Started Socially, for Hospitality Professionals
Getting Started Socially, for Hospitality ProfessionalsGetting Started Socially, for Hospitality Professionals
Getting Started Socially, for Hospitality Professionals
 
Joshua Benton at the Canadian Journalism Foundation, Jan. 18, 2011
Joshua Benton at the Canadian Journalism Foundation, Jan. 18, 2011Joshua Benton at the Canadian Journalism Foundation, Jan. 18, 2011
Joshua Benton at the Canadian Journalism Foundation, Jan. 18, 2011
 
20120516101553799
2012051610155379920120516101553799
20120516101553799
 
Vishnupriya
Vishnupriya Vishnupriya
Vishnupriya
 
Itinerarios para personas emprendedoras
Itinerarios para personas emprendedoras Itinerarios para personas emprendedoras
Itinerarios para personas emprendedoras
 
No son las conspiraciones, es el déficit fiscal
No son las conspiraciones, es el déficit fiscalNo son las conspiraciones, es el déficit fiscal
No son las conspiraciones, es el déficit fiscal
 
Hisocial review. facebook coupon app
Hisocial review. facebook coupon appHisocial review. facebook coupon app
Hisocial review. facebook coupon app
 
Pimplad
PimpladPimplad
Pimplad
 
R and Access 2007
R and Access 2007R and Access 2007
R and Access 2007
 
Insights Newsletter August 2010
Insights Newsletter August 2010Insights Newsletter August 2010
Insights Newsletter August 2010
 
Comunicación asertiva lucia de los angeles perea islas (1)
Comunicación asertiva lucia de los angeles perea islas (1)Comunicación asertiva lucia de los angeles perea islas (1)
Comunicación asertiva lucia de los angeles perea islas (1)
 

Similar to Mba admission in india

A Tutorial on Computational Geometry
A Tutorial on Computational GeometryA Tutorial on Computational Geometry
A Tutorial on Computational GeometryMinh-Tri Pham
 
Unit ii divide and conquer -4
Unit ii divide and conquer -4Unit ii divide and conquer -4
Unit ii divide and conquer -4subhashchandra197
 
Clipping in Computer Graphics
Clipping in Computer Graphics Clipping in Computer Graphics
Clipping in Computer Graphics Barani Tharan
 
14th Athens Colloquium on Algorithms and Complexity (ACAC19)
14th Athens Colloquium on Algorithms and Complexity (ACAC19)14th Athens Colloquium on Algorithms and Complexity (ACAC19)
14th Athens Colloquium on Algorithms and Complexity (ACAC19)Apostolos Chalkis
 
Lect 5 2d clipping
Lect 5 2d clippingLect 5 2d clipping
Lect 5 2d clippingmajicyoung
 
Liang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygons
Liang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygonsLiang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygons
Liang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygonsLahiru Danushka
 
Design and Analysis of Algorithms Lecture Notes
Design and Analysis of Algorithms Lecture NotesDesign and Analysis of Algorithms Lecture Notes
Design and Analysis of Algorithms Lecture NotesSreedhar Chowdam
 
Anlysis and design of algorithms part 1
Anlysis and design of algorithms part 1Anlysis and design of algorithms part 1
Anlysis and design of algorithms part 1Deepak John
 
Efficient Volume and Edge-Skeleton Computation for Polytopes Given by Oracles
Efficient Volume and Edge-Skeleton Computation for Polytopes Given by OraclesEfficient Volume and Edge-Skeleton Computation for Polytopes Given by Oracles
Efficient Volume and Edge-Skeleton Computation for Polytopes Given by OraclesVissarion Fisikopoulos
 
unit-4-dynamic programming
unit-4-dynamic programmingunit-4-dynamic programming
unit-4-dynamic programminghodcsencet
 
Hormann.2001.TPI.pdf
Hormann.2001.TPI.pdfHormann.2001.TPI.pdf
Hormann.2001.TPI.pdfssuserbe139c
 

Similar to Mba admission in india (20)

A Tutorial on Computational Geometry
A Tutorial on Computational GeometryA Tutorial on Computational Geometry
A Tutorial on Computational Geometry
 
lecture8 clipping
lecture8 clippinglecture8 clipping
lecture8 clipping
 
Unit ii divide and conquer -4
Unit ii divide and conquer -4Unit ii divide and conquer -4
Unit ii divide and conquer -4
 
Clipping in Computer Graphics
Clipping in Computer Graphics Clipping in Computer Graphics
Clipping in Computer Graphics
 
14th Athens Colloquium on Algorithms and Complexity (ACAC19)
14th Athens Colloquium on Algorithms and Complexity (ACAC19)14th Athens Colloquium on Algorithms and Complexity (ACAC19)
14th Athens Colloquium on Algorithms and Complexity (ACAC19)
 
UNIT2.pptx
UNIT2.pptxUNIT2.pptx
UNIT2.pptx
 
Geometric algorithms
Geometric algorithmsGeometric algorithms
Geometric algorithms
 
Curve clipping
Curve clippingCurve clipping
Curve clipping
 
Lect 5 2d clipping
Lect 5 2d clippingLect 5 2d clipping
Lect 5 2d clipping
 
Liang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygons
Liang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygonsLiang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygons
Liang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygons
 
Hprec6 4
Hprec6 4Hprec6 4
Hprec6 4
 
Polygon filling
Polygon fillingPolygon filling
Polygon filling
 
Design and Analysis of Algorithms Lecture Notes
Design and Analysis of Algorithms Lecture NotesDesign and Analysis of Algorithms Lecture Notes
Design and Analysis of Algorithms Lecture Notes
 
factoring
factoringfactoring
factoring
 
Week6.ppt
Week6.pptWeek6.ppt
Week6.ppt
 
Anlysis and design of algorithms part 1
Anlysis and design of algorithms part 1Anlysis and design of algorithms part 1
Anlysis and design of algorithms part 1
 
Efficient Volume and Edge-Skeleton Computation for Polytopes Given by Oracles
Efficient Volume and Edge-Skeleton Computation for Polytopes Given by OraclesEfficient Volume and Edge-Skeleton Computation for Polytopes Given by Oracles
Efficient Volume and Edge-Skeleton Computation for Polytopes Given by Oracles
 
unit-4-dynamic programming
unit-4-dynamic programmingunit-4-dynamic programming
unit-4-dynamic programming
 
Lecture26
Lecture26Lecture26
Lecture26
 
Hormann.2001.TPI.pdf
Hormann.2001.TPI.pdfHormann.2001.TPI.pdf
Hormann.2001.TPI.pdf
 

More from Edhole.com

Chartered accountant in dwarka
Chartered accountant in dwarkaChartered accountant in dwarka
Chartered accountant in dwarkaEdhole.com
 
Ca firm in dwarka
Ca firm in dwarkaCa firm in dwarka
Ca firm in dwarkaEdhole.com
 
Website development company surat
Website development company suratWebsite development company surat
Website development company suratEdhole.com
 
Website designing company in surat
Website designing company in suratWebsite designing company in surat
Website designing company in suratEdhole.com
 
Website dsigning company in india
Website dsigning company in indiaWebsite dsigning company in india
Website dsigning company in indiaEdhole.com
 
Website designing company in delhi
Website designing company in delhiWebsite designing company in delhi
Website designing company in delhiEdhole.com
 
Chartered accountant in dwarka
Chartered accountant in dwarkaChartered accountant in dwarka
Chartered accountant in dwarkaEdhole.com
 
Ca firm in dwarka
Ca firm in dwarkaCa firm in dwarka
Ca firm in dwarkaEdhole.com
 
Website development company surat
Website development company suratWebsite development company surat
Website development company suratEdhole.com
 
Website designing company in surat
Website designing company in suratWebsite designing company in surat
Website designing company in suratEdhole.com
 
Website designing company in india
Website designing company in indiaWebsite designing company in india
Website designing company in indiaEdhole.com
 
Website designing company in delhi
Website designing company in delhiWebsite designing company in delhi
Website designing company in delhiEdhole.com
 
Website designing company in mumbai
Website designing company in mumbaiWebsite designing company in mumbai
Website designing company in mumbaiEdhole.com
 
Website development company surat
Website development company suratWebsite development company surat
Website development company suratEdhole.com
 
Website desinging company in surat
Website desinging company in suratWebsite desinging company in surat
Website desinging company in suratEdhole.com
 
Website designing company in india
Website designing company in indiaWebsite designing company in india
Website designing company in indiaEdhole.com
 

More from Edhole.com (20)

Ca in patna
Ca in patnaCa in patna
Ca in patna
 
Chartered accountant in dwarka
Chartered accountant in dwarkaChartered accountant in dwarka
Chartered accountant in dwarka
 
Ca in dwarka
Ca in dwarkaCa in dwarka
Ca in dwarka
 
Ca firm in dwarka
Ca firm in dwarkaCa firm in dwarka
Ca firm in dwarka
 
Website development company surat
Website development company suratWebsite development company surat
Website development company surat
 
Website designing company in surat
Website designing company in suratWebsite designing company in surat
Website designing company in surat
 
Website dsigning company in india
Website dsigning company in indiaWebsite dsigning company in india
Website dsigning company in india
 
Website designing company in delhi
Website designing company in delhiWebsite designing company in delhi
Website designing company in delhi
 
Ca in patna
Ca in patnaCa in patna
Ca in patna
 
Chartered accountant in dwarka
Chartered accountant in dwarkaChartered accountant in dwarka
Chartered accountant in dwarka
 
Ca firm in dwarka
Ca firm in dwarkaCa firm in dwarka
Ca firm in dwarka
 
Ca in dwarka
Ca in dwarkaCa in dwarka
Ca in dwarka
 
Website development company surat
Website development company suratWebsite development company surat
Website development company surat
 
Website designing company in surat
Website designing company in suratWebsite designing company in surat
Website designing company in surat
 
Website designing company in india
Website designing company in indiaWebsite designing company in india
Website designing company in india
 
Website designing company in delhi
Website designing company in delhiWebsite designing company in delhi
Website designing company in delhi
 
Website designing company in mumbai
Website designing company in mumbaiWebsite designing company in mumbai
Website designing company in mumbai
 
Website development company surat
Website development company suratWebsite development company surat
Website development company surat
 
Website desinging company in surat
Website desinging company in suratWebsite desinging company in surat
Website desinging company in surat
 
Website designing company in india
Website designing company in indiaWebsite designing company in india
Website designing company in india
 

Recently uploaded

Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayMakMakNepo
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationAadityaSharma884161
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 

Recently uploaded (20)

Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up Friday
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint Presentation
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 

Mba admission in india

  • 1. MBA Admission in India By: admission.edhole.com
  • 2. Convex Hulls in Two Dimensions  Definitions  Basic algorithms Gift Wrapping (algorithm of Jarvis) Graham scan Divide and conquer Convex Hull for line intersections General solution Random lines admission.edhole.com
  • 4. Convexity A set S is convex if x Î S and y Î S implies the segment xy Î S x y admission.edhole.com
  • 5. Segment The segment xy is the set of all points of the form α x + β y with α ≥ 0, β ≥ 0 and α + β = 1 Thus for, End Point x : α = 1 and β = 0, End Point y : α = 0 and β = 1, Mid Point : α = 1/2 and β = 1/2 x(1,0) y(4,0) admission.edhole.com
  • 6. Convex Combination A convex combination of points x1 , … , xk is a sum of the form α1 x1 + … + αk xk with αi ³ 0 for all i and α1+ … + αk = 1 Example: 1. Line segment 2. Triangle 3. Tetrahedron admission.edhole.com
  • 7. Convex Hull Convex hull of a set of points S is the set of all convex combinations of points of S Convex hull of S is denoted by conv S, sometimes the notation (S) is also used admission.edhole.com
  • 8. Some other definitions of Convex Hull Convex Hull of a finite set of points S in the plane is the smallest convex polygon P that encloses S which means that there is no other polygon P’ such that S Í P’ Ì P Intersection of all convex sets containing the points in S admission.edhole.com
  • 9. The convex hull of a set of points S in the plane is the union of all the triangles determined by points in S Informal definition: Convex hull of a set of points in plane is the shape taken by a rubber band stretched around the nails pounded into the plane at each point Now we define the convex hull problem: - The problem is to construct the boundary of a convex hull in two dimensions given a finite set S of n points - Four outputs can be distinguished for the above problem: 1. all the points on the hull, in arbitrary order; 2. the extreme points, in arbitrary order; 3. all the points on the hull, in boundary traversal order; 4. the extreme points, in boundary traversal order; admission.edhole.com
  • 10. Extreme Points The extreme points of a set S of points in the plane are the vertices of the convex hull at which the interior angle is less than π Also a point is extreme iff there exists a line through that point that other wise does not touch the convex hull admission.edhole.com
  • 11. Algorithms to find Extreme Points A] Using Non Extreme Points Identifying non extreme points implies identifying extreme points A point is non extreme iff it is inside some (closed) triangle whose vertices are the points of the set and is not itself a corner of that triangle. Thus given a triangle:  If a point is interior to triangle it is non extreme  Corners of the triangle might be extreme Thus as the output we will get the extreme points in some arbitrary order. admission.edhole.com
  • 12. Algorithm: Interior Points for each i do for each j ≠ i do for each k ≠ i ≠ j do for each l ≠ k ≠ i ≠ j do if pl Î Δ(pi ,pj , pk) then pl is nonextreme • There are four nested loops in this algorithm • Hence the order is O(n4) • For each of the n3 triangles, the test for extremeness costs n • It is important to find a faster algorithm admission.edhole.com
  • 13. B] Extreme Edges An edge is extreme if every point of S is on or to one side of the line determined by the edge If we treat the edge as directed and let the left side of edge be inside then – the directed edge is not extreme if there is some point that is not left of it or on it The output of this algorithm will be all the points on the convex hull in arbitrary order admission.edhole.com
  • 14. Algorithm: Extreme Edges for each i do for each j ≠ i do for each k ≠ i ≠ j do if pk is not left or on (pi ,pj) then (pi ,pj) is not extreme • There are three nested loops in this algorithm • Hence the order is O(n3) • For each of the n2 pair of points, the test for extremeness costs n • The vertices that are extreme can now be found admission.edhole.com
  • 15. C] Gift Wrapping (a more realistic hull algorithm) A minor variation of Extreme Edge algorithm can accelerate it by factor n as well as output the points in order The idea is to use one extreme edge as an anchor for finding the next Suppose the algorithm found an extreme edge whose unlinked endpoint is x θ y x e • For each y of set S we compute the angle θ • The point that yields the smallest θ must determine an extreme edge • The output of this algorithm is all the points on the hull in boundary traversal order admission.edhole.com
  • 16. Idea: Think of wrapping a gift. Put the paper in contact with the gift and continue to wrap around from one surface to the next until you get all the way around. admission.edhole.com
  • 17. Algorithm: Gift Wrapping Find the lowest point (smallest y coordinate) Let i0 be its index, and set i ← i0 repeat for each j ≠ i do compute counterclockwise angle θ from previous hull edge Let k be the index of the point with the smallest θ Output (pi ,pk) as a hull edge i ← k until i = i0 • We use the lowest point as the anchor • The order is O(n2) • The cost is O(n) for each hull edge • The point set is wrapped by a string that bends the that bends with minimum angle from previous to next hull edge admission.edhole.com
  • 18. Jarvis March - Example p0 p1 p3 p4 p5 p2 p6 p7 p8 p9 p11 p12 p10 admission.edhole.com
  • 19. Jarvis March - Example p0 p1 p3 p4 p5 p2 p6 p7 p8 p9 p11 p12 p10 admission.edhole.com
  • 20. Jarvis March - Example p0 p1 p3 p4 p5 p2 p6 p7 p8 p9 p11 p12 p10 admission.edhole.com
  • 21. Jarvis March - Example p0 p1 p3 p4 p5 p2 p6 p7 p8 p9 p11 p12 p10 admission.edhole.com
  • 22. Jarvis March - Example p0 p1 p3 p4 p5 p2 p6 p7 p8 p9 p11 p12 p10 admission.edhole.com
  • 23. Jarvis March - Example p0 p1 p3 p4 p5 p2 p6 p7 p8 p9 p11 p12 p10 admission.edhole.com
  • 24. Jarvis March - Example p0 p1 p3 p4 p5 p2 p6 p7 p8 p9 p11 p12 p10 admission.edhole.com
  • 25. Gift Wrapping O(n |H(S)| ) admission.edhole.com
  • 26. Graham scan O(n log n) admission.edhole.com
  • 27. Computer Graphics 27 Step 1 Find a point, P, interior to the convex hull (CH) by taking the average of the coordinates of all the given points. Another strategy might be to simply choose yMin. P admission.edhole.com
  • 28. Computer Graphics 28 Step 2 Translate the interior point, P, and all the others, so the interior point is at the origin. P X Y admission.edhole.com
  • 29. Step 3 Find the angle between the line connecting P to each of the points and the positive X-axis. Sort the points according to the magnitude of the angle. The sorting determines the order that the algorithm will process Y the points. P X admission.edhole.com Computer Graphics 29
  • 30. Step 4 If two points have the same angle, delete the point with the smaller amplitude (This step creates a new set of points S’). Starting from the lowest Y-Axis coordinate CCW, label the points P0, P1, P2, ... P0 P2 P3 P1 P4 P5 admission.edhole.com Computer Graphics 30
  • 31. P3 Computer Graphics 31 Step 5 Let labels Pa, Pb, Pc refer to P0, P1, P2 respectively. P0 P1 P2 P5 Pa Pb Pc P4 admission.edhole.com
  • 32. Step 6 If the interior angle formed by Pa, Pb, Pc is greater than or equal to 180° then: Eliminate the point labeled with Pb. Set point Pb to point Pa. Set point Pa to the previous point in the sequence (in this case P5). P3 P4 P3 Computer Graphics 32 P5 Pa Pb Pc q eliminate P4 Pb Pc Pa P5 admission.edhole.com
  • 33. Step 6 - Cont. If the interior angle formed by Pa, Pb, Pc from before is less than 180° then: No points are eliminated. Each of Pa, Pb and Pc are advanced forward one point. P3 P4 Pc Computer Graphics 33 P5 Pa Pb Pc P4 q P5 P0 Pb Pa P3 admission.edhole.com
  • 34. Step 7 The Algorithm continues by repeating step 6 until Pb=P0. At this point, the algorithm stops and only the points of the convex hull remain. admission.edhole.com Computer Graphics 34
  • 35. Computer Graphics 35 Efficiency Assume n is the number of points in S. Step 1 can be done in O(n) operations. Step 2 can be done in O(n) operations. Step 3 can be done in O(n·Log(n)) operations. Step 4 can be done in O(n) operations. Step 5 can be done in O(1) operations. admission.edhole.com
  • 36. Efficiency - Cont. Note that each application of step 6 either eliminates a point (and partially moves backward) or moves forward (advancing Pc). This means that after 2n iterations at the most, we’ll end up with the CH. In conclusion, the algorithm will take O(n·Log(n)) operations. This is the Lower Bound complexity. Otherwise we could sort better than admissioOn(.ne·Ldohgo(lne).)c. om Computer Graphics 36
  • 37. Graham Scan - Example p0 p1 p3 p4 p5 p2 p6 p7 p8 p11 p12 p10 p9 admission.edhole.com
  • 38. Graham Scan - Example p0 p1 p3 p4 p5 p2 p6 p7 p8 p11 p12 p10 p9 admission.edhole.com
  • 39. Graham Scan - Example p0 p1 p3 p4 p5 p2 p6 p7 p8 p11 p12 p10 p9 admission.edhole.com
  • 40. Graham Scan - Example p0 p1 p3 p4 p5 p2 p6 p7 p8 p11 p12 p10 p9 admission.edhole.com
  • 41. Graham Scan - Example p0 p1 p3 p4 p5 p2 p6 p7 p8 p11 p12 p10 p9 admission.edhole.com
  • 42. Graham Scan - Example p0 p1 p3 p4 p5 p2 p6 p7 p8 p11 p12 p10 p9 admission.edhole.com
  • 43. Graham Scan - Example p0 p1 p3 p4 p5 p2 p6 p7 p8 p11 p12 p10 p9 admission.edhole.com
  • 44. Graham Scan - Example p0 p1 p3 p4 p5 p2 p6 p7 p8 p9 p11 p12 p10 admission.edhole.com
  • 45. Graham Scan - Example p0 p1 p3 p4 p5 p2 p6 p7 p8 p9 p11 p12 p10 admission.edhole.com
  • 46. Graham Scan - Example p0 p1 p3 p4 p5 p2 p6 p7 p8 p9 p11 p12 p10 admission.edhole.com
  • 47. Graham Scan - Example p0 p1 p3 p4 p5 p2 p6 p7 p8 p9 p11 p12 p10 admission.edhole.com
  • 48. Graham Scan - Example p0 p1 p3 p4 p5 p2 p6 p7 p8 p9 p11 p12 p10 admission.edhole.com
  • 49. Graham Scan - Example p0 p1 p3 p4 p5 p2 p6 p7 p8 p9 p11 p12 p10 admission.edhole.com
  • 50. Convex Hull - Divide and Conquer Algorithm:  Find a point with a median x coordinate (time: O(n))  Compute the convex hull of each half (recursive execution)  Combine the two convex hulls by finding common tangents. Can be done in O(n) 2 ) ( n O n T n T + ÷ø ( ) ö 2 çè = æ Complexity: O(nlogn) admission.edhole.com
  • 51. Convex Hull of Line Intersections. Motivation  The database contains roads and the intersections of Tel-Aviv  First intersections for an incoming guest are “important”.  We need to find important intersections, i.e. the convex hull  We don’t want to check all intersections. admission.edhole.com
  • 52. Convex Hull of Line Intersections  Applying one of the previous algorithms give O(n2 log n) time  Can we do better? admission.edhole.com
  • 53. Algorithm of Atallah 1. Sort the n input lines by decreasing slope. Li = aix+bi 2. Let qi be the intersection point between Li and Li+1. Q = {q1,…,qn} 3. Compute CH(Q). It is output of the algorithm admission.edhole.com
  • 54. Algorithm of Atallah The algorithm takes O(n log n) time admission.edhole.com
  • 55. Correctness Lj Lk Li v w p admission.edhole.com
  • 56. Correctness p – corner point => p in Q Suppose that p = Li Ç Lj , i<j If i + 1 = j or i = n-1 and j =0 than p in Q Otherwise there exists k such that ai < ak < aj Since q ¹ pn-1 , one of the following is true 1. j ¹ n-1 2. i ¹ 0 admission.edhole.com
  • 57. Correctness (j ¹ n-1) Lj Lk Li v w Ln-1 s p admission.edhole.com
  • 58. Lj Lk Li v w Ln-1 s p admission.edhole.com
  • 59. Random Lines Each line is defined by the point with polar coordinates The angles are distributed uniformly in [0, 2π] The distances have common arbitrary distribution R with final E(R) admission.edhole.com
  • 60. Random Lines The angles are distributed uniformly in [0, 2π] The distances have common arbitrary distribution R with final E(R) admission.edhole.com
  • 61. Random Lines. Results Devroye and Toussaint proved that for this case the expected number of points in the convex hull is O(1) admission.edhole.com
  • 62. Random Lines Algorithm  Find the points in the convex hull using Atallah algorithm  Gift wrapping admission.edhole.com
  • 63. Random Lines The sorting in the algorithm of Atallah requires expected linear time Gift wrapping works in expected linear time admission.edhole.com