¦

all the vertices that constitute . This results in the inequality

¢ ¨˜ — (

¤

¦

which suggests that it may be a good idea to ¬rst visit the nodes with smaller degrees. In

fact, this observation leads to a general heuristic regarding a good order of traversal. The

algorithm can be viewed as follows: Each time a node is visited, remove it and its nearest

neighbors from the graph, and then visit a node from the remaining graph. Continue in the

same manner until all nodes are exhausted. Every node that is visited is a member of and

¦

Q

its nearest neighbors are members of . As result, if is the degree of the node visited at

step , adjusted for all the edge deletions resulting from the previous visitation steps, then

˜

the number of nodes that are left at step satis¬es the relation

˜ g ˜

Y ¦

3 3B

0

&

y

d nd¡ £ ¨¡ d¥ $ ¥ £ ”¤§¤

u © n ¥ u§¥

¤ §¥ ¡ ©

¨

¤©

¡ ¥

˜ 7

The process adds a new element to the set at each step and stops when . In order

to maximize , the number of steps in the procedure must be maximized. The dif¬culty

in the analysis arises from the fact that the degrees are updated at each step because of the

removal of the edges associated with the removed nodes. If the process is to be lengthened,

a rule of thumb would be to visit the nodes that have the smallest degrees ¬rst.

¡¤q G ¥¦¤¢

¦£ B B© B¤! ¦ " ¦ B G £ ©

©¥

!8 ¢ ¥ B ¡

§ £)

¨

§ (

Q F ©T ©

G P‘)11) 0

1. Set . Find an ordering of the nodes by increasing degree.

˜ )1)uC… Yy

2. For , Do:

3. If node is not marked then

… % ¤ … !

4.

5. Mark and all its nearest neighbors

6. EndIf

7. EndDo

A re¬nement to the above algorithm would be to update the degrees of all nodes in-

volved in a removal, and dynamically select the one with the smallest degree as the next

node to be visited. This can be implemented ef¬ciently using a min-heap data structure.

A different heuristic is to attempt to maximize the number of elements in by a form of

local optimization which determines the order of traversal dynamically. In the following,

removing a vertex from a graph means deleting the vertex and all edges incident to/from

this vertex.

¥ £T ©

©¨¦

§¥

The algorithms described in this section were tested on the same example

used before, namely, the ¬nite element mesh problem of Figure 2.10. Here, all strategies

used yield the initial independent set in the matrix itself, which corresponds to the nodes

of all the previous levels of re¬nement. This may well be optimal in this case, i.e., a larger

independent set may not exist.

Multicolor orderings. Graph coloring is a familiar problem in computer science which

refers to the process of labeling (coloring) the nodes of a graph in such a way that no

two adjacent nodes have the same label (color). The goal of graph coloring is to obtain

a colored graph which uses the smallest possible number of colors. However, optimality

in the context of numerical linear algebra is a secondary issue and simple heuristics do

provide adequate colorings.

Basic methods for obtaining a multicoloring of an arbitrary grid are quite simple. They

rely on greedy techniques, a simple version of which is as follows.

¡¤q G ¥¦¤¢

¦£ %&¡DDB ¨#

$B 8 £D " §% ¤

§8 § ¦ " ! "% 8 §©

©

¨

§ ©

Q F T©

˜)5˜1i))u11CYd

Yd C rB ' Q – 8

7

1. For Do: set .

¤

2. For Do:

¢ rB wCEC B ¤£ ¢ b C VB

( !

( 7 ¢

3. Set Color Color

C

4. EndDo

ud

¤§ ¥ §¢

¡

¡© © ¢ ¡ ¥ ¥ © ¡ ¥

§

wC B

Here, Adj represents the set of nodes that are adjacent to node . The color assigned to

node in line 3 is the smallest allowable color number which can be assigned to node .

Here, allowable means different from the colors of the nearest neighbors and positive. This

procedure is illustrated in Figure 3.9. The node being colored in the ¬gure is indicated by

an arrow. It will be assigned color number 3, the smallest positive integer different from 1,

2, 4, 5.

1

0