Question: USE JAVA!! AI IS PORHIBITED! PLEASE DONT USE AI TO ANSWER THIS PROBLEM Problem 2 : Compare between the brute force implementation of matrix multiplication
USE JAVA!! AI IS PORHIBITED! PLEASE DONT USE AI TO ANSWER THIS PROBLEM
Problem :
Compare between the brute force implementation of matrix multiplication and the Strassen's Algorithm.
Analyze theoretically how Strassen's Algorithm reduces the time complexity and is better than the direct divide and conquer approach and the brute force approach.
Explain how this algorithm applies divide, transform and conquer.
Implement Strassen's algorithm as a function called strassenmatrixmultiply that takes two matrices, where kindots and returns their multiplication.
Write the following helper functions:
a matrixadd: Takes matrices & returns their addition.
b matrixsubtract: Takes matrices & returns their subtraction.
c Matrixdisplay: Takes a matrix & prints it on the screen.
Hint: You can represent matrices as vectors or d arrays.
Compare between the brute force and the Strassen's implementation by calculating the number of multiplications for different npowers of sizes of randomly initialized matrices. Save the results in an excel file.
Plot the curve to represent the difference between both implementations.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
