Question: Part 1: Matrix Multiplication. (50) 1. Use the code makematrix.cpp (included with the assignment) to create matrices of different sizes and sparsity. You can assume



Part 1: Matrix Multiplication. (50) 1. Use the code makematrix.cpp (included with the assignment) to create matrices of different sizes and sparsity. You can assume the matrices to be square. Compare the time to multiply two matrices using (i) standard matrix multiplication O(n3); (ii) Strassen's method and (iii) sparse matrix multiplication. Question a. Experiment 1. Change the matrix sizes as follows 20, 30, 100, 500, 1000 keeping sparsity=0 Experiment 2. For matrix size =20 change sparsity=0, 10, 50, 80 Experiment 3. For matrix size =500 change sparsity=0, 10, 50, 80 For each experiment test all the three methods, on the set of matrices and show your results as histograms. (3*10=20) In 1-2 paragraphs discuss your findings (5) Question b. Develop and implement an algorithm that can take in the matrix dimensions and sparsity and identify the best method to use. Test your algorithm for a subset of matrices from experiments from Experiments 1-3. Explain your algorithm clearly in english and as a pseudocode (10) Provide some results of your algorithms and discuss the results in 1-2 paragraphs (5). // Makematrix.cpp // // // Created by Bhowmick, Sanjukta on 1/20/20. // #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
