4. Convolution theorem
Convolution theorem
Convolution in one domain (e.g., time domain) equals point-
wise multiplication in the other domain (e.g., frequency
domain).
4
5. Polynomials
Polynomials
A polynomial in the variable x over the field F is a function
A(x) that can be represented as
For example:
Degree: 4
5
tcoefficienisawhere
xaxaxaaxaxA
i
n
n
n
i
i
i
1
1
2
210
1
0
)(
432
43825)( xxxxxA
6. Representations of polynomials
Coefficient representation
Example:
Point-value representation of a polynomial A(x)
A set of n point-value pairs where xk is distinct and yk = A(xk) for 0 k n – 1
A polynomial has many point-value representations.
Example:
6
1
0
)(
n
i
i
i xaxA),,,,( 1210 naaaaa
)4,3,8,2,5(
43825)( 432
a
xxxxxA
)},(,),,(),,{( 111100 nn yxyxyx
x
y = A(x)
xj
yj
)105,2(),22,1(),5,0(),12,1(),73,2(
105,22,5,12,73:)(
2,1,0,1,2:
43825)( 432
k
k
xA
x
xxxxxA
8. Polynomial Multiplication (Coefficient representation)
8
220
:
where)()()(
then,)(and)(
0
22
0
1
0
1
0
njfor
bacnconvolutio
bacxcxBxAxC
xbxBxaxA
i
k
kiki
i
n
j
i
i
n
i
i
i
n
i
i
...)()(
)()(
)()()(
2
201102100100
1
1
2
210
1
1
2
210
xbababaxbababa
xbxbxbbxaxaxaa
xBxAxC
n
n
n
n
65432
3
32
12144420758645)()()(
245)(
67109)(
xxxxxxxBxAxC
xxxB
xxxxA
Multiplication: O(n2)
Example:
Formal representation:
9. Polynomial Addition(Point-value representation)
Polynomial Addition(Point-value representation): O(n)
Example
9
)},(,),,(),,{(:)(
)},(,),,(),,{(:)(
)},(,),,(),,{(:)(
10
111111000
111100
111100
nnn
nn
nn
k
zyxzyxzyxxC
zxzxzxxB
yxyxyxxA
nkfordistinctisx
)}59,3(),18,2(),3,1(),2,0{(:
)}37,3(),13,2(),3,1(),1,0{(:
)}22,3(),5,2(),0,1(),1,0{(:
)3,2,1,0(
1:)(
12:)(
23
3
C
B
A
x
xxxB
xxxA
k
10. Polynomial Multiplication(Point-value representation)
Problem O(n)
if 𝐴 and 𝐵 are of degree-bound 𝑛, then 𝐶 is of degree-bound 2𝑛.
Example
10
)}814,3(),65,2(),0,1(),1,0(),2,1(),9,2(),340,3{(:
)}37,3(),13,2(),3,1(),1,0(),2,1(),3,2(),20,3{(:
)}22,3(),5,2(),0,1(),1,0(),1,1(),3,2(),17,3{(:
)3,2,1,0,1,2,3(
1:)(
12:)(
23
3
C
B
A
x
xxxB
xxxA
k
)},(,),,(),,{(:)(
)},(,),,(),,{(:)(
)},(,),,(),,{(:)(
121212111000
12121100
12121100
nnn
nn
nn
zyxzyxzyxxC
zxzxzxxB
yxyxyxxA
11. Conversion Between Representations
Evaluation (Coefficient to point-value): O(n2)
Computing the value of A(x0) at a given point x0
We can evaluate a polynomial in O(n) using Horner’s rule(for each)
For example
Standard form:
3 additions and 6 multiplications 7·x,9·x·x,2·x·x·x
Horner’s form:
3 additions and 3 multiplications
Interpolation (point-value to Coefficient):
Inverse of evaluation
Determining the coefficient form of a polynomial from a point-value representation
Note Vandermonde matrix is invertible iff xk are distinct
11
)))((()( 12210 nn xaaxaxaxaxA
32
2975)( xxxxA
xxxxA ))29(7(5)(
1
1
0
1
1
2
11
1
1
2
11
1
0
2
00
1
1
0
matrixeVandermond
)()(1
)()(1
)()(1
...
n
n
nnn
n
n
n
n a
a
a
xxx
xxx
xxx
y
y
y
12. Conversion Between Representations
Interpolation (point-value to Coefficient):
Vandermonde matrix, denoted by V(x0,x1,…,xn-1), whose determinant is
Coefficient :
The LU Decomposition algorithm: O(n3)
A faster algorithm Lagrange’s formula
12
0)(
10
nkj
jk xx
yxxxVa n
1
11,0 ),,(
1
0 )(
)(
)(
n
k
kj
jk
kj
j
k
xx
xx
yxA
15. Complex Roots of Unity
Complex nth root of unity
A complex number such that ωn = 1
Principal n th root of unity
There are exactly n complex nth root of unity
All other complex nth roots of unity are powers of
n complex roots of unity are equally spaced around the circle of unit radius
centered at the origin of the complex plane
15
n
i
n e
2
1,...,2,1,0,
2
nkfore n
ki
1210
,,,, n
nnnn
n
radiansingiven:
unit,imaginary:i
logarithm,naturaltheofbase:
,sincos
e
whereiei
Euler's formula:
17. Cancellation Lemma
For any integers n 0, k 0, and b > 0,
Proof
For any even integer n > 0,
Example:
17
k
n
dk
dn
k
n
knidkdnidk
dn ee
)()( /2/2
12
2/
n
n
4
6
24
4
4/224
6
2
624/26
24 )(
i
i
i
eee
18. Halving Lemma
If 𝑛>0 is even, then the squares of the 𝑛 complex 𝑛th
roots of unity are the 𝑛/2 complex 𝑛/2 th roots of unity
Proof
By the cancellation lemma, we have for any
nonnegative integer 𝑘.
If we square all of the complex 𝑛th roots of unity, then each
𝑛/2 th root of unity is obtained exactly twice
18
k
n
k
n 2/
2
)(
222222/
)()( k
n
k
n
n
n
k
n
nk
n
nk
n
19. Summation lemma
For any integer 𝑛≥1 and nonzero integer 𝑘 not divisible by 𝑛,
Proof
Requiring that 𝑘 not be divisible by 𝑛 ensures that the denominator is not 0,
since only when k is divisible by 𝑛
19
0)(
1
0
n
j
jk
n
0
1
1)1(
1
1)(
1
1)(
)(
1
0
k
n
k
k
n
kn
n
k
n
nk
n
n
j
jn
k
Note:
▪ k is not divisible by n
▪ only when k is divisible by n
1k
n
21. Discrete Fourier Transform
21
DFT
110 ,...,, Nxxx
110 ,...,, NXXX
1
0
2N
i
ik
N
j
ik exX
Inverse DFT
110 ,...,, Nxxx
110 ,...,, NXXX
1
0
2
1 N
i
ik
N
j
ik eX
N
x
22. Discrete Fourier Transform
We wish to evaluate a polynomial of degree bound n at
assume that 𝑛 is a power of 2
assume 𝐴 is given in coefficient form
We define the results
The vector is the discrete fourier transform
of
22
0 1 1
, , , n
n n n
1
0
)(
n
i
i
i xaxA
),,( 110 naaa a
1,...,2,1,0)(
1
0
nkforaAy
n
j
kj
nj
k
nk
1
0
2N
i
ik
N
j
ik exX
),,( 110 nyyy y
),,( 110 naaa a
23. Discrete Fourier Transform
Key idea
23
unityofrootnprincipleiswherexchoose thk
k
1
3
2
1
0
)1)(1()1(3)1(21
)1(3963
)1(2642
132
1
3
2
1
1
3
2
1
0
1
1
1
1
11111
)(
)(
)(
)(
)1(
n
nn
n
n
n
n
n
n
n
n
nnnn
n
nnnn
n
nnnn
n
n
n
n
n
n a
a
a
a
a
A
A
A
A
A
y
y
y
y
y
1
1
0
1
1
2
11
1
1
2
11
1
0
2
00
1
0
)()(1
)()(1
)()(1
...
n
n
nnn
n
n
n
n a
a
a
xxx
xxx
xxx
y
y
y
DFT:
24. Inverse Discrete Fourier Transform
24
1
3
2
1
0
1
)1)(1()1(3)1(21
)1(3963
)1(2642
132
1
3
2
1
0
1
1
1
1
11111
1
n
nn
n
n
n
n
n
n
n
n
nnnn
n
nnnn
n
nnnn
n y
y
y
y
y
n
a
a
a
a
a
Inverse DFT:
26. Fast Fourier Transform(FFT)
Fast Fourier Transform
An efficient algorithm for computing the DFT
Takes advantage of the special properties of the complex roots of unity to
compute DFT𝑛(a) in time Θ(𝑛log𝑛).
Divide and conquer approach
Divide and conquer approach
Divide the polynomial A(x) by splitting it into its even and odd powers
26
1
1
3
3
2
210)(
n
n xaxaxaxaaxA
)()()(
)()()(
)()()(
)(
)(
221
1
3
3
2
210
221
1
3
3
2
210
22
12/
1
2
531
12/
2
2
420
xxAxAxaxaxaxaaxA
xxAxAxaxaxaxaaxA
xxAxAxA
xaxaxaaxA
xaxaxaaxA
oddeven
n
n
oddeven
n
n
oddeven
n
nodd
n
neven
27. Fast Fourier Transform(FFT)
The problem of evaluating A(x) at reduces to
Evaluating the degree-bound n/2 polynomials Aeven(x) and Aodd(x) at the points
Combining the results by A(x) = Aeven(x2) + xAodd(x2)
Why bother?
The list does not contain n distinct values,
but n/2 complex n/2 th roots of unity
Polynomials Aeven and Aodd are recursively evaluated at the n/2 complex
n/2 th roots of unity
Sub problems have exactly the same form as the original problem, but are
half the size
27
110
,,, n
nnn
212120
)(,,)(,)( n
nnn
212120
)(,,)(,)( n
nnn
30. Complexity
If we can recursively evaluate Aeven and Aodd using the same approach, we get
the following recurrence relation for the running time of the algorithm
Our trick was to evaluate x at ( positive ) and -x ( negative ).
But inputs to Aeven and Aodd are always of the form x2 ( positive )!
How can we apply the same trick?
30
)log(
.),()
2
(2
,1),1(
)(
n
n
otherwisen
n
T
nif
nT
33. Euler’s formula
Euler's formula
Modulus
Some important cases
33
1sincos)(
sincos)sin(cos)(
22
iii
i
eee
iie
11 22
ii
i
eeie
radiansingiven:
unit,imaginary:i
logarithm,naturaltheofbase:
,sincos
e
whereiei
34. Euler’s formula
A point in the complex plane
can be represented by a complex number written in cartesian coordinates
Euler's formula provides a means of conversion between cartesian
coordinates and polar coordinates.
The polar form simplifies the mathematics when used in multiplication or
powers of complex numbers
34
),(2atanarg
,,
,,Im
,Re
)sin(cos
)sin(cos
22
xyz
zofmagnitudetheyxzr
partimaginarythezy
partrealthezx
where
reiziyxz
reiziyxz
i
i
35. Euler’s formula
Relationship to trigonometry
Euler's formula provides a powerful connection between analysis and
trigonometry
35
xixxixe
xixe
Derived
i
ee
ex
ee
ex
ix
ix
ixix
ix
ixix
ix
sincos)sin()cos(
sincos
:
,
2
)Im(sin
2
)Re(cos
)cos(
)()(
)cos(
)()(
222
1
22
coscos
yx
yxiyxi
yx
yxiyxi
iyiyixix
eeee
eeee
yx