Lecture20110120_2

Lecture20110120_2 - C 2 K 1 = 2 C 1 But we have K 1 rows....

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Operation Count for Forward Substitution x 1 = b 1 l 11 1 flop 2 = 2 K 2 1 22 3 = 1 + 2 flops 3 = 3 K 32 2 K 31 1 33 5 flops j = K > i = 1 K 1 ji jj 1+2(j-1) flops n 1 C 2 K 1 Total: 2 C 2 K 1 2 = 2 Similarly (excercise), backward substitution is also O 2 Now we've solved Lx = and Ux = What about a general Ax = (1) Do this by transforming (1) into an equivalent system, = ~ using Gaussian elimination. Consider the augmented matrix (2) a 11 ... 1 1 ... ... ... ... n1 ... nn We transform (2) into an upper triangular system by elementary row operations [In floating point, avoid multiplying rows by a constant, this could lead to round-off errors] Example Solve the following for 1 1 2 3 4 5 6 7 8 1 2 3 = 10 11 12 5 1 1 2 10 3 4 5 11 6 7 8 12 1 1 2 10 0 1 K 1 K 19 0 1 K 4 K 48 1 1 2 10 0 1 K 1 K 19 0 0 K 3 K 29 0 3 = K 29 K 3 = 29 3 , 2 = K 28 3 , 1 = 0 Notes i) sometimes we need to pivot (permute) ii) GE works for some singular systems. Operation Count for Gaussian Elimination [Assume no pivoting for now] to zero column k = 1 below the main diagonal, ie, for rows = 2,. .
Background image of page 1

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

View Full DocumentRight Arrow Icon
c i1 = K a 11 1 flop ij 0 1 = C 1 j for = 2,. .., n 2 K 1 flop b i / 1 = C 1 2 flop Sub total for one row 3
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: C 2 K 1 = 2 C 1 But we have K 1 rows. Sub total K 1 2 C 1 (to zero column one) To zero column k = 2 (below the diag), for for ros = 3,. .., i2 = K 1 22 1 1 flop 1 / 2 = 1 C 2 for = 3,. .., 2 K 2 flop 1 / 2 = 1 C 2 1 2 flop Sub total for column two K 1 2 K 1 flop To zero column takes K 2 K 2 C 3 flop Gaussian elimination (no pivoting) of an # system takes: > l = 1 K 1 K 2 K 2 C 3 = 2 3 3 C 1 2 2 K 7 6 Back Sub. (from before) costs 2 TOTAL to solve Ax = is 2 3 3 C 3 2 2 K 7 6 ~ O 3 HWK 1) 4x4 case 2a) (for A 2 ) 3)...
View Full Document

Page1 / 2

Lecture20110120_2 - C 2 K 1 = 2 C 1 But we have K 1 rows....

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online