the Top T HEME ARTICLE

INTEGER RELATION DETECTION

Practical algorithms for integer relation detection have become a staple in the emerging discipline of experimental —using modern computer technology to explore mathematical questions. After briefly discussing the problem of integer relation detection, the author describes several recent, remarkable applications of these techniques in both mathematics and physics.

or many years, researchers have dreamt (if it exists), or can produce bounds within which of a facility that lets them recognize a no integer relation exists. numeric constant in terms of the math- The problem of finding integer relations is not ematical formula that it satisfies. With new. Euclid (whose Euclidean algorithm solves Fthe advent of efficient integer relation detection this problem in the case n = 2) first studied it algorithms, that time has arrived. about 300 BC. Leonard Euler, Karl Jacobi, Jules Poincaré, and other well-known 18th, 19th, and 20th century pursued solutions Integer relation detection for a larger n. The first integer relation algo- Let x = (x1, x2, …, xn) be a vector of real or rithm for general n was discovered in 1977 by complex numbers. x is said to possess an integer Helaman Ferguson and Rodney Forcade.1 relation if there exist integers ai (not all zero), There is a close connection between integer such that a1x1 + a2x2 + …+ anxn = 0. An integer relation detection and integer-lattice reduction. relation algorithm is a practical computational Indeed, one common solution to the integer re- scheme that can recover the vector of integers ai lation problem is to apply the Lenstra-Lenstra- Lovasz lattice-reduction algorithm. However, there are some difficulties with this approach, notably the somewhat arbitrary selection of a re- 1521-9615/00/$10.00 © 2000 IEEE quired multiplier—if it is too small or too large, the LLL solution will not determine the desired DAVID H. BAILEY integer relation. The HJLS algorithm,2 which is Lawrence Berkeley Laboratory based on the LLL algorithm, addresses these dif-

24 COMPUTING IN SCIENCE & ENGINEERING ficulties, but, unfortunately, it suffers from nu- 5.Norm bound: Compute M := 1/maxj |Hjj|. merical instability and thus fails in many cases of Then there can exist no relation vector practical interest. whose Euclidean norm is less than M.

Upon completion, the desired relation is found The PSLQ algorithm in column B corresponding to the 0 entry of y. The most effective algorithm for integer rela- (Some efficient “multilevel” implementations of tion detection is Ferguson’s recently discovered PSLQ, as well as a variant of PSLQ that is well- PSLQ algorithm;3 the name derives from its us- suited for highly parallel computer systems, are age of a partial sum-of-squares vector and an LQ described in a recent paper.4) (lower-diagonal-orthogonal) matrix factoriza- Almost all applications of an integer relation tion. In addition to possessing good numerical algorithm such as PSLQ require high-precision stability, PSLQ finds a relation in a polynomi- arithmetic. The 64-bit IEEE floating-point ally bounded number of iterations. A simple arithmetic available on current computer sys- statement of the PSLQ algorithm, equivalent to tems can reliably recover only a very small class the original formulation, is as follows: Let x be of relations. In general, if we want to recover a the n-long input real vector, and let nint denote relation of length n with coefficients of maxi- —— the nearest integer function. Select γ ≥ √4/3 mum size d digits, then the input vector x must Then perform the following operations. be specified to at least nd digits, and we must employ floating-point arithmetic accurate to at 1. Set the n × n matrices A and B to the identity. least nd digits. Maple and Mathematica include 2.Compute the n-long vector s as multiple precision arithmetic facilities. There s := ∑n x2 are several freeware multiprecision software k j=k j packages.5–7 and set y to the x vector, normalized by s1. × − 3. Compute the initial n (n 1) matrix H as Hij − Finding algebraic relations using PSLQ = 0 if i < j, Hjj := sj+1/sj, and Hij := yiyj/(sjsj + 1) if i > j. One PSLQ application in the field of mathe- 4.Reduce H: For i := 2 to n: for j := i − 1 to 1 matical number theory is to determine whether − α step 1 : set t := nint (Hij/Hjj); and yj := yj + or not a given constant , whose value can be − tyi; for k := 1 to j: set Hik := Hik tHjk; endfor; computed to high precision, is algebraic of some − for k := 1 to n: set Aik := Aik tAjk and Bkj := degree n or less. First compute the vector x = (1, α α2 αn Bk j + tBki; endfor; endfor; endfor. , , …, ) to high precision, and then apply an integer relation algorithm. If you find a rela- Iterate until an entry of y is within a reasonable tion for x, then this relation vector is precisely tolerance of 0, or until precision is exhausted: the set of integer coefficients of a polynomial α satisfies. γ i 1.Select m such that |Hii| is maximal when One of the first results of this sort was i = m. the identification of the constant B3 = 2.Exchange the entries of y indexed m and m + 3.54409035955 …. B3 is the third bifurcation − 1, the corresponding rows of A and H, and point of the logistic map zk+1 = rzk(1 zk), which the corresponding columns of B. exhibits period doubling shortly before the onset ≤ − 5 3. Remove the corner on H diagonal: If m n of chaos. To be precise, B3 is the smallest value 2, set of the parameter r such that successive iterates zk exhibit eight-way periodicity instead of four- = 2 + 2 = t0: Hmm Hm,m+1, t1: Hmm / t0 way periodicity. Computations using a prede- cessor algorithm to PSLQ found that B3 is a root 2 − 3 − and t2 := Hm,m+1 /t0; for i := m to n: set t3 := of the polynomial 0 = 4913 + 2108t 604t 4 5 6 7− 8 − 9 10 − Him, t4 := Hi, m+1, Him := t1t3 + t2t4 and Hi, m+1 := 977t + 8t + 44t + 392t 193t 40t + 48t − 11 12 t2t3 + t1t4; endfor; endif. 12t + t . 4.Reduce H: For i := m + 1 to n: for j := min(i − Recently, British physicist David Braodhurst − 1, m + 1) to 1 step 1: set t := nint (Hij / Hjj) identified B4 = 3.564407268705 …, the fourth bi- − 4 and yj := yj + tyi; for k := 1 to j: set Hik := Hik furcation point of the logistic map, using PSLQ. − t Hjk; endfor; for k := 1 to n: set Aik := Aik t It had been conjectured that B4 might satisfy a Ajk and Bkj := Bkj + tBki; endfor; endfor; endfor. 240-degree polynomial, and further analysis sug-

JANUARY/FEBRUARY 2000 25 recently discovered.8 In particular, this simple ∞ scheme lets us compute the nth hexadecimal (or π = ∑ 1  4 − 2 − 1 − 1  k  + + + +  binary) digit of π without computing any of the k=0 16 8k 1 8k 4 8k 5 8k 6 first n − 1 digits, without using multiple-pre- cision arithmetic software, and at the expense Figure 1. The formula found by PSLQ, which can of very little computer memory. The one-mil- be used to compute hexadecimal digits of π. lionth hex digit of π can be computed in this manner on a current-generation personal com- puter in only about 60 seconds runtime. This scheme for computing ∞ 2 1  243 405 81 27 the nth digit of π is based on a π 2 = ∑  − − − k + 2 + 2 + 2 + 2 formula that was discovered in 27 k=0 729 (12k 1) (12k 2) (12k 4) (12k 5) 1996 using PSLQ (see Figure 72 9 9 5 1  − − − − +  1). Similar base-2 formulas exist + 2 + 2 + 2 + 2 + 2 (12k 6) (12k 7) (12k 8) (12k 10) (12k 11)  for other mathematical con- stants,8,9 and Broadhurst re- Figure 2. A base-3 formula for π2. cently has obtained some base- 3 formulas,10 including an identity for π2 (see Figure 2), using PSLQ.

2 ∞  1 1 −4 37 ∑ 1+ +L +  (k + 1) = π 6 − ς 2(3) k=1 2 k 22,680 Identifying multiple- sum constants 3 ∞  1 1 −6 197 1 In the course of researching ∑ 1+ +L +  (k + 1) = ς 3(3) + ς(9) + π 2ς(7) k=1 2 k 24 2 multiple sums, scientists re- cently found many results using 11 37 − π 4ς(5) − π 6ς(3) PSLQ, such as those shown in 120 7560 Figure 3. After computing the

2 numerical values of these con- ∞  +  −   − 1 + + − k 1 1 + 3 = 1 − 1 5 − 17 ς stants, a PSLQ program deter- ∑ 1 L ( 1)  (k 1) 4Li5  1n (2) (5) k=1 2 k  2 30 32 mined if a given constant satis- 11 7 1 1 − π 41n(2) + ς(3)1n2(2) + π 21n3(2) − π 2ς(3) fied an identity of a conjectured 720 4 18 8 form. These efforts produced numerous empirical evalua- ς = ∞ −t Figure 3. Some multiple-sum identities found by PSLQ. (t) ∑ = j is the Riemann ∞ j 1 tions and suggested general = ∑ j −n 11 zeta function, and Lin(x) j=1 x j denotes the polylogarithm function. results —for which scien- tists eventually found elegant proofs.12,13 α − − gested that the constant = B4(B4 2) might sat- In another application to mathematical num- isfy a 120-degree polynomial. To test this hypoth- ber theory, several researchers have used PSLQ esis, Broadhurst applied a PSLQ program to the to investigate sums of the form α α2 α120 121-long vector (1, , , …, ). Indeed, a rela- 1 tion was found, but the computation required S(k) = ∑ . 2n 10,000-digit arithmetic. The recovered integer co- n >0 nk   n  efficients descend monotonically from 25730 ≈ 1.986 × 1072 to 1. For small k, these constants satisfy simple iden- tities, such as S(4) = 17π4/3240. Thus, re- π A new formula for searchers have sought generalizations of these Throughout the centuries, mathematicians formulas for k > 4. As a result of PSLQ compu- have assumed that there is no shortcut to com- tations, several researchers have evaluated the puting just the nth digit of π. Thus, it came as constants {S(k) | k = 5 … 20} in terms of multiple no small surprise when such an algorithm was zeta values,14 which are defined by

26 COMPUTING IN SCIENCE & ENGINEERING ς = 1 ( s1, s 2,L , s r ) ∑  8 8  13,921 s1 s2 sr S(9) = π 2M(7,1) + M(5,3) + ς(2)M(5,1) − ς(9) > >L > > k k L k   k1 k2 kr 0 1 2 r  3 9  216 6,211 8,101 331 8 + ς(7)ς(2) + ς(6)ς(3) + ς(5)ς(4) − ς 3(3) and multiple Clausen values15 of the form 486 648 18 9

π b = sin(n1 / 3) 1 M(a, b) ∑ a ∏ . Figure 4. A sample evaluation of an of an Apery sum constant using > >L > > n = n j n1 n2 nt 0 1 j 1 PSLQ.

Figure 4 gives a sample evaluation. The evaluation of S(20) is an integer relation problem with n = 118, requiring 5,000-digit arithmetic. (The full solution is given in a recent paper.4)

V1 V2A V2N V3T V3S Connections to quantum field theory In a surprising recent development, Broad- hurst found an intimate connection between these multiple sums and constants resulting from V V V V V evaluating Feynman diagrams in quantum field 3L 4A 4N 5 6 theory.16,17 In particular, the renormalization procedure (which removes infinities from the Figure 5. The 10 tetrahedral cases. perturbation expansion) involves multiple zeta values. Broadhurst used PSLQ to find formulas and identities involving these constants. As be- fore, a fruitful theory emerged, including a large “letters” comprising the one-forms Ω := dx/x and 14,18 λ–k − λ √—− number of both specific and general results. wk := dx/( x), where := (1 + 3)/2 is the More generally, we can define Euler sums by14 primitive sixth root of unity, and k runs from 0 k k 10  s , s L s  σ 1 σ 2 σ kr to 5. ς 1 2 r  = ∑ 1 2 L r Figure 5 shows these 10 cases. In the diagrams, σ σ L σ  s1 s2 sr 1, 2 r > > > > k k k k1 k2 L kr 0 1 2 r dots indicate particles with nonzero rest mass. σ where j = ±1 are signs and sj > 0 are integers. Table 1 gives the formulas that Broadhurst When all the signs are positive, we have a multi- found, using PSLQ, for the corresponding con- Σ j+k 3 ple zeta value. Constants with alternating signs stants. In the table, U = j>k>0(–1) /(j k);V = Σ j π 3 appear in problems such as computing an elec- j>k>0(–1) cos (2 k/3)/(j k);and the constant C = Σ π 2 tron’s magnetic moment. k>0 sin ( k/3)/k . Broadhurst conjectured that the dimension of Σ the Euler sum spaces with weight w = sj is the Fibonacci number Fw + 1 = Fw + Fw−1, with F1 = F2 = 1. I’ve obtained complete reductions of all Table 1. The formulas found by PSLQ for the 10 cases in Figure 5. Euler sums to a basis of size Fw+1 with PSLQ at weights w ≤ 9. At weights w = 10 and w = 11, Tetrahedral cases PSLQ formulas ς ς Broadhurst stringently tested the by V1 6 (3) + 3 (4) ς − ς applying PSLQ in more than 600 cases. At V2A 6 (3) 5 (4) ς ς − weight w = 11, such tests involve solving integer V2N 6 (3) – 13/2 (4) 8 U 4 ς − ς relations of size n = F12 + 1 = 145. V3T 6 (3) 9 (4) ς ς − 2 Some recent quantum field theory results are V3S 6 (3) – 11/2 (4) 4 C ς ς − 2 even more remarkable. Broadhurst has now V3L 6 (3) – 15/4 (4) 6 C ς ς − 2 shown, using PSLQ, that in each of 10 cases with V4A 6 (3) – 77/12 (4) 6 C ς − ς − unit or 0 mass, the finite part of the scalar, three- V4N 6 (3) 14 (4) 16 U ς − ς 2 − loop, tetrahedral vacuum Feynman diagram re- V5 6 (3) 469/27 (4) + 8/3 C 16V ς − ς − − 2 duces to four-letter “words.” These words rep- V6 6 (3) 13 (4) 8U 4C resent iterated integrals in an alphabet of seven

JANUARY/FEBRUARY 2000 27 sing integer relation algorithms, re- 9. D.J. Broadhurst, “Polylogarithmic Ladders, Hypergeometric and the Ten Millionth Digits of ς(3) and ς(5),” preprint, Mar. searchers have discovered numerous 1998; xxx.lanl.gov/abs/math/9803067 (current Nov. 1999). new facts of mathematics and physics, 10. D.J. Broadhurst, “Massive 3-loop Feynman Diagrams Reducible and these discoveries have in turn led to SC* Primitives of Algebras of the Sixth Root of Unity,” preprint, Uto valuable new insights. This process, often March 1998, to appear in European Physical J. Computing; called “experimental mathematics”—namely, the xxx.lanl.gov/abs/hep-th/9803091 (current Nov. 1999). 11. D.H. Bailey, J.M. Borwein, and R. Girgensohn, “Experimental utilization of modern computer technology in the Evaluation of Euler Sums,” Experimental Mathematics, Vol. 4, No. discovery of new mathematical principles—is ex- 1, 1994, pp. 17–30. pected to play a much wider role in both pure and 12. D. Borwein and J.M. Borwein, “On an Intriguing Integral and applied mathematics during the next century. In Some Series Related to ς(4),” Proc. American Mathematical Soc., particular, when fast integer relation detection fa- Vol. 123, 1995, pp. 111–118. 13. D. Borwein, J.M. Borwein, and R. Girgensohn, “Explicit Evalua- cilities are integrated into widely used mathemat- tion of Euler Sums,” Proc. Edinburgh Mathematical Soc., Vol. 38, ical computing environments, such as Mathe- 1995, pp. 277–294. matica and Maple, we can expect numerous more 14. J.M. Borwein, D.M. Bradley, and D.J. Broadhurst, “Evaluations of discoveries of the sort described in this article, k-fold Euler/Zagier Sums: A Compendium of Results for Arbitrary and, possibly, new applications that we cannot yet k,” Electronic J. Combinatorics, Vol. 4, No. 2, #R5, 1997. 15. J.M. Borwein, D.J. Broadhurst, and J. Kamnitzer, “Central Bino- foresee. mial Sums and Multiple Clausen Values (with Connections to Zeta Values),” No. 137, 1999; www.cecm.sfu.ca/preprints/ 1999pp.html (current Nov. 1999). 16. D.J. Broadhurst, J.A. Gracey, and D. Kreimer, “Beyond the Trian- gle and Uniqueness Relations: Non-Zeta Counterterms at Large N from Positive Knots,” Zeitschrift für Physik, Vol. C75, 1997, pp. Acknowledgments 559–574. This work was supported by the Director of the Office 17. D.J. Broadhurst and D. Kreimer, “Association of Multiple Zeta of Computational and Technology Research, Division of Values with Positive Knots via Feynman Diagrams up to 9 Loops,” Mathematical, Information, and Computational Sciences Physics Letters, Vol. B383, 1997, pp. 403–412. of the US Department of Energy, under contract DE- 18. J.M. Borwein et al., “Combinatorial Aspects of Multiple Zeta Val- ues,” Electronic J. Combinatorics, Vol. 5, No. 1, #R38, 1998. AC03-76SF00098.

References 1. H.R.P. Ferguson and R.W. Forcade, “Generalization of the Eu- clidean Algorithm for Real Numbers to All Dimensions Higher Than Two,” Bulletin Am. Mathematical Soc., Vol. 1, No. 6, Nov. David H. Bailey is the chief technologist of the Na- 1979, pp. 912–914. tional Energy Research Scientific Computing Center at 2. J. Hastad et al., “Polynomial Time Algorithms for Finding Integer the Lawrence Berkeley National Laboratory. His re- Relations Among Real Numbers,” SIAM J. Computing, Vol. 18, No. 5, Oct. 1989, pp. 859–881. search has included studies in highly parallel comput- 3. H.R.P. Ferguson, D.H. Bailey, and S. Arno, “Analysis of PSLQ, An ing, numerical algorithms, fast Fourier transforms, mul- Integer Relation Finding Algorithm,” Mathematics of Computa- tiprecision computation, supercomputer performance, tion, Vol. 68, No. 225, Jan. 1999, pp. 351–369. and computational number theory. He received his BS 4. D.H. Bailey and D. Broadhurst, “Parallel Integer Relation Detec- in mathematics from Brigham Young University and tion: Techniques and Applications,” submitted for publication, 1999; also available at www.nersc.gov/~dhbailey, online paper his PhD in mathematics from Stanford University. In 34 (current Nov. 1999). 1993, he received the Sidney Fernbach Award, which is 5. D.H. Bailey, “Multiprecision Translation and Execution of Fortran bestowed by the IEEE Computer Society for contribu- Programs,” ACM Trans. Mathematical Software, Vol. 19, No. 3, tions to the field of high-performance computing. He 1993, pp. 288–319. has also received the Chauvenet Prize and the Merten 6. D.H. Bailey, “A Fortran-90 Based Multiprecision System,” ACM Trans. Mathematical Software, Vol. 21, No. 4, 1995, pp. 379–387. Hasse Prize from the Mathematical Association of 7. S. Chatterjee and H. Harjono, “MPFUN++: A Multiple Precision America and the H. Julian Allen Award from NASA. He Floating Point Computation Package in C++,” University of North just served as the technical papers chair for Super- Carolina, Sept. 1998; www.cs.unc.edu/Research/HARPOON/ computing ’99 and as the chair of the 1999 Gordon mpfun++ (current Nov. 1999). Bell Prize committee. Contact him at the Lawrence 8. D.H. Bailey, P.B. Borwein and S. Plouffe, “On The Rapid Com- putation of Various Polylogarithmic Constants,” Mathematics of Berkeley Laboratory, MS 50B-2239, Berkeley, CA Computation, Vol. 66, No. 218, 1997, pp. 903–913. 94720; [email protected].

28 COMPUTING IN SCIENCE & ENGINEERING