Introduction to Algorithms
Introduction to Algorithms
3rd Edition
ISBN: 9780262033848
Author: Thomas H. Cormen, Ronald L. Rivest, Charles E. Leiserson, Clifford Stein
Publisher: MIT Press
Question
Book Icon
Chapter 28, Problem 1P
Program Plan Intro

To find the LU decomposition of Matrix A given as:

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  1

Expert Solution
Check Mark

Explanation of Solution

LU Decomposition of A: The LU Decomposition of A means to decompose a matrix A into a product of lower triangular matrix and upper triangular matrix.

In Decomposition of A the input is lower triangular matrix and output is upper triangular matrix obtain by applying following row operation on A.

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  2

Here,

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  3

and

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  4

And lower triangular matrix is given by

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  5

Consider a matrix,

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  6

Initially calculate the value of all entries other than 0 and 1 of equation (1).

Apply the row operation to the matrix A to find the upper triangular matrix U

Calculate the value of Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  7

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  8(2)

Calculate the value of Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  9,

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  10(3)

Calculate the value of Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  11

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  12(4)

Calculate the value of Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  13

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  14(5)

Apply row transformation Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  15to find upper triangular matrix.

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  16

Similarly calculate the value of,

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  17…… (6)

Calculate the value of,

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  18…… (7)

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  19…… (8)

Apply row transformation Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  20to find upper triangular matrix.

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  21

Calculate the value of,

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  22(9)

Calculate the value of,

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  23(10)

Apply row transformation Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  24to find upper triangular matrix.

The upper triangular matrix is-

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  25

The lower triangular matrix is-

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  26

Hence, the LU decomposition of A is-

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  27

Program Plan Intro

To solve the equation Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  28by using forward and backward substitution.

Expert Solution
Check Mark

Explanation of Solution

Consider an expression-

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  29

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  30

To solve this, the following steps are followed-

Express Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  31in the Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  32decomposition form-

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  33

Let for any vector, the equation to be solved is. This is done by following steps:

• LUP Decomposition

• Forward Substitution

Let Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  34

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  35

After solving, the following value of Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  36is obtained-

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  37

• Backward Substitution

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  38

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  39

Solving for Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  40

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  41

Program Plan Intro

To find the inverse of A.

Expert Solution
Check Mark

Explanation of Solution

Inverse of a matrix Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  42is a matrix Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  43such that Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  44where Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  45is an identity matrix.

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  46

To solve this, the following steps are followed-

• Forward Substitution

Let Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  47

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  48

After solving, the following value of Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  49is obtained-

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  50

Similarly, other columns can also be obtained in the following way-

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  51Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  52Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  53

Inverse of the matrix can be formed by using the five results which comprises the columns of the inverse matrix.

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  54

• Backward Substitution

Now find Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  55from Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  56

Solving for Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  57

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  58

Program Plan Intro

To show how, for any Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  59symmetric positive-definite, tridiagonal matrix Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  60and any n-vector Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  61to solve the equationIntroduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  62

Expert Solution
Check Mark

Explanation of Solution

Inverse of a matrix Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  63is a matrix Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  64such that Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  65where Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  66is an identity matrix.

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  67

To solve this, the following steps are followed-

• Forward Substitution

Let Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  68

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  69

After solving, the following value of Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  70is obtained-

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  71

Similarly, other columns can also be obtained in the following way-

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  72Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  73Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  74

Inverse of the matrix can be formed by using the five results which comprises the columns of the inverse matrix.

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  75

• Backward Substitution

Now find Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  76from Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  77

Solving for Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  78

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  79

Program Plan Intro

To show that, for any Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  80non-singular, tridiagonal matrix.

Expert Solution
Check Mark

Explanation of Solution

Forward and Backward substitution take the same amount of operations as in the previous case. The only different case is the decomposition step. In this case, the decomposition is done into unit lower triangular and upper triangular matrix, and. The pivoting is done by the swapping rows such that the highest element of a column comes to the diagonal place. The decomposition looks like the following:

  Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  81

Here, Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  82loses the tri-diagonal property of matrixIntroduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  83but it is still a banded matrix. The essence to solve this is similar to the tri-diagonal case. The time complexity now depends on the width of the band or the distance between the farthest diagonals of the resultant matrix. Matrix becomes wider than the upper triangle of the initial matrix. The final complexity becomes

Hence the time complexity of LUP decomposition algorithm will be Introduction to Algorithms, Chapter 28, Problem 1P , additional homework tip  84

Want to see more full solutions like this?

Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
Students have asked these similar questions
Plot 1000 two-dimensional vectors obtained from the Mersenne twister in the Julia programming language.
Determined the eigenvalues of the matrix (A) given below?     A=[1  0  4; 0  4  0; 3  5  -3]
Construct the system for a free cubic spline for the following data, and solve it using MATLABto construct the polynomials. Write out the linear system, and the final si(x) polynomials. x -0.5 -0.25 0 f(x) -0.0247500 0.3349375 .10100001