Misplaced Pages

Thue's lemma

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Representation of modular integers by "small" fractions This article is about modular arithmetic. For Thue's theorem on Diophantine approximations, see Roth's theorem § Discussion.

In modular arithmetic, Thue's lemma roughly states that every modular integer may be represented by a "modular fraction" such that the numerator and the denominator have absolute values not greater than the square root of the modulus.

More precisely, for every pair of integers (a, m) with m > 1, given two positive integers X and Y such that Xm < XY, there are two integers x and y such that

a y x ( mod m ) {\displaystyle ay\equiv x{\pmod {m}}}

and

| x | < X , 0 < y < Y . {\displaystyle |x|<X,\quad 0<y<Y.}

Usually, one takes X and Y equal to the smallest integer greater than the square root of m, but the general form is sometimes useful, and makes the uniqueness theorem (below) easier to state.

The first known proof is attributed to Axel Thue (1902) who used a pigeonhole argument. It can be used to prove Fermat's theorem on sums of two squares by taking m to be a prime p that is congruent to 1 modulo 4 and taking a to satisfy a + 1 ≡ 0 mod p. (Such an "a" is guaranteed for "p" by Wilson's theorem.)

Uniqueness

In general, the solution whose existence is asserted by Thue's lemma is not unique. For example, when a = 1 there are usually several solutions (x, y) = (1, 1), (2, 2), (3, 3), ..., provided that X and Y are not too small. Therefore, one may only hope for uniqueness for the rational numberx/y⁠, to which a is congruent modulo m if y and m are coprime. Nevertheless, this rational number need not be unique; for example, if m = 5, a = 2 and X = Y = 3, one has the two solutions

2 a + 1 a + 2 0 ( mod 5 ) {\displaystyle 2a+1\equiv -a+2\equiv 0{\pmod {5}}} .

However, for X and Y small enough, if a solution exists, it is unique. More precisely, with above notation, if

2 X Y < m , {\displaystyle 2XY<m,}

and

a y 1 x 1 a y 2 x 2 0 ( mod m ) {\displaystyle ay_{1}-x_{1}\equiv ay_{2}-x_{2}\equiv 0{\pmod {m}}} ,

with

| x 1 | < X , | y 1 | < Y , {\displaystyle \left|x_{1}\right|<X,\quad \left|y_{1}\right|<Y,}

and

| x 2 | < X , | y 2 | < Y , {\displaystyle \left|x_{2}\right|<X,\quad \left|y_{2}\right|<Y,}

then

x 1 y 1 = x 2 y 2 . {\displaystyle {\frac {x_{1}}{y_{1}}}={\frac {x_{2}}{y_{2}}}.}

This result is the basis for rational reconstruction, which allows using modular arithmetic for computing rational numbers for which one knows bounds for numerators and denominators.

The proof is rather easy: by multiplying each congruence by the other yi and subtracting, one gets

y 2 x 1 y 1 x 2 0 ( mod m ) . {\displaystyle y_{2}x_{1}-y_{1}x_{2}\equiv 0{\pmod {m}}.}

The hypotheses imply that each term has an absolute value lower than XY < ⁠m/2⁠, and thus that the absolute value of their difference is lower than m. This implies that y 2 x 1 y 1 x 2 = 0 {\displaystyle y_{2}x_{1}-y_{1}x_{2}=0} , hence the result.

Computing solutions

The original proof of Thue's lemma is not efficient, in the sense that it does not provide any fast method for computing the solution. The extended Euclidean algorithm, allows us to provide a proof that leads to an efficient algorithm that has the same computational complexity of the Euclidean algorithm.

More precisely, given the two integers m and a appearing in Thue's lemma, the extended Euclidean algorithm computes three sequences of integers (ti), (xi) and (yi) such that

t i m + y i a = x i for  i = 0 , 1 , . . . , {\displaystyle t_{i}m+y_{i}a=x_{i}\quad {\text{for }}i=0,1,...,}

where the xi are non-negative and strictly decreasing. The desired solution is, up to the sign, the first pair (xi, yi) such that xi < X.

See also

References

  1. Shoup, Victor (2005). A Computational Introduction to Number Theory and Algebra (PDF). Cambridge University Press. Retrieved 26 February 2016. Theorem 2.33.
  2. Thue, A. (1902). "Et par antydninger til en taltheoretisk metode". Kra. Vidensk. Selsk. Forh. 7: 57–75.
  3. Aigner, Martin; Ziegler, Günter M. (2018). Proofs from THE BOOK (6th ed.). Springer. p. 21. doi:10.1007/978-3-662-57265-8. ISBN 978-3-662-57265-8.
  4. Ore, Oystein (1948). Number Theory and its History. pp. 262–263.
  5. Shoup 2005, Section 4.6.
  6. Shoup 2005, Section 4.5.
Categories: