Bipartite Matching
Bipartite Matching
ABSTRACT
A matching M of the graph G is an edge set such that no two edges of M share their endpoints. For a bipartite
graph G = (V, E) maximum matching are matching whose cardinalities are maximum among all matchings.
Existing enumerating algorithm of maximum matching has time complexity is O(|V |) per matching. FordFulkerson method finds the maximum matching on a bipartite graph with O(VE) time. In this paper, an
algorithm to find the maximum matching on a bipartite graph with O(E) time is presented which is less than
the time complexity of the existing algorithms.
1. INTRODUCTION
Bipartite graph is a connected undirected graph such that (i)
the vertices of G partitioned into two sets X and Y, (ii)
every edge of G has one end point in X and the other in Y.
Matching M in G a set of edges that have no end points in
common. Maximum Bipartite Matching Problem finds a
matching with the greatest number of edges (over all
matching). A matching M of the graph G is an edge set
such that no two edges of M share their endpoints. Edges of
a matching are called matching edges. If a vertex is incident
to a matching edge, the vertex is covered by the matching,
and otherwise uncovered. Matching with the maximum
cardinality among all matching in G a maximum matching,
and a matching which is properly contained in no other
matching a maximal matching. In bipartite graph vertex set
can be partitioned into V=LR; where L and R are
disjointed and all edges in E go between L and R. Our
algorithm starts selection the vertex from left side or right
side (vertex) of a bipartite graph, which has minimum
number of incident edge on it, and its neighbour vertex. So
the selected vertex and neighbour vertex represent the edge.
This algorithm discard all the incident edges to that edge.
This process continue until to cover all the edges. Therefore
the selected edges are the maximum matchings.
2. RELATED WORK
Takeaki Uno [1] described, Algorithms for Enumerating
All Perfect, Maximum and Maximal matching in Bipartite
Graphs. This algorithm takes only O(n) time per a
matching; where n is the number of vertexes in a graph.
For perfect matching in a bipartite graph, K. Fukuda and T.
33
DUET Journal
Step 5: Exchange edges along the cycle
and output the obtained maximum
matching M.
Step 6: Enumerate all maximum matchings
including e by Enum Maximum
Matchings iter with G+(e), M and
trimmed D(G+(e),M / e).
Step 7: Enumerate all maximum matchings
not including e by
Enum_Maximum_Matchings_iter with
G-(e),
M and trimmed D(G-(e),
M ). Stop.
Step 8: Find a feasible path with length
2 and generate a new maximum
matching M. Let e be the edge
of the path not included in M.
Step 9: Call Enum Maximum Matchings iter
(G+(e), M, ).
Step 10: Call Enum Maximum Matchings
iter (G -(e), M, ).
Fig. 1: Algorrithm_Enum_maximum matching.
3.1 Complexity Analysis of the Algorithm
The algorithm Enum Maximum Matching takes O(n1/2m)
time. The algorithm Enum Maximum Matching iteration
takes O(n) time except for trimming in steps 9 and 10. In
steps 9 and 10 of each recursive call, spending time
proportional to the size of D(G, M). But in the previous
section, it is showed that this time can be assigned to their
descendants such that the total assigned time for each
vertex of the enumeration tree does not exceed O(n).
Therefore the total time spent by the algorithm is O(n) time
per a maximum matching. Where n is the number of
vertices in a graph.
4. PROPOSED MATCHING ALGORITHM
A matching of size K in a graph G is a set of K pair wise
disjoint edges. If a matching saturates every vertex of G
then it is a perfect matching or 1-factor. Given an
undirected graph G = (V, E) matching is a subset of edges
such that for all vertex v V at mast one edge of M is
incident on v. It is said that a vertex v V is matched by
matching M if some edge in M is incident on v. otherwise v
is unmatched. A maximum matching is a matching of
maximum cardinality, that is a matching M such that for
any matching M/, |M|>|M/|. In bipartite graph vertex set can
be partitioned into V=LR. Where L and R are disjointed
and all edges in E go between L and R. Explanation of the
algorithm is given in Fig. 3.
Algorithm Maximum_matching (E, L, R){
// E is the edges of the graph,
// L is the set of left nodes
// R is set of right nodes Count
incident edge of all vertexes;
1. m ;
2. While (E ) {
3. i=find vertex from L and R which
has minimum incident edge;
4. If (i>1) j=Neighbor of i has
minimum edge;
5. Else j=Neighbor of i;
6.
m=m (i, j);
Delete
all
edges
which
are
incident of i and j;
Count incident edge of other
vertex ;}
Fig. 2: Algorithm_maximum_matching.
34
DUET Journal
(c)
(b)
(a)
(e)
(d)
(f)
Fig. 3: Explanation of the proposed algorithm
E n u m A lg o
F o rd -F u lk A lg o
P ro p o s e d A lg o
10000
1000
100
10
1
1
N o o f v e r t e x a n d e dge s ( in dif f e r e n t D a t a se t s)
35
DUET Journal
[3]
[4]
[5]
[6]
5. DISCUSSION
Our algorithm finds the maximum matching on a bipartite
graph. From Fig. 3(f) it is observed that cardinality of
maximum matching is 5. The complexity of the algorithm
is almost O(E). A comparative analysis of the time
efficiency between proposed system and existing (best
known) algorithms is presented in Fig. 4.
[7]
[8]
[9]
K. Giaro, R. Janczewski, and M. Kubale, "A 27/26Approximation Algorithm for the Chromatic Sum
Coloring of Bipartite Graphs," in LNCS 2462, 2002,
pp. 135-145.
6. CONCLUSION
The existing enumerating algorithm of maximum matching
has time complexity O(|V |) per matching. Ford-Fulkerson
method finds the maximum matching on a bipartite graph
with O(VE) time. The proposed algorithm to find the
maximum matching on a bipartite graph with O(E) time is
less than the time complexity of the existing algorithm. The
comparative analysis of time efficiency also shows that the
proposed algorithm takes less time than that of the other
existing (well known) algorithms.
REFERENCES
[1]
[2]
www.springerlink.com/index/7328p0x9v216l357.pdf,
"Algorithms for Enumerating All Perfect, Maximum
and Maximal Matchings in Bipartite Graphs ".
http://www.misojiro.t.u-tokyo.ac.jp/~tomomi,
"Finding All Minimum Cost Perfect Matchings in
Bipartite Graphs ".
[12] V. Polishchuk and J. Suomela, "A simple local 3approximation algorithm for vertex cover " Elsevier
Journal, vol. 109, pp. 642-645, 2009.
[13] R. E. Tarjan, "Depth-First Search and Linear Graph
Algorithm," SIAM Journal, vol. 1, pp. 146-169, 1972.
36