4 3
1 2
4 3
© T © ¥ ¢ D ¢¢
¡ Graphs of two sparse matrices.
Going back to sparse matrices, the adjacency graph of a sparse matrix is a graph
¨B ˜ ˜
¨
, whose vertices in represent the unknowns. Its edges represent the
¢
$
C
binary relations established by the equations in the following manner: There is an edge
p… ‚
a
7
from node to node when . This edge will therefore represent the binary relation
equation involves unknown . Note that the graph is directed, except when the matrix has
H… ‚
T ‚… ˜ # a` #
78 78
a symmetric pattern ( iff for all ).
…Hp‚
T‘…‚
When a matrix has a symmetric nonzero pattern, i.e., when and are always
nonzero at the same time, then the graph is undirected. Thus, for undirected graphs, ev
ery edge points in both directions. As a result, undirected graphs can be represented with
nonoriented edges.
As an example of the use of graph models, parallelism in Gaussian elimination can
be extracted by ¬nding unknowns that are independent at a given stage of the elimination.
These are unknowns which do not depend on each other according to the above binary rela
tion. The rows corresponding to such unknowns can then be used as pivots simultaneously.
Thus, in one extreme, when the matrix is diagonal, then all unknowns are independent.
Conversely, when a matrix is dense, each unknown will depend on all other unknowns.
Sparse matrices lie somewhere between these two extremes. 6
There are a few interesting simple properties of adjacency graphs. The graph of
r`rB
˜
can be interpreted as an vertex graph whose edges are the pairs for which there
C
exists at least one path of length exactly two from node to node in the original graph of
'
. Similarly, the graph of consists of edges which represent the binary relation “there
is at least one path of length from node to node .” For details, see Exercise 4.
ud
¡ ¤§ ¥ §¢
¡
¡© © ¢ ¡ ¥ ¥ © ¡ ¥
§
¤ ¦ ¦ IP '
B¥¤¥
A¡ A¡ ¥' #(
% § 3 82©
6¨ ¨§
For Partial Differential Equations involving only one physical unknown per mesh point, the
adjacency graph of the matrix arising from the discretization is often the graph represented
by the mesh itself. However, it is common to have several unknowns per mesh point. For
example, the equations modeling ¬‚uid ¬‚ow may involve the two velocity components of
the ¬‚uid (in two dimensions) as well as energy and momentum at each mesh point. In
such situations, there are two choices when labeling the unknowns. They can be labeled
contiguously at each mesh point. Thus, for the example just mentioned, we can label all
four variables (two velocities followed by momentum and then pressure) at a given mesh
p B 1)
—
BV
point as ,, . Alternatively, all unknowns associated with one type of variable
V
C C
can be labeled ¬rst (e.g., ¬rst velocity components), followed by those associated with the
second type of variables (e.g., second velocity components), etc. In either case, it is clear
that there is redundant information in the graph of the adjacency matrix. The quotient graph
corresponding to the physical mesh can be used instead. This results in substantial savings
in storage and computation. In the ¬‚uid ¬‚ow example mentioned above, the storage can
be reduced by a factor of almost 16 for the integer arrays needed to represent the graph.
This is because the number of edges has been reduced by this much, while the number of
vertices, which is usually much smaller, remains the same.
$ £ ( § ( ¡ % § ) # £ ¢ ! § §
§
$ §
)
!
&'U&

Permuting the rows or the columns, or both the rows and columns, of a sparse matrix is a
common operation. In fact, reordering rows and columns is one of the most important in
gredients used in parallel implementations of both direct and iterative solution techniques.
This section introduces the ideas related to these reordering techniques and their relations
to the adjacency graphs of the matrices. Recall the notation introduced in Chapter 1 that
…2 ‚
2 ‚
the th column of a matrix is denoted by and the th row by .
¥¤ ¤ ¦ ¦
£
¦¡¥ ¥
¡ ' ¨ I! "P
We begin with a de¬nition and new notation.
q¤ ¥ „ P‘)1)136 P 0 )
H RFP I#F D
Q FH T©
C
!
Let be a matrix and a permutation of the set
˜ 5)1)uCYY
!
. Then the matrices
” 1( … £ ‘ 0 ( e ¡ %‚ X2 ¡¢
" ! "… " %%%"
$$$ " %%%"
$$$
0
0 (e … ¡ % ¡ 2
‚
1( … £
" ! " %%%"
$$$ " %%%"