Next: Fast Convolution and Multiplication
Up: Fast Polynomial Multiplication based on
Previous: Convolution of polynomials
The Fast Fourier Transform computes the DFT quickly.
This important algorithm for computer science
(not only computer algebra, but also digital signal
processing for instance) was (re)-discovered
in 1965 by Cooley and Tukey.
Let n
mathend000# be a positive even integer,
R
mathend000# be a primitive n
mathend000#-th
root of unity and
f = fi xi
mathend000#.
In order to evaluate f
mathend000# at
1,,,...,
mathend000#,
we follow a divide-and-conquer strategy; more precisely, we consider
the divisions with remainder of f
mathend000# by
xn/2 - 1
mathend000# and
xn/2 + 1
mathend000#.
So let
q0, q1, r0, r1
mathend000# be polynomials such that
f = q0(xn/2 -1) + r0 with |
(31) |
and
f = q1(xn/2 +1) + r1 with |
(32) |
The relations
deg(q0) < n/2
mathend000# and
deg(q1) < n/2
mathend000#
hold because the polynomial f
mathend000# has degree less than n
mathend000#.
Observe that the computation of
(q0, r0)
mathend000# and
(q1, r1)
mathend000#
can be done very easily.
Indeed, let
F0, F1 R[x]
mathend000# be such that
f = F1 xn/2 + F0 with |
(33) |
We have
f = F1(xn/2 -1) + F0 + F1 and f = F1(xn/2 +1) + F0 - F1 |
(34) |
Hence we obtain
r0 = F0 + F1 and r1 = F0 - F1 |
(35) |
Let i
mathend000# be an integer such that
0 i < n/2
mathend000#.
By using Relation (31) with
x =
mathend000#
we obtain
f () = q0()( -1) + r0() = r0() |
(36) |
since
= 1
mathend000#.
Then, by using Relation (32) with
x =
mathend000#
we obtain
f () = q1()( +1) + r1() = r1() |
(37) |
since
= - 1
mathend000#.
Indeed, this last equation follows from
0 = -1 = ( -1)( + 1) |
(38) |
and the fact that
- 1
mathend000# is not zero
nor a zero divisor.
Therefore we have proved the following
Proposition 4
Evaluating
f R[x]
mathend000# (with degree less than n
mathend000#)
at
1,,...,
mathend000#
is equivalent to
- evaluate r0
mathend000# at the even powers
mathend000# for
0 i < n/2
mathend000#, and
- evaluate r1
mathend000# at the odd powers
mathend000# for
0 i < n/2
mathend000#.
Since it is easy to show that
mathend000# is a primitive n/2
mathend000#-th root of unity
we can hope for a recursive algorithm.
This algorithm would be easier if both r0
mathend000# and r1
mathend000# would
be evaluated at the same points.
So we define
r1 * () = r1(). |
(39) |
Now we obtain the following algorithm.
Algorithm 1
mathend000#
Theorem 1
Let n
mathend000# be a power of 2
mathend000# and
R
mathend000# be a primitive n
mathend000#-th
root of unity.
Then Algorithm 1 computes
DTF(f )
mathend000# using
-
n log(n)
mathend000# additions in R
mathend000#,
-
(n/2) log(n)
mathend000# multiplications by powers of
mathend000#.
leading in total to
3/2 n log(n)
mathend000# ring operations.
Proof.
By induction on
k = log
2(
n)
mathend000#.
Let S(n)
mathend000# and T(n)
mathend000# be the number of additions
and multiplications in R
mathend000# that the algorithms requires
for an input of size n
mathend000#.
If k = 0
mathend000# the algorithm returns (f0)
mathend000# whose costs is null
thus we have S(0) = 0
mathend000# and T(0) = 0
mathend000# which satisfies
the formula since
log(n) = log(1) = 0
mathend000#.
Assume k > 0
mathend000#.
Just by looking at the algorithm we that
S(n) = 2 S(n/2) + n and T(n) = 2 T(n/2) + n/2 |
(40) |
leading to the result by plugging in the induction hypothesis.
Next: Fast Convolution and Multiplication
Up: Fast Polynomial Multiplication based on
Previous: Convolution of polynomials
Marc Moreno Maza
2007-01-10