cs209 lab9
http://www.maths.nuigalway.ie/~gettrick/teach/cs209/l9.html
-
For this lab you should submit all source code (PYTHON
files), and the result(s) of running the program on (a few)
test cases.
The source code must
be well presented (indenting, spaces, reasonable variable/function names,
etc.) and must include comments (as a rough guideline - aim to have nearly as
many comments as lines of code).
-
The above material should be uploaded to BLACKBOARD
before
the deadline of 5pm
Monday 3rd. April 2017. You will lose 20% for each day
(or part of day) the lab is late. (In BLACKBOARD, you should attach your
PYTHON program under "Attach File" in the section "2. Assignment Materials".
If you are including anything other than PYTHON code, e.g. answers to
questions, etc, it can be cut/pasted in to "Submission" under "2.
Assignment Materials".)
If any of this is unclear, you should ask the Teaching Assistant in the lab.
-
Plagiarism (the unattributed copying of work from other sources
(internet, fellow students,....)) will not be tolerated. Please see
http://www.nuigalway.ie/engineering/documents/plagiarism_guide_students
_v4.pdf. You risk getting zero for your lab if it is found to be
plagiarized.
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
-
The total number of individual number multiplications necessary in your solution.
-
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:
- [10,120,35,20,40]
- [4,25,10,20,80,170,24,20,15]
- [6,10,6,40,36,30,6,98,16,20,6,38,5,30]
and submit these three answers.
©
NUI, Galway