Home / Expert Answers / Advanced Math / lu-decomposition-flop-count-matlab-suppose-a-has-a-lu-decomposition-we-can-use-this-decomposition-pa613

(Solved): lu decomposition, flop count, matlab Suppose A has a LU decomposition. We can use this decomposition ...



lu decomposition, flop count, matlab
Suppose \( A \) has a LU decomposition. We can use this decomposition to solve linear systems in a slightly more efficient wa
\( x(1)=L(1, n) / L(1,1) ; \% \) Solve first equation of augmented matrix.
for \( i=2: m \% i \) counts up from 2 to \( m \)
Suppose has a LU decomposition. We can use this decomposition to solve linear systems in a slightly more efficient way. In particular, given we can use the LU decomposition of to arrive at Now we introduce an intermediate vector . This intermediate vector divides our method of solving the linear system into two steps: 1. Solve for by forward substitution. 2. Solve for by backward substitution. "What is forward substitution?" you may ask. It is precisely the same method as backward substitution, except now your coefficient matrix is lower-triangular and so you start by solving the first equation in your linear system and work down the hierarchy of equations. Here's a MATLAB code that performs forward substitution on a lower-triangular, augmented matrix: \% Forward substitution on a by lower triangular matrix L. \% Initialize column vector of unknowns (to be updated). Here, and are real numbers that are much smaller in size than but much larger in size than . Solve first equation of augmented matrix. for counts up from 2 to in intervals of 1 . SUM for SUM SUM ; end Updates the ith entry of . end is the solution of the linear system. a. Compute the flop count of forward substitution. Please show the major steps of your calculation. b. Compute the flop count of solving the linear system using the LU decomposition of . (This will be the sum of flops for both the forward and backward substitution steps.) Please use results from your previous homework. c. Based on your answers to (b) and previous homework questions, which of the following is more expensive: solving a linear system by Gaussian elimination or solving a linear system by LU decomposition, assuming the decomposition is known ahead of time? Remark: Of course, the LU decomposition is not usually known ahead of time, and it requires just as many flops to compute as it does to perform Gaussian elimination. However, once you've computed the LU decomposition once, you know it for all time. Thus, if you happen to be solving for several different , you can use Gaussian elimination to determine the LU decomposition and then use this decomposition to solve your systems. Doing so requires fewer flops than using Gaussian elimination to solve each system.


We have an Answer from Expert

View Expert Answer

Expert Answer


a. The flop count of forward substitution can be calculated by analyzing the operations performed in each iteration of the loop. The main operations p
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe