5.3 MCM
5.3 MCM
UNIVERSITY INSTITUTE OF
ENGINEERING
COMPUTER SCIENCE ENGINEERING
Bachelor of Engineering
Design and Analysis of
Algorithms(CST-311/ITT-311)
Outcome:
• Student will understand
Matrix Chain Multiplication using dynamic
programming.
Example
Or(A1,A2,A3.............An-1) (An)
• It can be observed that after splitting the kth matrices, we are
left with two parenthesized sequence of matrices: one consist
'k' matrices and another consist 'n-k' matrices.
Algorithm
Example
REFERENCES
Text books:
•Cormen, Leiserson, Rivest, Stein, “Introduction to Algorithms”, Prentice Hall of
India, 3rd edition 2012. problem, Graph coloring.
Websites:
• https://www.javatpoint.com/matrix-chain-multiplication-example
Summary
Dynamic programming: