Home /
Expert Answers /
Computer Science /
explain-extremely-well-with-many-steps-i-don-39-t-understand-divide-snd-conquer-well-will-upvote-pa253
(Solved):
explain extremely well with many steps. i don't understand divide snd conquer well. will upvote. ...
explain extremely well with many steps. i don't understand divide snd conquer well. will upvote. thanks.
1. [12\%] Implement the algorithm for finding the closest pair of points in two dimension plane using divide and conquer strategy. A system for controlling air or sea traffic might need to know which are the two closest vehicles in order to detect potential collisions. This part solves the problem of finding the closest pair of points in a set of points. The set consists of points in R2 defined by both an x and a y coordinate. The "closest pair" refers to the pair of points in the set that has the smallest Euclidean distance, where Euclidean distance between points p1?=(x1?,y1?) and p2?=(x2?,y2?) is simply sqrt ((x1??x2?)2+(y1??y2?)2). If there are two identical points in the set, then the closest pair distance in the set will obviously be zero. Input data: n points with coordinates: X coordinates: p[0]?x,p[1]?x,p[2]?x,….,p[n]?x Y coordinates: p[0].y, p[1].y, p[2].y,...., p[n].y Output: minimum distance between points p[i] and p[j] (index i and j should be identified)