Divide and Conquer is a well known algorithmic procedure for solving many kinds of problem. In this procedure, the problem is partitioned into two parts until the problem is trivially solvable. Finding the distance of the closest pair is an interesting topic in computer science. With divide and conquer algorithm we can solve closest pair problem. Here also the problem is partitioned into two parts until the problem is trivially solvable. But it is theoretically and practically observed that sometimes partitioning the problem space into more than two parts can give better performances. In this paper, a new proposal is given that dividing the problem space into (n) number of parts can give better result while divide and conquer algorithm is used for solving the closest pair of point's problem.
The Closest-Pair problem is considered an easy problem, in the sense that there are a number of other geometric problems (e.g. nearest neighbors and minimal spanning trees) that find the closest pair as part of their solution [1]. This problem and its generalizations arise in areas such as statistics, pattern recognition and molecular biology.
At present time, many algorithms are known for solving the Closest-Pair problem in any dimension k > 1, with optimal time complexity [2]. The Closest-Pair is also one of the first nontrivial computational problems that were solved efficiently using the divide-and-conquer strategy and it became since a classical, textbook example for this technique.
During studying, we find out the optimal parameter for divide-and-conquer algorithm. Generally two is used as partition parameter but we theoretically and practically observed that two is not the best parameter of divide-and-conquer algorithm for solving famous closest pair problem. In this circumstance we proposed (n) partition parameter is the better optimum partition parameter for divide-and-conquer algorithm to solve closest pair problem.
In computer science, divide and conquer (D&C) is an important algorithm design paradigm based on multi-branched recursion. A divide and conquer algorithm works by recursively breaking down a problem into two or more sub-problems of the same or related type, until these become simple enough to be solved directly. The solutions to the sub-problems are then combined to give a solution to the original problem. The most well known algorithm design strategies are:
• Divide instance of problem into two or more smaller instances • Solve smaller instances recursively • Obtain solution to original instance by combining these solutions
The closest pair of point’s problem or closest pair problem is a problem of computational geometry. The closest pair and its generalizations arise in areas like statistics, pattern recognition and molecular biology. The closest pair problem is defined as follows: Given a set of points, determine the two points that are closest to each other in terms of distance. Furthermore, if there is more than one pair of points with the closest distance, all such pairs should be identified. So the input is a point set with size n and the output is a point pair set.
Its two-dimensional version, for points in the plane, was among the first geometric problems which were treated at the origins of the systematic study of the computational complexity of geometric algorithms.
A naive algorithm of finding distances between all pairs of points and selecting the minimum requires O(dn 2 ) time. It turns out that the problem may be solved in O(n log n) time in a Euclidean space of fixed dimension d.
Given a set of points S in the plane, we partition it into two subsets S 1 and S 2 by a vertical line l such that the points in S 1 are to the left of l and those in S 2 are to the right of l.
We now recursively solve the problem on these two sets obtaining minimum distances of d 1 (for S 1 ), and d 2 (for S 2 ). We let d be the minimum of these. Now, if the closest pair of the whole set consists of one point from each subset, and then these two points must be within d of l. This area is represented as the two strips P 1 and P 2 on either side of l (as shown in the Figure 1). In this situation for any particular point p in one strip, only points that meet the following constraints in the other strip need to be checked:
-those points within d of p in the direction of the other strip -those within d of p in the positive and negative y directions Simply because points outside of this bounding box cannot be less than d units from p (Figure :
2). It happens because every point in this box is at least d apart, there can be at most six points within it. Here we don’t need to check all n 2 points. We have to do is sort the points in the strip by their y-coordinates and scan the points in order, checking each point against a maximum of 6 of its neighbors. This means at most 6n comparisons are required to check all candidate pairs. However, since we sorted the points in the strip by their y-coordinates the process of merging our two subsets is not linear, but in fact takes O(nlogn) time.
Divide the set into two equal sized parts by the line l, and recursively compute the minimal distance in each part. Steps define the merging process must be repeated logn times because this is a divide and conquer algorithm.
Let P be a set of n >1 points in the XY-plane. The closest pair in P can be found in O(n log n) time using the divide-and-conquer algorithm.
1 Presort points in P along the x-coordinate. At first sight it seems that something of the order of n 2 /4 distance comparisons will be required to compute d LR . However, Bentley and Shamos [3] noted that the knowledge of both distances d L and d R induces a scarcity condition over the set P.
Let d = min ( d L ,d R ) and consider the vertical sl
This content is AI-processed based on open access ArXiv data.