Upload
sydney-bruce
View
213
Download
0
Embed Size (px)
Citation preview
Triangular Linear Equations
Lecture #5
EEE 574
Dr. Dan Tylavsky
© Copyright 1999 Daniel Tylavsky
Triangular Linear Equations Sparse Matrix Equations
– Solving Sparse Matrix Equations is one goal of this course.
– Let’s look a solving a special case:Lx=b• L is dense and lower triangular. (Forward Substitution)
– (L is stored by rows, RR(C)U/O.)
nnnnnnn b
b
b
b
x
x
x
x
llll
lll
ll
l
3
2
1
3
2
1
321
333231
2221
11
© Copyright 1999 Daniel Tylavsky
Triangular Linear Equations
nnnnnnn b
b
b
b
x
x
x
x
llll
lll
ll
l
3
2
1
3
2
1
321
333231
2221
11
11
01
1 lxx
22
12122 l
xlbx
33
23213133 l
xlxlbx
nn
n
kknkn
n l
xlb
x
1
1
– Term under the summation sign is a dot product.
– Conceptually construct.
nb
b
b
b
x
3
2
1
0
nb
b
b
x
x 3
2
1
1
nb
b
x
x
x 3
2
1
2
n
n
x
x
x
x
x 3
2
1
– Using dot product algorithm. Remember: no symbolic step necessary since b/x is dense.
– Approach works if data is stored by rows.
© Copyright 1999 Daniel Tylavsky
Triangular Linear Equations
IR=IR+1
Construct almost dot product of row IR with bIR.
Replace bIRIR-1 with the result.
IR=N?
End
No
IR=0
N
Y
© Copyright 1999 Daniel Tylavsky
Triangular Linear Equations Individual Problem: Solve the following for x.
12
25
17
8
3442
631
53
2
4
3
2
1
x
x
x
x
© Copyright 1999 Daniel Tylavsky
Triangular Linear Equations– We often have L (in Lx=b), stored as CR(C)O/U
(x,b dense, stored in ordered compact form.)
nnnnnnn b
b
b
b
x
x
x
x
llll
lll
ll
l
3
2
1
3
2
1
321
333231
2221
11
Column 1
11
01
1 lxx
121212 xlbx
131313 xlbx
111 xlbx nnn
Column 2
22
12
2 lxx
23213
23 xlxx
2212 xlxx nnn
Column k
kk
kk
k lxx
1
knkkn
kn xlxx 1
Column n
nn
nn
n lxx
1
nb
b
b
b
x
3
2
1
0
1
13
12
1
1
nx
x
x
x
x
2
23
2
1
2
nx
x
x
x
x
kn
kk
x
x
x
x
1
n
n
x
x
x
x
x
3
2
1
© Copyright 1999 Daniel Tylavsky
Triangular Linear Equations Individual Problem: Solve the following for x assuming L is store by columns.
12
25
17
8
3442
631
53
2
4
3
2
1
x
x
x
x
© Copyright 1999 Daniel Tylavsky
Triangular Linear Equations– Let’s look at solving a special case:Ux=b
• U is dense and upper triangular. (Backward Substitution)– (U is stored by rows, RR(C)U/O.)
nnnn
n
n
n
b
b
b
b
x
x
x
x
u
uu
uuu
uuuu
3
2
1
3
2
1
333
22322
1131211
© Copyright 1999 Daniel Tylavsky
Triangular Linear Equations
nn
nn ubx
1,1
1,11
nn
nnnnn u
xubx
1,1
11,2,222
nn
nnnnnnnn u
xlxlbx
11
2
11
1 u
xlb
x nkkk
– Conceptually construct.
n
n
nn
b
b
b
b
x
1
2
1
1
– Approach works if data is stored by rows.
nnnn
n
n
n
b
b
b
b
x
x
x
x
u
uu
uuu
uuuu
3
2
1
3
2
1
333
22322
1131211
n
n
nn
x
b
b
b
x
1
2
1
n
n
nn
x
x
b
b
x
1
2
1
1
n
n
n
x
x
x
x
x
1
2
1
1
– Term under the summation sign is a dot product.
© Copyright 1999 Daniel Tylavsky
Triangular Linear Equations Individual Problem: Solve the following for x assuming U is store by rows.
8
17
25
12
2
35
136
2443
4
3
2
1
x
x
x
x
44
44 ubx
1,1
1,11
nn
nnnnn u
xubx
1,1
11,2,222
nn
nnnnnnnn u
xlxlbx
11
2
11
1 u
xlb
x nkkk
The End