Chapter 5 Approxmate Smallest Enclosng Balls 5. Boundng Volumes A boundng volume for a set S R d s a superset of S wth a smple shape, for example a box, a ball, or an ellpsod. Fgure 5.: Boundng boxes Q(P ) of pont sets P R Boundng volumes whch are smallest among the ones of a gven shape (wth respect to volume, dameter, or some other crtera) are very useful, because they approxmate the possbly complcated set S by a smple superset. Then, whenever you want to know somethng about S, you frst try to use the boundng volume to answer the queston (ths s usually cheap), and only f ths fals, you analyze S n more detal. Here, we focus on the stuaton n whch S s a pont cloud (fnte pont set) whch we usually denote by P. Fgure 5.: Smallest enclosng balls B(P ) of pont sets P R What shapes to use depends on the questons you want to ask, of course. If you
want to know, for example, how the set P R must be translated and scaled such that a prntout of t flls a sheet of paper, you want to use axes-parallel boundng boxes. Fndng the smallest axes-parallel boundng box (or smply the boundng box) s easy. For every {,..., d}, terate over the -th coordnate of all ponts to fnd the smallest and largest one. Ths results n an algorthm of total runtme O(dn) for P = n. See Fgure 5. for two examples. The resultng box Q(P ) s smallest wth respect to volume and dameter. Alternatvely, you may consder other boundng volumes. A popular one s the smallest enclosng ball, see Fgure 5.. Here, smallest refers to the radus (or equvalently, the volume) of the ball. In the exercses, we ask you to prove that the dameter of the optmal ball B(P ) s never larger than the dameter of the boundng box Q(P ). Ths means, f you consder the dameter as a measure of how well the boundng volume approxmates the pont set, balls are better than boxes. On the other hand, f you consder the volume as the measure of qualty, there s no clear wnner. Supermposng Fgures 5. and 5., you see that the ball has smaller volume than the box n the left stuaton, but larger volume n the rght stuaton. There s another aspect where the ball s the wnner: rotatng P changes the shape and dameter of the boundng box, but the smallest enclosng ball stays the same (up to translaton). Ths s a desrable property n many geometrc applcatons, because t means that the smallest enclosng ball does not have to be recomputed when we apply an sometry (any affne transformaton that preserves lengths of dfference vectors) to P. Other popular boundng volumes are boxes of arbtrary orentaton (mages of some Q d (b, b) under an sometry) and ellpsods, mostly because they approxmate the volume of conv(p ) well. They are more dffcult to compute than (axes-paralell) boxes and balls, though. 5. Fndng an almost optmal ball For P R d, P = n > 0, we let B(P ) denote the ball of smallest radus that contans P. It s well-known that B(P ) exsts and s unque [3], but how do we (effcently) compute t? Recall that the boundng box was easy to fnd n tme O(dn). Can we also compute B(P ) n tme O(dn)? There s no rgorous argument that ths s not possble, but there are good reasons to beleve that one cannot do t. At least, all known algorthms for computng B(P ) are much slower so slow n fact that they wll not be able to solve the problem for n = d =, 000, say. The goal of ths chapter s to prove that tme O(dn) suffces to fnd a ball contanng P whose radus s only % larger than the radus of B(P ). If ths s not good enough, the same algorthm can produce a ball whose radus s only 0.% larger, at the expense of runnng (essentally) ten tmes as long. In fact, any desred percentage can be a mappng x Ax + b, wth A R d d a matrx and b R d a translaton vector
acheved n tme O(dn), but wth the constant behnd the bg O dependng on the percentage. The algorthm (actually, a combnaton of two algorthms) s due to Bădou and Clarkson []. 5.. Bascs Here s what we mean by (the center of) an almost optmal ball, wth respect to a gven constant ε 0. Defnton 5.. Let R P be the radus of B(P ), ε 0. A pont c R d s called ( + ε)- approxmaton of B(P ), f max q P q c ( + ε)r P. Note that the center c P of B(P ) s a -approxmaton of B(P ). We wll need the followng statement about c P. The orgn of t s unknown to me, and often t s conceved as a more or less obvous fact. Bădou and Clarkson remark that the statement s proved n a paper by Goel et al. [] whch s not true. But anyway, t s a smple exercse to prove the followng lemma. Lemma 5.. For any c R d, there exsts a pont p P such that () p c P = R P, and () p c c c P + p c P, see Fgure 5.3 (left). If c c P and P > (whch s the case we are nterested n), ths lemma says that we can fnd a pont on the boundary of B(P ) such that the nonzero vectors p c P and c c P span an obtuse angle (an angle of at least 90 o ). Ths nterpretaton of the nequalty n Lemma 5.. () s a consequence of cosne theorem. In more geometrc terms, the nequalty can also be nterpreted as follows: f c c P, the unque hyperplane h = {x R d (x c P ) (c c P ) = 0} through c P wth normal vector c c P must have a boundary pont of B(P ) n the halfspace h c := {x R d (x c P ) (c c P ) 0} not contanng c, see Fgure 5.3 (left). The rght part of the fgure shows on an ntutve level why ths condton s necessary: f no pont p satsfes the crtera of the Lemma, we can shrnk B(P ) and get a stll smaller ball contanng P, whch s a contradcton to B(P ) beng smallest. Usng Lemma 5.., we can easly prove that a ( + ε)-approxmaton cannot be too far away from c P, just lke we would expect t. 3
h c B(P ) h h B(P ) frag replacements c P c c P c c P c c P c p p c P Fgure 5.3: Illustraton of Lemma 5.. Lemma 5..3 Let c R d be a ( + ε)-approxmaton of B(P ). Then c c P ε + ε R p. Proof. Choose p accordng to Lemma 5... Because p s on the boundary of B(P ) and c s a ( + ε)-approxmaton, we get c c P p c p c P ( + ε) R P R P = (ε + ε )R P. 5.. Algorthm Here s our frst algorthm for approxmatng B(P ). For gven P and ε > 0, ths algorthm computes a sequence of centers c, =,..., /ε, wth the property that the last one s a ( + ε)-approxmaton of c P. Mnball Approx(P, ε): (* computes ( + ε)-approxmaton of B(P ) *) choose p P arbtrarly and set c := p FOR = TO /ε DO choose q P such that q c s maxmum c := c + (q c ) END RETURN c /ε 4
Theorem 5..4 For =,..., /ε, c c P R P. Ths nvarant mmedately mples the approxmaton factor of the algorthm: usng the trangle nequalty, we get that for all s P, s c s c P + c c P R P + R P = ( + ) R P. (5.) It follows that c s a ( + / )-approxmaton; settng = /ε gves the desred ( + ε)-approxmaton. Proof. If P =, we have c = c P n any teraton and the result follows. Otherwse, we proceed by nducton. The statement holds for = because of c P. Now assume that > and that we have already verfed the theorem for. Let us apply Lemma 5.. wth c = c, provdng us wth a pont p. Let q be the pont chosen n teraton. Clam. q c c c P + q c P. (5.) To see ths, we use the way q was chosen, together wth p s propertes () and () from Lemma 5.. to conclude that q c p c () c c P + p c P () c c P + q c P. Note that for c c P, equaton (5.) s equvalent to q h c, see Fgure 5.4 and the dscusson after Lemma 5... The clamed bound for c c P s obvous f c = c P, so we wll assume that c c P. Moreover, P > mples c c (why?), and > mples q c, see the stuaton n Fgure 5.4. We now restrct attenton to the trangle spanned by c P, c and q (ths trangle also contans c ); assume c P c and c c span some angle β, so that c P c and q c span angle 80 o β. Let us ntroduce the followng shortcuts. x := c c P, a := c c P, b := q c P, κ := c c, µ := q c, λ := q c = κ + µ. Because all nvolved vectors are nonzero, these angles are well-defned, even f the trangle spanned by c P, c and q s flat. 5
h c K(P ) PSfrag replacements γ q c P b µ a x β c c κ s p Fgure 5.4: Proof of Theorem 5..4 Recallng that cos(80 o β) = cos(β), the cosne theorem (appled to the two subtrangles nvolvng c c P ) yelds By defnton of c, we have x = a κ + xκ cos β, (5.3) x = b µ xµ cos β. (5.4) κ = λ, µ = λ. Therefore, (5.3) and (5.4) can be rewrtten as follows. ( ) x = a λ + x ( x = b λ cos β, (5.5) ) λ x λ cos β. (5.6) Multplyng (5.5) wth and addng up the two equatons removes the contrbuton of β and x on the rght hand sde, and we get x = ( )a + b λ. (5.7) 6
Inequalty (5.) exactly says that λ a + b, so that (5.7) further yelds x ( ( )a + b ) (a + b ) ( ) ( ) = a + b. Inductvely, we know that a = c c P RP /( ), and because b = q c P RP, the desred nequalty x R P follows. For P = n, the runtme of Algorthm Mnball Approx s O(dn) for one teraton (we need to fnd the largest among n scalar products), meanng that the total runtme s ( ) dn O. 5..3 Algorthm ε The denomnator of ε n the runtme of Algorthm Mnball Approx s not very satsfactory. Even a moderate error bound of ε = 0.0 (%) leads to 0, 000 teratons n the algorthm; that way, we cannot compete wth the boundng box. Here s a second algorthm that acheves a denomnator of ε. The prze to pay s that ths algorthm requres as a black box the computaton of the exact smallest enclosng ball of a small pont set (the call to ths black box can be replaced wth a call to Mnball Approx, though). Mnball Approx(P, ε): (* computes ( + ε)-approxmaton of B(P ) *) choose p P arbtrarly and set c := p, S := {p}, j := 0, := FOR = TO /ε DO choose q P such that q c s maxmum IF q c < THEN j := := q c END S := S {q} compute the smallest enclosng ball B(S ) = B d (c, R ) END IF max s P s c /ε < THEN j = /ε END RETURN c j 7
In the analyss of the algorthm, we work wth the followng symbols. Observe that for all, R := radus R P of B(P ), R := ( + ε)r, c := center of B(S ), R := radus of B(S ) (note that R = 0), λ := R / R, k := c c. λ R/ R = /( + ε), (5.8) because S P, so B(S ) cannot have larger radus than B(P ). Let us assume that no c s a ( + ε)-approxmaton of B(P ). We wll show that under ths assumpton, λ /ε + exceeds the bound n (5.8), a contradcton. 3 To analyze the development of λ n teraton, we frst apply Lemma 5.. to the set S and the pont c = c to deduce the exstence of p S such that meanng that p c c c + p c = k + R, p c λ R + k. (5.9) Furthermore, for the pont q chosen n teraton, the trangle nequalty yelds q c q c + c c, mplyng q c q c c c = q c k > R k. (5.0) In the last nequalty (and only here), we use the assumpton that c s not a ( + ε)- approxmaton, meanng that q c = max s P s c > ( + ε)r = R. We are now approachng a recursve lower bound for λ. Because both p and q are n S, we get usng (5.9) and (5.0) that ) λ R = R max ( p c, q c ) max ( λ R + k, R k. (5.) The frst term of the maxmum ncreases wth k, whle the second term decreases. It follows that the maxmum s mnmzed when both terms are equal, so when k = λ 3 you may object that λ /ε + does not appear n the algorthm, but for ths argument, we smply consder a hypothetcal last teraton wth = /ε +. 8 R
and consequently λ R + k = R k = + λ Substtutng ths nto (5.) yelds λ + λ,, (5.) wth λ = R / R = 0. Equaton (5.) s equvalently wrtten as R. whch n turn mples λ λ,, λ ( λ )( + λ ) = + λ because λ <. By expandng ths, we get In other words, For = /ε +, ths gves + λ > > + = + λ λ,. λ > λ > + ( )/,. + /ε = + ε, λ +,, a contradcton to (5.8). Therefore, our ntal assumpton was wrong, and there must be some c 0, 0 {,..., /ε }, whch yelds a ( + ε)-approxmaton. By the choce of j, the pont c j returned by the algorthm satsfes max s P s c j max s P s c 0 ( + ε)r, so c j s tself a ( + ε)-approxmaton. The runtme of the algorthm s bounded by ( dn O ε + ) ε f d ( /ε ), wth f d (n) the tme necessary to compute the exact smallest enclosng ball of a set of n ponts n R d. The known bounds for f d (n) are exponental n d, but by usng Mnball Approx nstead, we can replace ths by a bound whch s polynomal n d and /ε (we omt the detals here). 9
5..4 Core sets Our analyss of Algorthm Mnball Approx has a very nterestng consequence whch we want to state explctly (choose S = S j to get t). Corollary 5..5 For any fnte pont set P R d and ε > 0, there exsts a subset S P, S /ε, such that the center of B(S) s a ( + ε)-approxmaton of B(P ). Such a set s called a core set, and we wll encounter core sets for other boundng volumes later n the course. Accordng to the exercses, a subset wth the same smallest enclosng ball as P may requre up to d + ponts (and ths s tght). If you are wllng to accept a small error of ε = 0.0, say, you can fnd a subset S of constant sze 00 wth the same smallest enclosng ball as P, n any dmenson. Ths s qute remarkable, and also exceptonal. Whle other boundng volumes for P do have core sets whose szes do not depend on n = P, there s usually an (exponental) dependence on d, on top of the dependence on ε. 5.3 Coresets and balls n other norms Let us reformulate Corollary 5..5 somewhat dfferently: For any fnte pont set P R d and ε > 0, there exsts a subset S P, S /ε, such that all ponts of P are wthn dstance εr S of B(S). Here, B(S) s the smallest enclosng ball of S, and R P s the radus of the smallest enclosng ball B(P ) of P. It turns out that a smlar statement also holds f we generalze our concept of balls. 0
Bblography [] M. Bădou and K. L. Clarkson. Optmal core-sets for balls. submtted, 00. [] A. Goel, P. Indyk, and K. R. Varadarajan. Reductons among hgh-dmensonal proxmty problems. In Proc. th ACM-SIAM Symposum on Dscrete Algorthms, pages 769 778, 00. [3] E. Welzl. Smallest enclosng dsks (balls and ellpsods). In H. Maurer, edtor, New Results and New Trends n Computer Scence, volume 555 of Lecture Notes n Computer Scence, pages 359 370. Sprnger-Verlag, 99.