solving systems
- L. Olson
Department of Computer Science University of Illinois at Urbana-Champaign
1
solving systems L. Olson Department of Computer Science University - - PowerPoint PPT Presentation
solving systems L. Olson Department of Computer Science University of Illinois at Urbana-Champaign 1 goals for today . . . Identify why our basic GE method is naive: identify where the errors come from? division by zero, near-zero
Department of Computer Science University of Illinois at Urbana-Champaign
1
2
3
4
5
6
7
ε)
ε
8
9
* Rows completed in forward elimination. Rows to search for a more favorable pivot element. Row with zero pivot element
10
11
12
13
14
1jn |aij|
15
16
17
18
1
Initialize ℓ = [1, . . . , n]
2
Set s to be the max of rows
3
for k = 1 to n
4
rmax = 0
5
for i = k to n
6
r = |aℓik/sℓi|
7
if(r > rmax)
8
rmax = r
9
j = i
10
end
11
swap ℓj and ℓk
12
for i = k + 1 to n
13
xmult = aℓik/aℓk k
14
aℓik = xmult
15
for j = k + 1 to n
16
aℓij = aℓij − xmult · aℓk j
17
end
18
end
19
end
19
1
2
3
4
5
6
7
8
9
10
11
12
20
21
23
24
n
i
x0
x0
1jn m
1im n
25
26
27
28
29
30
A
31
32
33
34
35
36
37
38