SlideShare a Scribd company logo
1 of 35
Download to read offline
Convolution and FFT
Chenghao Jin
2018-08-16 2
Polynomials (Representation and Convolution)1
Complex Roots of Unity2
DFT33
FFT44
Euler’s formula5
1. Polynomials
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
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 
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
Polynomial Addition(Coefficient representation)
 Formal representation
 Addition: O(n)
 Example:
7
10where)()()(
then,)(and)(
1
0
1
0
1
0










njforbacxcxBxAxC
xbxBxaxA
jjj
j
n
j
j
j
n
j
j
j
n
j
j
1
111100
1
1
2
210
1
1
2
210
)()()()()()(
)(
)(









n
nn
n
n
n
n
xbaxbabaxBxAxC
xbxbxbbxB
xaxaxaaxA



)4,7,6,4(4764)(
)2,0,4,5(245)(
)6,7,10,9(67109)(
32
3
32



xxxxC
xxxB
xxxxA
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:
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






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



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

  




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
The Road So Far
13
2. Complex Roots of Unity
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:
Complex roots of unity
 8 Complex 8th Roots of Unity
16
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
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   
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
1k
n
3. DFT
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

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
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:
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:
4. FFT
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

















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  
Fast Fourier Transform(FFT)
28
Fast Fourier Transform(FFT)
29)()()()(
)(1)()1()(
)()()()(
)(1)()1()(
)()(
)()()(
)()(
)1()(
)()(
)1()(
)(
3120
3
4
3120
2
4
3120
1
4
3120
0
4
2
31
2
20
22
3210
3
4
3210
2
4
3210
1
4
3210
0
4
3
3
2
210
aaiaaiAA
aaaaAA
aaiaaiAA
aaaaAA
xaaxxaaxA
xAxAxA
iaaiaaiAA
aaaaAA
iaaiaaiAA
aaaaAA
xaxaxaaxA
oddeven



















Example
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








31
5. Euler’s formula
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

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












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

More Related Content

What's hot

Fast Fourier Transform
Fast Fourier TransformFast Fourier Transform
Fast Fourier Transformop205
 
Divide and Conquer - Part 1
Divide and Conquer - Part 1Divide and Conquer - Part 1
Divide and Conquer - Part 1Amrinder Arora
 
DESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMSDESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMSGayathri Gaayu
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notationsEhtisham Ali
 
String Matching with Finite Automata and Knuth Morris Pratt Algorithm
String Matching with Finite Automata and Knuth Morris Pratt AlgorithmString Matching with Finite Automata and Knuth Morris Pratt Algorithm
String Matching with Finite Automata and Knuth Morris Pratt AlgorithmKiran K
 
Quick sort Algorithm Discussion And Analysis
Quick sort Algorithm Discussion And AnalysisQuick sort Algorithm Discussion And Analysis
Quick sort Algorithm Discussion And AnalysisSNJ Chaudhary
 
Learn from LL(1) to PEG parser the hard way
Learn from LL(1) to PEG parser the hard wayLearn from LL(1) to PEG parser the hard way
Learn from LL(1) to PEG parser the hard wayKir Chou
 
Formal Languages and Automata Theory unit 2
Formal Languages and Automata Theory unit 2Formal Languages and Automata Theory unit 2
Formal Languages and Automata Theory unit 2Srimatre K
 
Skip list vinay khimsuriya_200430723005
Skip list vinay khimsuriya_200430723005Skip list vinay khimsuriya_200430723005
Skip list vinay khimsuriya_200430723005vinaykhimsuriya1
 
Hash table
Hash tableHash table
Hash tableVu Tran
 
Functions in discrete mathematics
Functions in discrete mathematicsFunctions in discrete mathematics
Functions in discrete mathematicsRachana Pathak
 
Poset in Relations(Discrete Mathematics)
Poset in Relations(Discrete Mathematics)Poset in Relations(Discrete Mathematics)
Poset in Relations(Discrete Mathematics)Rachana Pathak
 

What's hot (20)

Automata theory
Automata theoryAutomata theory
Automata theory
 
Binary Search Tree
Binary Search TreeBinary Search Tree
Binary Search Tree
 
Fast Fourier Transform
Fast Fourier TransformFast Fourier Transform
Fast Fourier Transform
 
Divide and Conquer - Part 1
Divide and Conquer - Part 1Divide and Conquer - Part 1
Divide and Conquer - Part 1
 
DESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMSDESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMS
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notations
 
String Matching with Finite Automata and Knuth Morris Pratt Algorithm
String Matching with Finite Automata and Knuth Morris Pratt AlgorithmString Matching with Finite Automata and Knuth Morris Pratt Algorithm
String Matching with Finite Automata and Knuth Morris Pratt Algorithm
 
First order logic
First order logicFirst order logic
First order logic
 
Quick sort Algorithm Discussion And Analysis
Quick sort Algorithm Discussion And AnalysisQuick sort Algorithm Discussion And Analysis
Quick sort Algorithm Discussion And Analysis
 
Learn from LL(1) to PEG parser the hard way
Learn from LL(1) to PEG parser the hard wayLearn from LL(1) to PEG parser the hard way
Learn from LL(1) to PEG parser the hard way
 
Formal Languages and Automata Theory unit 2
Formal Languages and Automata Theory unit 2Formal Languages and Automata Theory unit 2
Formal Languages and Automata Theory unit 2
 
Recurrences
RecurrencesRecurrences
Recurrences
 
Hash table
Hash tableHash table
Hash table
 
Skip list vinay khimsuriya_200430723005
Skip list vinay khimsuriya_200430723005Skip list vinay khimsuriya_200430723005
Skip list vinay khimsuriya_200430723005
 
Hash table
Hash tableHash table
Hash table
 
Functions in discrete mathematics
Functions in discrete mathematicsFunctions in discrete mathematics
Functions in discrete mathematics
 
NP completeness
NP completenessNP completeness
NP completeness
 
Poset in Relations(Discrete Mathematics)
Poset in Relations(Discrete Mathematics)Poset in Relations(Discrete Mathematics)
Poset in Relations(Discrete Mathematics)
 
SINGLE-SOURCE SHORTEST PATHS
SINGLE-SOURCE SHORTEST PATHS SINGLE-SOURCE SHORTEST PATHS
SINGLE-SOURCE SHORTEST PATHS
 
Quick sort
Quick sortQuick sort
Quick sort
 

Similar to Convolution and FFT

Phase-Type Distributions for Finite Interacting Particle Systems
Phase-Type Distributions for Finite Interacting Particle SystemsPhase-Type Distributions for Finite Interacting Particle Systems
Phase-Type Distributions for Finite Interacting Particle SystemsStefan Eng
 
DSP_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_FOEHU - Lec 08 - The Discrete Fourier TransformDSP_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_FOEHU - Lec 08 - The Discrete Fourier TransformAmr E. Mohamed
 
Seismic data processing lecture 3
Seismic data processing lecture 3Seismic data processing lecture 3
Seismic data processing lecture 3Amin khalil
 
Density theorems for anisotropic point configurations
Density theorems for anisotropic point configurationsDensity theorems for anisotropic point configurations
Density theorems for anisotropic point configurationsVjekoslavKovac1
 
Z transform and Properties of Z Transform
Z transform and Properties of Z TransformZ transform and Properties of Z Transform
Z transform and Properties of Z TransformAnujKumar734472
 
Moment Closure Based Parameter Inference of Stochastic Kinetic Models
Moment Closure Based Parameter Inference of Stochastic Kinetic ModelsMoment Closure Based Parameter Inference of Stochastic Kinetic Models
Moment Closure Based Parameter Inference of Stochastic Kinetic ModelsColin Gillespie
 
Rvtvtbthtbrvrvthrbrhtjrhrjtjrgtjtgrhrpde.ppt
Rvtvtbthtbrvrvthrbrhtjrhrjtjrgtjtgrhrpde.pptRvtvtbthtbrvrvthrbrhtjrhrjtjrgtjtgrhrpde.ppt
Rvtvtbthtbrvrvthrbrhtjrhrjtjrgtjtgrhrpde.pptshivamvadgama50
 
Moment closure inference for stochastic kinetic models
Moment closure inference for stochastic kinetic modelsMoment closure inference for stochastic kinetic models
Moment closure inference for stochastic kinetic modelsColin Gillespie
 
differentiol equation.pptx
differentiol equation.pptxdifferentiol equation.pptx
differentiol equation.pptxPlanningHCEGC
 
Dcs lec02 - z-transform
Dcs   lec02 - z-transformDcs   lec02 - z-transform
Dcs lec02 - z-transformAmr E. Mohamed
 
Solution to schrodinger equation with dirac comb potential
Solution to schrodinger equation with dirac comb potential Solution to schrodinger equation with dirac comb potential
Solution to schrodinger equation with dirac comb potential slides
 
Conformable Chebyshev differential equation of first kind
Conformable Chebyshev differential equation of first kindConformable Chebyshev differential equation of first kind
Conformable Chebyshev differential equation of first kindIJECEIAES
 

Similar to Convolution and FFT (20)

It 05104 digsig_1
It 05104 digsig_1It 05104 digsig_1
It 05104 digsig_1
 
Lecture5-FEA.pdf
Lecture5-FEA.pdfLecture5-FEA.pdf
Lecture5-FEA.pdf
 
Dft
DftDft
Dft
 
Ch07 8
Ch07 8Ch07 8
Ch07 8
 
Phase-Type Distributions for Finite Interacting Particle Systems
Phase-Type Distributions for Finite Interacting Particle SystemsPhase-Type Distributions for Finite Interacting Particle Systems
Phase-Type Distributions for Finite Interacting Particle Systems
 
DSP_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_FOEHU - Lec 08 - The Discrete Fourier TransformDSP_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_FOEHU - Lec 08 - The Discrete Fourier Transform
 
Seismic data processing lecture 3
Seismic data processing lecture 3Seismic data processing lecture 3
Seismic data processing lecture 3
 
Density theorems for anisotropic point configurations
Density theorems for anisotropic point configurationsDensity theorems for anisotropic point configurations
Density theorems for anisotropic point configurations
 
Z transform and Properties of Z Transform
Z transform and Properties of Z TransformZ transform and Properties of Z Transform
Z transform and Properties of Z Transform
 
lec z-transform.ppt
lec z-transform.pptlec z-transform.ppt
lec z-transform.ppt
 
Moment Closure Based Parameter Inference of Stochastic Kinetic Models
Moment Closure Based Parameter Inference of Stochastic Kinetic ModelsMoment Closure Based Parameter Inference of Stochastic Kinetic Models
Moment Closure Based Parameter Inference of Stochastic Kinetic Models
 
Rvtvtbthtbrvrvthrbrhtjrhrjtjrgtjtgrhrpde.ppt
Rvtvtbthtbrvrvthrbrhtjrhrjtjrgtjtgrhrpde.pptRvtvtbthtbrvrvthrbrhtjrhrjtjrgtjtgrhrpde.ppt
Rvtvtbthtbrvrvthrbrhtjrhrjtjrgtjtgrhrpde.ppt
 
Moment closure inference for stochastic kinetic models
Moment closure inference for stochastic kinetic modelsMoment closure inference for stochastic kinetic models
Moment closure inference for stochastic kinetic models
 
differentiol equation.pptx
differentiol equation.pptxdifferentiol equation.pptx
differentiol equation.pptx
 
QMC: Operator Splitting Workshop, Using Sequences of Iterates in Inertial Met...
QMC: Operator Splitting Workshop, Using Sequences of Iterates in Inertial Met...QMC: Operator Splitting Workshop, Using Sequences of Iterates in Inertial Met...
QMC: Operator Splitting Workshop, Using Sequences of Iterates in Inertial Met...
 
Shape1 d
Shape1 dShape1 d
Shape1 d
 
Dcs lec02 - z-transform
Dcs   lec02 - z-transformDcs   lec02 - z-transform
Dcs lec02 - z-transform
 
Cse41
Cse41Cse41
Cse41
 
Solution to schrodinger equation with dirac comb potential
Solution to schrodinger equation with dirac comb potential Solution to schrodinger equation with dirac comb potential
Solution to schrodinger equation with dirac comb potential
 
Conformable Chebyshev differential equation of first kind
Conformable Chebyshev differential equation of first kindConformable Chebyshev differential equation of first kind
Conformable Chebyshev differential equation of first kind
 

Recently uploaded

All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...Sérgio Sacani
 
GFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptxGFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptxAleenaTreesaSaji
 
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptxUnlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptxanandsmhk
 
Presentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxPresentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxgindu3009
 
VIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C PVIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C PPRINCE C P
 
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSpermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSarthak Sekhar Mondal
 
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxSOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxkessiyaTpeter
 
Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxUmerFayaz5
 
Natural Polymer Based Nanomaterials
Natural Polymer Based NanomaterialsNatural Polymer Based Nanomaterials
Natural Polymer Based NanomaterialsAArockiyaNisha
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Sérgio Sacani
 
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 60009654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000Sapana Sha
 
Botany 4th semester series (krishna).pdf
Botany 4th semester series (krishna).pdfBotany 4th semester series (krishna).pdf
Botany 4th semester series (krishna).pdfSumit Kumar yadav
 
GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)Areesha Ahmad
 
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCRStunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCRDelhi Call girls
 
Biopesticide (2).pptx .This slides helps to know the different types of biop...
Biopesticide (2).pptx  .This slides helps to know the different types of biop...Biopesticide (2).pptx  .This slides helps to know the different types of biop...
Biopesticide (2).pptx .This slides helps to know the different types of biop...RohitNehra6
 
Botany 4th semester file By Sumit Kumar yadav.pdf
Botany 4th semester file By Sumit Kumar yadav.pdfBotany 4th semester file By Sumit Kumar yadav.pdf
Botany 4th semester file By Sumit Kumar yadav.pdfSumit Kumar yadav
 
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdfPests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdfPirithiRaju
 
DIFFERENCE IN BACK CROSS AND TEST CROSS
DIFFERENCE IN  BACK CROSS AND TEST CROSSDIFFERENCE IN  BACK CROSS AND TEST CROSS
DIFFERENCE IN BACK CROSS AND TEST CROSSLeenakshiTyagi
 

Recently uploaded (20)

All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
 
9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service
9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service
9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service
 
GFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptxGFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptx
 
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptxUnlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptx
 
Presentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxPresentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptx
 
VIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C PVIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C P
 
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSpermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
 
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxSOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
 
Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptx
 
Natural Polymer Based Nanomaterials
Natural Polymer Based NanomaterialsNatural Polymer Based Nanomaterials
Natural Polymer Based Nanomaterials
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
 
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 60009654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
 
Botany 4th semester series (krishna).pdf
Botany 4th semester series (krishna).pdfBotany 4th semester series (krishna).pdf
Botany 4th semester series (krishna).pdf
 
GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)
 
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCRStunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
 
Engler and Prantl system of classification in plant taxonomy
Engler and Prantl system of classification in plant taxonomyEngler and Prantl system of classification in plant taxonomy
Engler and Prantl system of classification in plant taxonomy
 
Biopesticide (2).pptx .This slides helps to know the different types of biop...
Biopesticide (2).pptx  .This slides helps to know the different types of biop...Biopesticide (2).pptx  .This slides helps to know the different types of biop...
Biopesticide (2).pptx .This slides helps to know the different types of biop...
 
Botany 4th semester file By Sumit Kumar yadav.pdf
Botany 4th semester file By Sumit Kumar yadav.pdfBotany 4th semester file By Sumit Kumar yadav.pdf
Botany 4th semester file By Sumit Kumar yadav.pdf
 
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdfPests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
 
DIFFERENCE IN BACK CROSS AND TEST CROSS
DIFFERENCE IN  BACK CROSS AND TEST CROSSDIFFERENCE IN  BACK CROSS AND TEST CROSS
DIFFERENCE IN BACK CROSS AND TEST CROSS
 

Convolution and FFT

  • 2. 2018-08-16 2 Polynomials (Representation and Convolution)1 Complex Roots of Unity2 DFT33 FFT44 Euler’s formula5
  • 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
  • 7. Polynomial Addition(Coefficient representation)  Formal representation  Addition: O(n)  Example: 7 10where)()()( then,)(and)( 1 0 1 0 1 0           njforbacxcxBxAxC xbxBxaxA jjj j n j j j n j j j n j j 1 111100 1 1 2 210 1 1 2 210 )()()()()()( )( )(          n nn n n n n xbaxbabaxBxAxC xbxbxbbxB xaxaxaaxA    )4,7,6,4(4764)( )2,0,4,5(245)( )6,7,10,9(67109)( 32 3 32    xxxxC xxxB xxxxA
  • 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
  • 13. The Road So Far 13
  • 14. 2. Complex Roots of Unity
  • 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:
  • 16. Complex roots of unity  8 Complex 8th Roots of Unity 16
  • 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 1k 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        
  • 31. 31
  • 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