19.07.2014 Views

Contents - Student subdomain for University of Bath

Contents - Student subdomain for University of Bath

Contents - Student subdomain for University of Bath

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

4.4. FURTHER APPLICATIONS 141<br />

i.e.<br />

M.̂x = det(M)a. (4.17)<br />

If we avoid primes dividing det(M), we can solve (4.17) <strong>for</strong> enough primes<br />

(suitable bounds are given in Corollary 21), reconstruct integer entries in ̂x,<br />

and then divide through by det(M).<br />

4.4.3.2 Solve with Fractions<br />

If (3.13) is soluble modulo p, its solution x p is indeed congruent to x when<br />

evaluated at p, i.e. x| p = x p . If we use many primes p i (discarding those <strong>for</strong><br />

which (3.13) is not soluble), and apply Algorithm 39 to the vectors x pi , we<br />

get a vector x N such that x N ≡ x (mod N), where N = ∏ p i . However, the<br />

entries <strong>of</strong> x are rationals, with numerator and denominator bounded, say, by B<br />

(see Corollary 21), rather than integers. How do we find the entries <strong>of</strong> x from<br />

x N ? This problem has a long history in number theory, generally under the<br />

name Farey fractions, but was first considered in computer algebra in [Wan81].<br />

Since we will have occasion to use this solution elsewhere, we consider it in more<br />

generality in the next section.<br />

If we assume this problem solved, we then have the following answer to the<br />

questions on page 114.<br />

1. Are there good primes?: yes — all that do not divide det(M)<br />

2. How can we tell if a prime p is bad? Equation (3.13) is not soluble modulo<br />

p.<br />

3. How many reductions should we take? Enough such that the product <strong>of</strong><br />

the good primes is greater than 2B 2 .<br />

4. How do we combine? Algorithm 21.<br />

5. How do we check the result? If we use the bound from Corollary 21),<br />

we do not need to check. However, there are ‘early success” variations,<br />

analogous to section 4.1.5, wher we do need to check, which can be done<br />

by checking that M.x = a: an O(n 2 ) operation rather than the O(n 3 ) <strong>of</strong><br />

solving.<br />

4.4.3.3 Farey reconstruction<br />

In this section, we consider the problem <strong>of</strong> reconstructing an unknown fraction<br />

x = n/d, with |n|, |d| < B, given that we know x ≡ y (mod N), i.e. n ≡ yd<br />

(mod N), where N > 2B 2 . We first observe that this representation is unique,<br />

<strong>for</strong> if n ′ /d ′ (similarly bounded) is also congruent to y, then nd ′ ≡ ydd ′ ≡ n ′ d,<br />

so nd ′ − n ′ d ≡ 0 (mod N), and the only solution satisfying the bounds is<br />

nd ′ − n ′ d = 0, i.e. n/d = n ′ /d ′ .<br />

Actually finding n and d is done with the Extended Euclidean Algorithm<br />

(see Algorithm 4).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!