2, etc.).

7 Given a ¬ve-point ¬nite difference graph, show that the greedy algorithm will always ¬nd a

coloring of the graph with two colors.

8 Prove that the total number of colors found by the greedy multicoloring algorithm does not

& ¤¢

exceed , where is the maximum degree of all the vertices of a graph (not counting

£¡ ¦¡¥

£

££

the cycles associated with diagonal elements).

f¦c

9 Consider a graph that is bipartite, i.e., 2-colorable. Assume that the vertices of the graph are

colored by a variant of Algorithm (3.4), in which the nodes are traversed in a certain order

£ ¦ 5 5p5 ¦ 5 £ ¦ H £

.

£ ¦ W5W55 ¦ H £

§¨¦ Is it true that for any permutation the number of colors found will be two?

§© Consider now a permutation satisfying the following property: for each at least one of the P

C £ ¦ W5W5 ¦ 5 £ ¦ H £ C£

nodes is adjacent to . Show that the algorithm will ¬nd a 2-coloring of the

HF 5 graph.

§ Among the following traversals indicate which ones satisfy the property of the previous

C£

question: (1) Breadth-First Search, (2) random traversal, (3) traversal de¬ned by = any

£

node adjacent to .

H FC

10 Given a matrix that is irreducible and with a symmetric pattern, show that its structural inverse is

dense. Structural inverse means the pattern of the inverse, regardless of the values, or otherwise

stated, is the union of all patterns of the inverses for all possible values. [Hint: Use Cayley

Hamilton™s theorem and a well known result on powers of adjacency matrices mentioned at the

end of Section 3.2.1.]

11 The most economical storage scheme in terms of memory usage is the following variation on the§

©& & § ¢

¨ ¨¤

coordinate format: Store all nonzero values in a real array and the corresponding

C¨ 7 ¢

£

P f #0 c

&

“linear array address” in an integer array . The order in which these IC

¢

corresponding entries are stored is unimportant as long as they are both in the same position in

their respective arrays. What are the advantages and disadvantages of this data structure? Write

a short routine for performing a matrix-by-vector product in this format.

12 Write a FORTRAN code segment to perform the matrix-by-vector product for matrices stored

in Ellpack-Itpack format.

13 Write a small subroutine to perform the following operations on a sparse matrix in coordinate

format, diagonal format, and CSR format:

§¨¦ Count the number of nonzero elements in the main diagonal;

§© Extract the diagonal whose offset is ;

£

§ Add a nonzero element in position of the matrix (this position may initially contain a

f P¦ c

zero or a nonzero element);

¤ § Add a given diagonal to the matrix. What is the most convenient storage scheme for each of

these operations?

14 Linked lists is another popular scheme often used for storing sparse matrices. These allow to link

together data items (e.g., elements of a given row) in a large linear array. A starting position is

given in the array which contains the ¬rst element of the set. Then, a link to the next element in

the array is provided from a LINK array.

§¨¦ Show how to implement this scheme. A linked list is to be used for each row.

§© What are the main advantages and disadvantages of linked lists?

ud

¤§ ¥ §¢

¡

¡© © ¢ ¡ ¥ ¥ © ¡ ¥

§

¡

§ Write an algorithm to perform a matrix-by-vector product in this format.

NOTES AND REFERENCES. Two good references on sparse matrix computations are the book by

George and Liu [104] and the more recent volume by Duff, Erisman, and Reid [77]. These are geared

toward direct solution methods and the ¬rst specializes in symmetric positive de¬nite problems. Also

of interest are [157] and [163] and the early survey by Duff [76].

Sparse matrix techniques have traditionally been associated with direct solution methods.

Clearly, this is now changing rapidly since the sophistication of iterative solution packages is

starting to equal that of direct solvers. The SPARSKIT library, a package for sparse matrix

computations [179] is currently in its second version and is available through anonymous FTP

( ). Another available software package

8 756 25)¢3 ©¢"))¢""1 ¢)($("££%#" £¦©©©¨¦££¢

' 4 2 § 0 ¤ 1 0 § 0 $ ' § & $ ! § §¥ ¤ ¡ ¡

which emphasizes object-oriented design with the goal of hiding complex data structures from

users is PETSc [19]. A manipulation package for sparse matrices, similar to SPARSKIT in spirit, is

SMMS developed by Alvarado [6].

The idea of the greedy multicoloring algorithm is known in Finite Element techniques (to color

elements); see, e.g., Benantar and Flaherty [23]. Wu [229] presents the greedy algorithm for multi-

coloring vertices and uses it for SOR type iterations, see also [182]. The effect of multicoloring has

been extensively studied by Adams [2, 3] and Poole and Ortega [164]. Interesting results regarding

multicoloring in the context of ¬nite elements based on quad-tree structures have been obtained by

Benantar and Flaherty [23] who show, in particular, that with this structure a maximum of six colors

is required.

µ³

´

from the ¬nite difference discretization of Elliptic Partial Differential Equations.

matrices, but a large body of theory exists for the case where the coef¬cient matrix arises

. The convergence of these methods is rarely guaranteed for all

of the residual vector V}k¨

©§²

component in order to improve an iterate. One example is to annihilate some component(s)

vector solution at a time. This is natural since there are simple criteria when modifying a

ing from one iterate to the next by modifying one or a few components of an approximate

and is the vector of unknowns. Most of the methods covered in this chapter involve pass- ©

Equation (4.1) is a linear system, is the coef¬cient matrix, is the right-hand side vector,

¨ §

¨¬t§©

±Rw°i ¯® such that

belonging to «cª

real matrix and a real -vector , the problem considered is: Find

Given an

© ¨ ¤ § ¤¥

¦¤

This chapter begins by reviewing the basic iterative methods for solving linear systems.

R£¢

¡

— ” ™ “™ ˜——–• ‘

7vv7ffA—R‚VVc”“˜’lC

•irBP qrXn

pbn

d8F rHbr‚p tprHGFQ8rBaD`RXW6FWAVd8’D98W6w9fXRDqX rHpFP HrB9PyQ8%B98yRDePQ8rBy„X rHpFePu H rx8ccQ8rBP

D P Y 8 U F s T 6 P s pnnP f P

Q8%B98’6i•s%B989T’XQ8VvwipGbGfGD’De8ue9u’bVd8F rH˜r8PezWx98’6CesDE%B8IpF`P9%6%BI8FRP tseYr8tH%Bdu’DY

F BX D b‚ s u F n u p H 8

aD`RX6’WFAcpF9s8 RHugW…th8ym98W6l’6F 7gYe98tsrHtU„WXug9s98A•s%B98rT‚RXiwpix %pd8FpQPrB9P%nd8D˜eYd8DRb

Y 8 U 8 BX U F H 6 8 „

x %pQ8rBhPQ8rB’D98‚ Hr96eud8ld8’D98W6F{cp™™•iIXFreu98``9PY SH’DQ8B˜98W6%fyDIpF%s98qrXtU„WXuWx8gP

B P b s F s X B Tp b F X s n f

Bf98„cuRtsrHpFP tprH6trHs7pF˜eYAtUrHP7D H{esDR%nI8GFts„X SHFR%PeoP %pQ8}’Y8 p PeqesRD„X SHRF’P@ q`XAgI8’D986’F

X sX sPP8 D B p u s u HY U

f%V%69uqwi{eY9896%uePQ8fD me89u9sa8uE%B98pTs„WXautpSHpFw•s%BQYttsrHPdtF%Be8mVtszY9`ccwUHrlFRyW8xf

X P| B H sb 8 BX u P H sP 8 F P P

UA s

pqkbP „Ay98DIXX d8qpFs rXc`wUsP qaHs X porHEXpF%BAnP tU`aHn PmQXeo%s%B98Tn `98lW6P ’6wFF 9f7vVDXH IRupFws9srH98ss „ts%X`V8’unH kqjU k’X’iyShu 98•’“6 c—Fr f”Qx q%…Hg `yW–X–Y efYaD `™RX“•d `WF˜W6 V8– At•”U— – d8WD“ r89‘’’6 erF`X„Hs rXF

p B Hn PV

u …s q

eYd8DR9Pgh89B‚y%U8IGFRDGxCrBeP98wsH Vr8QurBP vRutsrHT qIXDihXfgYed8RDcaD`RXW6WFAV89T SHRFQP%BI8F AGFDEC@A9875

8D D p p p B b Y 8U H B 6

431) ( ' &%$ "#" ¨

20 © ! ©

§

¦¥¤£¢¡