A LGORITHM FOR E LIMINATION OF S YSTEMS WITH S PARSE A SYMMETRIC
R EDUCIBLE M ATRICES
Daniela Bittnerová
Faculty of Science, Humanities and Education Department of Mathematics and Didactics of Mathematics
Studentská 2, 461 17, Liberec, Czech Republic daniela.bittnerova@tul.cz
Abstract
In the paper, an algorithm for finding an optimal or almost optimal permutation for an ordering of elements of a matrix, which is sparse, asymmetric and reducible, is suggested.
Using this algorithm we can solve large sparse systems of linear equations more efficiently.
The algorithm is a modification of the algorithm presented in [6], therefore the same indications and symbols are use.
Keywords: Asymmetric reducible sparse matrix, algorithm.
Introduction
A matrix can be considered as sparse if the number of its zero elements is much greater than the number of nonzero ones. Sparse matrices occur in many fields of applied mathematics, for example at partial differential equations solving, but also in many other fields of science, like structural analysis, management analysis, power system analysis, surveying etc. Solving a practical problem we obtain large systems of linear equations with sparse matrices. Hand in hand with a development of a parallel programming for large quantity data, the importance of an optimization of sparse matrices increases. There exist lots of ways how to do it. Some of them go out from graph structures of associated matrices. In the paper, one such algorithm is suggested. It is a modification of the algorithm presented in [6], where symmetric sparse irreducible matrices were discussed, for generally Boolean asymmetric reducible sparse matrices. Using such algorithm we are able to solve large sparse systems of linear equations by some direct method. Indications and symbols are kept from the paper [6].
1. Basic Theory and Assumptions
Let A a
i,jbe a sparse matrix of order n, V v
i,j, W w
i,jbe matrices of order n, where
0 ; 1 , , 1 ,
,1
,0
,j
i j
i j
i
i j n v a
v
0 ; 1 , , 1 ,
,1
,0
,0
,j
ij
ij
ji
i
i j n w a a
w .
The matrix A is called Boolean symmetric if V = W. In the opposite case, it is said Boolean asymmetric.
The graph G(A) = (X, E) is called the non-oriented graph associated to the matrix A,
G
0(A) = (X, E
0) oriented
if X x
1, , x
n is a set of nodes of the graph G(A) such that the node x corresponds
iG
0(A)
to the row i of A, and the set E is a set of all non-oriented edges of the graph G(A), E
0oriented G
0(A) i.e. E x
i; x
j ; x
i X x
j X w
i,j 1 , i j .
x
ix
jx
i x
j v
i j i j
; ; X X
,1 ,
E
0If G is a connected graph associated to the matrix A, it implies the matrix A is irreducible. Let us denote:
y x y x
x X E
N ( ) ; ;
y x y x
x
0
1
X E
N ( ) ; ;
y y x x
x
0
2
X E
N ( ) ; ;
y z y x z x y z
x ) ; ; ( ) ( )
( E N N
D
y z y x z x y z
x ) ; ; ( ) ( )
(
0 1 11
E N N
D
y z y x z x y z
x ) ; ; ( ) ( )
(
0 2 22
E N N
D
Evidently,
N is the set of all successors (neighbours) of the node x including x in the graph G,
N
1(x) is the set of all heads (ended nodes) of all oriented edges from x in G
0including x.
N
2(x) tails (starting nodes) to
The sets D(x), D
1(x), D
2(x) describe relations of successors in the graph G
0each other, in relation to the fill in of matrices L and U in the LU-decomposition of the matrix A (and/or to the fill in of matrices L, D in the LDL
T-decomposition). The numbers of elements of the sets
), ( x
iN N
1( x
i), N
2( x
i) , D ( x
i), D
1( x
i), D
2( x
i) are denoted by the symbols n
i(G ), n
1i( G
0), ),
2
(
0i
G
n d
i(G ), d
1i( G
0), d
i2( G
0) , respectively. The number d
i(G) (called “fill in”) determines a number of new edges after elimination of the node x
i.
The graph
x x
i x
i x
i
i
X E X D
G , is called the graph
i i i i
x
x x x x
i 1 2
0
X , E X D D
G
0
produced from the graph G by an elimination of the node x
i. G
0With respect to the found algorithm, let us denote G
0= G, G
00 G
0,
G
kbe a graph produced from G
k1by an elimination of the node x
i, k 1 , 2 , , n 1 .
G
0kG
0k12. Algorithms
Our goal is to find an optimal, respective almost optimal, permutation to change the given ordering of rows and columns of the matrix A so that the elimination of a system with the matrix A is as efficient as possible. In [6], two algorithms are presented. They are defined for irreducible sparse symmetric systems. The following algorithms are determined for reducible sparse generally asymmetric systems. The Algorithm 1 deals with matrices as if symmetric, Algorithm 2 deals with asymmetric matrices.
Algorithm 1 Step 0:
Put S
0 , G
0 G . Step k 1 , , n 1 :
1. Put R
k S
k1for S
k1 else
k 1
k
G
R x ;
jx
j
.
2.
k 1
1 k k
k
1
R G G
S
j j Rk qd d
x
xq
min
; .
3. i j
xj
k k
S1
min
. 4. Eliminate the node
ik
x from the graph G
k1(i.e. the index i constructed in the
kpermutation p is equal to the integer k).
5. k
k
N G
S ( )
ik
j
x
x
Algorithm 2 Step 0:
Put S
0 , G
00 G
0. Step k 1 , , n 1 :
1. Put R
k S
k1for S
k1 else 0k 1
k
G
R x ;
jx
j
.
2.
0 1 k 0
1 k k
k
1
R G G
S
j j Rk qd d
x
xq
min
; .
3. i j
xj
k k
S1
min
. 4. Eliminate the node
ik
x from the graph G
0k1(i.e. the index i constructed in the
kpermutation p is equal to the integer k).
5. 1 2
0k
k
N N G
S ( ) ( )
k
k i
i
j