Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. (10 pts) Write a script that will read the matrix A from the file matrix. atx using the function scipy. do. mmread. This function

image text in transcribed
image text in transcribed
1. (10 pts) Write a script that will read the matrix A from the file matrix. atx using the function scipy. do. mmread. This function will store the matrix in a sparse format. For more information about sparse matrices look the module scipy. sparse. For your convenience try to convert the matrix into NumPy array- 2. (30 pts) Write a function cholesky and bandcholeaky implementing the Cholesky and the banded Cholesky factorizations respectively. 3. (20 pts) Use your functions to factorize the matrix A. Compare your functions with PYTHON 's function numpy . linalg - cholesky. You may need to change to format of the matrix though. 4. (20 pts) Write functions solve and bandsolve to solve the linear system Ar = & with by = 2joy. To verify the accuracy of the results, compute the norm of the error [2 - 2| where f is the numerical solution while a is the exact solution, Le. r, = 1 for all i = 1. ... .n. You may use any norm among the norms II . /1. I - 12. | - - 5. (30 pts) Improve your code by using symmetric band storage. Specifically, taking advantage of the symmetry and the banded structure of the matrix, store the main diagonal and all the left diagonals in the rows of a new p x n (dense) matrix As using the formula: A(1+i- jj) = A(i.j), for jig min(n,j + p). For example, when n = 5 and p = 2 the matrix is being stored in the 3 x 5 matrix Ay: IED OSE 6. (10 pts) Compare the efficiency of all these methods. Among other Indicators present the CPU time required for each implementation

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Discrete Mathematics Mathematical Reasoning And Proof With Puzzles, Patterns, And Games

Authors: Douglas E Ensley, J Winston Crawley

1st Edition

1118226534, 9781118226537

More Books

Students also viewed these Mathematics questions

Question

1. Avoid conflicts in the relationship

Answered: 1 week ago

Question

1. What will happen in the future

Answered: 1 week ago