gauss - 6x + 7y + 8z = 16 4x + 2y + 4z = 16 S=[7, 8, 4]...

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

View Full Document Right Arrow Icon
Week 9 - Gaussian elimination - Scaled partial pivoting
Background image of page 1

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

View Full DocumentRight Arrow Icon
Naive Gaussian Elimination Part 1: Eliminate all the lower coefficients in each column by subtracting a multiple of the diagonal element in the matrix.
Background image of page 2
Naive Gaussian Elimination [ ] 2 3 4 4 3 4 6 6 1 [ ] 2 3 4 0 -3 -4 6 6 1 [ ] 2 3 4 0 -3 -4 0 -3 -11 [ ] 2 3 4 0 -3 -4 0 0 -7 Done! -4 -6 -8 -6 -9 -12 0 3 4
Background image of page 3

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

View Full DocumentRight Arrow Icon
Naive Gaussian Elimination Part 2: Backwards substitute to get an answer.
Background image of page 4
Naive Gaussian Elimination Solve: x + y + z = 3 2x + 3y + z = 5 -x - 2y +3z = 4 [ ] 1 1 1 3 2 3 1 5 -1 -2 3 4 [ ] 1 1 1 3 0 1 -1 -1 0 0 3 6 z=2 , y=1, x=0
Background image of page 5

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

View Full DocumentRight Arrow Icon
Scaled Partial Pivoting Part 1: Use a special form of Gaussian elimination to get zeros below the diagonal Part 2: Back substitute like always
Background image of page 6
Scaled Partial Pivoting First, store the largest coefficient on each row in an array “S” 2x + 3y + 7z = 16 6x + 7y + 8z = 16 4x + 2y + 4z = 16 S=[7, 8, 4]
Background image of page 7

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

View Full DocumentRight Arrow Icon
Scaled Partial Pivoting Second, find the relatively largest coefficient of each row that isn't done 2x + 3y + 7z = 16
Background image of page 8
Background image of page 9

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

View Full DocumentRight Arrow Icon
Background image of page 10
Background image of page 11

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

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

Unformatted text preview: 6x + 7y + 8z = 16 4x + 2y + 4z = 16 S=[7, 8, 4] Max: [2/7, 6/8, 4/4] Scaled Partial Pivoting Third, swap the row found in step 2 with the row equal to the current column number and record the swap 2x + 3y + 7z = 16 6x + 7y + 8z = 16 4x + 2y + 4z = 16 4x + 2y + 4z = 16 6x + 7y + 8z = 16 2x + 3y + 7z = 16 L=[1, 2, 3] L=[3, 2, 1] Scaled Partial Pivoting Third, record the swap found in step 2 by keeping track of an “L” array 4x + 2y + 4z = 16 L=[1, 2, 3] 6x + 7y + 8z = 16 2x + 3y + 7z = 16 to L=[3, 2, 1] Scaled Partial Pivoting Fourth, do Gaussian elimination 2x + 3y + 7z = 16 6x + 7y + 8z = 16 4x + 2y + 4z = 16 2 3 7 16 6 7 8 16 4 2 4 16 [ ] [ ] 2 3 7 16 0 4 2 -8 4 2 4 16 [ ] 0 2 5 8 0 4 2 -8 4 2 4 16 Scaled Partial Pivoting Go back to step 2 until done! [ ] [ ] 0 0 4 12 0 4 2 -8 4 2 4 16 0 2 5 8 0 4 2 -8 4 2 4 16 S=[7, 8, 4] Max: [2/7, 4/8] L=[3, 2, 1]...
View Full Document

This note was uploaded on 10/21/2011 for the course CSCI 2031 taught by Professor Meyer during the Spring '08 term at Minnesota.

Page1 / 12

gauss - 6x + 7y + 8z = 16 4x + 2y + 4z = 16 S=[7, 8, 4]...

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

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