From what I understand, Strassen's method for multiplying Matrices should be the fastest... but the Divide & Conquer method is clearly the fastest in my testing... Am I doing something wrong? Or is this correct?
The instructions were: "The total time spent is then divided by the number of times the algorithm is performed to obtain the time taken to solve the given instance"
So I just have an individual "counter++" in every method and divide the time "recorded / counter++"
So far here are my times: (in order top/down: classic, divide & conquer, strassen) (size = size of matrix)
size 2
Time Elapsed:8660 nano-seconds
Time Elapsed:3849 nano-seconds
Time Elapsed:5377 nano-seconds
size 4
Time Elapsed:24864 nano-seconds
Time Elapsed:3080 nano-seconds
Time Elapsed:5229 nano-seconds
size 8
Time Elapsed:125435 nano-seconds
Time Elapsed:2920 nano-seconds
Time Elapsed:5196 nano-seconds
size 16
Time Elapsed:867149 nano-seconds
Time Elapsed:1559 nano-seconds
Time Elapsed:2853 nano-seconds
size 32
Time Elapsed:5191721 nano-seconds
Time Elapsed:972 nano-seconds
Time Elapsed:1722 nano-seconds
size 64
Time Elapsed:8155785 nano-seconds
Time Elapsed:874 nano-seconds
Time Elapsed:1696 nano-seconds
SAMPLE OUTPUT Here's an example of my output for a matrix of size 4:
1st Random Generated Matrix:
10 57 33 70
6 12 38 70
20 41 65 98
83 0 31 73
2nd Random Generated Matrix:
11 70 54 79
2 51 38 71
27 53 37 86
48 87 20 41
Classic Multiplication Matrix:
4475 11446 5327 10545
4476 9136 3586 7464
6761 15462 7003 14099
5254 13804 7089 12216
Time Elapsed:21232 nano-seconds
Divide and Conquer Multiplication Matrix:
4475 11446 5327 10545
4476 9136 3586 7464
6761 15462 7003 14099
5254 13804 7089 12216
Time Elapsed:3042 nano-seconds
Strassen Multiplication Matrix:
4475 11446 5327 10545
4476 9136 3586 7464
6761 15462 7003 14099
5254 13804 7089 12216
Time Elapsed:5303 nano-seconds