Beruflich Dokumente
Kultur Dokumente
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
Outline
2 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
Outline
2 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
Outline
2 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
Outline
2 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
Outline
3 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
Intyroduction
We will now describe the Jacobi and the Gauss-Seidel iterative
methods, classic methods that date to the late eighteenth century.
4 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
Intyroduction
We will now describe the Jacobi and the Gauss-Seidel iterative
methods, classic methods that date to the late eighteenth century.
Iterative techniques are seldom used for solving linear systems of
small dimension since the time required for sufficient accuracy
exceeds that required for direct techniques such as Gaussian
elimination.
4 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
Intyroduction
We will now describe the Jacobi and the Gauss-Seidel iterative
methods, classic methods that date to the late eighteenth century.
Iterative techniques are seldom used for solving linear systems of
small dimension since the time required for sufficient accuracy
exceeds that required for direct techniques such as Gaussian
elimination.
For large systems with a high percentage of 0 entries, however,
these techniques are efficient in terms of both computer storage
and computation.
4 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
5 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
5 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
5 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
Outline
6 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
Jacobis Method
The Jacobi iterative method is obtained by solving the ith equation in
Ax = b for xi to obtain (provided aii 6= 0)
xi =
n
X
j=1
j6=i
aij xj
aii
+
bi
,
aii
for i = 1, 2, . . . , n
7 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
Jacobis Method
The Jacobi iterative method is obtained by solving the ith equation in
Ax = b for xi to obtain (provided aii 6= 0)
xi =
n
X
j=1
j6=i
aij xj
aii
+
bi
,
aii
for i = 1, 2, . . . , n
(k )
(k )
xi
n
X
1
(k 1)
a
x
+ bi
ij j
,
aii
for i = 1, 2, . . . , n
j=1
j6=i
7 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
Jacobis Method
Example
The linear system Ax = b given by
E1 : 10x1
x2 + 2x3
E2 :
x1 + 11x2
E3 :
2x1
E4 :
=6
x3 + 3x4 = 25
x2 + 10x3 x4 = 11,
3x2
x3 + 8x4 = 15
8 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
Jacobis Method
Example
The linear system Ax = b given by
E1 : 10x1
x2 + 2x3
E2 :
x1 + 11x2
E3 :
2x1
E4 :
=6
x3 + 3x4 = 25
x2 + 10x3 x4 = 11,
3x2
x3 + 8x4 = 15
8 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
Solution (1/4)
We first solve equation Ei for xi , for each i = 1, 2, 3, 4, to obtain
1
1
x2
x3
10
5
1
1
x2 =
x1
+
x3
11
11
1
1
x3 = x1 +
x2
+
5
10
3
1
x4 =
x2 +
x3
8
8
x1 =
3
5
3
25
x4 +
11
11
1
11
x4
10
10
15
+
8
+
9 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
Solution (2/4)
From the initial approximation x(0) = (0, 0, 0, 0)t we have x(1) given by
(1)
x1
(1)
x2
(1)
x3
(1)
x4
1 (0)
1 (0)
x2
x
10
5 3
1 (0)
1 (0)
=
x
+
x
11 1
11 3
1 (0)
1 (0)
= x1 +
x
+
5
10 2
3 (0)
1 (0)
x2 +
x
=
8
8 3
=
3
5
3 (0) 25
x +
11 4
11
1 (0) 11
x
10 4
10
15
+
8
0.6000
2.2727
= 1.1000
=
1.8750
10 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
Solution (3/4)
(k )
(k )
(k )
(k )
(k )
x1
(k )
x2
(k )
x3
(k )
x4
0.0
0.0
0.0
0.0
0.6000
2.2727
1.1000
1.8750
1.0473
1.7159
0.8052
0.8852
0.9326
2.053
1.0493
1.1309
1.0152
1.9537
0.9681
0.9739
10
1.0001
1.9998
0.9998
0.9998
11 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
Solution (4/4)
The process was stopped after 10 iterations because
kx(10) x(9) k
8.0 104
=
< 103
1.9998
kx(10) k
In fact, kx(10) xk = 0.0002.
12 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
Outline
13 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
14 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
14 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
15 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
A= .
..
..
..
.
.
an1 an2 ann
Numerical Analysis (Chapter 7)
15 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
16 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
a11 0 0
..
0 a22 . . .
.
D = .
.
.
.
.
.
.
.
. 0
0 0 ann
16 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
0
a11 0 0
..
..
a21 . . .
0 a22 . . .
.
.
L= .
D = .
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. 0
.
an1 an,n1 0
0 0 ann
16 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
0
a11 0 0
..
..
a21 . . .
0 a22 . . .
.
.
L= .
D = .
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. 0
.
an1 an,n1 0
0 0 ann
and
0 a12
a1n
..
..
..
..
.
.
.
.
U =
..
..
.
. an1,n
0
0
Numerical Analysis (Chapter 7)
16 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
17 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
17 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
k = 1, 2, . . .
17 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
18 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
18 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
(k )
xi
n
X
1
(k 1)
a
x
+ bi
ij j
,
aii
for i = 1, 2, . . . , n
j=1
j6=i
is used in computation.
Numerical Analysis (Chapter 7)
18 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
Example
Express the Jacobi iteration method for the linear system Ax = b given
by
E1 : 10x1 x2 + 2x3
=6
E2 :
x1 + 11x2
E3 :
2x1
x2 + 10x3 x4 = 11
3x2
E4 :
x3 + 3x4 = 25
x3 + 8x4 = 15
19 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
Solution (1/2)
We saw earlier that the Jacobi method for this system has the form
1
1
x2
x3
10
5
1
1
x2 =
x1
+
x3
11
11
1
1
x3 = x1 +
x2
+
5
10
3
1
x4 =
x2 +
x3
8
8
x1 =
3
5
3
25
x4 +
11
11
1
11
x4
10
10
15
+
8
+
20 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
Solution (2/2)
Hence, we have
11
1
0
10
1
0
8
c=
1
10
15
1
11
0
T =
1
1
5
10
0 38
1
11
and
3
5
25
11
11
10
15
8
21 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
Outline
22 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
23 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
23 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
23 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
24 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
24 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
24 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
24 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
24 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
Step 5 Set k = k + 1
24 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
Step 5 Set k = k + 1
Step 6 For i = 1, . . . , n set XOi = xi
24 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
Step 5 Set k = k + 1
Step 6 For i = 1, . . . , n set XOi = xi
Step 7 OUTPUT (Maximum number of iterations exceeded)
(The procedure was successful)
STOP
Numerical Analysis (Chapter 7)
24 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
Jacobis Method
Comments on the Algorithm
Step 3 of the algorithm requires that aii 6= 0, for each
i = 1, 2, . . . , n.
25 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
Jacobis Method
Comments on the Algorithm
Step 3 of the algorithm requires that aii 6= 0, for each
i = 1, 2, . . . , n. If one of the aii entries is 0 and the system is
nonsingular, a reordering of the equations can be performed so
that no aii = 0.
25 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
Jacobis Method
Comments on the Algorithm
Step 3 of the algorithm requires that aii 6= 0, for each
i = 1, 2, . . . , n. If one of the aii entries is 0 and the system is
nonsingular, a reordering of the equations can be performed so
that no aii = 0.
To speed convergence, the equations should be arranged so that
aii is as large as possible.
25 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
Jacobis Method
Comments on the Algorithm
Step 3 of the algorithm requires that aii 6= 0, for each
i = 1, 2, . . . , n. If one of the aii entries is 0 and the system is
nonsingular, a reordering of the equations can be performed so
that no aii = 0.
To speed convergence, the equations should be arranged so that
aii is as large as possible.
Another possible stopping criterion in Step 4 is to iterate until
kx(k ) x(k 1) k
kx(k ) k
is smaller than some prescribed tolerance.
25 / 26
Introduction
Jacobis Method
Equivalent System
Jacobi Algorithm
Jacobis Method
Comments on the Algorithm
Step 3 of the algorithm requires that aii 6= 0, for each
i = 1, 2, . . . , n. If one of the aii entries is 0 and the system is
nonsingular, a reordering of the equations can be performed so
that no aii = 0.
To speed convergence, the equations should be arranged so that
aii is as large as possible.
Another possible stopping criterion in Step 4 is to iterate until
kx(k ) x(k 1) k
kx(k ) k
is smaller than some prescribed tolerance.
For this purpose, any convenient norm can be used, the usual
being the l norm.
Numerical Analysis (Chapter 7)
25 / 26
Questions?