For proof-based questions, write your answers on your own papers. For pro-
gramming questions, submit your codes using MATLAB Grader. Hand in your homework
on Wednesday, October 6 in class.
1. Write a MATLAB function to perform the LU factorization. Your input should be a non singular n ×n matrix A. Your output should be a lower triangular matrix L and an upper triangular matrix U such that A = LU. See detailed description in MATLAB Grader.
2. We discussed in class that Gaussian Elimination/LU factorization is an O(n3) algorithm.
This means that for a n ×n matrix, LU factorization needs approximately n3 flops. The top supercomputer today is Supercomputer Fugaku in Japan. This machine can execute, theoretically, 4.42 ×1017 flops per second.
a. How long does it take approximately for Supercomputer Fugaku to com- plete a LU factorization for a square matrix with n = 108? How about n = 109, n = 1010?
b. Suppose we have an O(n) algorithm to solve the linear system Ax = b, how long does it take for Supercomputer Fugaku to solve the system with size n = 108? How about n = 109, n = 1010?
Remark 1. From the results you should see why we need fast algorithms.