Hi,(adsbygoogle = window.adsbygoogle || []).push({});

I am studying Matrix chain Multiplication to find out the optimal way of multiplying a series of matrices so that we can reduce the number of multiplications. I have got this example from the book which multiplies the matrices having dimensions given below:

A1 30 * 35

A2 32 * 15

A3 15 * 5

A4 5 * 10

A5 10 * 20

A6 20 * 25

From these matrices, it creates the 2 tables:

The algorithm is given below:

MTM(A, s, I, j)

If j> i

Then Xß MCM(A, s, I, s[I,j])

Y ß MCM(A, s, s[I,j] + 1, j)

return MCM (X, Y)

else return Ai

They are invoking the algorithm by:

MCM(A, s, 1, 6)

Can some body guide me what is the value of A & s?

After that i want to find out the best way of ordering these matrices for multiplication. Some body please guide me.

Zulfi.

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Matrix Chain Multiplication: Optimal way of multiplying

Have something to add?

Draft saved
Draft deleted

Loading...

Similar Threads - Matrix Chain Multiplication | Date |
---|---|

WaveGrid - Non-equilibrium Emergence Sandbox | Jan 22, 2018 |

How, exactly, are chained assignments processed? | Jan 2, 2018 |

Importing a matrix into Numpy | Oct 3, 2017 |

Reading matrix elements from a file in Fortran77 | Sep 18, 2017 |

Matrix times vector in Fortran | Jul 28, 2017 |

**Physics Forums - The Fusion of Science and Community**