4
Volume 15, Number 4 INFORMATION PROCESSING LETTERS 3 I October 1982 RECOGNITION OF PERFECT ELIMINATION BIPARTITE GRAPHS k. GOH and D. ROTEM bdiversity of Waterloo, Department of Computer Science, Waterloo, Ontario N2L 3G1, Canada Received 20 July 1981; revised version received 15 July 1982 Perfect elimination (PE) bipartite graphs were introduced by Golumbic and Goss where they were shown to represent sparse I matrices (non symmetric) on which Gaussian elimination may be performed without fill-in. We propose an 0(n3) recognition algorithm for PE bipartite graphs which improves on the 0(n5) procedure suggested by Golumbic and Goss for this problem. Keywords: Ripartite graphs, bisimplicia! edge, fill-in, perfect elimination 1. Introduction A graph G = (V, E) consists of a vertex set V and an edge set E of unordered pairs of vertices. Two vertices x, y E V are adjclcent if the edge xy E E, and two edges are adjacent if they share a common vertex. For a vertex v we denote by Adj(v) the set of all vertices which are adjacent to it. A subset A c V induces a subgraph (A, E(A)) where E(A) = {xy E Elx, y E A). A graph G = (V, E) is bipartite with vertex classes X, Y, if XUY=V, XnY=@and each edge in E joins a vertex in X to a vertex in Y. A bipartite graph (X U Y, E) is a complete bipartite graph if xy E E for every vertex x E X and y E Y. An edge xy is called bisimplicial if Adj(x) U Adj(y) induces a complete bipartite graph (see Fig. 1). In this paper, deleting an edge xy from a graph G = (V, E) means the removal of xy and all its adjacent edges from G, i.e., the resulting sub- graph is the one induced by the set V - {x, y}* We denote by G - [e,, e,,..., ek ] the subgraph which is obtained by removing the edges e,, . . . , ek from G in this order. A bipartite graph G = (X U K, E) is called a perfect elimination (PE) bipartite graph if there exists a sequence of edges [e,, e,, . . . , e, ] such that (I ) e, is a bisimplicial edge in G and e, is bisimplicial in G - [e,, . . . . ei_ i] for 2 G i s t, WI x2 x3 X4 G= ; Yl y2 y3 Y4 Fig. 1. A PE bipartite graph. The edge x, y, is bisimplicial since {%~ YI, x *, yz} induces a complete bipartite graph in G, the edge x2y2 is not bisimplicial in G, but it is bisimplicial in G-x,Y,. (2) G - [e,, e2, . . . . e,] is empty. It is shown in [2] and [3] that the class of perfect elimination bipartite graphs is closely related to Gaussian elimination schemes on sparse matrices in the following way. Given a linear system of equations Mx = b where M is an n X n matrix, let B(M) = (X U Y, E) be a bipartite graph associated with the matrix M such that X = {x,, . . .,x “} and Y = (Y,,.*.r y,> correspond to the rows and col- umns of M respectively and xi yj E E if and only if the entry m,j in M is nonzero. The nonsingular matrix M (not necessarily symmetric) has a se- quence of pivots which preserve zeroes if and only if B(M) is a perfect elimination bipartite graph. In most applications only the nonzero entries of PA are stored, hence if B(M) is PE bipartite, the sparseness of M and therefore its storagt require- C1020-0190/82/0000-0000/$02.75 0 1982 North-Holland i79

Recognition of perfect elimination bipartite graphs

  • Upload
    l-goh

  • View
    216

  • Download
    2

Embed Size (px)

Citation preview

Volume 15, Number 4 INFORMATION PROCESSING LETTERS 3 I October 1982

RECOGNITION OF PERFECT ELIMINATION BIPARTITE GRAPHS

k. GOH and D. ROTEM

b diversity of Waterloo, Department of Computer Science, Waterloo, Ontario N2L 3G1, Canada

Received 20 July 1981; revised version received 15 July 1982

Perfect elimination (PE) bipartite graphs were introduced by Golumbic and Goss where they were shown to represent sparse I matrices (non symmetric) on which Gaussian elimination may be performed without fill-in. We propose an 0(n3) recognition algorithm for PE bipartite graphs which improves on the 0(n5) procedure suggested by Golumbic and Goss for this problem.

Keywords: Ripartite graphs, bisimplicia! edge, fill-in, perfect elimination

1. Introduction

A graph G = (V, E) consists of a vertex set V and an edge set E of unordered pairs of vertices. Two vertices x, y E V are adjclcent if the edge xy E E, and two edges are adjacent if they share a common vertex. For a vertex v we denote by Adj(v) the set of all vertices which are adjacent to it. A subset A c V induces a subgraph (A, E(A)) where E(A) = {xy E Elx, y E A).

A graph G = (V, E) is bipartite with vertex classes X, Y, if XUY=V, XnY=@and each edge in E joins a vertex in X to a vertex in Y. A bipartite graph (X U Y, E) is a complete bipartite graph if xy E E for every vertex x E X and y E Y.

An edge xy is called bisimplicial if Adj(x) U Adj(y) induces a complete bipartite graph (see Fig. 1). In this paper, deleting an edge xy from a graph G = (V, E) means the removal of xy and all its adjacent edges from G, i.e., the resulting sub- graph is the one induced by the set V - {x, y}* We denote by G - [e,, e,,..., ek ] the subgraph which is obtained by removing the edges e,, . . . , ek from G in this order.

A bipartite graph G = (X U K, E) is called a perfect elimination (PE) bipartite graph if there exists a sequence of edges [e,, e,, . . . , e, ] such that

(I ) e, is a bisimplicial edge in G and e, is bisimplicial in G - [e,, . . . . ei_ i] for 2 G i s t,

WI x2 x3 X4

G= ;

Yl y2 y3 Y4

Fig. 1. A PE bipartite graph. The edge x, y, is bisimplicial since

{%~ YI, x *, yz} induces a complete bipartite graph in G, the edge x2y2 is not bisimplicial in G, but it is bisimplicial in

G-x,Y,.

(2) G - [e,, e2, . . . . e,] is empty. It is shown in [2] and [3] that the class of perfect

elimination bipartite graphs is closely related to Gaussian elimination schemes on sparse matrices in the following way. Given a linear system of equations Mx = b where M is an n X n matrix, let B(M) = (X U Y, E) be a bipartite graph associated with the matrix M such that X = {x,, . . .,x “} and

Y = (Y,,.*.r y,> correspond to the rows and col- umns of M respectively and xi yj E E if and only if the entry m,j in M is nonzero. The nonsingular matrix M (not necessarily symmetric) has a se- quence of pivots which preserve zeroes if and only if B(M) is a perfect elimination bipartite graph. In most applications only the nonzero entries of PA are stored, hence if B(M) is PE bipartite, the sparseness of M and therefore its storagt require-

C1020-0190/82/0000-0000/$02.75 0 1982 North-Holland i79

Volume 15, Number 4 i,‘U’FORMATION PROCESSING LETTERS 31 October 1982

ments can be preserved throughout the reduction of M during a Gaussian elimination process. The above characterization of matrices which have a ‘perfect elimination’ scheme generalizes previous

results by Haskins and Rose [4] and Kleitman [S]. This motiv&es the search for a recognition al-

gorithm for PE bipartite graphs since such an dgorithm answers the general decision problem whether a given sparse matrix M has a perfect elimination scheme. In case of a positive snswef, the algorithm also provides us with a sequence of pivots which reduce M to I (the identity matrix) without changing a zero entry into a nonzero. Clearly the recognition algorithm takes into account orily rhe structure of M, hence it can be run jbst ~f:.ce for a family of linear systems as long as mt-2; 13 3 3 i, this family differ only in their right-hanJ side and/or the numerical values of the nonzero en@ies in M (see [3, Ch. 121 for more referents on matrix elimination problems and their relation to graph theory).

The following tkxrem is proved in [2].

Tkorerm 1.1. If e is a bisimplicial edge oj a PE bipartite graph G, then G - [e] is also a PE bipar- tite gruph.

As noted in [2] this theorem suggests a.r~ a&o- rithm for recognizing PE bipartite graphs and producing an elimination sche-me. We repeatedly find a bisimplicial edge of a bipartite graph and dele*.e it. If we succeed in eliminating all edges, then the bipartite graph was perfect elimination, otht:rwise it was not. The worst case running time of this algorithm for a graph with IX] = lY] = n is O(n’) sin;;.~ for finding a single bisimplicial edge we have tr, check O(n*) edges for being bisimpli- ciai where each such check may require O(n*) steps. This procedure is repeated O(n) times since each elimination deletes one vertex from X and one vertex from Y. In the next section we present a recognition algorithm which requires only O(d) seps.

2. The Algon’thoro

For convenience we will describe the algorithm in terms ofmatri s. A bipartite graph G = (X u Y,

180

E) with IX] = IY] = n can be represented by an n X n matrix IA zz (mij) where

1 IIlij =

if xiyj EE,

0 otherwise.

A vector (a,, a2 ,..., a,,) majorizes the vector (b,, bz,..., b,,) if ai 3 bi for 1 si GE. Note that every vector majorizes itself by this definition. Our algorithm is based on the following lemma.

Lemma 2.1 Let M = (mij) be an a X n (0,l) matrix representing a bipartite graph G = (X U Y, Ej. Let ei be the number of rows in M that majorize row i and Sj the sum of entries in column j of M. Then,

mij = 1 and ei=sj if and or@ if the edge xiyj is a bisimplicial edge of G.

Roof. The ‘if part; For convenience we deuote f i by t and Sj by q. We have to show that xiyj is bisinrplicial. Let rows i ,,...,it majorize row i and mij,9**-,mijk be the nonzero elements in row i. Then Adj(xi)= (yj,,...,yjll}. Since rows i,,...,i, majorize row i, we have

Adj(Xi,) 2 (Yj, ’ l l Yj,},

.

Adjbi,) 2 (Yj, l l l Yj,) l

Thus, since Yj E {Yj,,***,Yj,}, Adj(Yj)> (X,,,*.*,xi,)* But the degree of yj is q = t SO we have Adj(yj) = {xi,9**g9 Xi,}. NOW It is clear that Adj(xi) U Adj(yj) induces a complete bipartite subgraph of G. Hence, x iyj is a bisimplicial edge.

The ‘only if part: Assume Xi yj is a bisimplicial edge of G. Then, since xi Yj E E, we have m ij = 1 and hence all rows that majorize row i must have a 1 in column j. Therefore, the sum q of column j, is not smaller than t which is the number of rows that majorize row i. If q > t, then there exists an i’ e (i, ,..., it} such that milj = 11, i.e., XisYj E E and xi- E Adj(yj) but row i’ does not majorize row i. Hence there exists a jr E (jl,...,jk} (the set of column indices of nonzero elements in row i) such that mi,j, = 0, i.e., xi*yv e E.

NOW, since Xi" E Adj(yj) and yjf E Adj(xi), Ad$x i ) U AdjQ) d&s not induce a complete bipartite graph in G and xiyj is not a bisimplicial

Volume 15, Number 4 INFORMATION PROCESSING LETTERS 31 October 1982

edge which gives the required contradiction. Cl

In the algorithm, we compute fi for 14 i G n by noticing that in the matrix Q = (qij) = MMT, there are exactly fi elements in row i which are equal to the diagonal element qii (qii itself is also counted). This follows since qij counts the number of col- umns in M which have a nonzero entry in both row i and row j while q ii is the sum of the ith row in M, hence qu = qii if and only if row j majorizes row i in M. The matrix Q is computed only once, and tlhen it is updated in 0(n2) operations after the elimination of each bisimplicial edge xiyj. This is done by subtracting one from each entry qrS such that mj X mj = 1 and then changing the ith row and column of Q to zero.

The Ar’gorithm

Let G(X U Y, E) be the input bipartite graph to be checked where 1X1= lYl = n and assume it is represented by the matrix M. For a matrix A, we denote by AU the matrix obtained by changing all entries in the ith row and jth column of A to zero and by AT the transpose of A.

The Algorithm Let M = (mu) be the input matrix

begin simplical -found + true compute the matrix Q = (qij) where Q = MMT; for j + 1 to n do Sj + Zr=, mij; while there exists an Sj 7” 0 and simplical_found do

begi for i + 1 to R do let ei be the number of entries in ro\J i of Q which are equal to q ii; if there exists a nonzero entry mu in M Iwhere s, f e, then begin

Compute the matrix D = (dk& where d ZZ lYl~j*ll?lfj;

Q -“(‘Q - ]D)ii; comment: Q is now equal to (M’ti)(Mili)T;

for k + 1 to n do

sk * Sk - mik;

s: co;

end 4

else simplical -found + false; end;

if simplical_found then M represents a PE bi- partite graph else it does not;

end

The wcrst case running time of this algorithm is 0(n3) since the while loop may be performed at most n times and each execution of the loop takes at most 0(n2) operations.

Example. Given the graph of Fig. 1,

YI Y2 Y3 Y.4

M=x,: XI 1 1 0 1 0 0, x,0 1 1 1 x,0 0 1 1

so x , y, is d bisimplicial edge (x 4y4 is also bisimpli- cial). After x, y, is eliminated the matrix D is computed,

and

i

0 0 0 0

(Q D)li 0 2 2 - = 0 2 3 1 i 2’ 10 1 2 21

and also M is updated to give

0 0 0 o\

M= 1 c C (1 1 1 0 1 111’

0 i 1

NOM, Y 2 y2 is a bisimplicial edge since s2 = t’ Z = 2.

181

Volume 15, Number 4 INFORMA-LION PROCESSING LETTERS 31 October 1952

In this case,

counterparts of chordal graphs. A graph G of n vertices is a chordal graph if there exists a sequence of vertices v,, . . D, vn such that

(1) v, is simplicial in G, i.e., Adj(v,) induces a complete subgraph in G,

(2) vi is simplicial in G - [vi,. . . ,Vi _ ,]. The recognition algorithm in this paper used

adjacency matrix methods similar to the algorithm of [l] for testing chordality of graphs. A linear time algorithm for chordality testing is given in [6], this algorithm uses lexicographic breadth first search. Although the problems of recognizing chordal graphs and PE bipartite graphs are re- lated, it seems that the latter problem is more complicated since the ctmrination scheme involves

checking conditions on edges rather than on vertices. Typically algorithms which involve check- ing such conditions require more than linear time. For example, the fastest known recognition algo- rithm for comparability graphs [3] which also in- volves checking edge conditions requires O(r?) steps in its worst case.

References

(11

PI

[31

PI

151

t61

F. Gavril, An algorithm for testing chordality of graphs, Inform. Process. Lett. 3 (1974) 1 IQ-1 12. MC. Golumbic and C.F. Goss, Perfect elimination and chordal bipartite graphs, J. Graph Theory 2 (1978) 155- 163. M.C. Golumbic, Algorithmic Graph Theory and Perfect Graphs (Academic Press, New York, 1980). L. Haskins and D.J. Rose, Toward a characterization of perfect elimination digraphs, SIAM J. Comput. 2 (1973) 217-224. D.J. Rleitman, A note on perfect elimination digraphs, SIAM J. Comput 3 (1974) 280-282. D r- Rose, R.E. Tarjan and G.S. Leuker, Algorithmic aspects of vertex elimination on graphs, SIAM J. Comput. 5 (1976) 266-283.

182