Skip to content

Python or Mathematica. Using relationship between nested parentheses and triangulated polygon to improve runtime of DP on MCM

Notifications You must be signed in to change notification settings

thong3le/Speedup-Matrix-Chain-Multiplication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Matrix-Chain-Multiplication

Given n matrices M1, M2, ..., Mn of dimensions d1xd2, d2xd3, ..., dnxd(n+1). What is the optimal order, by multiply two matices at a time, to compute the product M1xM2xM3x...xMn?

Dynamic Programmming is a straight forward method to solve matrix chain multiplication problem. The algorithm is O(n^3) runtime. However, we can improve the runtime by studying the geometric representation for the problem. These properties can lead to an O(n^2) dynamic programming algorithm.

Users can use either Python or Mathematica.

About

Python or Mathematica. Using relationship between nested parentheses and triangulated polygon to improve runtime of DP on MCM

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published