# Integer relation algorithm

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Integer_relation_algorithm
> Markdown URL: https://mediated.wiki/source/Integer_relation_algorithm.md
> Source: https://en.wikipedia.org/wiki/Integer_relation_algorithm
> Source revision: 1285523551
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

Mathematical procedure

An **integer relation** between a set of real numbers *x*1, *x*2, ..., *x**n* is a set of integers *a*1, *a*2, ..., *a**n*, not all 0, such that

- a 1 x 1 + a 2 x 2 + ⋯ + a n x n = 0. {\displaystyle a_{1}x_{1}+a_{2}x_{2}+\cdots +a_{n}x_{n}=0.\,}

An **integer relation algorithm** is an [algorithm](/source/Algorithm) for finding integer relations. Specifically, given a set of real numbers known to a given precision, an integer relation algorithm will either find an integer relation between them, or will determine that no integer relation exists with coefficients whose magnitudes are less than a certain [upper bound](/source/Upper_bound).[1]

## History

For the case *n* = 2, an extension of the [Euclidean algorithm](/source/Euclidean_algorithm) can find any integer relation that exists between any two real numbers *x*1 and *x*2. The algorithm generates successive terms of the [continued fraction](/source/Continued_fraction) expansion of *x*1/*x*2; if there is an integer relation between the numbers, then their ratio is rational and the algorithm eventually terminates.

- The Ferguson–Forcade algorithm was published in 1979 by [Helaman Ferguson](/source/Helaman_Ferguson) and [R.W. Forcade](https://en.wikipedia.org/w/index.php?title=R.W._Forcade&action=edit&redlink=1).[2] Although the paper treats general *n*, it is not clear if the paper fully solves the problem because it lacks the detailed steps, proofs, and a precision bound that are crucial for a reliable implementation.

- The first algorithm with complete proofs was the **[LLL algorithm](/source/Lenstra%E2%80%93Lenstra%E2%80%93Lov%C3%A1sz_lattice_basis_reduction_algorithm)**, developed by [Arjen Lenstra](/source/Arjen_Lenstra), [Hendrik Lenstra](/source/Hendrik_Lenstra) and [László Lovász](/source/L%C3%A1szl%C3%B3_Lov%C3%A1sz) in 1982.[3]

- The **HJLS algorithm**, developed by [Johan Håstad](/source/Johan_H%C3%A5stad), Bettina Just, [Jeffrey Lagarias](/source/Jeffrey_Lagarias), and [Claus-Peter Schnorr](/source/Claus_P._Schnorr) in 1986.[4][5]

- The **PSOS algorithm**, developed by Ferguson in 1988.[6]

- The **PSLQ algorithm**, developed by Ferguson and [Bailey](/source/David_H._Bailey_(mathematician)) in 1992 and substantially simplified by Ferguson, Bailey, and Arno in 1999.[7][8][9][10] In 2000 the PSLQ algorithm was selected as one of the "Top Ten Algorithms of the Century" by [Jack Dongarra](/source/Jack_Dongarra) and Francis Sullivan[11] even though it is considered essentially equivalent to HJLS.[12][13]

- The LLL algorithm has been improved by numerous authors. Modern LLL implementations can solve integer relation problems with *n* above 500.

## Applications

Integer relation algorithms have numerous applications. The first application is to determine whether a given real number *x* is likely to be [algebraic](/source/Algebraic_number), by searching for an integer relation between a set of powers of *x* {1, *x*, *x*2, ..., *x**n*}. The second application is to search for an integer relation between a real number *x* and a set of mathematical constants such as *e*, π and ln(2), which will lead to an expression for *x* as a linear combination of these constants.

A typical approach in [experimental mathematics](/source/Experimental_mathematics) is to use [numerical methods](/source/Numerical_method) and [arbitrary precision arithmetic](/source/Arbitrary_precision_arithmetic) to find an approximate value for an [infinite series](/source/Series_(mathematics)), [infinite product](/source/Infinite_product) or an [integral](/source/Integral) to a high degree of precision (usually at least 100 significant figures), and then use an integer relation algorithm to search for an integer relation between this value and a set of mathematical constants. If an integer relation is found, this suggests a possible [closed-form expression](/source/Closed-form_expression) for the original series, product or integral. This conjecture can then be validated by formal algebraic methods. The higher the precision to which the inputs to the algorithm are known, the greater the level of confidence that any integer relation that is found is not just a [numerical artifact](/source/Almost_integer).

A notable success of this approach was the use of the PSLQ algorithm to find the integer relation that led to the [Bailey–Borwein–Plouffe formula](/source/Bailey%E2%80%93Borwein%E2%80%93Plouffe_formula) for the value of [π](/source/Pi). PSLQ has also helped find new identities involving [multiple zeta functions](/source/Multiple_zeta_function) and their appearance in [quantum field theory](/source/Quantum_field_theory); and in identifying bifurcation points of the [logistic map](/source/Logistic_map). For example, where B4 is the logistic map's fourth bifurcation point, the constant α = −*B*4(*B*4 − 2) is a root of a 120th-degree polynomial whose largest coefficient is 25730.[14][15] Integer relation algorithms are combined with tables of high precision mathematical constants and heuristic search methods in applications such as the [Inverse Symbolic Calculator](/source/Inverse_Symbolic_Calculator) or [Plouffe's Inverter](https://en.wikipedia.org/w/index.php?title=Plouffe%27s_Inverter&action=edit&redlink=1).

Integer relation finding can be used to [factor polynomials](/source/Factorization_of_polynomials) of high degree.[16]

## References

1. **[^](#cite_ref-1)** Since the set of real numbers can only be specified up to a finite precision, an algorithm that did not place limits on the size of its coefficients would always find an integer relation for sufficiently large coefficients. Results of interest occur when the size of the coefficients in an integer relation is small compared to the precision with which the real numbers are specified.

1. **[^](#cite_ref-2)** [Weisstein, Eric W.](/source/Eric_W._Weisstein) ["Integer Relation"](https://mathworld.wolfram.com/IntegerRelation.html). *[MathWorld](/source/MathWorld)*.

1. **[^](#cite_ref-3)** [Weisstein, Eric W.](/source/Eric_W._Weisstein) ["LLL Algorithm"](https://mathworld.wolfram.com/LLLAlgorithm.html). *[MathWorld](/source/MathWorld)*.

1. **[^](#cite_ref-4)** [Weisstein, Eric W.](/source/Eric_W._Weisstein) ["HJLS Algorithm"](https://mathworld.wolfram.com/HJLSAlgorithm.html). *[MathWorld](/source/MathWorld)*.

1. **[^](#cite_ref-5)** Johan Håstad, Bettina Just, Jeffrey Lagarias, Claus-Peter Schnorr: *Polynomial time algorithms for finding integer relations among real numbers.* Preliminary version: STACS 1986 (*Symposium Theoret. Aspects Computer Science*) Lecture Notes Computer Science 210 (1986), p. 105–118. *SIAM J. Comput.*, Vol. 18 (1989), pp. 859–881

1. **[^](#cite_ref-6)** [Weisstein, Eric W.](/source/Eric_W._Weisstein) ["PSOS Algorithm"](https://mathworld.wolfram.com/PSOSAlgorithm.html). *[MathWorld](/source/MathWorld)*.

1. **[^](#cite_ref-7)** Helaman R. P. Ferguson, David H. Bailey, and Steve Arno: "Analysis of PSLQ, an integer relation finding algorithm", Math. Comp., vol.68, no.225 (Jan. 1999), pp.351-369.

1. **[^](#cite_ref-8)** [David H. Bailey and J.M. Borwein: "PSLQ: An Algorithm to Discover Integer Relations" (May 14, 2020)](https://www.davidhbailey.com/dhbpapers/pslq-comp-alg.pdf)

1. **[^](#cite_ref-9)** [Weisstein, Eric W.](/source/Eric_W._Weisstein) ["PSLQ Algorithm"](https://mathworld.wolfram.com/PSLQAlgorithm.html). *[MathWorld](/source/MathWorld)*.

1. **[^](#cite_ref-10)** [*A Polynomial Time, Numerically Stable Integer Relation Algorithm*](http://crd.lbl.gov/~dhbailey/dhbpapers/pslq.pdf) [Archived](https://web.archive.org/web/20070717073907/http://crd.lbl.gov/~dhbailey/dhbpapers/pslq.pdf) 2007-07-17 at the [Wayback Machine](/source/Wayback_Machine) by Helaman R. P. Ferguson and David H. Bailey; RNR Technical Report RNR-91-032; July 14, 1992

1. **[^](#cite_ref-11)** [Cipra, Barry Arthur](/source/Barry_Arthur_Cipra). ["The Best of the 20th Century: Editors Name Top 10 Algorithms"](https://web.archive.org/web/20210424004030/https://www.uta.edu/faculty/rcli/TopTen/topten.pdf) (PDF). *SIAM News*. **33** (4). Archived from [the original](http://www.uta.edu/faculty/rcli/TopTen/topten.pdf) (PDF) on 2021-04-24. Retrieved 2012-08-17.

1. **[^](#cite_ref-12)** Jingwei Chen, Damien Stehlé, Gilles Villard: [*A New View on HJLS and PSLQ: Sums and Projections of Lattices.*](http://perso.ens-lyon.fr/damien.stehle/downloads/PSLQHJLS.pdf), [ISSAC'13](http://www.issac-conference.org/2013/)

1. **[^](#cite_ref-13)** Helaman R. P. Ferguson, David H. Bailey and Steve Arno, ANALYSIS OF PSLQ, AN INTEGER RELATION FINDING ALGORITHM: [\[1\]](http://crd-legacy.lbl.gov/~dhbailey/dhbpapers/cpslq.pdf)

1. **[^](#cite_ref-14)** David H. Bailey and David J. Broadhurst, ["Parallel Integer Relation Detection: Techniques and Applications,"](http://crd.lbl.gov/~dhbailey/dhbpapers/ppslq.pdf) [Archived](https://web.archive.org/web/20110720013234/http://crd.lbl.gov/~dhbailey/dhbpapers/ppslq.pdf) 2011-07-20 at the [Wayback Machine](/source/Wayback_Machine) Mathematics of Computation, vol. 70, no. 236 (October 2000), pp. 1719–1736; LBNL-44481.

1. **[^](#cite_ref-15)** I. S. Kotsireas, and K. Karamanos, "Exact Computation of the bifurcation Point B4 of the logistic Map and the Bailey–Broadhurst Conjectures", I. J. Bifurcation and Chaos 14(7):2417–2423 (2004)

1. **[^](#cite_ref-16)** M. van Hoeij: *Factoring polynomials and the knapsack problem.* J. of Number Theory, 95, 167–189, (2002).

## External links

- [*Recognizing Numerical Constants*](https://web.archive.org/web/20080422084455/http://oldweb.cecm.sfu.ca/organics/papers/bailey/paper/html/paper.html) by [David H. Bailey](/source/David_H._Bailey_(mathematician)) and [Simon Plouffe](/source/Simon_Plouffe)

- [*Ten Problems in Experimental Mathematics*](http://crd.lbl.gov/~dhbailey/dhbpapers/tenproblems.pdf) [Archived](https://web.archive.org/web/20110610051846/http://crd.lbl.gov/~dhbailey/dhbpapers/tenproblems.pdf) 2011-06-10 at the [Wayback Machine](/source/Wayback_Machine) by David H. Bailey, [Jonathan M. Borwein](/source/Jonathan_Borwein), Vishaal Kapoor, and [Eric W. Weisstein](/source/Eric_W._Weisstein)

v t e Number-theoretic algorithms Primality tests AKS APR Baillie–PSW Elliptic curve Pocklington Fermat Lucas Lucas–Lehmer Lucas–Lehmer–Riesel Proth's theorem Pépin's Quadratic Frobenius Solovay–Strassen Miller–Rabin Prime-generating Sieve of Atkin Sieve of Eratosthenes Sieve of Pritchard Sieve of Sundaram Wheel factorization Integer factorization Continued fraction (CFRAC) Dixon's Lenstra elliptic curve (ECM) Euler's Pollard's rho p − 1 p + 1 Quadratic sieve (QS) General number field sieve (GNFS) Special number field sieve (SNFS) Rational sieve Fermat's Shanks's square forms Trial division Shor's Multiplication Ancient Egyptian Long Karatsuba Toom–Cook Schönhage–Strassen Fürer's Euclidean division Binary Chunking Fourier Goldschmidt Newton-Raphson Long Short SRT Discrete logarithm Baby-step giant-step Pollard rho Pollard kangaroo Pohlig–Hellman Index calculus Function field sieve Greatest common divisor Binary Euclidean Extended Euclidean Lehmer's Modular square root Cipolla Pocklington's Tonelli–Shanks Berlekamp Other algorithms Chakravala Cornacchia Exponentiation by squaring Integer square root Integer relation (LLL; KZ) Modular exponentiation Montgomery reduction Schoof Trachtenberg system Italics indicate that algorithm is for numbers of special forms

---
Adapted from the Wikipedia article [Integer relation algorithm](https://en.wikipedia.org/wiki/Integer_relation_algorithm) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Integer_relation_algorithm?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
