Question
Program the following algorithms that we covered in the class: a. Classical matrix multiplication b. Divide-and-conquer matrix multiplication c. Strassen's matrix multiplication You can use
Program the following algorithms that we covered in the class: a. Classical matrix multiplication b. Divide-and-conquer matrix multiplication c. Strassen's matrix multiplication You can use either Java, or C++ for the implementation. The objective of this project is to help student understand how above three algorithms operates and their difference in run-time complexity (average- case scenario). The project will be divided into three phases to help you to accomplish above tasks. They are Part 1: Design and Theoretical analysis, Part 2: Implementation, and Part 3: Comparative Analysis. This project will ask student to conduct the matrix multiplication on the numeric data type. You can implement the above three algorithms in your choice of data structures based on the program language of your choice. Note that you always try your best to give the most efficient program for each problem. Let the matrix size be n x n. Carry out a complete test of your algorithms with n = 2, 4, 8, 16, 32, 64, 128, 256, ... (up to the largest size of n that your computer can handle). The size of the input will be limited in the power of 2. They are 2, 4, 8, 16, 32 up to 2k where 2k is the largest size of the input that your computer can handle or your program might quit at size of 2k due to running out of memory. The reason for the power of 2 is to ease the programming component of the assignment. Submission Instructions: After the completion of all three parts, Part 1, Part 2 and Part 3, submit (upload) the following files to Canvas: three program files of three algorithms or one program file including all three algorithms (your choice of programming language with proper documentation) this document in pdf format (complete it with all the
2 Part 1: Design & Theoretical Analysis (30 points) a. Complete the following table for theoretical worst-case complexity of each algorithm. Also need to describe how the worst-case input of each algorithm should be. Algorithm theoretical worst-case complexity describe the worst-case input Classical matrix multiplication
3 c. Design the program correctness testing cases. Design at least 10 testing cases to test your program, and give the expected output of the program for each case. We prepare for correctness testing of each of the three programs later generated in Part 2. Testing case # Input Expected output Classical matrix multiplication ( if CORRECT output from your program) Divide-and- conquer matrix multiplication ( if CORRECT output from your program) Strassen's matrix multiplication ( if CORRECT output from your program) 1
4 Part 2: Implementation (35 points) a. Code each program based on the design (pseudocode or flow chart) given in Part 1(b).
5 Part 3: Comparative Analysis (35 points) a. Run each program with the designed randomly generated input data given in Part 1(d). Generate a table for all the experimental results as follows. Input Size n Average time (Classical matrix multiplication) Average Time (Divide-and-conquer matrix multiplication) Average Time (Strassen's matrix multiplication) 2
6
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started