Hey All,
The mmq ( Matrix Multiplication Question ) is worth 10 marks which is somewhere about what I got last time so I am thinking sweet can do one question in 50mins
and do just as good....wonder what order that is...lols.
That thought aside. Please try an practice this question, yeah its 10marks but you really have to WORK for it.
By following the algorithm in the hand out he gave us you basically work out the diagonals.
Usually he asks to show working on how you go the table. So what I suggest is that for each entry you do something like this:
C[1 4]
r1 r2 r5 //you can ignore these r's I just put them there so can work you the mpn value quickly
M1 | M2 M3 M4 = 0 + C[2 4 ] + r1*r2*r3 = whatever1
r1 r3 r3 r5
M1 M2 | M3 M4 = C[1 2] + C[3 4 ] + r1*r3*r5 = whatever2
r1 r4 r5
M1 M2 M3 | M4 = C[1 3] + 0 + r1*r4*r5 = whatever3
=> min(whatever1,whatever2,whatever3) = the ans for C[1 4]
Then move to the next entry. As you can see this will take a while. I usually draw the table first, fill in the 0's for the i = j stuff. Of course you will have to write out the r array so (labeling the entries 1 to n is not a bad idea either makes working out r1*3*r5 say easier). Then start with D0 and move on showing the working for each entry similar to above. Other than this have to take your time multiplying.
I suggest doing this question first since its worth the most marks. However its longer but does not require too much figuring out it usually only comes one way so some time is saved there.
Humm... wonders if there is a dynamic programming solution to choosing the order in which to do questions in an exam? lolz
Kris
--
If you want it, then go get it!