cs209 lab9


http://www.maths.nuigalway.ie/~gettrick/teach/cs209/l9.html




Consider again the matrix multiplication problem from lectures and the last lab. Write a PYTHON program which "solves" this problem using a greedy strategy. Your program should report both

  1. The total number of individual number multiplications necessary in your solution.
  2. The detailed instructions of which matrices should be multiplied in which order (of course - for n matrices - there should be n-1 steps in these instructions).
Run your program on the matrix dimensions:
  1. [10,100,5,30,10]
  2. [4,20,10,80,90,70,2,50,35]
  3. [6,20,6,20,6,20,6,20,6,20,6]
and submit these three answers.

© NUI, Galway