Minimum enclosingdisk


Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Minimum enclosingdisk

  1. 1. Simple methods for solving Smallest k-Enclosing Circle Problem Anirban Mitra and Dhruv Matani {reachnomind,dhruvbird} Abstract. We discuss the problem of finding the smallet circle enclosing K points out of a given set of N 2-Dimensional points, known as Small- est k-Enclosing Circle Problem. The runtime complexity of the methods discussed are O(N 3 × log(N )) and O(N 2 × log(N ) × log(d)) where d is the geometric span of the set of points. The space complexity for both the methods is O(n). Keywords: Smallest k-Enclosing Circle, Minimum Disk Problem, Small- est Enclosing Circle, Bomb Problem1 IntroductionNow, we define the problem, known as Smallest k-Enclosing Circle Problem Given a set S of 2D points of size N, find the smallest circle containing atleast K(2 ≤ K ≤ N ) of the points in S. The problem has an O(N × K) expected runtime solution using randomisedalgorithms [1] [2] and a deterministic solution with a runtime of O(N × K ×log 2 N ) [3]. Here, we present simple methods to solve the problem with compa-rable efficiency with the later. The Smallest Enclosing Circle problem [4] [5] [6],which is a special case of the above, is the problem of finding the circle of small-est radius enclosing all the points. There is an O(N ) time solution by NimrodMegiddo [8] using linear programming. This problem belongs to shape fitting class of problems which is a funda-mental problem in computational geometry. The problem is useful in decidingthe location of a shared facility like a university for a group of small cities. Inmilitary this is called the Bomb Problem which is, given location of many bombs,determine the location to drop a bomb with a certain impact radius to destroythe maximum number of bombs.1.1 Smallest circle pass through two or more pointsThere can be many candidates for the smallest circle containing K or morepoints. And, all of the smallest circles will have 2 or more points on its circum-ference [9]. Here is an argument for the same.
  2. 2. 2 Simple methods for solving Smallest k-Enclosing Circle Problem Let us assume that we know any one of the smallest circle and the correspond-ing set of K points. Ignore all other points for now. Start with an arbitrary largecircle containing all the K points. Now, go on shrinking the circle till one ormore of the points lie on its circumference. If there is only one point on thecircumference, then rotate the circle about the point (in either direction) tillanother point lies on the circumference. So, in either cases, we end up with acircle with two points on the circumference. If the points on the circumference are diametrically opposite then this is thesmallest circle because any smaller circle can not contain both the points. So, inthis case the smallest circle has two points on the circumference. Else, let L be the line segment joining the points on the circumference andM be the perpendicular bisector as shown in Fig. 1. We further shrink the circleby moving the centre towards L along M till either another point lies on thecircumference or the L becomes a diameter. In either case, no smaller circlecontaining all the points is possible, hence it is the smallest circle and it has 2or more points on its circumference. M C F E D A O B L Fig. 1. Shrinking circle to get smallest circle containing K = 4 points Using this result, the naive solution is to draw circles for every triplet ofpoints on its circumference and every pair as diameter, and count the numberof points lying inside. The runtime complexity of the method is O(N 4 ).
  3. 3. Simple methods for solving Smallest k-Enclosing Circle Problem 32 A solution generating circles passing through two pointsWe choose any two points from the set, say P and Q. Now, we find the smallestcircle passing through these two points and containing K points. Let L be the line passing through A and B (see Fig. 2). Now consider anythird point X. We know that for the circumcircle passing through A, B, and X,any point on the circumference (on the same side of AB) subtends an equal angleat AB, any point outside subtends a smaller angle and points inside subtendgreater angles. We sort the points by the angles subtended at AB. Now if wechoose any point from the sorted sequence say Y , then all the points to the rightof it will also be inside the circle. To include the points from the other side ofAB too, consider any random point say M (i.e. L(M ) < 0) and1. If AM B is equal to (180 − AXB), it lies on the circumference2. If AM B greater than (180−AXB), it lies inside the circle, otherwise outside C D F A B E Fig. 2. C, D, E and F - Points sorted according to the rules presented above To be complete, for points on L, the ones that lie between AB, the they willalways be inside and others can be ignored. Altogether, we sort all the points and choose the optimal third point to drawthe circumcircle and calculate the radius. We repeat the same for every pair ofpoints and choose the optimal. For one pair of points the runtime complexity isO(N × log(N )) and hence the overall runtime complexity is O(N 3 × log(N )).
  4. 4. 4 Simple methods for solving Smallest k-Enclosing Circle Problem3 A solution generating circles hinged at a pointConsider all the circles of a certain radius R hinged at one of the given pointssay X. The locus of centres of all such circles is a circle of radius R centered atX, call it Circle-1. Now, consider any other point in the set, say Y and let it beoutside Circle-1. Drop line segments from Y on the circumference of the circle(Y A and Y B as shown in the Fig. 3) such that Y A = Y B = R. The distanceof any point on arc ACB from Y is less than or equal to R. Hence, any circlecentered on arc ACB having a radius R and passing through X will contain Y . Circle-3 B R Y C Circle-2 R A X Circle-1: Locus of centers of circle hinged at X Fig. 3. Both Circle-2 and Circle-3 contains Y This is true for points in the set lying inside the Circle-1 too. So, if we cancalculate the arc intervals for all the points (other than X) in the set and find outwhere maximum number of intervals overlap, we will have the maximum pointscontained in a cicle of radius R and passing through X. There is a solution formaximum interval overlap problem in O(N × log(N )) (note that the interval
  5. 5. Simple methods for solving Smallest k-Enclosing Circle Problem 5here is circular). – This is true for points in the set lying inside the Circle-1 too. So, if we can calculate the arc intervals for all the points. A dsjdf A dsjdf A dsjdf A dsjdfReferences1. Matousek, J.: On enclosing k points by a circle, Inform. Process. Lett. 53, 217221, 19952. Har-Peled, S. and Mazumdar S.: Fast Algorithms for Computing the Smallest k- Enclosing Circle, Algorithmca 41, 147-157, 20053. Efrat A., Sharir M., and Ziv A.: Computing the smallest k-enclosing circle and related problems, Comput. Geom. Theory Appl. 4, 119136, 1994.4. Smallest circle problem, Wikipedia - The Free Encyclopedia, http://en. Weisstein, Eric W.: Minimal Enclosing Circle, MathWorld–A Wolfram Web Re- source, Muhammad, R. B.: Smallest Enclosing Circle Problem, http://www.personal. Weisstein, Eric W.: Geometric Span, MathWorld–A Wolfram Web Resource, http: // N. Megiddo: Linear-time algorithms for linear programming in r3 and related prob- lems, SIAM Journal on Computing 12 (1983), 7597769. Eliosoff, J., Unger, R.: What is the Problem?, projects/1998/jacob/problem.html10. H.W.E., Jung: Ueber den kleinsten Kreis, der eine ebene Figur einschliesst, J. Reine Angew. Math. 130, pp. 310313, 190111. Weisstein, Eric W.: Jung’s Theorem, MathWorld–A Wolfram Web Resource,