13
This article was downloaded by: [University of York] On: 21 August 2014, At: 01:05 Publisher: Taylor & Francis Informa Ltd Registered in England and Wales Registered Number: 1072954 Registered office: Mortimer House, 37-41 Mortimer Street, London W1T 3JH, UK Parallel Algorithms and Applications Publication details, including instructions for authors and subscription information: http://www.tandfonline.com/loi/gpaa19 OPTIMAL PARALLEL MATCHING ON BIPARTITE PERMUTATION GRAPHS HIRYOUNG KIM a & ALAN P. SPRAGUE a a Department of Computer and Information Sciences , University of Alabama at Birmingham , Birmingham, Alabama, 35294 Published online: 02 Mar 2007. To cite this article: HIRYOUNG KIM & ALAN P. SPRAGUE (1997) OPTIMAL PARALLEL MATCHING ON BIPARTITE PERMUTATION GRAPHS, Parallel Algorithms and Applications, 10:3-4, 165-176, DOI: 10.1080/10637199708915615 To link to this article: http://dx.doi.org/10.1080/10637199708915615 PLEASE SCROLL DOWN FOR ARTICLE Taylor & Francis makes every effort to ensure the accuracy of all the information (the “Content”) contained in the publications on our platform. However, Taylor & Francis, our agents, and our licensors make no representations or warranties whatsoever as to the accuracy, completeness, or suitability for any purpose of the Content. Any opinions and views expressed in this publication are the opinions and views of the authors, and are not the views of or endorsed by Taylor & Francis. The accuracy of the Content should not be relied upon and should be independently verified with primary sources of information. Taylor and Francis shall not be liable for any losses, actions, claims, proceedings, demands, costs, expenses, damages, and other liabilities whatsoever or howsoever caused arising directly or indirectly in connection with, in relation to or arising out of the use of the Content. This article may be used for research, teaching, and private study purposes. Any substantial or systematic reproduction, redistribution, reselling, loan, sub-licensing, systematic supply, or distribution in any form to anyone is expressly forbidden. Terms & Conditions of access and use can be found at http:// www.tandfonline.com/page/terms-and-conditions

OPTIMAL PARALLEL MATCHING ON BIPARTITE PERMUTATION GRAPHS

  • Upload
    alan-p

  • View
    217

  • Download
    0

Embed Size (px)

Citation preview

Page 1: OPTIMAL PARALLEL MATCHING ON BIPARTITE PERMUTATION GRAPHS

This article was downloaded by: [University of York]On: 21 August 2014, At: 01:05Publisher: Taylor & FrancisInforma Ltd Registered in England and Wales Registered Number: 1072954 Registered office: Mortimer House,37-41 Mortimer Street, London W1T 3JH, UK

Parallel Algorithms and ApplicationsPublication details, including instructions for authors and subscription information:http://www.tandfonline.com/loi/gpaa19

OPTIMAL PARALLEL MATCHING ON BIPARTITEPERMUTATION GRAPHSHIRYOUNG KIM a & ALAN P. SPRAGUE aa Department of Computer and Information Sciences , University of Alabama atBirmingham , Birmingham, Alabama, 35294Published online: 02 Mar 2007.

To cite this article: HIRYOUNG KIM & ALAN P. SPRAGUE (1997) OPTIMAL PARALLEL MATCHING ON BIPARTITE PERMUTATIONGRAPHS, Parallel Algorithms and Applications, 10:3-4, 165-176, DOI: 10.1080/10637199708915615

To link to this article: http://dx.doi.org/10.1080/10637199708915615

PLEASE SCROLL DOWN FOR ARTICLE

Taylor & Francis makes every effort to ensure the accuracy of all the information (the “Content”) containedin the publications on our platform. However, Taylor & Francis, our agents, and our licensors make norepresentations or warranties whatsoever as to the accuracy, completeness, or suitability for any purpose of theContent. Any opinions and views expressed in this publication are the opinions and views of the authors, andare not the views of or endorsed by Taylor & Francis. The accuracy of the Content should not be relied upon andshould be independently verified with primary sources of information. Taylor and Francis shall not be liable forany losses, actions, claims, proceedings, demands, costs, expenses, damages, and other liabilities whatsoeveror howsoever caused arising directly or indirectly in connection with, in relation to or arising out of the use ofthe Content.

This article may be used for research, teaching, and private study purposes. Any substantial or systematicreproduction, redistribution, reselling, loan, sub-licensing, systematic supply, or distribution in anyform to anyone is expressly forbidden. Terms & Conditions of access and use can be found at http://www.tandfonline.com/page/terms-and-conditions

Page 2: OPTIMAL PARALLEL MATCHING ON BIPARTITE PERMUTATION GRAPHS

Pholncopying permitted by license only

@ 1997 OPA (Oversea\ Puhlirhen Asmcintion) Amnerdam B.V. Puhlirhed in The Netherlands under

license by Cordon and Hierch Science Puhliaherr Printcd in Malaysia

OPTIMAL PARALLEL MATCHING ON BIPARTITE PERMUTATION GRAPHS

HIRYOUNG KIM* and ALAN P. S P R A G U E ~

Departmer~t of Computer a n d I~~forntatiort Sciences, University of Alabama a t Birmingl~crm, Birmir~glram, Alabama 35294

(Received 16 Ju~luary 1996)

We present a cost-optimal parallel algorithm for the maximum matching problem on bipartite permutation graphs on an EREW PRAM. Previously, Chen and Yesha have dealt with this problem. Their solution relies on Dekel and Sahni's matching algorithm for convex bipartite graphs, which runs in 0(log2 11) time using O(n) processors. Given a permutation diagram, our algorithm runs in O(logr!) time by using O ( r ~ / l o g r ~ ) processors. Our method starts with an easily understood greedy algorithm. We define a nontrivial binary operation which is associative and equivalent to the greedy algorithm. Thus parallel prefix can be applied to the problem.

Keywords: Parallel algorithms; maximum matching; bipartite permutation graphs; parallel prefix; complexity

1. INTRODUCTION

A graph is bipartite if its vertices can be partitioned into two disjoint inde- pendent sets, so each edge has one end in each set. Let V = { I , 2, . . . , 1 1 1 ,

and let the sequence n = [nl, n2,. . . , n,,] be a permutation on V. Then n ,~ ' represents the position of number i in the n sequence. The per~nutatiorl graph of n, G ( n ) = ( V , E ) is defined to be the undirected graph such that i j E E if and only if ( i - j)(n,-' - n;') < 0. Pictorially, a permutation graph can

* email: [email protected] t email: [email protected], phone: (205) 934-2213

Dow

nloa

ded

by [

Uni

vers

ity o

f Y

ork]

at 0

1:05

21

Aug

ust 2

014

Page 3: OPTIMAL PARALLEL MATCHING ON BIPARTITE PERMUTATION GRAPHS

166 HIRYOUNG KIM AND ALAN P. SPRAGUE

be shown in the pernuitation diagram constructed as follows: Consider two parallel lines each of which has rl points. Label the top points 1, . . . , n and the bottom points T I , n2, . . . , ir,,. Draw the line segments between the top and bottom points having the same label. The vertices of a permutation graph are the line segments and two vertices are adjacent if and only if the corresponding line segments intersect. I f a graph G satisfies the properties of both permu- tation and bipartite graphs, then G is a bipartite permutation graph. Spinrad et 01. [I I] give useful characterizations of the graphs which lead to a number of algorithms including linear time recognition.

A n~utching in a graph is a subset of its edges such that no two edges share the same vertex. A nmaximun~ n~atching is the largest possible such set of edges.

A good number of sequential matching algorithms on various classes o l graphs have been developed. Even and Kariv [5] provided an O(n2.5) time algorithm on general graphs, which was slightly improved to O(n0.5m) time by Micali and Vazirani [8]. The best known bipartite graph matching has the complexity of O(n1.5 Jw) time [I]. For permutation graphs, Rhee and Liang [ lo] provided O(n loglogn) time algorithm. Despite the many sequen- tial algorithms for various graphs, it seems elusive to find efficient parallel solutions. Matching on bipartite graphs and general graphs is not known to bc in NC. Though sequential matching on interval graphs can be done in O(n logn), its parallel solution has 0(log2 n ) time using 0 ( n 6 ) processors [9]. Chen and Yesha [3] provided a parallel algorithm for bipartite permu- tation graphs having 0(log2 n ) time with 0 (n3) processors. Their algorithm gives a maximum matching if a graph is a bipartite permutation graph, other- wise the algorithm reports that the input graph is not bipartite permutation. Their matching algorithm relies on Dekel and Sahni's matching algorithm on convex bipartite graphs which are superclass of bipartite permutation graphs. Dckcl and Sahni's algorithm (41 has the running time of 0(log2 11) with O(n) processors.

In this paper, we provide a parallel solution to the maximum matching problem on bipartite permutation graphs. Our algorithm is cost-optimal running i n O(logn) time with O(n/ logn) processors on an EREW PRAM assuming that the permutation for a bipartite permutation graph G ( V , E) is given. The permutation is given in array P, where P[i] = T, for i = 1. 2, . . . , I ? . Here, i in the permutation diagram corresponds to v; E V. We will use i and v;

interchangeably. In Section 2, we characterize bipartite permutation graphs. Section 3

discusses a sequential greedy algorithm for finding a maximum matching. In ~ e d t i o n 4, we provide an associative binary operation corresponding to

Dow

nloa

ded

by [

Uni

vers

ity o

f Y

ork]

at 0

1:05

21

Aug

ust 2

014

Page 4: OPTIMAL PARALLEL MATCHING ON BIPARTITE PERMUTATION GRAPHS

PARALLEL MATCHING ON GRAPHS 167

the greedy algorithm. Finally, in Section 5 , we present a parallel matching algorithm and its complexity.

2. CHARACTERIZATION OF BIPARTITE PERMUTATION GRAPHS

LEMMA 2.1 Let G be u bipartite permutation graph. Giverr a pern~utation diagram of G, let A; be the sign of the result of i - n,:', i.e., Ai can be 0, +, or -. Then the following are true:

(I) A; = 0 i f i is an isolated vertex. (2) i f A; = A ,, then i and j are not adjacent. ( 3 ) If A; # 0, i is adjacent to at least one vertex j , where AiA = - 1.

Proof ( 1 ) (=+) Suppose A; = 0. By assumption, i = n,:'. Suppose j < i. Then either n,:' < n;' or ny' >

n;'. If IT;' < n;' clearly i is not adjacent to j. (See Figure 2.l(a)) If rr;' > n;', then i and j intersect and there exists some k such that k > i and n;' < n;'. Then all of i, j, and k intersect each other and hence form a clique of size three as shown in Figure 2.l(b). This, however, can not happen since G is a bipartite graph. Therefore, there is no such j < i that n;' > n;'. Hence, i is not adjacent to any j for j < i and the same holds for j > i by a similar argument. Therefore i is an isolated vertex.

(1) (+) Suppose i is an isolated vertex. Then no vertices intersect i in the diagram. (Figure 2.2) Thus the number

of points on the left of i is equal to the number of points on the left of n;', which implies i = IT,:'. Therefore, A; = 0.

FIGURE 2.1

Dow

nloa

ded

by [

Uni

vers

ity o

f Y

ork]

at 0

1:05

21

Aug

ust 2

014

Page 5: OPTIMAL PARALLEL MATCHING ON BIPARTITE PERMUTATION GRAPHS

I68 HlRYOUNG KIM AND ALAN P. SPRAGUE

-I

FIGURE 2.2

FIGURE 2.3

(2) Suppose Ai = A j . (Case 1 ) Ai = A j = 0. I t is clear that i and j are not adjacent by the proof of (i).

(Case 2) A i , = A j = +. Suppose i c j . Since Ai = A j = +, n,T1 < i and < j . 1 n , < nyl, clearly, i and j do not intersect as shown in

Figure 2.3(a). Suppose ir,;' > nl'. Then i and j intersect, and there must

be some k < i such that rr;' > n,yl. (See Figure 2.3(b)) Thus, i , j , and k form a clique of size three violating the property of bipartite graph. Therefore, n,:' < nyl, that is, i and j are not adjacent.

(Casc 3 ) Ai = A j = -. The same argument in case 2 applies. (3) I t is clear from (i) and (ii).

Let U bc the set of vertices whose sign is 0. Let S and T be two sets ;iftcr bipartition of V - U according to the signs, where S consists of the vcrticcs with "-" signs and T consists of those with "+" signs. G, henceforth is assumed a connected bipartite permutation graph, and thus, U = CI

COROLLARY 2.2 Lei lMM 1 be the size of maximum marching. 77retr lMMl 5 min(lS1, /TI).

Dow

nloa

ded

by [

Uni

vers

ity o

f Y

ork]

at 0

1:05

21

Aug

ust 2

014

Page 6: OPTIMAL PARALLEL MATCHING ON BIPARTITE PERMUTATION GRAPHS

PARALLEL MATCHING ON GRAPHS 169

Proof Suppose IS1 ( ITI. By Lemma 2.1, no two elements of T can be matched. So every matched pair contains an element of S. Therefore,

IMMI < IS/.

Since we rely on permutation diagram, we will use "intersect" in preference to "adjacent" for the rest of the section.

Let i be in S . Let 1; be the set of j E T such that j intersects i .

LEMMA 2.3 l i is an itrterval, i.e., for j l , j Z , j3 E T , if j l and j2 E l i . and jl 5 j3 < j ~ , then j3 E l i .

Proof Clearly, i < j l . Suppose j l and j2 E I , , and j l ( j3 p j2. Then i intersects jl and jz . Since j l , j 2 , j3 E T , and hence have the same signs, by Lemma 2.1, they do not intersect each other. (See Figure 2.4) Thus j l ( j3 p j: implies x i 1 ( xi,' ( nil. Therefore, i intersects j3 , and hence j3 E 1 1 .

From now on, we call I; the marching interval for i .

LEMMA 2.4 Let i , j E S. Suppose i < j . Let 1; and I j be the rna~ching intervals for i and j , respectively, where Ii = [ I i , r;] and I j = [ I j , r j ] . Then

1; I , and ri 5 rj.

Proof We prove this lemma by contradiction. Since i and j are in the same set, by Lemma 2.1, i and j do not intersect, and hence n;' < n j l . Suppose I ; > l j . Since l i is the smallest vertex that intersects i, I j does not intersect i , but intersects j . That is, n;' < n ~ ' . Since 1; intersects i , ncl < n;'. Then I , intersects I j , and hence l i , I j , and j form a clique of size three. (See Figure 2.5) Therefore, I ; p I j . The fact that ri 5 rj can be proved similarly.

FIGURE 2.4

Dow

nloa

ded

by [

Uni

vers

ity o

f Y

ork]

at 0

1:05

21

Aug

ust 2

014

Page 7: OPTIMAL PARALLEL MATCHING ON BIPARTITE PERMUTATION GRAPHS

HIRYOUNG KIM AND ALAN P. SPRAGUE

FIGURE 2.5

3. GREEDY ALGORITHM

Let S, T, and U be the sets defined in Section 2. Let IUI = 0. Suppose we arrange the vertices in S and T in increasing order and relabel them: S = (sl, sz, . . . , s ~ ] and T = I t l , t2, . . . , t , , -k } . (An example follows later.) Having found S and T in increasing order, we then find a matching from S to T . Our objective is to find a set of t,(i) E T such that t,(;, is adjacent to s,.

Let I,, = [I,;, t , ] be the matching interval of s; for 1 5 i 5 k as defined immediately before Lemma 2.3. We recursively define M = (r,(,), t,(*,, . . . , a sequence of elements of T, as follows:

a ( i + 1) = max[min(a(i) + 1, r;+l], / ,+I] for all 1 5 i 5 k - 1 . . . F ,

At this point, let us take a look at an example shown in Figure 3.1. In the example, S = ( 1 , 2 ,4 ] and T = {3,5] , and after relabelling, S =

(SI, ~ 2 , .Q) and T = (11, t2} , where s; and ti denote corresponding elements in

nl 3 s 1 2 ' 4

FIGURE 3.1

Dow

nloa

ded

by [

Uni

vers

ity o

f Y

ork]

at 0

1:05

21

Aug

ust 2

014

Page 8: OPTIMAL PARALLEL MATCHING ON BIPARTITE PERMUTATION GRAPHS

PARALLEL MATCHING ON GRAPHS 171

the order in S and T, respectively. The matching intervals for each s; are the following: I ,T , = [ r l , rz] . I, , = [ r , , t * ] , I , , = [ t z t 2 ] . Then, according to F I , M = ( 1 1 , 1 2 , 1 2 ) .

We call M a matching sequence for S. The formula F 1 defines lo ( ; ) for each s; 6 S by assigning the first available vertex within the matching interval for s;. By "the first available vertex", we mean the vertex t,(,)+l that comes immediately after in(;) E T if t , ( ,~+l is in the matching interval I,,,,. If t,(i)+l is outside the matching interval I,,,, is . , t,(;)+l is not adjacent to s;+l, then: (i) If in(;)+] < tl,,, , then t ,(;+l), the successor to r , ( i ) , is set equal to tl,,, (ii) if fo(i)+~ > r r i + , , then, t , ( i+~) = to+,. Case (ii) implies t , ( i+~) = t,(;), SO t , ( ; + ~ ) is a duplicate in the matching sequence M. In the example mentioned above, t , (3 , is a duplicate.

Let D be the set of duplicates of M. If IM -Dl = JMMI, we say M is a maximum matching sequence.

L E M M A 3.1 Let S = ( 3 1 , S 2 , . . . , Sk]. Let M = 1,(2) , . . . , r , ( k ) ) by F I . Then

(i) s;r,(;) E E, 1 5 i 5 k , (ii) IM -D l = IMMI.

Proof (i) By definition, I, = [ r l , , r , ] is the matching interval for si. F I finds t,(;) such that 11 , 5 t,(;) 5 tr; , and hence by Lemma 2.3, s , is adjacent to t,(;).

(ii) Partition S as follows: sj+l = s; if t,(;) is not a duplicate and r , ( j + l ) =

or if r , ( i + l J = I,(;). Extend the binary relation (by transitivity) to an equivalence relation, thus defining equivalence classes on S. Let S',, . . . , SA, 1 5 h 5 k , be such classes. Then

Define Ti T, U j E s ; l j = Ti .

Figure 3.2 shows an example. The interval ( t , , , t , ) for each s; is represented as a line. Each non-duplicate to(;, is shown by asterisk, and the duplicates are marked by hollow circles.

Let SI, be a class that has duplicates, and T i be a corresponding class in T. Let .? = US;, and ? = UT;, where the first union is over all classes SI, having duplicates, and where each Tb is the corresponding class in T. Then I.?( - 1 ? 1 = the number of duplicates in .?. Clearly, in any matching from S into ?, the mate of each i must be in ?, so in any matching, at least 121 -I?'[ members of .? are unmatched. Then M, excluding duplicates in M, is a maximum matching.

Dow

nloa

ded

by [

Uni

vers

ity o

f Y

ork]

at 0

1:05

21

Aug

ust 2

014

Page 9: OPTIMAL PARALLEL MATCHING ON BIPARTITE PERMUTATION GRAPHS

HIRYOUNG KIM AND ALAN P. SPRAGUE

FIGURE 3.2

4. ASSOCIATIVE BINARY OPERATION

In Section 3, we have introduced a greedy algorithm (formula F 1 ) to find a maximum matching sequence M. To compute F 1 in parallel, we construct an associative binary operation @ to which parallel prefix technique can be applied.

Let S be the set of ordered triples (x, y, z) of integers where .r 5 y. Given ( I r l . d l ) , ( 1 2 , r2. d 2 ) E S, F2 is defined as follows: ( I I , r l , d l ) @ ( 1 2 , 1-2, d z ) = ( I * r , ( I ) , where

Dow

nloa

ded

by [

Uni

vers

ity o

f Y

ork]

at 0

1:05

21

Aug

ust 2

014

Page 10: OPTIMAL PARALLEL MATCHING ON BIPARTITE PERMUTATION GRAPHS

PARALLEL MATCHING ON GRAPHS 173

LEMMA 4.1 @, a s defined by formula F2. is at1 associative binary operalion.

Proof Let a = ( I l , r l , d l ) , b = (12. r2. d2), c = (13. r3, d3) be members of S. I t is clear that a @ b is also in S, so @ is a binary operation. To prove associativity, we will show that a @ (b @ c) = (a @ b) @ c. Let A and B the results of lefthand and righthand sides, respectively. Let X = b @ c and Y = a $ b. Let us first evaluate the lefthand side. X = (Ix, rx, dx) , where

rx = max[min(r2 + dj . r3]. I,], and dx = d 2 + d3

And thus, A = (IA, r ~ , dA), where

IA = max[min{ll + dx, ~ x J , Ix],

rA = max[min{rl + dx, rxJ, l x ] and

dA = d l + dx.

Now, the righthand side. Y = ( Iy , ry, d y ) , where

And thus, B = (IB, rB, dB), where

Now let us show A = B, that is,

I,, = lB . . . (i)

rA = rg . . . (ii)

dA = d B . . . (iii)

Since both dA and dg are dl + d2 + d3, (iii) is valid. For (i) and (ii), if we show (i), (ii) can be shown similarly, and thus we will show only part (i) in this proof. To show (i), define a function tnid as the following:

mid(a, b, c) = b, where a 5 b 5 c.

Similarly, where a 5 b 5 c 5 d 5 e, mid(a, b, c, d , e ) = c.

Dow

nloa

ded

by [

Uni

vers

ity o

f Y

ork]

at 0

1:05

21

Aug

ust 2

014

Page 11: OPTIMAL PARALLEL MATCHING ON BIPARTITE PERMUTATION GRAPHS

174 HIRYOUNG KIM AND ALAN P. SPRAGUE

Then, IA and In can be represented as:

Let A and represent /A and In, respectively. By substituting l I + d 2 + d 3 with 11, r2 + d 3 with r2, and 12 + d 3 with 12, both A and B can be reduced to the following:

To show A = 8, we will prove the following Lemma.

LEMMA 4.2 Write mid(/,, 12, r2, 13, r3) as mid(t11e five). If mid(thefi~~e) E [I3, r3) theu, A = B = mid(t1tefive). Otherwise, A = B = 13 or r3, whichever is the ~~or~extretne one.

Proof There are basically six cases in terms of the ordering of the five variables on a line:

( I ) x x x - (2) x x x - (3) x x x (4) xx-x (5) x x x (6) xxxx, where - repre- sents either l3 or r3, and s represents any of I , , r2, and 12.

Suppose mid(the five) E [ I3 , r3]. Then the first five cases are the possibili- ties. First, let's compute A for case (1). Since 13 and r3 are the two extremes, mid(r2, 1 3 , r3) is r2, and mid(12, 13, r3) is 12. And, thus A = rnid(l1, 12, r2) = mid(the five). In computing B, it can be easily seen that B = mid(ll, 12, r2) for case (I ) , and thus, B = mid(the five).

Similarly, i t can be shown that the conclusion is true for all other cases. Suppose mid(the five) @ [I3. r3 ] This can happen only when 13 and r3 are

either the two smallest or the two largest. That is, -xxx or xxx__. Without loss of generality, we consider case (6). Since in S, l3 p r3, A = mid(l1, 13, I,), and is the nonextreme one in this case. In 8, since l3 and r3 are the extremes at the right side, mid(/[, 12, r2) is left of both I 3 and r3. Thus, B = 13, which is the nonextreme one. Therefore, we have shown that A = B, and hence the $ defined in F2 is an associative binary operation as claimed.

So far we have presented a sequential maximum matching algorithm FI and an associative binary operation Fz. Our next objective is to establish that F2 may be used to find the same matching sequence as F1 does.

Dow

nloa

ded

by [

Uni

vers

ity o

f Y

ork]

at 0

1:05

21

Aug

ust 2

014

Page 12: OPTIMAL PARALLEL MATCHING ON BIPARTITE PERMUTATION GRAPHS

PARALLEL MATCHING ON GRAPHS 175

Let tri and t , be the left and right bounds of the matching interval I,rf, for s; E S, that is, s , is adjacent to all t , E T, t , , 5 r j ( r , .

Define ( I ; . ;;, d ; ) = $ ; = , ( l j , r j , d j ) where d , = 1 for all j.

Notice that I ; + l corresponds to a ( i + 1) in F I . Pi and di for 1 ( i ( k were introduced as infrastructure to maintain binary associativity. In the following lemma, we prove that both F1 and F2 produce the same maximum matching sequence by showing that l;+l = u(i + I ) for all i .

A * LEMMA 4.3 Lei L = ( 1 1 , 1 2 , . . . , l k ) . Let M = (fo(l), t ,(z). . . . , as defined in F I . The,, i; = a ( i ) , for all i , 1 ( i ( k .

Proof Proof by induction. (Base) Initially, 1 1 = 1 1 = (~(1). (Induction) Suppose I I = u ( l ) , 12 =

u ( 2 ) , . . . , l i - I = u(i - 1) . Then F 1 yields:

Given ( / , - I . ; , - I , d;-1) and ( 1 ; . r , , d , ) , $ defined in F2 yields:

We have d ; = I, and by hypothesis, l ; - , = u(i - 1 ) . Thus l i = ~ ( i ) . Therefore i; = a(;), for all i , I 5 i 5 k .

5. PARALLEL ALGORITHM AND COMPLEXITY

In this section, we present a parallel algorithm to find a maximum matching. We assume that a permutation diagram for a bipartite permutation graph G ( V , E) is provided. Having established binary associativity, the algorithm finds a maximum matching using parallel prefix. We also show the correctness of the algorithm followed by analysis of complexity. Algorithm to find a maximum matching

STEP 1 Find a partition of V into S and T according to signs as defined in Lemma 2.1;

STEP 2 Arrange the vertices in S and T in increasing order and index them accordingly;

STEP 3 For all vertices in S, find the corresponding matching intervals;

STEP 4 Find a matching sequence from S to T according to F2 as defined immediately before Lemma 4.1.

Dow

nloa

ded

by [

Uni

vers

ity o

f Y

ork]

at 0

1:05

21

Aug

ust 2

014

Page 13: OPTIMAL PARALLEL MATCHING ON BIPARTITE PERMUTATION GRAPHS

176 HIRYOUNG KIM AND ALAN P. SPRAGUE

THEOREM 5.1 The ulgorirlrm finds a tnusimum matclli~lg.

Proof Corollary 2.2 and Lemma 3.1 show that the matching from S to T by formula FI is a maximum matching. In Lemma 4.3: we have s h ~ w n that FI and F2 produce the samc maximum matching sequence. Therefore, the algorithm finds a maximum matching.

Wc show that the algorithm may be executed by O(n/ logn) processors in O(logn) time in the EREW model. Step 1 can be done in O(logn) time by dividing V into log11 subsets. Step 2 can be done by parallel prefix sums. In step 3, we apply parallel merge twice to find the matching intervals ( I i . r ; ) in the following manncr: After step 2, all i E S and all j E T are in increasing order. Lemma 2.1 (ii) implies that ir;' and irjl are also in increasing order. First, we apply parallel merge on two sequences of sorted i i S and j E T. Then 1; is the smallest j E T such that j > i. Next, we merge S and T in parallel in terms of n,-' and n,'. Then r; is the largest j E T such that ir;' <

ir,-'. Finally, the formula F2 in Lemma 4.1 has been shown binary associative, to which parallel prefix technique ciin be applied [2] . Both parallel merge [6 ] and parallel prefix 171 run in O(log11) time using O(n/ logn) processors on an EREW, and thus the cost of our algorithm is optimal.

References

I I I Alt, H., Blum, N.. Mchlhorn, K. and Paul, M. (1991). Computing a maximum cardinality

matching in a bipartite graph in time O(II'.~ -), IrlJorrr~. Proc. Len., 31, 237-240. 121 Akl, S. G. (1989). The Desigrr undArtalysis oJParullelAlgorirhrr~.~. Prentice Hall, ch. 2, 49. 131 Chcn, L. and Yesha. Y. (1993). Efficient parallel algorithms for bipartite permutation graphs,

Nerwurks, 22, 29 -39. 141 Dckcl, E. and Sahni, S. (1984), A parallel matching algorithm for convex bipartite graphs

and applications to scheduling, J. oJParallel rrnd Disrr. Conprrbrg, 1, 185-205. (51 Even, S.. Iuhi, A. and Shamir, A. (1976). On the complexity of timetable and multicom-

niadity flow problems, SlAM Jo. Comprrr., 5. 691 -703. 161 Hagcrup, T. and Rub, C. (1989). Optimal merging and sorting on the EREW PRAM, Infurrir.

Proc. Lcrr.. 33. 18 I - 185. 171 Jaj;~, J. (lYY2). ,411 1r11,nd~rcriort to Pi~rullel Algorirltrns. (Addison-Wesley), ch. 2, 44. [ X I Micali, S. and Vazirani, V. V. (1980). An O ( m ) algorithm for tinding maximum

matching on general graphs. I'roc. oJ2 l~ r AIIII. Symp. Found oJComp. Sci., 17-25. (91 Moitra, A. and Johnson, R. (1989). Parallel algorithms for maximum matching and other

problems on interval graphs. Technical Report: Cornell Univ. 1101 Rhec, C. and Liang, Y. D. (1994). Finding a maximum matching in a permulalion graph.

Pmc. oJ32r1d Arrrr. Sourl~eusr COIIJ. 69 -73. [ I I ] Spinard, J., Brandstaedt, A. and Stewart. L. (1987). Bipartite permutation graphs. DAM, 18,

279-292.

Dow

nloa

ded

by [

Uni

vers

ity o

f Y

ork]

at 0

1:05

21

Aug

ust 2

014