Lecture 17/18: Dynamic Programming - Matrix Chain Parenthesization
COMS10007 - Algorithms
- Dr. Christian Konrad
01.04.2019 and 02.04.2019
- Dr. Christian Konrad
Lecture 17/18: Matrix Chain Parenthesization 1 / 18
Lecture 17/18: Dynamic Programming - Matrix Chain Parenthesization - - PowerPoint PPT Presentation
Lecture 17/18: Dynamic Programming - Matrix Chain Parenthesization COMS10007 - Algorithms Dr. Christian Konrad 01.04.2019 and 02.04.2019 Dr. Christian Konrad Lecture 17/18: Matrix Chain Parenthesization 1 / 18 Matrix Multiplication Problem:
Lecture 17/18: Matrix Chain Parenthesization 1 / 18
1 Input: Matrices A, B with A.columns = B.rows 2 Output: Matrix product A × B
Lecture 17/18: Matrix Chain Parenthesization 2 / 18
Lecture 17/18: Matrix Chain Parenthesization 3 / 18
Lecture 17/18: Matrix Chain Parenthesization 4 / 18
1 Input: A sequence (chain) of n matrices A1, A2, A3, . . . , An 2 Output: The product A1 × A2 × A3 × · · · × An
Lecture 17/18: Matrix Chain Parenthesization 5 / 18
Lecture 17/18: Matrix Chain Parenthesization 6 / 18
1 Input: A sequence (chain) of n matrices A1, A2, A3, . . . , An 2 Output: A parenthesization of A1 × A2 × A3 × · · · × An that
Lecture 17/18: Matrix Chain Parenthesization 7 / 18
1 A1 × ((A2 × A3) × A4) 2 A1 × ((A2 × (A3 × A4)) 3 (A1 × A2) × (A3 × A4) 4 ((A1 × A2) × A3) × A4 5 (A1 × (A2 × A3)) × A4
Lecture 17/18: Matrix Chain Parenthesization 8 / 18
Lecture 17/18: Matrix Chain Parenthesization 9 / 18
Lecture 17/18: Matrix Chain Parenthesization 10 / 18
Lecture 17/18: Matrix Chain Parenthesization 11 / 18
Lecture 17/18: Matrix Chain Parenthesization 12 / 18
Lecture 17/18: Matrix Chain Parenthesization 13 / 18
Lecture 17/18: Matrix Chain Parenthesization 14 / 18
Lecture 17/18: Matrix Chain Parenthesization 15 / 18
Lecture 17/18: Matrix Chain Parenthesization 15 / 18
Lecture 17/18: Matrix Chain Parenthesization 15 / 18
Lecture 17/18: Matrix Chain Parenthesization 15 / 18
Lecture 17/18: Matrix Chain Parenthesization 15 / 18
Lecture 17/18: Matrix Chain Parenthesization 15 / 18
Lecture 17/18: Matrix Chain Parenthesization 15 / 18
Lecture 17/18: Matrix Chain Parenthesization 15 / 18
Lecture 17/18: Matrix Chain Parenthesization 15 / 18
Lecture 17/18: Matrix Chain Parenthesization 15 / 18
Lecture 17/18: Matrix Chain Parenthesization 15 / 18
Lecture 17/18: Matrix Chain Parenthesization 15 / 18
Lecture 17/18: Matrix Chain Parenthesization 15 / 18
Lecture 17/18: Matrix Chain Parenthesization 15 / 18
Lecture 17/18: Matrix Chain Parenthesization 16 / 18
Lecture 17/18: Matrix Chain Parenthesization 17 / 18
Lecture 17/18: Matrix Chain Parenthesization 17 / 18
Lecture 17/18: Matrix Chain Parenthesization 18 / 18