Question: C++ or Python or C Given a unit lower triangular matrix L and an upper triangular matrix U. Write the forward and backward elimination solves

C++ or Python or C

Given a unit lower triangular matrix L and an upper triangular matrix U.

Write the forward and backward elimination solves (Ly = b and U x = y) assuming that L and U are stored in compressed sparse row (CSR) format. Estimate the cost of memory and operations. Lets say our test matrices are stored in adjacency list (in each row of the file we have three numbers) something like this (it is also .txt file):

row index, column index, and value

23 3 0.004

4 4 0.1078

7 4 0.0226

11 4 -0.006

But this file might have 25 or 50 rows.

Factor them into LD^{-1}L^T form, either using some library or implementing it yourself. Store the resulting unit triangular matrix L in CSR format (do not store the zeros).

The .txt file contains only the nonzero entries of the matrix. The data should give s.p.d. matrices.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!