We proved in this class that if
is aq prime and
then there exist integers
such that
. The goal is to find such
and
in
polynomial time (i.e., in time
).
Rabin and Shallit showed that we can find
in randomized polynomial
time (a Las Vegas algorithm).
As a subroutine, they need to factor polynomials in
. This
can be done in randomized polynomial time using a Las Vegas algorithm
by Berlekamp.
(Polynomial-time factoring of polynomials over
is a consequence of the lattice basis reduction algorithm.
This algorithm does not work for factoring over
and no deterministic polynomial-time algorithm is known
for this case.)
How can we guarantee that a factoring is correct? By multiplying
the factors we can verify that the product equals the input
polynomial. But we also need to test that the factors are
irreducible. Indeed, we
have a deterministic test for irreducibility of polynomials over
.