Question: 3 Divide and Conquer Approach for Convex Hull 3 . 0 . 1 Splitting the Set of Points Problem 7 . Split a given set
Divide and Conquer Approach for Convex Hull
Splitting the Set of Points
Problem Split a given set of points into two subsets by a vertical line. Some considerations when you are splitting:
Avoid Collinearity: Ensure the line doesn't overlap any points you want to separate.
Subset Sizes: Decide if you want equalsized subsets or if different sizes are acceptable.
Boundary Conditions: Determine whether points on the line belong to the left or right subset.
marks
Solution.
Problem Why is it necessary to divide the points with respect to the median and not the mean? marks
Solution.
Merging the Convex Hulls
Definition The Upper Tangent The upper tangent between two convex hulls is the line segment that touches both hulls at exactly one point each and lies above all other points in both hulls.
Definition The Lower Tangent Similarly, the lower tangent is the line segment that touches both hulls at exactly one point each and lies below all other points in both hulls.
Problem Given the following code to merge convex hulls including the code for the upper tangent, write the code finding the lower tangent. marks
Algorithm Convex Hull Merging Process
Input: Two convex hulls, HullA and HullB
Output: Merged convex hull
procedure FindUppertangentHullA HullB
Set i index of the rightmost point of HullA
Set j index of the leftmost point of HullB
while line segment HullAiHullBj is not an upper tangent do
if not an upper tangent for HullA then
Move i counterclockwise in HullA
else if not an upper tangent for HullB then
Move j clockwise in HullB
return HullAiHullBj as the upper tangent
procedure FindLOWERTANgEntHullA HullB
procedure MErgeHullsHullA HullB
upperTangent leftarrow FindUpPERTAngEnTHullA HullB
lowerTangent leftarrowmathrm FindLOWERTAngEntHullA HullB
Initialize an empty list for the merged hull
Traverse points from upperTangent to lowerTangent on HullA
Traverse points from upperTangent to lowerTangent on HullB
return the merged convex hull
Solution.
Problem Given the points and find the upper and lower tangents between the convex hulls of the sets and For finding the lower tangent, use the algorithm you wrote for the previous question. marks
Solution.
Problem Merge the convex hulls and using the algorithm mentioned above. marks
Solution.
Problem Why not select the highest point for the upper tangent and the lowest points for the lower tangent? Why use the mentioned algorithm? marks
Solution.
Problem Explain why the merging step in the divide and conquer algorithm takes On time. marks
Solution. Divide and Conquer Algorithm
Time Complexity Analysis
Problem Explain the time complexity of the divide and conquer convex hull algorithm. Break down the time complexity for each step, including:
Dividing the points into two subsets,
Recursively solving the convex hull for each subset, and
Merging the two convex hulls.
marks
Solution.
Problem Given the recurrence relation for the divide and conquer convex hull algorithm:
Tn TleftfracnrightOn
Solve this recurrence relation using the Master Theorem to determine the overall time complexity of the algorithm. marks
Solution.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
