SlideShare a Scribd company logo
1 of 4
Download to read offline
THREE LINEAR ALGEBRA APPLICATIONS
11/28/2018, MATH 121 GUEST LECTURE
Three Applications of Linear algebra
Rather than grinding through a laundry list of applications, we focus on three parts,
where linear algebra plays a role. The first is an unsolved problem in complexity
theory of arithmetic, the second is a short overview how data structures and data
storage rely on notions put forward by linear algebra. The third is a spectral problem
in graph theory which is related to networks. The lecture will conclude with a slide
show showing off some applications without going into details.
1. Fast multiplication
1.1. An important unsolved problem in computer science is the question, how fast one
can multiply two integers. The grade-school multiplication of two n-digit numbers uses
about n2
computation steps. Modern computer algebra frame works use more sophis-
ticated methods like the GNU multiple precision arithmetic library. These methods
chose between different methods.
1.2. The Karatsuba method uses the idea that the one can write (a + b)(c + d) =
u+(u+w−v)+w where u = ac, w = bd, v = (b−a)(d−c). Instead of 4 multiplications,
we need only 3. This cuts the O(n2
) complexity to O(nlog2(3)
) = O(n1.5849
) which is
faster. For example, to multiply x = 1234 with y = 5577, build u = 12 ∗ 55 = 660
and w = 34 ∗ 77 = 2618, and v = (33 − 12)(77 − 55) = 22 ∗ 22 = 484, then compute
u ∗ 10000 + v100 + w = 6600000 + (660 + 2618 − 484) ∗ 100 + 2618 = 6882018.
1.3. I learned the following method from a talk of Albrecht Beutelspacher. If
numbers are close to a round number like 1000, there is a neat trick to make the
computation. Assume for example, we have two 3 digit numbers x, y so that the
product of 1000−a and 1000−b is smaller than 1000. Then use (1000−a)(1000−b) =
1000(1000 − a − b) + ab = 1000(x − b) + ab. For example, to compute 991 ∗ 899 build
x − b = 991 − 101 = 890 and ab = 9 ∗ 101 = 909. The result is 890909.
1.4. The fastest multiplication methods are based on linear algebra. Given again two
integers like x = 1234 and y = 5577. If n is the number of digits in x and y, then we
need about n2
operations to get the product. It turns out that there is a faster way
to do that. And this involves linear algebra. The idea is to write the numbers x, y as
functions, then multiply the functions using Fourier theory. How does this work?
Linear Algebra Applications
1.5. If xk and yk are the integer coefficients of x and y so that x = n−1
k=0 xk10k
and
y = n−1
k=0 yk10k
, we look at the functions f(z) = n−1
k=0 xkzk
and g(z) = n
k=0 ykzk
.
We assume n is the number of digits in xy and that xk, yk are zero for k larger than
the number of digits of x or y. Now, if h(z) = f(z)g(z), then h(10) is the product.
The point is that we can compute n data points of h with n log(n) operations and that
we can get from n data points of a polynomial the function back in n log(n) operators.
So, we can compute the product xy in n log(n) operations. How do we achieve this
miracle?
1.6. Given a polynomial f, we can look at the periodic function F(t) = f(e2πit
)/
√
n
and evaluate Xk = F(2πk/n) for k = 0, . . . , (n − 1). This produces a linear map
U : (x0, . . . , xn−1) → (X0, . . . , Xn−1) which is called the discrete Fourier trans-
form. There is a fast Fourier transform implementation which does this in n log(n)
computation steps. If U(y0, . . . , yn−1) = (Y0, . . . , Yn−1) then we have just to compute
Q = U−
1(XY ) and get xy = n
k=0 Qk10k
. Mathematica has the fast Fourier transform
and its inverse implemented. Here is the code:
FastMultiplication [ x , y ]:=Module[{X,Y,U,V, n ,Q} ,
X = Reverse [ IntegerDigits [ x ] ] ; Y = Reverse [ IntegerDigits [ y ] ] ;
n =Length [X]+Length [Y]+1; X=PadRight [X, n ] ; Y=PadRight [Y, n ] ;
U=InverseFourier [X] ; V=InverseFourier [Y] ;
Q=Round[Re[ Fourier [U∗V]∗ Sqrt [ n ] ] ] ;
Sum[Q[ [ k ] ] 10ˆ(k−1), {k , n } ] ] ;
x0 = 11234; y0 = 52342; FastMultiplication [ x0 , y0]==x0∗y0
The procedures Fourier and InverseFourier are implemented already in Mathematica
Here are emulations showing what they do:
X={4 ,2 ,3 ,2 ,1}; n =Length [X] ; InverseFourier [X]
f = Sum[X[ [ k ] ] t ˆ(k−1),{k , n } ] ;
N[ Table [ f /. t −> Exp[−I 2 Pi k/n ] ,{ k ,0 , n−1}]]/ Sqrt [ n ]
N[ ( Table [Exp[ I 2Pi k l /n ] ,{ k ,0 , n−1},{ l ,0 , n−1}]/Sqrt [ n ] ) .X]
Fourier [X]
2. Data structures
2.1. Information is commonly represented in the form of vectors or matrices. This
is sometimes not obvious as data can be complicated. Still, we usually get away with
matrices. For example, if we have names linked to addresses and telephone numbers,
we can make a spread sheet A(i, j), where A(i, 1) is the name and A(i, 2) is the
address and A(i, 3) is the telephone number. In a relational database, information
is stored in tables as matrices containing records as rows and attributes as columns.
2.2. Data can also be stored more geometrically, especially in the form of a graph. A
special case is the hierarchical database in which the graph is a tree, the Khipu knot
encoding used in the Incan empire is an example of a hierarchical database. It is
important to note however that also geometric information like a graph can be stored as
part of a relational data base. A graph with nodes can be encoded with an adjacency
matrix A(i, j) defined as A(i, j) = 1 if i and j are connected and A(i, j) = 0 else.
Figure 1. Khipu from the Inka period. Image Source: Museo Chileno
De Arte Precolombino.
3. Media
3.1. Multimedia like images, sound or movies are stored in vector or matrix form. An
image is an array of pixels, a sound is an array of amplitudes, a movie is given by
an array of pictures and a sound.
3.2. Let us look at a color image A: It is a matrix where each entry A(i, j) contains
three numbers (r, g, b), where r, g, b are red, green and blue color values. Even so this
is a rectangular array of pixels, where each pixel is a vector of numbers, this can be
written as a single vector.
3.3. A sound file consists of two vectors (l, r), where l is the left channel and r is the
right channel. Each entry can be a signed integers from −127 to 128. A movie can be
seen as a vector of pictures. It is a curve in the large space of all pictures.
Figure 2. 6 Frames from the Movie Samsara (2011). Each frame is a
360 x 854 matrix, where each pixel has a Red,Green and Blue value.
Linear Algebra Applications
4. Networks
4.1. A graph G = (V, E) consists of a collection of nodes V which are connected by
edges collected in E. Graphs in which the direction of the edges matter are also called
digraphs. If one says graph, one usually does not specify directions. A graph can be
encoded as a matrix A, the adjacency matrix of A. It is defined as A(i, j) = 1 if i is
connected to j and A(i, j) = 0 else. This matrix is self-adjoint, A = AT
. Therefore,
the eigenvalues of A are real.
4.2. The analogue of the Laplacian in calculus is the matrix L = B − A, where
B = Diag(d1, · · · , dn) is the diagonal matrix containing the vertex degrees of B in
the diagonal. The matrix L always has the eigenvalue 0, with eigenvector [1, 1, · · · , 1].
If the graph is connected, the rest of the eigenvalues are positive. They are the fre-
quencies one can hear, when one hits the graph. The eigenvectors tell something
about the distribution of electrons if the graph represents a molecule. In the case
of circular graphs, we need the same mathematics than for the fast multiplication of
integers. The circle is closed.
Figure 3. Examples of networks.
Oliver Knill, knill@math.harvard.edu, Math 121, Harvard College, 11/27/18

More Related Content

What's hot

An algorithm for generating new mandelbrot and julia sets
An algorithm for generating new mandelbrot and julia setsAn algorithm for generating new mandelbrot and julia sets
An algorithm for generating new mandelbrot and julia setsAlexander Decker
 
Meta-learning and the ELBO
Meta-learning and the ELBOMeta-learning and the ELBO
Meta-learning and the ELBOYoonho Lee
 
A mid point ellipse drawing algorithm on a hexagonal grid
A mid  point ellipse drawing algorithm on a hexagonal gridA mid  point ellipse drawing algorithm on a hexagonal grid
A mid point ellipse drawing algorithm on a hexagonal gridS M K
 
Lecture 9 dim & rank - 4-5 & 4-6
Lecture 9   dim & rank -  4-5 & 4-6Lecture 9   dim & rank -  4-5 & 4-6
Lecture 9 dim & rank - 4-5 & 4-6njit-ronbrown
 
Chapter 2 Image Processing: Pixel Relation
Chapter 2 Image Processing: Pixel RelationChapter 2 Image Processing: Pixel Relation
Chapter 2 Image Processing: Pixel RelationVarun Ojha
 
Semi-Supervised Regression using Cluster Ensemble
Semi-Supervised Regression using Cluster EnsembleSemi-Supervised Regression using Cluster Ensemble
Semi-Supervised Regression using Cluster EnsembleAlexander Litvinenko
 
Pixel Relationships Examples
Pixel Relationships ExamplesPixel Relationships Examples
Pixel Relationships ExamplesMarwa Ahmeid
 
Basics of pixel neighbor.
Basics of pixel neighbor.Basics of pixel neighbor.
Basics of pixel neighbor.raheel rajput
 
Theory of Relational Calculus and its Formalization
Theory of Relational Calculus and its FormalizationTheory of Relational Calculus and its Formalization
Theory of Relational Calculus and its FormalizationYoshihiro Mizoguchi
 
Algebras for programming languages
Algebras for programming languagesAlgebras for programming languages
Algebras for programming languagesYoshihiro Mizoguchi
 
Introductory maths analysis chapter 02 official
Introductory maths analysis   chapter 02 officialIntroductory maths analysis   chapter 02 official
Introductory maths analysis chapter 02 officialEvert Sandye Taasiringan
 
A Coq Library for the Theory of Relational Calculus
A Coq Library for the Theory of Relational CalculusA Coq Library for the Theory of Relational Calculus
A Coq Library for the Theory of Relational CalculusYoshihiro Mizoguchi
 
Efficient Analysis of high-dimensional data in tensor formats
Efficient Analysis of high-dimensional data in tensor formatsEfficient Analysis of high-dimensional data in tensor formats
Efficient Analysis of high-dimensional data in tensor formatsAlexander Litvinenko
 
8517ijaia06
8517ijaia068517ijaia06
8517ijaia06ijaia
 

What's hot (19)

An algorithm for generating new mandelbrot and julia sets
An algorithm for generating new mandelbrot and julia setsAn algorithm for generating new mandelbrot and julia sets
An algorithm for generating new mandelbrot and julia sets
 
Meta-learning and the ELBO
Meta-learning and the ELBOMeta-learning and the ELBO
Meta-learning and the ELBO
 
A mid point ellipse drawing algorithm on a hexagonal grid
A mid  point ellipse drawing algorithm on a hexagonal gridA mid  point ellipse drawing algorithm on a hexagonal grid
A mid point ellipse drawing algorithm on a hexagonal grid
 
JC Vectors summary
JC Vectors summaryJC Vectors summary
JC Vectors summary
 
Lecture 9 dim & rank - 4-5 & 4-6
Lecture 9   dim & rank -  4-5 & 4-6Lecture 9   dim & rank -  4-5 & 4-6
Lecture 9 dim & rank - 4-5 & 4-6
 
Chapter 2 Image Processing: Pixel Relation
Chapter 2 Image Processing: Pixel RelationChapter 2 Image Processing: Pixel Relation
Chapter 2 Image Processing: Pixel Relation
 
Lausanne 2019 #2
Lausanne 2019 #2Lausanne 2019 #2
Lausanne 2019 #2
 
Semi-Supervised Regression using Cluster Ensemble
Semi-Supervised Regression using Cluster EnsembleSemi-Supervised Regression using Cluster Ensemble
Semi-Supervised Regression using Cluster Ensemble
 
Pixel Relationships Examples
Pixel Relationships ExamplesPixel Relationships Examples
Pixel Relationships Examples
 
Basics of pixel neighbor.
Basics of pixel neighbor.Basics of pixel neighbor.
Basics of pixel neighbor.
 
Theory of Relational Calculus and its Formalization
Theory of Relational Calculus and its FormalizationTheory of Relational Calculus and its Formalization
Theory of Relational Calculus and its Formalization
 
Double Integral
Double IntegralDouble Integral
Double Integral
 
Algebras for programming languages
Algebras for programming languagesAlgebras for programming languages
Algebras for programming languages
 
Introductory maths analysis chapter 02 official
Introductory maths analysis   chapter 02 officialIntroductory maths analysis   chapter 02 official
Introductory maths analysis chapter 02 official
 
A Coq Library for the Theory of Relational Calculus
A Coq Library for the Theory of Relational CalculusA Coq Library for the Theory of Relational Calculus
A Coq Library for the Theory of Relational Calculus
 
Efficient Analysis of high-dimensional data in tensor formats
Efficient Analysis of high-dimensional data in tensor formatsEfficient Analysis of high-dimensional data in tensor formats
Efficient Analysis of high-dimensional data in tensor formats
 
8517ijaia06
8517ijaia068517ijaia06
8517ijaia06
 
QMC: Transition Workshop - Reduced Component-by-Component Constructions of (P...
QMC: Transition Workshop - Reduced Component-by-Component Constructions of (P...QMC: Transition Workshop - Reduced Component-by-Component Constructions of (P...
QMC: Transition Workshop - Reduced Component-by-Component Constructions of (P...
 
Integration
IntegrationIntegration
Integration
 

Similar to Lecture50

elliptic-curves-modern
elliptic-curves-modernelliptic-curves-modern
elliptic-curves-modernEric Seifert
 
Robust Image Denoising in RKHS via Orthogonal Matching Pursuit
Robust Image Denoising in RKHS via Orthogonal Matching PursuitRobust Image Denoising in RKHS via Orthogonal Matching Pursuit
Robust Image Denoising in RKHS via Orthogonal Matching PursuitPantelis Bouboulis
 
Solution set 3
Solution set 3Solution set 3
Solution set 3慧环 赵
 
Computer Graphics in Java and Scala - Part 1
Computer Graphics in Java and Scala - Part 1Computer Graphics in Java and Scala - Part 1
Computer Graphics in Java and Scala - Part 1Philip Schwarz
 
Seismic data processing introductory lecture
Seismic data processing introductory lectureSeismic data processing introductory lecture
Seismic data processing introductory lectureAmin khalil
 
On an extension of a c algebra
On an extension of a  c algebraOn an extension of a  c algebra
On an extension of a c algebraAlexander Decker
 
Lesson 2: A Catalog of Essential Functions (slides)
Lesson 2: A Catalog of Essential Functions (slides)Lesson 2: A Catalog of Essential Functions (slides)
Lesson 2: A Catalog of Essential Functions (slides)Matthew Leingang
 
Lesson 2: A Catalog of Essential Functions (slides)
Lesson 2: A Catalog of Essential Functions (slides)Lesson 2: A Catalog of Essential Functions (slides)
Lesson 2: A Catalog of Essential Functions (slides)Mel Anthony Pepito
 
chAPTER1CV.pptx is abouter computer vision in artificial intelligence
chAPTER1CV.pptx is abouter computer vision in artificial intelligencechAPTER1CV.pptx is abouter computer vision in artificial intelligence
chAPTER1CV.pptx is abouter computer vision in artificial intelligenceshesnasuneer
 
computervision1.pptx its about computer vision
computervision1.pptx its about computer visioncomputervision1.pptx its about computer vision
computervision1.pptx its about computer visionshesnasuneer
 
Calculus and Numerical Method =_=
Calculus and Numerical Method =_=Calculus and Numerical Method =_=
Calculus and Numerical Method =_=Fazirah Zyra
 
Some Engg. Applications of Matrices and Partial Derivatives
Some Engg. Applications of Matrices and Partial DerivativesSome Engg. Applications of Matrices and Partial Derivatives
Some Engg. Applications of Matrices and Partial DerivativesSanjaySingh011996
 
Iterative procedure for uniform continuous mapping.
Iterative procedure for uniform continuous mapping.Iterative procedure for uniform continuous mapping.
Iterative procedure for uniform continuous mapping.Alexander Decker
 

Similar to Lecture50 (20)

elliptic-curves-modern
elliptic-curves-modernelliptic-curves-modern
elliptic-curves-modern
 
Robust Image Denoising in RKHS via Orthogonal Matching Pursuit
Robust Image Denoising in RKHS via Orthogonal Matching PursuitRobust Image Denoising in RKHS via Orthogonal Matching Pursuit
Robust Image Denoising in RKHS via Orthogonal Matching Pursuit
 
Solution set 3
Solution set 3Solution set 3
Solution set 3
 
Parallel algorithm in linear algebra
Parallel algorithm in linear algebraParallel algorithm in linear algebra
Parallel algorithm in linear algebra
 
Networking Assignment Help
Networking Assignment HelpNetworking Assignment Help
Networking Assignment Help
 
Lecture_note2.pdf
Lecture_note2.pdfLecture_note2.pdf
Lecture_note2.pdf
 
Computer Graphics in Java and Scala - Part 1
Computer Graphics in Java and Scala - Part 1Computer Graphics in Java and Scala - Part 1
Computer Graphics in Java and Scala - Part 1
 
StewartCalc7e_01_01.ppt
StewartCalc7e_01_01.pptStewartCalc7e_01_01.ppt
StewartCalc7e_01_01.ppt
 
Seismic data processing introductory lecture
Seismic data processing introductory lectureSeismic data processing introductory lecture
Seismic data processing introductory lecture
 
On an extension of a c algebra
On an extension of a  c algebraOn an extension of a  c algebra
On an extension of a c algebra
 
Chapter 4 Integration
Chapter 4  IntegrationChapter 4  Integration
Chapter 4 Integration
 
Lesson 2: A Catalog of Essential Functions (slides)
Lesson 2: A Catalog of Essential Functions (slides)Lesson 2: A Catalog of Essential Functions (slides)
Lesson 2: A Catalog of Essential Functions (slides)
 
Lesson 2: A Catalog of Essential Functions (slides)
Lesson 2: A Catalog of Essential Functions (slides)Lesson 2: A Catalog of Essential Functions (slides)
Lesson 2: A Catalog of Essential Functions (slides)
 
Computer Network Homework Help
Computer Network Homework HelpComputer Network Homework Help
Computer Network Homework Help
 
chAPTER1CV.pptx is abouter computer vision in artificial intelligence
chAPTER1CV.pptx is abouter computer vision in artificial intelligencechAPTER1CV.pptx is abouter computer vision in artificial intelligence
chAPTER1CV.pptx is abouter computer vision in artificial intelligence
 
computervision1.pptx its about computer vision
computervision1.pptx its about computer visioncomputervision1.pptx its about computer vision
computervision1.pptx its about computer vision
 
Calculus and Numerical Method =_=
Calculus and Numerical Method =_=Calculus and Numerical Method =_=
Calculus and Numerical Method =_=
 
Some Engg. Applications of Matrices and Partial Derivatives
Some Engg. Applications of Matrices and Partial DerivativesSome Engg. Applications of Matrices and Partial Derivatives
Some Engg. Applications of Matrices and Partial Derivatives
 
Iterative procedure for uniform continuous mapping.
Iterative procedure for uniform continuous mapping.Iterative procedure for uniform continuous mapping.
Iterative procedure for uniform continuous mapping.
 
02 Notes Divide and Conquer
02 Notes Divide and Conquer02 Notes Divide and Conquer
02 Notes Divide and Conquer
 

Recently uploaded

A relative description on Sonoporation.pdf
A relative description on Sonoporation.pdfA relative description on Sonoporation.pdf
A relative description on Sonoporation.pdfnehabiju2046
 
Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxUmerFayaz5
 
The Black hole shadow in Modified Gravity
The Black hole shadow in Modified GravityThe Black hole shadow in Modified Gravity
The Black hole shadow in Modified GravitySubhadipsau21168
 
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxSOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxkessiyaTpeter
 
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
 
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡anilsa9823
 
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...jana861314
 
zoogeography of pakistan.pptx fauna of Pakistan
zoogeography of pakistan.pptx fauna of Pakistanzoogeography of pakistan.pptx fauna of Pakistan
zoogeography of pakistan.pptx fauna of Pakistanzohaibmir069
 
Dashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tanta
Dashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tantaDashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tanta
Dashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tantaPraksha3
 
Artificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PArtificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PPRINCE C P
 
Module 4: Mendelian Genetics and Punnett Square
Module 4:  Mendelian Genetics and Punnett SquareModule 4:  Mendelian Genetics and Punnett Square
Module 4: Mendelian Genetics and Punnett SquareIsiahStephanRadaza
 
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |aasikanpl
 
Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )aarthirajkumar25
 
Physiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptxPhysiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptxAArockiyaNisha
 
Recombinant DNA technology( Transgenic plant and animal)
Recombinant DNA technology( Transgenic plant and animal)Recombinant DNA technology( Transgenic plant and animal)
Recombinant DNA technology( Transgenic plant and animal)DHURKADEVIBASKAR
 
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...Sérgio Sacani
 
Scheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docxScheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docxyaramohamed343013
 
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfBehavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfSELF-EXPLANATORY
 
Genomic DNA And Complementary DNA Libraries construction.
Genomic DNA And Complementary DNA Libraries construction.Genomic DNA And Complementary DNA Libraries construction.
Genomic DNA And Complementary DNA Libraries construction.k64182334
 

Recently uploaded (20)

A relative description on Sonoporation.pdf
A relative description on Sonoporation.pdfA relative description on Sonoporation.pdf
A relative description on Sonoporation.pdf
 
Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptx
 
The Black hole shadow in Modified Gravity
The Black hole shadow in Modified GravityThe Black hole shadow in Modified Gravity
The Black hole shadow in Modified Gravity
 
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxSOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.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
 
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡
 
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
 
zoogeography of pakistan.pptx fauna of Pakistan
zoogeography of pakistan.pptx fauna of Pakistanzoogeography of pakistan.pptx fauna of Pakistan
zoogeography of pakistan.pptx fauna of Pakistan
 
Dashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tanta
Dashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tantaDashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tanta
Dashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tanta
 
Artificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PArtificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C P
 
The Philosophy of Science
The Philosophy of ScienceThe Philosophy of Science
The Philosophy of Science
 
Module 4: Mendelian Genetics and Punnett Square
Module 4:  Mendelian Genetics and Punnett SquareModule 4:  Mendelian Genetics and Punnett Square
Module 4: Mendelian Genetics and Punnett Square
 
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
 
Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )
 
Physiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptxPhysiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptx
 
Recombinant DNA technology( Transgenic plant and animal)
Recombinant DNA technology( Transgenic plant and animal)Recombinant DNA technology( Transgenic plant and animal)
Recombinant DNA technology( Transgenic plant and animal)
 
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
 
Scheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docxScheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docx
 
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfBehavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
 
Genomic DNA And Complementary DNA Libraries construction.
Genomic DNA And Complementary DNA Libraries construction.Genomic DNA And Complementary DNA Libraries construction.
Genomic DNA And Complementary DNA Libraries construction.
 

Lecture50

  • 1. THREE LINEAR ALGEBRA APPLICATIONS 11/28/2018, MATH 121 GUEST LECTURE Three Applications of Linear algebra Rather than grinding through a laundry list of applications, we focus on three parts, where linear algebra plays a role. The first is an unsolved problem in complexity theory of arithmetic, the second is a short overview how data structures and data storage rely on notions put forward by linear algebra. The third is a spectral problem in graph theory which is related to networks. The lecture will conclude with a slide show showing off some applications without going into details. 1. Fast multiplication 1.1. An important unsolved problem in computer science is the question, how fast one can multiply two integers. The grade-school multiplication of two n-digit numbers uses about n2 computation steps. Modern computer algebra frame works use more sophis- ticated methods like the GNU multiple precision arithmetic library. These methods chose between different methods. 1.2. The Karatsuba method uses the idea that the one can write (a + b)(c + d) = u+(u+w−v)+w where u = ac, w = bd, v = (b−a)(d−c). Instead of 4 multiplications, we need only 3. This cuts the O(n2 ) complexity to O(nlog2(3) ) = O(n1.5849 ) which is faster. For example, to multiply x = 1234 with y = 5577, build u = 12 ∗ 55 = 660 and w = 34 ∗ 77 = 2618, and v = (33 − 12)(77 − 55) = 22 ∗ 22 = 484, then compute u ∗ 10000 + v100 + w = 6600000 + (660 + 2618 − 484) ∗ 100 + 2618 = 6882018. 1.3. I learned the following method from a talk of Albrecht Beutelspacher. If numbers are close to a round number like 1000, there is a neat trick to make the computation. Assume for example, we have two 3 digit numbers x, y so that the product of 1000−a and 1000−b is smaller than 1000. Then use (1000−a)(1000−b) = 1000(1000 − a − b) + ab = 1000(x − b) + ab. For example, to compute 991 ∗ 899 build x − b = 991 − 101 = 890 and ab = 9 ∗ 101 = 909. The result is 890909. 1.4. The fastest multiplication methods are based on linear algebra. Given again two integers like x = 1234 and y = 5577. If n is the number of digits in x and y, then we need about n2 operations to get the product. It turns out that there is a faster way to do that. And this involves linear algebra. The idea is to write the numbers x, y as functions, then multiply the functions using Fourier theory. How does this work?
  • 2. Linear Algebra Applications 1.5. If xk and yk are the integer coefficients of x and y so that x = n−1 k=0 xk10k and y = n−1 k=0 yk10k , we look at the functions f(z) = n−1 k=0 xkzk and g(z) = n k=0 ykzk . We assume n is the number of digits in xy and that xk, yk are zero for k larger than the number of digits of x or y. Now, if h(z) = f(z)g(z), then h(10) is the product. The point is that we can compute n data points of h with n log(n) operations and that we can get from n data points of a polynomial the function back in n log(n) operators. So, we can compute the product xy in n log(n) operations. How do we achieve this miracle? 1.6. Given a polynomial f, we can look at the periodic function F(t) = f(e2πit )/ √ n and evaluate Xk = F(2πk/n) for k = 0, . . . , (n − 1). This produces a linear map U : (x0, . . . , xn−1) → (X0, . . . , Xn−1) which is called the discrete Fourier trans- form. There is a fast Fourier transform implementation which does this in n log(n) computation steps. If U(y0, . . . , yn−1) = (Y0, . . . , Yn−1) then we have just to compute Q = U− 1(XY ) and get xy = n k=0 Qk10k . Mathematica has the fast Fourier transform and its inverse implemented. Here is the code: FastMultiplication [ x , y ]:=Module[{X,Y,U,V, n ,Q} , X = Reverse [ IntegerDigits [ x ] ] ; Y = Reverse [ IntegerDigits [ y ] ] ; n =Length [X]+Length [Y]+1; X=PadRight [X, n ] ; Y=PadRight [Y, n ] ; U=InverseFourier [X] ; V=InverseFourier [Y] ; Q=Round[Re[ Fourier [U∗V]∗ Sqrt [ n ] ] ] ; Sum[Q[ [ k ] ] 10ˆ(k−1), {k , n } ] ] ; x0 = 11234; y0 = 52342; FastMultiplication [ x0 , y0]==x0∗y0 The procedures Fourier and InverseFourier are implemented already in Mathematica Here are emulations showing what they do: X={4 ,2 ,3 ,2 ,1}; n =Length [X] ; InverseFourier [X] f = Sum[X[ [ k ] ] t ˆ(k−1),{k , n } ] ; N[ Table [ f /. t −> Exp[−I 2 Pi k/n ] ,{ k ,0 , n−1}]]/ Sqrt [ n ] N[ ( Table [Exp[ I 2Pi k l /n ] ,{ k ,0 , n−1},{ l ,0 , n−1}]/Sqrt [ n ] ) .X] Fourier [X] 2. Data structures 2.1. Information is commonly represented in the form of vectors or matrices. This is sometimes not obvious as data can be complicated. Still, we usually get away with matrices. For example, if we have names linked to addresses and telephone numbers, we can make a spread sheet A(i, j), where A(i, 1) is the name and A(i, 2) is the address and A(i, 3) is the telephone number. In a relational database, information is stored in tables as matrices containing records as rows and attributes as columns. 2.2. Data can also be stored more geometrically, especially in the form of a graph. A special case is the hierarchical database in which the graph is a tree, the Khipu knot encoding used in the Incan empire is an example of a hierarchical database. It is important to note however that also geometric information like a graph can be stored as part of a relational data base. A graph with nodes can be encoded with an adjacency matrix A(i, j) defined as A(i, j) = 1 if i and j are connected and A(i, j) = 0 else.
  • 3. Figure 1. Khipu from the Inka period. Image Source: Museo Chileno De Arte Precolombino. 3. Media 3.1. Multimedia like images, sound or movies are stored in vector or matrix form. An image is an array of pixels, a sound is an array of amplitudes, a movie is given by an array of pictures and a sound. 3.2. Let us look at a color image A: It is a matrix where each entry A(i, j) contains three numbers (r, g, b), where r, g, b are red, green and blue color values. Even so this is a rectangular array of pixels, where each pixel is a vector of numbers, this can be written as a single vector. 3.3. A sound file consists of two vectors (l, r), where l is the left channel and r is the right channel. Each entry can be a signed integers from −127 to 128. A movie can be seen as a vector of pictures. It is a curve in the large space of all pictures. Figure 2. 6 Frames from the Movie Samsara (2011). Each frame is a 360 x 854 matrix, where each pixel has a Red,Green and Blue value.
  • 4. Linear Algebra Applications 4. Networks 4.1. A graph G = (V, E) consists of a collection of nodes V which are connected by edges collected in E. Graphs in which the direction of the edges matter are also called digraphs. If one says graph, one usually does not specify directions. A graph can be encoded as a matrix A, the adjacency matrix of A. It is defined as A(i, j) = 1 if i is connected to j and A(i, j) = 0 else. This matrix is self-adjoint, A = AT . Therefore, the eigenvalues of A are real. 4.2. The analogue of the Laplacian in calculus is the matrix L = B − A, where B = Diag(d1, · · · , dn) is the diagonal matrix containing the vertex degrees of B in the diagonal. The matrix L always has the eigenvalue 0, with eigenvector [1, 1, · · · , 1]. If the graph is connected, the rest of the eigenvalues are positive. They are the fre- quencies one can hear, when one hits the graph. The eigenvectors tell something about the distribution of electrons if the graph represents a molecule. In the case of circular graphs, we need the same mathematics than for the fast multiplication of integers. The circle is closed. Figure 3. Examples of networks. Oliver Knill, knill@math.harvard.edu, Math 121, Harvard College, 11/27/18