
Topics in Comptuter Algebra: Lecture 4Rational number reconstruction.Michael Monagan, Department of Mathematics, Simon Fraser University.
Abstract: Suppose we have computed a rational number n/d modulo some integer m. The problem of rational reconstruction is, given u = n/d mod m, and m, find n/d. We describe two algorithms for doing this. Both require that m is larger than 2nd. Both are based on the Euclidean algorithm and have complexity O(N^2) where N = log m. We apply rational number reconstruction to solve a linear system Ax=b over the rationals by first solving Ax=b mod p for some prime p, then using linear padic lifting to solve Ax=b mod p^k then recovering the solution vector x using rational reconstruction modulo p^k. We also describe an algorithm which uses Cramer's rule and Chinese remaindering to solve Ax=b. 