The Sxth Internatonal Syposu on Operatons Research and Its Applcatons ISORA 06 Xnang, Chna, August 8 12, 2006 Copyrght 2006 ORSC & APORC pp. 206 211 An Optal Bound for Su of Square Roots of Specal Type of Integers Janbo Qan 1 Cao An Wang 2, 1 Departent of Coputer Scence, Unversty of Waterloo, Ontaro, Canada 2 Departent of Coputer Scence, Meoral Unversty of Newfoundland, St. John s, Newfoundland, Canada A1B 3X5 Abstract The su of square roots of ntegers proble s to fnd the nu nonzero dfference between two sus of square roots of ntegers. Let rn, k denote the nu nonzero postve value: k 1 a k 1 b, where a and b are postve ntegers not larger than nteger n. We prove by an explct constructon that rn,k On 2k+ 3 2 for fxed k and any n. Our result ples that n order to copare two sus of k square roots of ntegers wth at ost d dgts per nteger, one ght need precson of as any as 2k 3 d dgts. We also prove that ths bound s optal 2 for a wde range of ntegers,.e., rn,k Θn 2k+ 3 2 for fxed k and for those ntegers n the for of n 2k 1 2n + 2 + 2k 1 2n 2 2+1 + 2 + 1, where n s any nteger satsfed the above for and s any nteger n range [0,2k 1]. 1 Introducton In order to fnd the optal soluton n an optzaton probles, one frequently needs to copare the values of two arthetc expressons. Each arthetc expresson represents a possble choce. Ths s actually slar to evaluate branch condtons n a coputer progra. As a consequence of ncorrect result, a coputaton ay follow an ncorrect path. Ths ay lead to catastrophc errors. For exaple n operatons research, n order to desgn an effcent dspatch schee for a tax copany n a cty, one needs to copare the lengths of dfferent routes, whch s a geoetrc proble. In the real of geoetrc coputatons, a route s a polygonal path. Moreover, paths are usually represented by sus of square roots of ntegers, where vertces are represented by nteger coordnates. It s ustfed snce n practce, nteger coordnates of ponts are wdely used n the pleentaton of geoetrc algorths. In order to quckly deterne the longer one of two such polygonal paths, one natural way s to copute the nuercally. The correctness of ths coputaton reles on the correct precson needed for dentfyng the dfference. In coplexty aspect, the Ths work s supported by NSERC grant OPG0041629. Correspondent author. E-al: wang@cs.un.ca
An Optal Bound for Su of Square Roots of Specal Type of Integers 207 sgnfcance of ths proble was ndcated by Davd Eppsten [2]: A aor bottleneck n provng NP-copleteness for geoetrc probles s a satch between the real-nuber and Turng achne odels of coputaton: one s good for geoetrc algorths but bad for reductons, and the other vce versa. Specfcally, t s not known on Turng achnes how to quckly copare a su of dstances square roots of ntegers wth an nteger or other slar sus, so even decson versons of easy probles such as the nu spannng tree are not known to be n NP. Therefore, ths becoes a fundaental open proble n coputatonal geoetry [1]. The proble can be expressed n nuber-theoretc ters: what s the sallest nonzero nuber that s the dfference of two sus of k roots of ntegers not larger than soe bound n? More precsely, fnd tght lower and upper bounds on rn,k, the nu postve value of k 1 a k 1 where a and b are ntegers not larger than n. Exaples [1] are: b, r20,2.0002 10 + 11 5 18, r20,3.000005 5 + 6 + 18 4 12 12. Hstorcally speakng, the proble was forally posed by Joseph O Rourke n 1981 [3], but t s lkely an older proble snce Ronald Graha had dscussed t n soe publc lectures before. The proble s now ncluded n The Open Probles Proect" as Proble 33: Su of Square Roots [1]. Of partcular portance s whether lg 1 s bounded above by a polynoal rn,k n k and lgn. If ths stateent s true, then we can copare two sus of square roots of ntegers n polynoal te. Note that even though lg 1 s not bounded rn,k by a polynoal n k and lgn, there ay stll exst polynoal-te algorths to copare such two sus by other eans. A lower bound s pled through root-separaton bounds [4]. When k s fxed, the bound s that rn,k Ωn 1 2 22k 2. To the authors best knowledge, the only known upper bound s On k+ 1 2 for fxed k due to Ronald Graha [2], as an applcaton of Prouhet-Tarry-Escott proble n nuber theory. 2 Our Results Our dea for constructng ths On 2k+ 3 2 bound s based on the Taylor expanson, but we avod usng the soluton of Prouhet-Tarry-Escott proble, whch s hard to solve tself. We can prove the followng results.
208 The Sxth Internatonal Syposu on Operatons Research and Its Applcatons Lea 1. Let 1 and n be ntegers. We have that 1 n 2 3!! + <, 2 n 1 2 where 2 3!! 1 3... 2 3. we regard 1!! as 1. Proof. Frst we prove the followng recursve equalty for k 1, usng cobnatoral dentty 1 1 : Let s, 1 for ntegers 1 and 0. s,k 1 k 1 1 1 1 k 1 1 1 1 1 1 + 1 k 1 1 1 1 1 k 1 k 1 1 1 1 bnoal expanson 1 1 1 l k 1 k 1 l0 l l let l 1 k 1 k 1 1 1 1 l l l0 l k 1 k 1 s 1,. Now we prove oe cobnatoral denttes: 1 for 0 1, we have s, 0 0 0 s regarded as 1; 2 s, 1!. For 1, we prove t by nducton on. When 0, s,0 1 s exactly the bnoal expanson of 1 1, thus 1 holds for 1. We assue that s, 0 holds for 0 k 1 and k, then for k and k + 1 by the recursve equalty above we have k 1 k 1 s,k s 1, 0. Ths proves 1. Also by the recursve equalty above: 1 s, 1 s 1, s 1, 1.
An Optal Bound for Su of Square Roots of Specal Type of Integers 209 Fro ths and the fact that s1,1 1 we have s, 1!. Thus 2 s also proved. For the proof of Lea 1, let f n 1 1 n + n 1 1 + n. Our dea s to prove that n ts Tayloror Maclaurn expanson of 1/n, all coeffcents of the frst 1 ters are zero. Functon 1 + x can be expanded by Taylor s forula as: 1 + x 1 1 2 x + 1 8 x2 1 16 x3 + 1 1 2 5!! + 1 2 2!! x 1 2 3!! + 1 2!! 2 3!! 1 x 2 3!! + 1 ξ, 2!! 2!! where 0 < ξ < x, 2 3!! 1 3... 2 3 and 2!! 2 4... 2. For 0, let c denote the coeffcent of the -th ter n the Taylor expanson of 1 + x,.e. c 1 2 3!!. Let M > n be soe constant so that 0. 2!! M n By Taylor s forula we can expand f n as f n 1 1 c 1 1 c n + 1 1 n + c s, 1 n + c s, M c 1! M. Thus we obtan 1 n + n f n n c! M < c! n 1 2 1 c M 1 1 c M ξ!2 3!! 2 3!!. 2!!n 1 2 2 n 1 2
210 The Sxth Internatonal Syposu on Operatons Research and Its Applcatons Usng Lea 1, we can prove the followng theore. Theore 2. 1 n + On + 1 2 for fxed 1. In Theore 1, let 2k 1, we have 2k 1 2k 1 1 n + k 1 2k 1 n + 2 k 1 2 On 2k+ 3 2. 2k 1 2 + 1 n + 2 + 1 1 By the defnton of rn,k and let a 2k 1 2n + 2 and b 2 2k 1 2n 2+1 + 2 + 1 n 1 and note n On, we obtan the an result n ths paper: Theore 3. rn,k On 2k+ 3 2 for fxed k 1. Note that the requreent that nteger a and b are not larger than n s satsfed as long as k s fxed and s n range [0,2k 1], and n s satsfed that a 2k 1 2n + 2 2 and b 2k 1 2n 2+1 + 2 + 1. One ght wonder whether the upper bound of Theore 2 can be proved by a ore sophstcated type of lnear cobnaton n for of x n + a. The followng theore shows that such an proveent s possble, whch also ples that ths bound s the best possble for the proble wth the above entoned specfc type of ntegers. Theore 4. Let 1 be a fxed nteger, and let x 0,x 1,...,x and a 0,a 1,...,a be real nubers such that a a for 0. Let gn x n + a. Then gn on + 1 2 on + 1 2 f and only f x 0 for 0. Proof. The If part s trval. Now we prove the Only If part. Assue that gn x n + a on + 1 2, we shall show x 0 for 0. As n the proof of Lea 1, for 0, let c denote the coeffcent of the -th ter n the Taylor seres of 1 + x,.e. 1 + x c x + Ox +1. We now can express gn/ n as Taylor expanson of a /n to ts -th ter: gn n x 1 + a n x c a n 1 + O n +1
An Optal Bound for Su of Square Roots of Specal Type of Integers 211 c x a 1 n + O 1 n +1 By the assupton that gn on + 1 2, or equvalently gn/ n on, we have that x a 0 for 0. We can regard the as a group of + 1 equatons for varables x 0,x 1,...,x, they have a non-zero soluton f and only f the coeffcent deternant a 0, s zero. But ths s possble snce a 0, s exactly the Vanderonde Deternant of a 0,a 1,...,a, t s zero f and only f a a for soe 0. If a a for soe 0, then gn cannot be bounded above by on + 1 2, a contradcton. Thus all x ust be zero. References [1] Erk D. Deane, Joseph S. B. Mtchell and Joseph O Rourke. The Open Probles Proect, Proble 33: Su of Square Roots. http://cs.sth.edu/ ~orourke/topp/p33.htl. [2] Usenet newsgroup sc.ath 25 Dec 90. What s the nu nonzero dfference between two sus of square roots of ntegers? http://www.cs.uc. edu/~eppsten/unkyard/sall-dst.htl. [3] Joseph O Rourke. Advanced proble 6369. Aer. Math. Monthly, 8810, 769, 1981. [4] C. Burnkel, R. Flescher, K. Mehlhorn and S. Schrra. A strong and easly coputable separaton bound for arthetc expressons nvolvng radcals. Algorthca, 271, 87 99, 2000. [5] Dana Anglun and Sarah Esenstat. How close can a + b be to an nteger? Manuscrpt n ftp://ftp.cs.yale.edu/pub/tr/tr1279.pdf.