hw2_2011_04_07_02_solutions

# hw2_2011_04_07_02_solutions - EE263 S Lall 2011.04.07.02...

This preview shows pages 1–3. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: EE263 S. Lall 2011.04.07.02 Homework 2 Solutions Due Thursday 4/14 at 5 PM on the filing cabinets at the second floor of Packard. 1. Solving triangular linear equations. 42085 Consider the linear equations y = Rx , where R ∈ R n × n is upper triangular and invertible. Suggest a simple algorithm to solve for x given R and y . Hint: first find x n ; then find x n- 1 (remembering that now you know x n ); then find x n- 2 (remembering that now you know x n and x n- 1 ); etc. Remark: the algorithm you will discover is called back substitution . It requires order n 2 floating point operations (flops); most methods for solving y = Ax for general A ∈ R n × n require order n 3 flops. Solution. Suppose that y = y 1 y 2 . . . y n , R = r 11 r 12 ··· r 1 n r 22 ··· r 2 n . . . . . . . . . ··· r nn , x = x 1 x 2 . . . x n . Consider the linear equation corresponding to the last ( n th) row of R , i.e. , y n = r nn x n . If r nn negationslash = 0 we can simply solve for x n to get x n = y n /r nn . If r nn = 0 then two cases may occur. Either y n negationslash = 0 which implies that the set of linear equations is inconsistent or y n = 0 which implies that the choice of x n is arbitrary. In any case, r nn = 0 means that a unique solution does not exist for the set of linear equations. Now consider the linear equation corresponding to the ( n − 1)th row of R , i.e. , y n- 1 = r ( n- 1)( n- 1) x n- 1 + r ( n- 1) n x n and for r ( n- 1)( n- 1) negationslash = 0 we get x n- 1 = 1 r ( n- 1)( n- 1) ( y n- 1 − r ( n- 1) n x n ) with x n found from the previous step. Again if r ( n- 1)( n- 1) = 0 it can be said that the system of linear equations has no unique solution. In general, if x n , x n- 1 , . . . , x i +1 are known, x i can be derived from the linear equation corresponding to the i th row of R as (assuming r ii negationslash = 0) x i = 1 r ii ( y i − r i ( i- 1) x i- 1 − r i ( i- 2) i x i- 2 − ··· − r in x n ) . Therefore, the x i ’s can be computed recursively for i = n, n − 1 , . . . , 1 by back substitution . This suggests the following simple algorithm: i := n ; while i ≥ 1 if r ii negationslash = 0 x i := 1 r ii parenleftBig y i − ∑ n j = i +1 r ij x j parenrightBig ; else unique solution does not exist; break ; end i := i − 1; end 1 EE263 S. Lall 2011.04.07.02 Note that whenever r ii = 0 a solution does not exist or the solution is not unique. We know that the condition for a (unique) solution to exist is det R = producttext n i =1 r ii negationslash = 0 which also implies that none of the diagonal elements r ii of R to be zero....
View Full Document

## This note was uploaded on 07/28/2011 for the course EE 263 taught by Professor Boyd,s during the Summer '08 term at Stanford.

### Page1 / 6

hw2_2011_04_07_02_solutions - EE263 S Lall 2011.04.07.02...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online