Approximation Algorithm for Maximum Weighted Matching ... - CiteSeerX

82 downloads 0 Views 260KB Size Report
It calculates a match- ing with an edge weight of at least 1. 2 of the edge weight of a maximum weighted matching. Its time complexity is O(jEj), with jEj being the.
Linear Time 12 -Approximation Algorithm for Maximum Weighted Matching in General Graphs Robert Preis ? Universitat Paderborn, D-33095 Paderborn, Germany [email protected]

Abstract. A new approximation algorithm for maximum weighted mat-

ching in general edge-weighted graphs is presented. It calculates a matching with an edge weight of at least 21 of the edge weight of a maximum weighted matching. Its time complexity is ( ), with being the number of edges in the graph. This improves over the previously known 1 2 -approximation algorithms for maximum weighted matching which require ( ( )) steps, where is the number of vertices. O jEj

O jEj  log jV j

jEj

jV j

1 Introduction Graph Matching is a fundamental topic in graph theory. Let G = (V; E ) be a graph with vertices V and undirected edges E without multi-edges or self-loops. A matching of G is a subset M  E , such that no two edges of M are adjacent. A vertex incident to an edge of M is called matched and a vertex not incident to an edge of M is called free. An enormous amount of work has been done in matching theory in the past. Di erent types of matchings have been discussed, their existence and properties have been analyzed and ecient algorithms for the calculating of speci c matchings have been developed. Many results have been achieved for speci c types of graphs like bipartite, planar or other ones. A central aspect are matchings with high cardinality. A Maximal Matching MMAX is a matching which cannot be enlarged by an additional edge without breaking the matching property. A graph may have several di erent maximal matchings and, especially, maximal matchings of di erent cardinality. A Maximum Cardinality Matching MMCM is a matching of maximum size, i.e. for all matchings M of G holds jMMCM j  jM j. Matchings are also discussed P for graphs with edge weights w : E ! IR. For a set F  E let W (F ) := fa;bg2F w(fa; bg) be the weight of F . A Maximum Weighted Matching MMWM is a matching of highest weight, i.e. for all matchings M of G holds W (MMWM )  W (M ). Many algorithms for the calculating of matchings have been developed in the past. Please consult e.g. [8, 9] for the history of matching algorithms. In the following, only the currently fastest algorithms are stated. Simple methods with time complexity O(jE j) can be used to calculate maximal matchings. The ?

Supported by DFG/HNI-Graduiertenkolleg "Parallele Rechnernetze in der Produktionstechnik" and DFG Sonderforschungsbereich 376: "Massive Parallelitat"

fastest algorithm for maximum cardinality matchingpup to date is by Micali and Vazirani [10] which has a time complexity of O(jE j jV j). In the edge-weighted case, the algorithm by Gabow [3] calculates a maximum weighted matching in time O(jV j  jE j + jV j2 log(jV j)). This time complexity has been improved by Gabow and Tarjan [4] under the assumption of integral costs that are not particularly high: if the weight function w : E ! [?N; p:::; N ] assigns only integers between ?N and N , their algorithm will run in O( jV j  (jE j; jV j)  log(jV j)  jE j  log(jV j  N )) time, where is the inverse of Ackermann's function. All algorithms discussed so far have super-linear time complexity. Recently, approximation algorithms for matching problems have attracted more and more attention. They have a smaller time complexity than an optimal algorithm and calculate suboptimal solutions. The guaranteed quality is described by an approximation factor which states the worst case loss to an optimal solution, e.g. a factor of 21 guarantees that the solution quality is at least half the value of the optimum solution. It is a simple exercise to prove that any maximal matching MMAX has a cardinality of at least 21 the cardinality of a maximum cardinality matching, i.e. jMMAX j  21 jMMCM j. Therefore, any algorithm for maximal matching is an 21 -approximation algorithm for maximum cardinality matching. Augmenting paths are often considered for graph matching, especially for approximating maximum cardinality matching. It is a path of an odd number of edges with alternating edges of M and of E nM and two free vertices as endpoints, i.e. an augmenting path of length l consists of l?21 edges of M and l+1 edges 2 of E nM . If such a path exists, the cardinality of M can be increased by one by exchanging the matched and unmatched edges of the path. Based on the work by Hopcroft and Karp [6], it can be shown that if the shortest augmenting path with respect to a matching Ml is l, then jMl j  ll?+11 jMMCM j (see e.g. [7], p.156). Matchings without short augmenting paths can be calculated very fast, e.g. a matching with a shortest path of length l  5 can be computed in time O(jE j), resulting in jM5 j  32 jMMCM j. If the minimum degree min and maximum degree max of all vertices are considered, it can easily be proven that if the shortest jV j, which implies augmenting path has a length l  5, then jM5 j  maxmin +2min jM5 j  31 jV j for graphs with a regular degree, i.e. 23 of the vertices are matched. For the weighted case, the GREEDY-algorithm of Figure 1 calculates a matching MGREEDY with weight W (MGREEDY )  21 W (MMWM ) which is analyzed by Avis [1]. It requires a time of O(jE j  log(jV j)), if the edges are sorted by their weights in a preprocessing step. GREEDY-Algorithm GREEDY := ; WHILE ( = ) M

;

E 6

;

take an edge fa; bg 2 E with highest weight; add fa; bg to MGREEDY ; remove all edges incident to a or b from E ; ENDWHILE

Fig. 1. GREEDY: 21 -app. alg. for maximum weighted matching in time (

( )).

O jEjlog jV j

1.1 New Result

The new algorithm is similar to GREEDY. It guarantees the same approximation quality, but has only a time complexity of O(jE j). The new algorithm LAM is described in the following sections and we now state the new theorem: Theorem 1. Let G = (V; E ) be a graph with vertices V and weighted undirected edges E . A matching MLAM of G with an edge weight of at least 21 of the edge weight of a maximum weighted matching can be computed in linear time O(jE j). Proof. Lemma 4 (Section 3) shows that the algorithm LAM of Figure 4 (Section 2) calculates a matching MLAM with an edge weight of at least 21 the edge weight of a maximum weighted matching and Lemma 5 (Section 4) shows the time complexity of O(jE j). ut According to corollary 2 (Section 2), matching MLAM computed by LAM is also maximal. As stated above, jMMAX j  21 jMMCM j, resulting in: Corollary 1. The matching MLAM computed by algorithm LAM not only has a weight of at least 12 the weight of a maximum weighted matching, but also has a cardinality of at least 12 the cardinality of a maximum cardinality matching.

1.2 Our Motivation: Matching for Multilevel Graph Partitioning

Graph Matching has a wide range of application, some of which are discussed by Lovasz and Plummer in [9]. Our motivation comes from the use of matchings in a multilevel approach for ecient partitioning of very large graphs. In graph partitioning, the vertices of a graph are partitioned in a xed number of equally sized parts, such that the number of edges connecting vertices of di erent parts is minimized. In the weighted case, the sum of weights of crossing edges is minimized. The calculation of a partition with minimum weight of crossing edges is NP-complete, even for the case of partitioning a graph with equal edge weights into two parts [5]. Therefore, ecient heuristics are used to calculate good partitions in a reasonable amount of time and many freely available partitioning libraries like PARTY [11] include several di erent types of methods, but many heuristics still have a high time complexity when used for very large graphs. The solution is to coarsen the large graph in several levels to smaller and smaller graphs with a similar structure, to partition the smallest graph and to project the here found partition back through the levels to a partition of the original graph. The single coarsening steps between two levels are usually performed by matchings, i.e. a matching of the graph is calculated and the vertices incident to a matching edge are contracted. It is important to contract those vertices which are connected via an edge of a high weight, because it is very likely that this edge does not cross between parts in a partition with a low weight of crossing edges. Generally, the use of a maximum weighted matching would bene t the coarsening step the most, but the super-linear time complexity of an optimal algorithm is too high for real examples. Therefore, fast approximation algorithms like the new one in this paper are very useful here.

2 New Linear Time Approximation Algorithm Figure 2 outlines the new LAM algorithm. It starts with an empty matching MLAM and repeatedly adds an edge fa; bg to MLAM and removes all edges incident to a or b, because they cannot be part of the nal matching. The key idea is to add locally heaviest edges fa; bg, i.e. an edge with a weight of at least as high as the weight of all adjacent edges remaining in E , i.e. w(fa; bg)  w(fx; yg) for any fx; yg 2 E with a = x or b = x. After a locally heaviest edge is removed from E , further edges may become locally heaviest. Note that at least one locally heaviest edge always exist.

Outline of LAM-Algorithm

MLAM := ;; WHILE (E 6= ;) take a locally heaviest edge fa; bg 2 E ; add fa; bg to MLAM ; remove all edges incident to a or b from E ; ENDWHILE

Fig. 2. Outline of LAM: Linear time 12 -app. alg. for maximum weighted matching. The main problem is to nd such an edge. Figure 3 shows the idea. The algorithm starts with an arbitrary edge and checks the remaining adjacent edges. As long as an adjacent edge with higher weight can be found, the algorithm switches to the new edge and repeats the checking procedure until a locally heaviest edge is reached, i.e. the weight increases along the path. free vertices matched vertices c_1 c_2 c_3

edges along search path

c_4

a

2 1

edges incident to a or b new matching edge: locally heaviest edge

3 b

current matching M_LAM

d_1 d_2

Conditions: weight of edge 1 < weight of edge 2 < weight of edge 3 weight of {a,b} >= weight of {a,c_i} weight of {a,b} >= weight of {b,d_i}

Fig. 3. Starting with an arbitrary edge 1, the path progresses along edges 2 and 3 with

higher weight until a locally heaviest edge is found. (Only edges of the current matching LAM , edges along the path and edges adjacent to are shown.) fa; bg

M

fa; bg

The detailed algorithm LAM is shown in Figure 4. It starts with an empty matching MLAM . The global sets U and R store the unchecked edges (U = E at the start) and the removed edges (R = ; at the start). The main algorithm is a WHILE loop which calls the procedure 'try match' with an arbitrary unchecked

LAM-Algorithm MLAM := ;; U := E ; R := ;; WHILE (U 6= ;) take arbitrary edge fa; bg 2 U ; try match (fa; bg); ENDWHILE

/* empty matching at the start */ /* all edges are unchecked at the start */ /* no removed edges at the start */

PROCEDURE try match (fa; bg) Cfa;bg (a) := ;; Cfa;bg (b) := ;; /* empty local sets of checked edges at the start */ WHILE (a is free AND b is free AND (9fa; cg 2 U OR 9fb; dg 2 U )) IF (a is free AND 9fa; cg 2 U ) move fa; cg from U to Cfa;bg (a); /* move from U to C */ IF (w(fa; cg) > w(fa; bg)) try match (fa; cg); /* call heavier edge */ ENDIF ENDIF IF (b is free AND 9fb; dg 2 U ) move fb; dg from U to Cfa;bg (b); /* move from U to C */ IF (w(fb; dg) > w(fa; bg)) try match (fb; dg); /* call heavier edge */ ENDIF ENDIF ENDWHILE IF (a is matched AND b is matched) move edges Cfa;bg (a) and Cfa;bg (b) to R; /* move from C to R */ ELSE IF (a is matched AND b is free) move edges Cfa;bg (a) and ffb; dg 2 Cfa;bg (b)j d is matchedg to R;/* move from C to R */ move edges ffb; dg 2 Cfa;bg (b)j d is freeg back to U ; /* move from C back to U */ ELSE IF (b is matched AND a is free) move edges Cfa;bg (b) and ffa; cg 2 Cfa;bg (a)j c is matchedg to R;/* move from C to R */ move edges ffa; cg 2 Cfa;bg (a)j c is freeg back to U ; /* move from C back to U */ ELSE /* a is free AND b is free */ move edges Cfa;bg (a) and Cfa;bg (b) to R; /* move from C to R */ add fa; bg to MLAM ; /* new matching edge fa; bg */ ENDIF

Fig. 4. LAM: Linear time 21 -app. alg. for maximum weighted matching. edge fa; bg. This edge is not added to the matching until all adjacent edges to free vertices are checked for higher weight which is managed in the WHILE part of the procedure. Every call of procedure 'try match (fa; bg)' stores its own sets of locally checked edges Cfa;bg (a) and Cfa;bg (b), depending on whether the checked edges Sare incident to a or b. Let C be the union of all locally checked edges, i.e. C := fa;bg2E Cfa;bg (a) [ Cfa;bg (b) (we will show later that 'try match' is called not more than once for every edge). As long as a and b are free and at least one of them is incident to an unchecked edge, it is checked and, if it has a higher weight, 'try match' calls itself recursively with the new edge. Recursive calls are repeated until a locally heaviest edge is reached. Then, the edge is added to MLAM, the algorithm terminates the current call of 'try match', tracks back the search path by one edge and continues the WHILE loop by checking further adjacent edges. The WHILE loop terminates if vertices a and/or b were matched in a recursive call or if no further adjacent unchecked edge exists. Then in the IF-ELSE part, fa; bg is added to MLAM if a and b are free. In addition, edges incident to matched vertices and checked in the current call are removed, i.e. moved from C to R. If a

or b remains free, all edges which were checked in the current call and are incident to two free vertices are unchecked, i.e. moved back from C to U . Lemma 5 will show that only a limited number of times edges are moved back from C to U . Note that the WHILE loop alternately checks adjacent edges incident to a and incident to b, as long as both types are available. This property will be used in Section 4 to show the linear time requirement. Additionally, removed edges cannot take part in the following matching process, but we need to keep track of how many edges are removed in every part of the algorithm. Unlike in the outline of the algorithm in Figure 2, edges incident to matched vertices are not removed immediately, but removed in those procedure calls of the algorithm where they were checked the last time. It is fairly obvious that the unchecked edges in U have the property that both incident vertices are free. It holds true for the start. New edges are only moved back to U in the IF-ELSE part, but only if they are incident to two free vertices. Furthermore, an edge fa; bg may only be matched at the end of the IF-ELSE part. In this case, a and b have to be free, and the WHILE loop terminated because there was no edge fa; cg or fb; dg in U , i.e. all edges in U keep the property of being incident to two free vertices. The central part of the algorithm is the procedure 'try match' and the following lemma shows the number of times it is called: Lemma 1 (jE j calls). Procedure 'try match' is called only once for every edge. Proof. The procedure 'try match' is only called with an edge fa; bg from U , which ensures that both vertices are free. The same edge cannot be the parameter in deeper recursive calls, because the search path only progresses along strictly higher edge weights. Finally, in the IF-ELSE part of 'try match', either a and/or b are already matched or they are matched by including edge fa; bg in MLAM. Therefore, after the rst call of 'try match(fa; bg)', a and/or b are matched, i.e. fa; bg cannot be in U anymore and cannot be called a second time. ut The following lemma shows the status of the edges: Lemma 2 (edge status). At the start all edges are not checked (U = E ), and there are no checked or removed edges (R = C = ;). At any stage, an edge fa; bg 2 E is either unchecked (2 U ), checked (2 C ) or removed (2 R), resulting in E = U [ C [ R. At the end, all edges are removed, i.e. U = C = ; and R = E . Proof. The status at the start is clear from the algorithm. The edges are only moved between the sets U , C and R, ensuring the stated status throughout the algorithm. The WHILE loop of the main algorithm terminates when U is empty. Besides, all edges Cfa;bg (a) and Cfa;bg (b), which have been moved in the WHILE loop of procedure call 'try match (fa; bg)', are either moved to R or back to U in the IF-ELSE part of the same call. Therefore, C is also empty after termination of all 'try match' calls, resulting, with E = U [ C [ R, in E = R. ut Lemma 2 ensures that all edges are removed at the end of the algorithm, because at least one of the incident vertices has been matched. Thus: Corollary 2 (maximal). The resulting matching MLAM is maximal.

3

1 2

- Approximation Quality

In this section the property of locally heaviest edge for any edge added to the matching and the 21 -approximation are shown. A similar proof has been done in [1] to show the 21 -approximation for the GREEDY algorithm of Figure 1. Lemma 3 (locally heaviest edge). Algorithm LAM starts with an empty matching and an edge fa; bg is only added if a and b are free and neither a nor b are adjacent to a free vertex with an edge of higher weight than fa; bg. Proof. An edge fa; bg is only added to MLAM in the last ELSE part of 'try match', i.e. a and b are free. Let a be adjacent to a free vertex c (or b adjacent to a free vertex d). According to Lemma 2, edge fa; cg (fb; dg) may be in R : Impossible, because then either a or c are already matched. in U : Impossible, because then the WHILE loop would not have terminated. in C : The weight of fa; bg (fb; dg) is higher than of all other edges in the search path. When edges were checked along the search path, either their weight was not higher than the weight of the corresponding path edge, or the search path progressed along this edge. In the later case, either the recursive call terminated with at least one incident vertex of that edge being matched, or the edge is still in the search path. ut 1 Lemma 4 ( 2 -approximation). Algorithm LAM computes a matching MLAM with at least 21 of the edge weight of a maximum weighted matching MMWM . Proof. Compare MLAM to an arbitrary matching MMWM , let VLAM be the matched vertices of the current MLAM and VMWM be the matched vertices of MMWM . Throughout the algorithm we will show that the weight of the current matching MLAM is at least 21 the weight of the edges of MMWM incident to a vertex of VLAM : W (MLAM )  21 W (ffu; vg 2 MMWM ju 2 VLAM _ v 2 VLAM g) It holds for the start (MLAM := ;). After adding an edge fa; bg to MLAM, W (MLAM ) increases by w(fa; bg), but also the right hand side may increase. If fa; bg 2 MMWM , the right hand side only increases by 21 w(fa; bg). Otherwise, let fa; cg; fb; dg 2 MMWM be the possible edges adjacent to fa; bg. The choice of matching edge fa; bg excluded the possible choice of fa; cg and fb; dg throughout the rest of the algorithm. These are the only two edges by which the subset of MMWM may increase, i.e. the right hand side may only increase by 12 (w(fa; cg) + w(fb; dg)). If c 2 VLAM (d 2 VLAM ) before we add edge fa; bg, then fa; cg (fb; dg) is already in the subset of MMWM . If c 2= VLAM (d 2= VLAM ), i.e. c (d) is free, Lemma 3 insures that w(fa; bg)  w(fa; cg) (w(fa; bg)  w(fb; dg)). Therefore, the value on the right hand side cannot increase by more than w(fa; bg). At the end, algorithm LAM terminates with a maximal matching MLAM (Corollary 2), i.e. for all edges fu; vg is u 2 VLAM or v 2 VLAM . Therefore, W (MLAM)  21 W (ffu; vg 2 MMWMju 2 VLAM _ v 2 VLAM g) = 21 W (MMWM )ut

4 Linear Time Requirement The time requirement depends on the number of times edges are moved between the sets U of unchecked, C of checked and R of removed edges. There are only three ways in which an edge may be moved: (1) in the WHILE loop of 'try match', previously unchecked edges are checked (moved from U to C ), in the IF-ELSE part, the checked edges are either (2) removed (moved from C to R), or (3) unchecked again (moved from C to U ). Therefore, once an edge is removed and stored in R, it will not be moved to any other set, ensuring that an edge may be moved from C to R at most jE j times. Furthermore, an edge may be moved several times between U and C , but we will show that every time when edges are moved back from C to U , an almost equal number of edges is moved from C to R, showing that the number of edges moved between U and C is O(jE j). Lemma 5 (linear time). Algorithm LAM of Figure 4 runs in O(jE j) time. Proof. The loop of the main algorithm has at most jE j iterations, because if it makes a call 'try match (fa; bg)' with an edge fa; bg 2 U , at least one of a and b are matched after the completion of the call. As stated in Section 2, an unchecked edge in U is always incident to two free vertices. Therefore, U reduces by at least the edge fa; bg in every iteration of the WHILE loop of the main algorithm. Although new edges may be added to U in the IF-ELSE part of 'try match', those edges have previously been moved in the WHILE loop of the same procedure. According to Lemma 1, the 'try match' procedure is not called more than once for every edge fa; bg 2 E . In sum, the time complexity of the algorithm is: X O(jE j) + fa;bg2E O(try match (fa; bg)) The procedure 'try match(fa; bg)' consists of a WHILE loop and an IF-ELSE part. In every WHILE loop, an edge fa; cg and/or fb; dg is checked and moved from U to the local sets Cfa;bg (a) and/or Cfa;bg (b) of checked edges, resulting in a time of O(jCfa;bg (a)j + jCfa;bg (b)j) for the WHILE loop. The values jCfa;bg (a)j and jCfa;bg (b)j refer to the maximum sizes of the sets Cfa;bg (a) and Cfa;bg (b), which occur after the completion of the WHILE loop. In the IF-ELSE part, the edges of the local sets Cfa;bg (a) and Cfa;bg (b) are either removed (moved to R), or they are unchecked again (moved to U ), which again leads to a time complexity of O(jCfa;bg (a)j + jCfa;bg (b)j). Thus, the run time of the algorithm is:

O(jE j) +

X

fa;bg2E O(jCfa;bg (a)j + jCfa;bg (b)j)

(1)

We will show that the number of check operations is not much larger than the number of remove operations for every call. LetPRfa;bg be the set of edges removed in the procedure call 'try match(fa; bg)', i.e. try match ( ) Rfa;bg = R. We distinguish between the cases of the IF-ELSE part: 1. a and b are matched; a and b are free: In both cases the size of sets Cfa;bg (a) and Cfa;bg (b) is equal to the number of removed edges, i.e. jCfa;bg (a)j + jCfa;bg (b)j = jRfa;bg j (2) fa; bg

2. a is matched, b is free: In this case, a was matched with an adjacent vertex c in a recursive call of 'try match'. It may be matched in a recursive call just one level deeper as shown in Figure 5(i), but it may also be matched in a deeper level of recursion as result of a loop in the search path as shown in Figure 5(ii). In addition, it may also be matched in a recursive call made from vertex b as shown in Figure 5(iii). We will show, that the number of 1

a

7

b

2

7 3

c

2

c 5

4

3

6

4

(ii)

(i)

1

a

4

3

b

c

b 2

new matching edge 1

b

2

edges of intermediate rec. levels a

1

a

edge of heighest rec. level

)iii(

d 5

6

(iv)

Fig. 5. Vertices or are matched in a recursive call. Edges of consecutive recursive a

b

calls are shown and numbers indicate the level of recursion, i.e. the edge weight increases with the numbers. (i): is matched in a recursive call from itself one level deeper. (ii): is matched in a recursive call from itself several levels deeper, forming a loop. (iii): is matched in a recursive call from . (iv): is matched in a recursive call from . a

a

a

b

b

a

uncheck operations is not larger than the number of remove operations. Let us assume, the WHILE loop terminates after i iterations, i.e. a and c were free at the start of every iteration and edge fa; cg matched in the i-th iteration. We have to show, that an edge fa; ci g 2 U was checked in every iteration i. According to Lemma 2, fa; cg is either in U , C or R at every stage and, especially, at the beginning of every iteration of the WHILE loop of the procedure call 'try match (fa; bg)'. If fa; cg is checked, it may either be checked from the procedure 'try match (fa; bg)', or from a procedure call earlier in the search path. When edges were checked along the search path, either their weight was not higher than the weight of the corresponding path edge, or the search path progressed along this edge. In the later case, either the recursive call terminated with at least one incident vertex of that edge being matched, or the edge is still in the search path. Therefore, if fa; cg is checked, it cannot have a higher weight than fa; bg, but this is impossible, because it was matched in iteration i while being the nal edge in the search path and fa; bg being within the search path. Furthermore, fa; cg can also not be removed, because then either a or c is matched. Therefore, fa; cg 2 U at the start of every iteration, i.e. the condition of the rst IF condition in the WHILE loop was true in each iteration and an edge fa; ci g is checked and moved to Cfa;bg (a), i.e. jCfa;bg (a)j = i. In addition, it is clear that jCfa;bg (b)j cannot be more than the number of iterations, i.e. jCfa;bg (b)j  i, resulting in jCfa;bg (a)j + jCfa;bg (b)j  2jCfa;bg (a)j  2  jRfa;bg j (3) 3. b is matched, a is free: This case is similar to the previous one, but not identical, because a is checked rst in the WHILE loop. It may happen that

b is matched in a recursive call from a as shown in Figure 5(iv). In this case, in the nal iteration of the WHILE loop, b was already matched after completion of the recursive calls from a and no further edge was added to Cfa;bg (b). Consequently, we can only guarantee i  jCfa;bg (b)j  i ? 1. As in the previous case, jCfa;bg (a)j cannot be more than the number of iterations, i.e. jCfa;bg (a)j  i, resulting in jCfa;bg (a)j + jCfa;bg (b)j  2jCfa;bg (b)j + 1  2  jRfa;bg j + 1 (4)

Equations 2, 3 and 4 reduce the overall time complexity of equation 1 to X O(jE j) + fa;bg2E O(2  jRfa;bg j + 1) = O(jE j); because the total number of removed edges cannot exceed jE j.

ut

5 Conclusion The new algorithm LAM has been tested experimentally and compared with other matching heuristics on many large graphs from real applications by Birger Boyens in [2]. It is implemented in the graph partitioning library PARTY [11], where it is used for graph coarsening in the multilevel partitioning approach. I would like to thank Burkhard Monien and Marco Riedel for many fruitful discussions on graph matching.

References 1. D. Avis. A survey of heuristics for the weighted matching problem. Networks, 13:475{493, 1983. 2. B. Boyens. Schrumpfungstechniken zur ezienten Graphpartitionierung. DiplomThesis, Universitat Paderborn, Germany, June 1998. (in German). 3. H.N. Gabow. Data structures for weighted matching and nearest common ancestors with linking. ACM-SIAM Symposium on Discrete Algorithms., pages 434{443, 1990. 4. H.N. Gabow and R.E. Tarjan. Faster scaling algorithms for general graph-matching problems. Journal of the ACM, 38(4):815{853, 1991. 5. M.R. Garey, D.S. Johnson, and L. Stockmeyer. Some simpli ed NP-complete graph problems. Theoretical Computer Science, 1:237{267, 1976. 6. J. Hopcroft and R.M. Karp. An ( 5=2 ) algorithm for maximum matching in bipartite graphs. SIAM Journal on Computing, 2:225{231, 1973. 7. M. Karpinski and W. Rytter. Fast Parallel Algorithms for Graph Matching Problems, Oxford Lecture Series in Math. and its Appl.. Oxford University Press, 1998. 8. E.L. Lawler. Combinatorial Optimization: Networks and Matroids. Holt, Rinehart and Winston, New York, 1976. 9. L. Lovasz and M.D. Plummer. Matching Theory, volume 29 of Annals of Discrete Mathematics. North-Holland Mathematics Studies, 1986. 10. S. Micali and V.V. Vazirani. An ( ) algorithm for nding maximum matching in general graphs. In IEEE Annual Symposium on Foundations of Computer Science, pages 17{27, 1980. 11. R. Preis and R. Diekmann. The PARTY partitioning-library, user guide, version 1.1. Technical Report TR-RSFB-96-024, Universitat Paderborn, Sep 1996. O n

O

p

jV j  jEj