Jump to content

Smallest-circle problem: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
 
(168 intermediate revisions by 77 users not shown)
Line 1: Line 1:
{{Short description|Finding the smallest circle that contains all given points}}
==1. Problem==
[[Image:Smallest circle problem.svg|thumb|right|300px|Some instances of the smallest bounding circle.]]


The '''smallest-circle problem''' (also known as '''minimum covering circle problem''', '''bounding circle problem''', '''least bounding circle problem''', '''smallest enclosing circle problem''') is a [[computational geometry]] problem of computing the smallest [[circle]] that contains all of a given [[set (mathematics)|set]] of [[point (geometry)|points]] in the [[Euclidean plane]]. The corresponding problem in [[n-dimensional space|''n''-dimensional space]], the [[smallest bounding sphere]] problem, is to compute the smallest [[n-sphere|''n''-sphere]] that contains all of a given set of points.<ref name="eh-mcsp-72">{{citation|first1=J.|last1=Elzinga|first2=D. W.|last2=Hearn|title=The minimum covering sphere problem|journal=[[Management Science (journal)|Management Science]]|volume=19|pages=96–104|year=1972|doi=10.1287/mnsc.19.1.96}}</ref> The smallest-circle problem was initially proposed by the English mathematician [[James Joseph Sylvester]] in 1857.<ref>{{citation|first=J. J.|last=Sylvester|author-link=James Joseph Sylvester|title=A question in the geometry of situation|journal=[[Quarterly Journal of Mathematics]]|volume=1|page=79|year=1857}}.</ref>
The '''minimum covering circle problem''' is a [[mathematical problem]] of computing a smallest enclosing circle of a set S of given N points in R<sup>n</sup>, which was initially proposed by Sylvester in 1987. This problem is also called minimum covering circle problem. In two dimensional space, the problem is a well known single facility location problem which locates a new facility to provide service to a number of customers or facilities. We can formulate the minimum covering circle problem as the minimax programming problem:


The smallest-circle problem in [[Plane (geometry)|the plane]] is an example of a [[Optimal facility location|facility location problem]] (the [[1-center problem]]) in which the location of a new facility must be chosen to provide service to a number of customers, minimizing the farthest distance that any customer must travel to reach the new facility.<ref>{{citation|last1=Francis|first1=R. L.|first2=L. F.|last2=McGinnis|first3=J. A.|last3=White|title=Facility Layout and Location: An Analytical Approach|edition=2nd|publisher=Prentice–Hall, Inc.|location=Englewood Cliffs, N.J.|year=1992}}.</ref> Both the smallest circle problem in the plane, and the smallest bounding sphere problem in any higher-dimensional space of bounded dimension are solvable in [[Worst-case complexity|worst-case]] [[linear time]].
<math> \min_{x\in R^n} \max_{x\in S} \|x-s\|</math>


==Characterization==
The problem can be reduced to the following minimization problem:
Most of the geometric approaches for the problem look for points that lie on the boundary of the minimum circle and are based on the following simple facts:
* The minimum covering circle is unique.
* The minimum covering circle of a set ''S'' can be determined by at most three points in ''S'' which lie on the boundary of the circle. If it is determined by only two points, then the [[line segment]] joining those two points must be a [[diameter]] of the minimum circle. If it is determined by three points, then the [[triangle]] consisting of those three points is not [[obtuse triangle|obtuse]].


{{Collapse top|title=Proof that the minimum covering disk is unique}}
<math>\min ~ r</math>
Let {{var|P}} be any set of points in the plane, and suppose that there are two smallest enclosing disks of {{var|P}}, with centers at <math>\vec{z}_1</math> and <math>\vec{z}_2</math>. Let <math>r</math> be their shared [[radius]], and let <math>2a</math> be the distance between their centers. Since {{var|P}} is a [[subset]] of both disks it is a subset of their [[intersection (set theory)|intersection]]. However, their intersection is contained within the disk with center <math>\frac 12 (\vec{z}_1+\vec{z}_2)</math> and radius <math>\sqrt{r^2-a^2}</math>, as shown in the following image:


:[[Image:The smallest enclosing disk of points in the plane is unique.svg|300px]]
with subject to


Since {{var|r}} is minimal, we must have <math>\sqrt{r^2-a^2}=r</math>, meaning <math>a=0</math>, so the disks are identical.{{sfn|Welzl|1991|p=2}}
<math>\|x-s\|\leq r</math>
{{Collapse bottom}}


==Linear-time solutions==
<math>x\in R^n,~s\in S,</math>
As [[Nimrod Megiddo]] showed,<ref>{{citation
| last = Megiddo | first = Nimrod | author-link = Nimrod Megiddo
| doi = 10.1137/0212052
| issue = 4
| journal = [[SIAM Journal on Computing]]
| mr = 721011
| pages = 759–776
| title = Linear-time algorithms for linear programming in {{math|'''R'''<sup>3</sup>}} and related problems
| volume = 12
| year = 1983| s2cid = 14467740 }}.</ref> the minimum enclosing circle can be found in linear time, and the same linear time bound also applies to the [[smallest enclosing sphere]] in Euclidean spaces of any constant dimension. His article also gives a brief overview of earlier <math>O(n^3)</math> and <math>O(n \log n)</math> algorithms;<ref name="msw"/> in doing so, Megiddo demonstrated that Shamos and Hoey's [[conjecture]] – that a solution to the smallest-circle problem was computable in <math>\Omega(n \log n)</math> at best – was false.<ref name="shamoshoey">{{citation|first1=M. I.|last1=Shamos|author1-link=Michael Ian Shamos|first2=D.|last2=Hoey|contribution=Closest point problems|title=Proceedings of 16th Annual IEEE Symposium on Foundations of Computer Science|pages=151–162|year=1975|doi=10.1109/SFCS.1975.8|title-link=Symposium on Foundations of Computer Science|s2cid=40615455 }}</ref>


[[Emo Welzl]]<ref name="Welzl 1991 359–370">{{citation
where <math>r</math> can be seen as the radius of the smallest covering circle, or equivalently
| last = Welzl | first = Emo | author-link = Emo Welzl
| editor-last = Maurer | editor-first = H.
| doi = 10.1007/BFb0038202
| contribution = Smallest enclosing disks (balls and ellipsoids)
| volume = 555
| pages = 359–370
| publisher = Springer-Verlag
| series = Lecture Notes in Computer Science
| title = New Results and New Trends in Computer Science
| year = 1991| isbn = 978-3-540-54869-0 | citeseerx = 10.1.1.46.1450 }}.</ref> proposed a simple [[randomized algorithm]] for the
minimum covering circle problem that runs in [[expected time]] <math>O(n)</math>, based on a [[linear programming]] algorithm of [[Raimund Seidel]].


Subsequently, the smallest-circle problem was included in a general class of [[LP-type problem]]s that can be solved by algorithms like Welzl's based on linear programming. As a consequence of membership in this class, it was shown that the dependence on the dimension of the constant factor in the <math>O(n)</math> time bound, which was [[factorial]] for Seidel's method, could be reduced to [[subexponential time|subexponential]].<ref name=msw>{{citation
<math>\min ~ r</math>
| last1 = Matoušek | first1 = Jiří | author1-link = Jiří Matoušek (mathematician)
| last2 = Sharir | first2 = Micha | author2-link = Micha Sharir
| last3 = Welzl | first3 = Emo
| doi = 10.1007/BF01940877
| journal = [[Algorithmica]]
| pages = 498–516
| title = A subexponential bound for linear programming
| url = http://www.inf.ethz.ch/personal/emo/PublFiles/SubexLinProg_ALG16_96.pdf
| volume = 16
| issue = 4–5 | year = 1996| citeseerx = 10.1.1.46.5644 | s2cid = 877032 }}.</ref>
Welzl's minidisk algorithm has been extended to handle Bregman divergences<ref>{{citation| first1=Frank|last1=Nielsen|first2=Richard |last2=Nock |
title=On the smallest enclosing information disk|journal=Information Processing Letters|volume=105|issue=3|pages=93-97|year=2008|doi=10.1016/j.ipl.2007.08.007}}</ref> which include the squared Euclidean distance.


=== Megiddo's algorithm ===
with subject to
[[File:Megiddo's minimum enclosing circle algorithm prune stage2.png|thumb|Run of Megiddo's algorithm phase, discarding from point set A, B, ..., U needless points E, T.]]
Megiddo's algorithm<ref>{{citation
| last = Megiddo | first = Nimrod | author-link = Nimrod Megiddo
| doi = 10.1137/0212052
| issue = 4
| journal = [[SIAM Journal on Computing]]
| mr = 721011
| pages = 759–776
| title = Linear-time algorithms for linear programming in {{math|'''R'''<sup>3</sup>}} and related problems
| volume = 12
| year = 1983| s2cid = 14467740 }}.</ref> is based on the technique called prune and search, reducing the size of the problem by removing <math display="inline">\frac{n}{16}</math> unnecessary points.
That leads to the recurrence <math>t(n) \le t\left(\frac{15n}{16}\right)+cn</math> giving <math>t(n)=16cn</math>.


The algorithm is rather complicated and it is reflected by its big multiplicative constant.
<math>\|x-s\|+v_s=r,</math>
The reduction needs to solve twice the similar problem where the center of the sought-after enclosing circle is constrained to lie on a given [[line (geometry)|line]].
The solution of the subproblem is either the solution of the unconstrained problem or it is used to determine the half-plane where the unconstrained solution center is located.


The <math display="inline">\frac{n}{16}</math> points to be discarded are found as follows:
<math>v_s\geq 0,~x\in R^n,~s\in S.</math>
The points {{var|P<sub>i</sub>}} are arranged into pairs which defines <math display="inline">\frac{n}{2}</math> lines {{var|p<sub>j</sub>}} as their [[bisection|bisectors]].
The median average {{var|p<sub>m</sub>}} of bisectors in order by their directions (oriented to the same half-plane determined by bisector {{math|''p''<sub>1</sub>}}) is found and pairs of bisectors are made, such that in each pair one bisector has direction at most {{var|p<sub>m</sub>}} and the other at least {{var|p<sub>m</sub>}}
(direction {{math|''p''<sub>1</sub>}} could be considered as −<math>\infty</math> or +<math>\infty</math> according our needs.) Let {{var|Q<sub>k</sub>}} be the intersection of the bisectors in the {{var|k}}-th pair.


The line ''q'' in the {{math|''p''<sub>1</sub>}} direction is placed to go through an intersection {{var|Q<sub>x</sub>}} such that there are <math display="inline">\frac{n}{8}</math> intersections in each half-plane defined by the line (median position).
==2. Algorithms==
The constrained version of the enclosing problem is run on the line q' which determines half-plane where the center is located.
The line ''q''′ in the {{var|p<sub>m</sub>}} direction is placed to go through an intersection {{var|Q<sub>x'</sub>}} such that there are <math display="inline">\frac{n}{16}</math> intersections in each half of the half-plane not containing the solution.
The constrained version of the enclosing problem is run on line ''q''′ which together with ''q'' determines the quadrant where the center is located.
We consider the points {{var|Q<sub>k</sub>}} in the quadrant not contained in a half-plane containing the solution.
One of the bisectors of the pair defining {{var|Q<sub>k</sub>}} has the direction ensuring which of points {{var|P<sub>i</sub>}} defining the bisector is closer to each point in the quadrant containing the center of the enclosing circle. This point could be discarded.


The constrained version of the algorithm is also solved by the prune and search technique, but reducing the problem size by removal of <math display="inline">\frac{n}{4}</math> points leading to recurrence
From here on we will consider the minimum covering circle problem in two dimensional Euclidean space. Most of the geometric approaches for the problem look for points that lie on the boundary of the minimum circle and are based on the following simple facts:
:<math>t(n) \le t\left(\frac{3n}{4}\right)+cn</math>
giving <math>t(n) = 4cn</math>.


The <math display="inline">\frac{n}{4}</math> points to be discarded are found as follows:
- The minimum covering circle is unique.
Points {{var|P<sub>i</sub>}} are arranged into pairs.
- The minimum covering circle can be determined by at most three points in S which lie on the boundary of the circle. If it is determined by only two points, then the line segment joining those two points must be a diameter of the minimum circle. If it is determined by three points, then the triangle consists of those three points is not obtuse.
For each pair, the intersection {{var|Q<sub>j</sub>}} of its bisector with the constraining line {{var|q}} is found (If this intersection does not exist we could remove one point from the pair immediately).
The median {{var|M}} of points {{var|Q<sub>j</sub>}} on the line {{var|q}} is found and in ''O''(''n'') time is determined which halfline of {{var|q}} starting in {{var|M}}
contains the solution of the constrained problem.
We consider points {{var|Q<sub>j</sub>}} from the other half.
We know which of the points {{var|P<sub>i</sub>}} defining {{var|Q<sub>j</sub>}} is closer to the each point of the halfline containing center of the enclosing circle of the constrained problem solution. This point could be discarded.


The half-plane where the unconstrained solution lies could be determined by the points {{var|P<sub>i</sub>}} on the boundary of the constrained circle solution. (The first and last point on the circle in each half-plane suffice. If the center belongs to their [[convex hull]], it is unconstrained solution, otherwise the direction to the nearest edge determines the half-plane of the unconstrained solution.)
We note that, according to the above facts, the problem can be solved in <math>O(N^4)</math> by enumerating all the triples of the points in S under a model in which square roots are calculated in constant time.


=== Welzl's algorithm ===
'''Algorithm 1'''
1. Set <math>k = 1</math>. Construct a circle that covers S and passes through two points, say A and B, in S. Find the center of the circle and denote by <math>O_k</math>.
2. Set <math>S_k = {A,B}</math>. Find a point C that minimizes <math>\angle ADB</math> over D 2 S n Sk. If angle \ADB is obtuse, terminate the algorithm and the minimum circle has diameter AB.


The algorithm is [[recursive algorithm|recursive]].

The initial input is a set ''P'' of points. The algorithm selects one point ''p'' [[Randomly selected|randomly]] and [[Uniform distribution (continuous)|uniformly]] from ''P'', and recursively finds the minimal circle containing ''P'' – {''p''}, i.e. all of the other points in ''P'' except ''p''. If the returned circle also encloses ''p'', it is the minimal circle for the whole of ''P'' and is returned.

Otherwise, point ''p'' must lie on the boundary of the result circle. It recurses, but with the set ''R'' of points known to be on the boundary as an additional parameter.

The recursion terminates when ''P'' is [[empty set|empty]], and a solution can be found from the points in ''R'': for 0 or 1 points the solution is trivial, for 2 points the minimal circle has its center at the midpoint between the two points, and for 3 points the circle is the [[circumcircle]] of the triangle described by the points. (In three dimensions, 4 points require the calculation of the [[circumsphere]] of a [[tetrahedron]].)

Recursion can also terminate when ''R'' has size 3 (in 2D, or 4 in 3D) because the remaining points in ''P'' must lie within the circle described by ''R''.

'''algorithm''' welzl '''is'''<ref name="Welzl 1991 359–370"/>
'''input:''' Finite sets ''P'' and ''R'' of points in the plane |''R''| &le; 3.
'''output:''' Minimal disk enclosing ''P'' with ''R'' on the boundary.
'''if''' ''P'' is empty '''or''' |''R''| = 3 '''then'''
'''return''' trivial(''R'')
'''choose''' ''p'' in ''P'' ([[Randomly selected|randomly]] and [[Uniform distribution (continuous)|uniformly]])
D := welzl(''P'' − {''p''}, ''R'')
'''if''' ''p'' is in ''D'' '''then'''
'''return''' ''D''
'''return''' welzl({{var|P}} − {''p''}, ''R'' ∪ {''p''})

Welzl's paper states that it is sufficient to randomly permute the input at the start, rather than performing independently random choices of ''p'' on each recursion.

It also states that performance is improved by dynamically re-ordering the points so that those that are found to be outside a circle are subsequently considered earlier, but this requires a change in the structure of the algorithm to store ''P'' as a "global".

==Other algorithms==
Prior to Megiddo's result showing that the smallest-circle problem may be solved in linear time, several algorithms of higher complexity appeared in the literature. A naive algorithm solves the problem in time O(''n''<sup>4</sup>) by testing the circles determined by all pairs and triples of points.
* An algorithm of Chrystal and Peirce applies a [[Local search (optimization)|local optimization]] strategy that maintains two points on the boundary of an enclosing circle and repeatedly shrinks the circle, replacing the pair of boundary points, until an optimal circle is found. Chakraborty and Chaudhuri<ref>{{citation|first1=R. K.|last1=Chakraborty|first2=P. K.|last2=Chaudhuri|title=Note on geometrical solutions for some minimax location problems|journal=[[Transportation Science]]|volume=15|issue=2|pages=164–166|year=1981|doi=10.1287/trsc.15.2.164|doi-access=free}}.</ref> propose a linear-time method for selecting a suitable initial circle and a pair of boundary points on that circle. Each step of the algorithm includes as one of the two boundary points a new vertex of the [[convex hull]], so if the hull has ''h'' vertices this method can be implemented to run in time O(''nh'').
* Elzinga and Hearn<ref>{{citation|first1=J.|last1=Elzinga|first2=D. W.|last2=Hearn|title=Geometrical solutions for some minimax location problems|journal=[[Transportation Science]]|volume=6|issue=4|pages=379–394|year=1972|doi=10.1287/trsc.6.4.379}}.</ref> described an algorithm which maintains a covering circle for a subset of the points. At each step, a point not covered by the current sphere is used to find a larger sphere that covers a new subset of points, including the point found. Although its worst case running time is O(''h''<sup>3</sup>''n''), the authors report that it ran in linear time in their experiments. The complexity of the method has been analyzed by Drezner and Shelah.<ref>{{citation|first1=Zvi|last1=Drezner|first2=Saharon|last2=Shelah|authorlink2=Saharon Shelah|title=On the complexity of the Elzinga–Hearn algorithm for the 1-center problem|journal=[[Mathematics of Operations Research]]|volume=12|issue=2|pages=255–261|year=1987|jstor=3689688|doi=10.1287/moor.12.2.255}}.</ref> Both [[Fortran]] and [[C (programming language)|C]] codes are available from {{harvtxt|Hearn|Vijay|Nickel|1995}}.<ref>{{citation|first1= D. W.|last1=Hearn|first2=J.|last2=Vijay|first3=S.|last3=Nickel|title=Codes of geometrical algorithms for the (weighted) minimum circle problem|journal=European Journal of Operational Research|volume=80|pages=236–237|year=1995|doi=10.1016/0377-2217(95)90075-6}}.</ref>
* The smallest sphere problem can be formulated as a [[quadratic program]]<ref name="eh-mcsp-72"/> defined by a system of linear constraints with a convex quadratic objective function. Therefore, any feasible direction algorithm can give the solution of the problem.<ref>{{citation|first=S. K.|last=Jacobsen|title=An algorithm for the minimax Weber problem|journal=European Journal of Operational Research|volume=6|issue=2|pages=144–148|year=1981|doi=10.1016/0377-2217(81)90200-9}}.</ref> Hearn and Vijay<ref name="hv-eawmcp-82">{{citation|first1=D. W.|last1=Hearn|first2=J.|last2=Vijay|title=Efficient algorithms for the (weighted) minimum circle problem|journal=[[Operations Research (journal)|Operations Research]]|volume=30|issue=4|pages=777–795|year=1982|doi=10.1287/opre.30.4.777}}.</ref> proved that the feasible direction approach chosen by Jacobsen is equivalent to the Chrystal–Peirce algorithm.
* The dual to this quadratic program may also be formulated explicitly;<ref>{{citation|first1=J.|last1=Elzinga|first2=D. W.|last2=Hearn|first3=W. D.|last3=Randolph|title=Minimax multifacility location with Euclidean distances|journal=[[Transportation Science]]|volume=10|issue=4|pages=321–336|year=1976|doi=10.1287/trsc.10.4.321}}.</ref> an algorithm of Lawson<ref>{{citation|first=C. L.|last=Lawson|title=The smallest covering cone or sphere|journal=[[SIAM Review]]|volume=7|issue=3|doi=10.1137/1007084|pages=415–417|year=1965}}.</ref> can be described in this way as a primal dual algorithm.<ref name="hv-eawmcp-82"/>
* Shamos and Hoey<ref name="shamoshoey"/> proposed an O(''n''&nbsp;log&nbsp;''n'') time algorithm for the problem based on the observation that the center of the smallest enclosing circle must be a vertex of the farthest-point [[Voronoi diagram]] of the input point set.

==Weighted variants of the problem==

The weighted version of the minimum covering circle problem takes as input a set of points in a Euclidean space, each with weights; the goal is to find a single point that minimizes the maximum weighted distance (i.e., distance multiplied by the corresponding weight) to any point. The original (unweighted) minimum covering circle problem corresponds to the case when all weights are equal to 1. As with the unweighted problem, the weighted problem may be solved in linear time in any space of bounded dimension, using approaches closely related to bounded dimension linear programming algorithms, although slower algorithms are again frequent in the literature.<ref name="hv-eawmcp-82"/><ref>{{citation|first=N.|last=Megiddo|author-link=Nimrod Megiddo|title=The weighted Euclidean 1-center problem|journal=[[Mathematics of Operations Research]]|volume=8|issue=4|pages=498–504|year=1983|doi=10.1287/moor.8.4.498}}.</ref><ref>{{citation|first1=N.|last1=Megiddo|author1-link=Nimrod Megiddo|first2=E.|last2=Zemel|title=An ''O''(''n''&nbsp;log&nbsp;''n'') randomizing algorithm for the weighted Euclidean 1-center problem|journal=Journal of Algorithms|volume=7|issue=3|pages=358–368|year=1986|doi=10.1016/0196-6774(86)90027-1}}.</ref>

==Smallest enclosing balls in non-Euclidean geometry==

The smallest enclosing ball of a finite point set has been studied in Riemannian geometry including Cartan-Hadamard manifolds.<ref>{{citation | first1=Marc | last1=Arnaudon | first2=Frank| last2=Nielsen |title=On approximating the Riemannian 1-center|journal=Computational Geometry|volume=46|issue=1| pages=93-104| year=2013| doi=10.1016/j.comgeo.2012.04.007| arxiv=1101.4718}}</ref>

== See also ==
* [[Bounding sphere]]
* [[1-center problem]]
* [[Circumscribed circle]]
* [[Closest string]]
* [[Jung's Theorem]]
* [[Minimum-diameter spanning tree]]


==References==
==References==
{{reflist}}
{{reflist|colwidth=30em}}


==External links==
==External links==
* [http://www.inf.ethz.ch/personal/gaertner/miniball.html Bernd Gärtner's smallest enclosing ball code]
* [http://www.inf.ethz.ch/personal/gaertner/miniball.html Bernd Gärtner's smallest enclosing ball code]
* [http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Bounding_volumes/Chapter_main.html CGAL] the ''Min_sphere_of_spheres'' package of the ''Computational Geometry Algorithms Library'' (CGAL)
* [http://miniball.sourceforge.net/ Miniball] open source project for smallest enclosing balls
* [https://github.com/hbf/miniball Miniball] an open-source implementation of an algorithm for the smallest enclosing ball problem for low and moderately high dimensions


[[Category:Geometric algorithms]]
[[Category:Computational geometry]]
[[Category:Combinatorial optimization]]
[[Category:Combinatorial optimization]]
[[Category:Circles]]
[[Category:Circles]]

Latest revision as of 02:22, 26 December 2024

Some instances of the smallest bounding circle.

The smallest-circle problem (also known as minimum covering circle problem, bounding circle problem, least bounding circle problem, smallest enclosing circle problem) is a computational geometry problem of computing the smallest circle that contains all of a given set of points in the Euclidean plane. The corresponding problem in n-dimensional space, the smallest bounding sphere problem, is to compute the smallest n-sphere that contains all of a given set of points.[1] The smallest-circle problem was initially proposed by the English mathematician James Joseph Sylvester in 1857.[2]

The smallest-circle problem in the plane is an example of a facility location problem (the 1-center problem) in which the location of a new facility must be chosen to provide service to a number of customers, minimizing the farthest distance that any customer must travel to reach the new facility.[3] Both the smallest circle problem in the plane, and the smallest bounding sphere problem in any higher-dimensional space of bounded dimension are solvable in worst-case linear time.

Characterization

[edit]

Most of the geometric approaches for the problem look for points that lie on the boundary of the minimum circle and are based on the following simple facts:

  • The minimum covering circle is unique.
  • The minimum covering circle of a set S can be determined by at most three points in S which lie on the boundary of the circle. If it is determined by only two points, then the line segment joining those two points must be a diameter of the minimum circle. If it is determined by three points, then the triangle consisting of those three points is not obtuse.
Proof that the minimum covering disk is unique

Let P be any set of points in the plane, and suppose that there are two smallest enclosing disks of P, with centers at and . Let be their shared radius, and let be the distance between their centers. Since P is a subset of both disks it is a subset of their intersection. However, their intersection is contained within the disk with center and radius , as shown in the following image:

Since r is minimal, we must have , meaning , so the disks are identical.[4]

Linear-time solutions

[edit]

As Nimrod Megiddo showed,[5] the minimum enclosing circle can be found in linear time, and the same linear time bound also applies to the smallest enclosing sphere in Euclidean spaces of any constant dimension. His article also gives a brief overview of earlier and algorithms;[6] in doing so, Megiddo demonstrated that Shamos and Hoey's conjecture – that a solution to the smallest-circle problem was computable in at best – was false.[7]

Emo Welzl[8] proposed a simple randomized algorithm for the minimum covering circle problem that runs in expected time , based on a linear programming algorithm of Raimund Seidel.

Subsequently, the smallest-circle problem was included in a general class of LP-type problems that can be solved by algorithms like Welzl's based on linear programming. As a consequence of membership in this class, it was shown that the dependence on the dimension of the constant factor in the time bound, which was factorial for Seidel's method, could be reduced to subexponential.[6] Welzl's minidisk algorithm has been extended to handle Bregman divergences[9] which include the squared Euclidean distance.

Megiddo's algorithm

[edit]
Run of Megiddo's algorithm phase, discarding from point set A, B, ..., U needless points E, T.

Megiddo's algorithm[10] is based on the technique called prune and search, reducing the size of the problem by removing unnecessary points. That leads to the recurrence giving .

The algorithm is rather complicated and it is reflected by its big multiplicative constant. The reduction needs to solve twice the similar problem where the center of the sought-after enclosing circle is constrained to lie on a given line. The solution of the subproblem is either the solution of the unconstrained problem or it is used to determine the half-plane where the unconstrained solution center is located.

The points to be discarded are found as follows: The points Pi are arranged into pairs which defines lines pj as their bisectors. The median average pm of bisectors in order by their directions (oriented to the same half-plane determined by bisector p1) is found and pairs of bisectors are made, such that in each pair one bisector has direction at most pm and the other at least pm (direction p1 could be considered as − or + according our needs.) Let Qk be the intersection of the bisectors in the k-th pair.

The line q in the p1 direction is placed to go through an intersection Qx such that there are intersections in each half-plane defined by the line (median position). The constrained version of the enclosing problem is run on the line q' which determines half-plane where the center is located. The line q′ in the pm direction is placed to go through an intersection Qx' such that there are intersections in each half of the half-plane not containing the solution. The constrained version of the enclosing problem is run on line q′ which together with q determines the quadrant where the center is located. We consider the points Qk in the quadrant not contained in a half-plane containing the solution. One of the bisectors of the pair defining Qk has the direction ensuring which of points Pi defining the bisector is closer to each point in the quadrant containing the center of the enclosing circle. This point could be discarded.

The constrained version of the algorithm is also solved by the prune and search technique, but reducing the problem size by removal of points leading to recurrence

giving .

The points to be discarded are found as follows: Points Pi are arranged into pairs. For each pair, the intersection Qj of its bisector with the constraining line q is found (If this intersection does not exist we could remove one point from the pair immediately). The median M of points Qj on the line q is found and in O(n) time is determined which halfline of q starting in M contains the solution of the constrained problem. We consider points Qj from the other half. We know which of the points Pi defining Qj is closer to the each point of the halfline containing center of the enclosing circle of the constrained problem solution. This point could be discarded.

The half-plane where the unconstrained solution lies could be determined by the points Pi on the boundary of the constrained circle solution. (The first and last point on the circle in each half-plane suffice. If the center belongs to their convex hull, it is unconstrained solution, otherwise the direction to the nearest edge determines the half-plane of the unconstrained solution.)

Welzl's algorithm

[edit]

The algorithm is recursive.

The initial input is a set P of points. The algorithm selects one point p randomly and uniformly from P, and recursively finds the minimal circle containing P – {p}, i.e. all of the other points in P except p. If the returned circle also encloses p, it is the minimal circle for the whole of P and is returned.

Otherwise, point p must lie on the boundary of the result circle. It recurses, but with the set R of points known to be on the boundary as an additional parameter.

The recursion terminates when P is empty, and a solution can be found from the points in R: for 0 or 1 points the solution is trivial, for 2 points the minimal circle has its center at the midpoint between the two points, and for 3 points the circle is the circumcircle of the triangle described by the points. (In three dimensions, 4 points require the calculation of the circumsphere of a tetrahedron.)

Recursion can also terminate when R has size 3 (in 2D, or 4 in 3D) because the remaining points in P must lie within the circle described by R.

algorithm welzl is[8]
    input: Finite sets P and R of points in the plane |R| ≤ 3.
    output: Minimal disk enclosing P with R on the boundary.

    if P is empty or |R| = 3 then
        return trivial(R)
    choose p in P (randomly and uniformly)
    D := welzl(P − {p}, R)
    if p is in D then
        return D

    return welzl(P − {p}, R ∪ {p})

Welzl's paper states that it is sufficient to randomly permute the input at the start, rather than performing independently random choices of p on each recursion.

It also states that performance is improved by dynamically re-ordering the points so that those that are found to be outside a circle are subsequently considered earlier, but this requires a change in the structure of the algorithm to store P as a "global".

Other algorithms

[edit]

Prior to Megiddo's result showing that the smallest-circle problem may be solved in linear time, several algorithms of higher complexity appeared in the literature. A naive algorithm solves the problem in time O(n4) by testing the circles determined by all pairs and triples of points.

  • An algorithm of Chrystal and Peirce applies a local optimization strategy that maintains two points on the boundary of an enclosing circle and repeatedly shrinks the circle, replacing the pair of boundary points, until an optimal circle is found. Chakraborty and Chaudhuri[11] propose a linear-time method for selecting a suitable initial circle and a pair of boundary points on that circle. Each step of the algorithm includes as one of the two boundary points a new vertex of the convex hull, so if the hull has h vertices this method can be implemented to run in time O(nh).
  • Elzinga and Hearn[12] described an algorithm which maintains a covering circle for a subset of the points. At each step, a point not covered by the current sphere is used to find a larger sphere that covers a new subset of points, including the point found. Although its worst case running time is O(h3n), the authors report that it ran in linear time in their experiments. The complexity of the method has been analyzed by Drezner and Shelah.[13] Both Fortran and C codes are available from Hearn, Vijay & Nickel (1995).[14]
  • The smallest sphere problem can be formulated as a quadratic program[1] defined by a system of linear constraints with a convex quadratic objective function. Therefore, any feasible direction algorithm can give the solution of the problem.[15] Hearn and Vijay[16] proved that the feasible direction approach chosen by Jacobsen is equivalent to the Chrystal–Peirce algorithm.
  • The dual to this quadratic program may also be formulated explicitly;[17] an algorithm of Lawson[18] can be described in this way as a primal dual algorithm.[16]
  • Shamos and Hoey[7] proposed an O(n log n) time algorithm for the problem based on the observation that the center of the smallest enclosing circle must be a vertex of the farthest-point Voronoi diagram of the input point set.

Weighted variants of the problem

[edit]

The weighted version of the minimum covering circle problem takes as input a set of points in a Euclidean space, each with weights; the goal is to find a single point that minimizes the maximum weighted distance (i.e., distance multiplied by the corresponding weight) to any point. The original (unweighted) minimum covering circle problem corresponds to the case when all weights are equal to 1. As with the unweighted problem, the weighted problem may be solved in linear time in any space of bounded dimension, using approaches closely related to bounded dimension linear programming algorithms, although slower algorithms are again frequent in the literature.[16][19][20]

Smallest enclosing balls in non-Euclidean geometry

[edit]

The smallest enclosing ball of a finite point set has been studied in Riemannian geometry including Cartan-Hadamard manifolds.[21]

See also

[edit]

References

[edit]
  1. ^ a b Elzinga, J.; Hearn, D. W. (1972), "The minimum covering sphere problem", Management Science, 19: 96–104, doi:10.1287/mnsc.19.1.96
  2. ^ Sylvester, J. J. (1857), "A question in the geometry of situation", Quarterly Journal of Mathematics, 1: 79.
  3. ^ Francis, R. L.; McGinnis, L. F.; White, J. A. (1992), Facility Layout and Location: An Analytical Approach (2nd ed.), Englewood Cliffs, N.J.: Prentice–Hall, Inc..
  4. ^ Welzl 1991, p. 2.
  5. ^ Megiddo, Nimrod (1983), "Linear-time algorithms for linear programming in R3 and related problems", SIAM Journal on Computing, 12 (4): 759–776, doi:10.1137/0212052, MR 0721011, S2CID 14467740.
  6. ^ a b Matoušek, Jiří; Sharir, Micha; Welzl, Emo (1996), "A subexponential bound for linear programming" (PDF), Algorithmica, 16 (4–5): 498–516, CiteSeerX 10.1.1.46.5644, doi:10.1007/BF01940877, S2CID 877032.
  7. ^ a b Shamos, M. I.; Hoey, D. (1975), "Closest point problems", Proceedings of 16th Annual IEEE Symposium on Foundations of Computer Science, pp. 151–162, doi:10.1109/SFCS.1975.8, S2CID 40615455
  8. ^ a b Welzl, Emo (1991), "Smallest enclosing disks (balls and ellipsoids)", in Maurer, H. (ed.), New Results and New Trends in Computer Science, Lecture Notes in Computer Science, vol. 555, Springer-Verlag, pp. 359–370, CiteSeerX 10.1.1.46.1450, doi:10.1007/BFb0038202, ISBN 978-3-540-54869-0.
  9. ^ Nielsen, Frank; Nock, Richard (2008), "On the smallest enclosing information disk", Information Processing Letters, 105 (3): 93–97, doi:10.1016/j.ipl.2007.08.007
  10. ^ Megiddo, Nimrod (1983), "Linear-time algorithms for linear programming in R3 and related problems", SIAM Journal on Computing, 12 (4): 759–776, doi:10.1137/0212052, MR 0721011, S2CID 14467740.
  11. ^ Chakraborty, R. K.; Chaudhuri, P. K. (1981), "Note on geometrical solutions for some minimax location problems", Transportation Science, 15 (2): 164–166, doi:10.1287/trsc.15.2.164.
  12. ^ Elzinga, J.; Hearn, D. W. (1972), "Geometrical solutions for some minimax location problems", Transportation Science, 6 (4): 379–394, doi:10.1287/trsc.6.4.379.
  13. ^ Drezner, Zvi; Shelah, Saharon (1987), "On the complexity of the Elzinga–Hearn algorithm for the 1-center problem", Mathematics of Operations Research, 12 (2): 255–261, doi:10.1287/moor.12.2.255, JSTOR 3689688.
  14. ^ Hearn, D. W.; Vijay, J.; Nickel, S. (1995), "Codes of geometrical algorithms for the (weighted) minimum circle problem", European Journal of Operational Research, 80: 236–237, doi:10.1016/0377-2217(95)90075-6.
  15. ^ Jacobsen, S. K. (1981), "An algorithm for the minimax Weber problem", European Journal of Operational Research, 6 (2): 144–148, doi:10.1016/0377-2217(81)90200-9.
  16. ^ a b c Hearn, D. W.; Vijay, J. (1982), "Efficient algorithms for the (weighted) minimum circle problem", Operations Research, 30 (4): 777–795, doi:10.1287/opre.30.4.777.
  17. ^ Elzinga, J.; Hearn, D. W.; Randolph, W. D. (1976), "Minimax multifacility location with Euclidean distances", Transportation Science, 10 (4): 321–336, doi:10.1287/trsc.10.4.321.
  18. ^ Lawson, C. L. (1965), "The smallest covering cone or sphere", SIAM Review, 7 (3): 415–417, doi:10.1137/1007084.
  19. ^ Megiddo, N. (1983), "The weighted Euclidean 1-center problem", Mathematics of Operations Research, 8 (4): 498–504, doi:10.1287/moor.8.4.498.
  20. ^ Megiddo, N.; Zemel, E. (1986), "An O(n log n) randomizing algorithm for the weighted Euclidean 1-center problem", Journal of Algorithms, 7 (3): 358–368, doi:10.1016/0196-6774(86)90027-1.
  21. ^ Arnaudon, Marc; Nielsen, Frank (2013), "On approximating the Riemannian 1-center", Computational Geometry, 46 (1): 93–104, arXiv:1101.4718, doi:10.1016/j.comgeo.2012.04.007
[edit]