Lecture+20--Partial+pivoting

Lecture+20--Partial+pivoting - Operation Count Important...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Operation Count Important issue for a large matrix Cramers rule: Using expansion by minors: ( n+1)! M/D; Using Gauss elimination for Determinants: O ( n4/3 ) M/D Gauss elimination routine uses on the order of O ( n3/3 ) operations Back-substitution uses O ( n2/2 ) n (n+1)! n3/3 10 3628800 333 20 2.4329E+18 2667 40 8.1592E+47 21333 Cramer Why there are 2 n 3 /3 Operations? Total operation counts for elimination stage = 2 n 3 /3 + O ( n2 ) Total operation counts for back substitution stage = n 2 + O ( n ) i(i-1) = (n3 n )/3 2nd row 3rd row nth row 2nd to nth col . + Outer Loop Inner Loop / * & /- 1 n i = k i flops flops 1 2 ( 1) ( 1)( 1) n n n n n -- + 2 3 ( 2)( 1) ( 2)( ) n n n n n --- 1 ( )( 1) ( )( 2) k k n n k n k n k n k + -- +-- + 1 (1)(2) (1)(3) n n n- Operation Count Number of flops (floating-point operations) for Naive Gauss elimination Computation time increase rapidly with n Most of the effort is incurred in the elimination step Improve efficiency by reducing the elimination effort % . . . . % . % . 85 99 10 67 6 10 68 6 1000000 10 67 6 1000 53 98 666667 681550 10000 671550 100 58 87 667 805 100 705 10 n Eliminatio to Due Percentage 3 2n Flops Total on Sbustituti Back n Eliminatio n 8 6 8 3 Partial Pivoting Problems with Gauss elimination division by zero round off errors ill conditioned systems Use Pivoting to avoid this Find the row with largest absolute coefficient below the pivot element Switch rows (partial pivoting) complete pivoting switch columns also (rarely used) Round-off Errors A lot of rounding with more than n3/3 operations More important - error is propagated For large systems (more than 100 equations), round- off error can be very important (machine dependent) Ill conditioned systems- small changes in coefficients lead to large changes in solution Round-off errors are especially important for ill- conditioned systems Ill-conditioned System 2x1 x2 = 3 2.1x1 x2 = 3...
View Full Document

Page1 / 21

Lecture+20--Partial+pivoting - Operation Count Important...

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

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