In order to obtain more accurate results, the algorithms should be tested with the same matrices of different sizes many times. The average runtime will be computed to obtain the runtime to solve the given instance.

computer science

Description

In order to obtain more accurate results, the algorithms should be tested with the same matrices of different sizes many times. The average runtime will be computed to obtain the runtime to solve the given instance. Let the matrix size be n x n. Carry out a complete test of your algorithms with n = 2, 4, 8, 16, 32, …, 2048. When n is getting bigger, the recursive methods can be slow to complete. Instead of base case size 1, we like to change the base case of recursive methods to sizes 4, 8 and 16. This simple trick will greatly improve the runtime of recursive methods. You will need to complete a result table that summarizes the average elapsed time (or runtime in milliseconds) of various test cases. You must use the given program matrix_multi_stud.java to complete the required algorithms (see requirements in the program). 


You will need to submit your source program with a result table below. Late submission will be accepted with a penalty of 10% per calendar day. I encourage discussion among students, but I expect each student to hand in original work. You are responsible for doing your own work and for ensuring that your work is protected from copying. The University’s policy on Academic Integrity will be enforced.

Instruction Files

Related Questions in computer science category