lect06 - Lecture 6 Dynamic Programming Matrix-chain...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Lecture 6 Dynamic Programming
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Matrix-chain Multiplication tion. multiplica scaler of number the minimizes way that a in product the ze parenthesi fully , dimension has matrix , ,..., 2 , 1 for where matrices, of } ,..., , { chain a Given 2 1 1 2 1 n i i i n A A A p p A n i n A A A × = -
Background image of page 2
Fully Parenthesize )) )( (( ) )) ( (( products. zed parenthesi fully two of product or the matrix single a either is it if zed parenthesi fully is product A 4 3 2 1 4 3 2 1 A A A A A A A A
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Scalar Multiplications . is product matrix this do to tions multiplica scalar of number the Thus, ) ( Then ). ( matrix and ) ( matrix Consider 1 pqr b a AB b B r q a A q p q j r p jk ij jk ij = × = = × = ×
Background image of page 4
tions. multiplica scalar of numbers different give may products zed parenthesi fully Different # of scalar multiplications 3 2 0 2 1 0 3 2 1 3 2 1 3 1 0 3 2 1 ) ) (( )) ( ( p p p p p p A A A p p p p p p A A A + + e.g.,
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
ly. respective , and of products zed parenthesi fully optimal are they Then . and of products zed parenthesi fully two of product the is product zed parenthesi fully optimal Suppose 1 1 1 1 n k k n k k A A A A A A A A + + Step 1. Find recursive structure of optimal solution
Background image of page 6
. if
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 28

lect06 - Lecture 6 Dynamic Programming Matrix-chain...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online