119k views
0 votes
Modify the closest pair of points algorithm so that the separating line L now separates the first n/4 points (sorted according to their r coordinates) from the remaining 3n/4 points. Write the recurrence relation that gives the running time of the modified algorithm. Is the running time of your algorithm still O(nlog n)? Specify the best asymptotic running time you can get for your algorithm and briefly justify.

Now let the line L separate the first √ n points (according to their x- coordinates) from the remaining n - √ n points. Write the recurrence relation that gives the running time of this modification of the algorithm. Is the running time of your algorithm still O(n log n)? If your answer is yes, provide a brief justification; if your answer is no, provide a (asymptotic) lower bound on the running time of the modified algorithm that should be enough to justify your answer.

1 Answer

2 votes

Answer:

Check the explanation

Step-by-step explanation:

Kindly check the attached images below to see the step by step explanation to the question above.

Modify the closest pair of points algorithm so that the separating line L now separates-example-1
Modify the closest pair of points algorithm so that the separating line L now separates-example-2
User Dbugger
by
4.1k points