Thue's lemma

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

More precisely for every pair of integer (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

ay\equiv x \pmod{m}

and

|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 make the unicity theorem (below) easier to state. [1]

The first known proof is attributed to Axel Thue (1902),[2] who used a pigeonhole argument.[3][4] It can be used to prove Fermat's theorem on sums of two squares by taking m to be a prime p that is 1 mod 4 and taking a to satisfy a2 + 1 = 0 mod p.

Unicity

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), ..., providing that X and Y are not too small. Therefore, one may only hope unicity for the rational number x/y, to which a is congruent modulo m if y and m are coprime. Nevertheless, this rational number needs not to be unique; for example, if m = 5, a = 2 and X = Y = 3, one has the two solutions

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

2XY < m,

and

ay_1-x_1\equiv ay_2-x_2 \equiv 0 \pmod m,

with

\left | x_1\right |< X, \quad\left| y_1\right| < Y,

and

\left| x_2\right| < X, \quad\left| y_2\right| < Y,

then

\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.[5]

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

y_2x_1-y_1x_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_2x_1-y_1x_2 =0, and thus 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.[6]

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_im+y_ia =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, theorem 2.33
  2. Thue, A. (1902), "Et par antydninger til en taltheoretisk metode", Kra. Vidensk. Selsk. Forh. 7: 57–75
  3. Clark, Pete L. "Thue's Lemma and Binary Forms". Retrieved 25 February 2016.
  4. Löndahl, Carl (2011-03-22). "Lecture on sums of squares" (PDF). Retrieved 26 February 2016.
  5. Shoup, section 4.6
  6. Shoup, section 4.5
This article is issued from Wikipedia - version of the Monday, March 07, 2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.