Received 6 April 2015; accepted 23 January 2016; published 26 January 2016

1. Introduction
A matching M of a graph
is a subset of edges with the property that no two edges of M share a common vertex. A matching is called induced if the subgraph of G induced by M consists of exactly M itself. The maximum matching problem is to find a matching with the maximum cardinality. Graph matching is one of the fundamental problems in combinatorial optimization because of its use in various fields such as computational biology [3] , pattern recognition [4] , computer vision [5] , music information retrieval [6] , and computational music theory [7] . For arbitrary graphs, it is known that this problem can be solved in
time [8] . Moitra and Johnson gave an
time algorithm on interval graphs [9] . In addition Alt, Blum, Mehlhorn,
and Paul gave an
time algorithm on bipartite graphs [10] . In [11] Yu and Yang exhibited an
time algorithm for the maximum matching problem on cographs. This result was extended in [12] by Fouquet, Parfenoff and Thuillier to a wider class, namely the
-tidy graphs. Also the technique developed in [11] was used by Fouquet, Giakoumakis and Vanherpe in [2] to find an
time algorithm for the maximum matching problem on bipartite
-free graphs (see Figure 1). In [1] , Lozin studied the class of bipartite
![]()
Figure 1. Forbidden configurations for
-free graphs.
-free graphs and conjectured that both maximum induced matching problem and maximum matching problem in this class can be solved in linear time. The first one has been solved in [13] . In this paper we shall solve Lozin’s conjecture for maximum matching problem by extending the matching algorithm for the class of
-free graphs [2] to the class of bipartite
-free graphs. Our algorithm is based on the recognition algorithm of the class
-free bipartite graphs introduced by Quaddoura in [14] .
2. Definitions and Properties
For terms not defined in the paper the reader can refer to [15] . The graphs considered in this paper are finite without multiple edges and loops. As usual, for any graph G we denote the set of its vertices by
and by
the set of its edges (or simply by V and E if there is no risk of confusion) and their respective cardinalities by n and m. A bipartite graph
is defined by two disjoint vertex subsets B the black vertices and W the white ones, and a set of edges
. The bi-complement of a bipartite graph
is the bipartite graph defined by
. If the color classes B and W are both non empty, the graph will be called bichromatic, monochromatic otherwise. A vertex x will be called isolated (resp. universal) if x has no neighbors in G (resp. in
). A complete bipartite graph is a graph having only universal white vertices and universal black vertices. A stable set is a subset of pairwise non-adjacent vertices. A chordless path on k vertices is denoted by
and a chordless cycle on k vertices is denoted by
. Given a subset X of the vertex set
, the subgraph induced by X will be denoted by
. A set
is called a module if every vertex in
is either adjacent to all vertices in A or none of them. The representative graph of a graph G is the subgraph of G induced by the set of vertices containing one vertex from each proper maximal module of G. A graph G is called Z-free where Z is a set of graphs, when G does not contain an induced subgraph isomorphic to a graph of Z.
Definition 1 [2] . Given a bipartite graph
of order at least 2, G is
graph if and only if G contains an isolated vertex or its vertex set can be decomposed into two sets K and S such that K induces a complete bipartite graph while S is a stable set.
Property 2 [2] . Let
be a bipartite graph of order at least 2. G is
graph if and only if there exists a partition of its vertex set into two non empty classes
and
such that all possible edges exists between the black vertices of
and the white vertices of
while there is no edge connecting a white vertex of
with a black vertex of
.
Such partition is referred as associated partition of G and is denoted by the ordered pair (
,
) [2] .
Property 3 [2] . A bipartite graph G is a
graph if and only if G admit a unique (up to isomorphism) partition of its vertex set
satisfying the following conditions:
1)
is an associated partition to the graph G.
2)
is not a
graph.
The partition
of the above property is called
decomposition while a set
said to be
component of the graph.
From
decomposition together with the decomposition of bipartite graph G into its connected components (parallel decomposition) or those of
(series decomposition) yield a new decomposition scheme for G called canonical decomposition. It is shown in [2] that whatever the order in which the decomposition operators are applied (
decomposition, series decomposition or parallel decomposition), a unique set of inde- composable (or prime) graphs with respect to canonical decomposition is obtained. Obviously, a unique tree is
associated to this decomposition. The internal nodes are labeled according to the type of decomposition applied, while every leaf correspond to a vertex of G. Hence there are four types of internal nodes, parallel node (labeled P), series node (labeled S),
node (labeled
), and indecomposable node (labeled N). By convention, the set of vertices corresponding to the set of leafs having an internal node
as their least common ancestor will be denoted simply by
.
Lozin in [1] gives the following characterization for bipartite Star123-free graphs.
Theorem 4 [1] . Let G be a bipartite Star123-free graph. One of the following hold.
1) G is
graph.
2) G and
aren’t both connected.
3) The representative graph of G or the bi-complement of the representative graph of G is a path
or a cycle
with
.
It is shown in [14] that the representative graph of a graph G is a path
or
or a cycle
or
if and only if G is an extended path
or a bi-complement of an extended path
or an extended cycle
or a bi-complement of an extended cycle
respectively. More precisely, (see Figure 2).
Definition 5 [14] . A graph G is said to be an extended path
if there is a partition of the vertex set of
G into a monochromatic sets
such that
.
Definition 6 [14] . A graph G is said to be an extended cycle
if there is a partition of the vertex set of
G into a monochromatic sets
such that
.
The construction of the canonical decomposition tree of a bipartite Star123-free graph can be obtained in linear time from the algorithm given by Quaddoura in [14] . According to this algorithm, every child of a N-node is a node marked by
corresponding to a set
, if
, or to a vertex of G otherwise. Figure 3 illustrates a bipartite Star123-free graph and its canonical decomposition tree.
3. Maximum Matching of Bipartite Star123-Free Graphs
In this section we will extend the techniques developed in [2] to provide an
time algorithm for the maximum matching problem on bipartite Star123-free graph. We present first the required tools for this purpose.
A classical tool for solving the maximum matching problem was introduced by Berge in [16] . Let M be any matching of a graph
, an M-alternating path is a path whose edges are alternately in M and in
. If some edge of M is incident to a vertex v, this vertex is said to be saturated by M, otherwise v is M-unsaturated. An M-augmenting path is an M-alternating path whose both endpoints are M-unsaturated.
![]()
Figure 3. A bipartite Star123-free graph and its canonical decomposition tree.
Theorem 7 [16] . A matching M of a graph G is maximum matching if and only if G contain no M-aug- menting path.
Consider a bipartite graph G such that G admit a decomposition according to some rule into two graphs
and
. Let
and
be maximum matchings of
and
, let
which is a matching of G. In order to increase the size of M we use the operations Match and Split (see [11] ) described below.
Let
be the set of
-unsaturated vertices of
and
be the set of
-unsatureted vertices of
. A Match operation occurs if there are two adjacent vertices
and
then the edge
is added to M, the vertices
and
are thus saturated by M and they are respectively deleted from the sets
and
.
Let U be the set of M-unsaturated vertices, a Split operation occurs if there exists an edge of M say xy and vertices u and v belonging to U such that u is adjacent to x and v is adjacent to y. In that case the Split operation constructs a new matching
defined by
, the vertices u and v being saturated by
and deleted from U and the edge xy is deleted from M. Note that, if
is a bipartite complete then a maximum matching of G can be obtained by applying Match operations between the two sets B and W.
Let now G be a bipartite Star123-free graph and
is its canonical decomposition tree. For our purpose we shall modify
to a binary tree
as follows: We visit all nodes of
in DFS order. For a node
of type P, S or
let
be the children of
. If
then
does not change. Else
remains its left child and
is its new child labeled by P, S or
respectively with
are its children. For a N-node
, using the Procedure MAXMATCH
, the Procedure MAXMATCH
, or the procedure MAXMATCH
described below, which find a maximum matching of an extended path
or an extended cycle
or their bi-complements, we replace
by a leaf
together with a maximum matching of the subgraph
and the set of unsatureted vertices with respect to this matching. Our algorithm uses post order traversal to visit all the nodes of
. Whenever an internal node
of this binary tree is visited, we compute a maximum matching of
from the maximum matching
of
and
of
where
and
are the two children of
in
. For this purpose we distinguish the following cases according to the type of
.
3.1. α Is of Type P, S or K + S
Consider now the set
which is a matching of
. Obviously, if
is a P-node then M is a maximum matching of
. In the case when
is of type S or K + S we use the same technique used in [6] to find a maximum matching of
.
Let
be the set of
-unsaturated vertices of
and
be the set of
-unsatureted vertices of
. Let
be the matching of
obtained when all possible Match operations have been sequentially performed.
Let now U be the set of M-unsaturated vertices, and Let
be the matching obtained when all possible Split operations have been sequentially performed.
Theorem 8 [2] . If
is a K + S-node, the set
is a maximum matching of
.
Theorem 9 [2] . Assume that
is a S-node and M is equal to
. Let U be the set of M-un- saturated vertices of
, then the set
is a maximum matching of
.
3.2. α Is of Type N
In this section we will develop an
algorithm to find a maximum matching of an extended path
or an extended cycle
and an
algorithm to find a maximum matching of their bi-complement (see Definitions 5 and 6). We can suppose that
if k is even or
if k is odd. We denote by
the matching of the bipartite complete graph
obtained by Match operations between the two monochromatic sets
and
. When an edge xy is added to this matching where
and
then x will be deleted from
and y will be deleted from
. Note that, during the execution of Procedure MAXMATCH
or the Procedures MAXMATCH
and MAXMATCH
, the matching
is not necessarily maximum for
, this is because some vertices of
or
may already be saturated.
3.2.1. α Is EPk or ECk
Procedure MAXMATCH
provides a maximum matching of an extended path
or an extended cycle
. By convention, every monochromatic set of an extended path or an extended cycle has an odd index consists of black vertices and those having an even index consist of white ones. For the purpose of simplification, the length k of the extended path in this Procedure is considered to be odd, if this length is even then the set
is considered to be empty.
Procedure MAXMATCH EPk, ECk
1) ![]()
2) if
then ![]()
3) for
to
do
begin for
4) ![]()
5) ![]()
end for
Theorem 10. Let
be an extended path
or an extended cycle
where
. Procedure MAXMATCH
produces a maximum matching of G.
Proof. Let
be an M-augmenting path in G. Since G is a bipartite, t is even, so
and
are of different colors. Without loss of generality, assume that
is a black vertex and
is white. Let
and
.
Claim 1. There is no black vertex of P in
.
Proof. Let
be the first black vertex of P in
, then
must be in
. Since
is a black vertex non saturated, it must be
. According to our Procedure, the edge
has been added to M by the operation
, but before this step, the edge
must be added to M by the step
, a contradiction. ■
Claim 2. There is no white vertex of P in
.
Proof. Let
be the last white vertex of P in
, then
must be in
or in
or in
and
. The vertex
does not belong to
, otherwise, since
, the path
must contain a vertex in
, a contradiction with our choice of
. If
then according to our Procedure, the edge
has been added to M by the operation
when
, but in the step
, the edge
must be added to M by the operation
, a contradiction. If
then
and
. In this case, the vertex
does not belong to
or to
, otherwise
must be added to M, so
. But now the set
must contain a vertex of P, a contradiction with Claim 1. ■
Suppose that G is an
or G is an
such that there is no edge of P connecting
and
. If
then either
contains a vertex of P or there is an edge of P connecting
and
, a contradiction. If
then either
contains a vertex of P or there is an edge of P connecting
and
, a contradiction. Therefore
. But now the edge
must be added to M by the operation
, a contradiction.
Suppose now G is an
and there is an edge of P connecting
and
. Let
be the first edge of P connecting
and
. By Claim 1 and Claim 2,
. Thus
does not belong to
. If
then according to our choice of
, the set
must contain a vertex of P, a contradiction with Claim 1. Therefore
. Since the vertex
is a black non-saturated vertex, the edge
does not belong to M, By our choice of the edge
, the vertex
must belong to
. Now, the edge
has been added to M by the operation
. But before this step, the edge
must be added to M by the operation
, a contradiction. □
The following Table 1 illustrates a trace of the Procedure MAXMATCH
for the
in Figure 2 where a vertex in
is denoted by
.
3.2.2. α Is
or ![]()
Note that the matching obtained by the Procedure MAXMATCH
is ensured to be maximum because of the order of applying Match operations. In the case when
is
or
, we must also design an order of applying Match operations and Split operations to ensure that the resulting matching is maximum. For this purpose, we will study first the structure of a M-augmenting path of a matching M of
obtained by doing in an arbitrary order all possible Match operations then all possible Split operations (Lemma 12 and Lemma 13). Knowing this structure will enable us to design an order of applying Match operations (Procedure Match (G)) then developing a Procedure of a maximum matching M for
or
.
Recall that when an edge xy is added to a matching M by a Match operation
where
and
then x will be deleted from
and y will be deleted from
. In addition, we suppose here that Match operation associates labels with x and y as
and
when
and
respectively. Two monochromatic sets
and
of different color are called independent if
form a stable set, non-independent otherwise.
Lemma 11. Let
or
, let M be a matching of G obtained when all possible Match operations have been performed. If there are at least two M-unsaturated vertices of different color then all the M-unsaturated vertices are located in at most three consecutive monochromatic sets
and
where
.
![]()
Table 1. Illustration of procedure MAXMATCH
for the
in Figure 2.
Proof. By the hypothesis of the Lemma, all the M-unsaturated vertices must be in independent sets. Obviously any three consecutive sets are independent and the maximum number of independent sets is three. □
Assume that
or
and M is a matching of G obtained when all possible Match operations have been performed (in an arbitrary order). The following Procedure determines the sets
which are the possible location of M-unsaturated vertices. Note that when
, the sets
and
are consecutive.
Procedure M-unsaturated vertices (G, M)
1) Find the small index
for which ![]()
2) if there is no such s then return M is maximum
else
3) if
or
then
//when
and
,
does not exist, when
and
, ![]()
4) if
then return
and ![]()
5) else return ![]()
else //
and ![]()
6) if
then return ![]()
7) else if
then return ![]()
8) else return ![]()
According to Lemma 11, one of the two M-unsaturated vertices of any M-augmenting path in G is in
and the second in
, or one in
and the second in
. Consider first a M-augmenting path in G which its M-unsaturated vertices are in
and in
.
To augment the size of M, Split operations can be done between the M-unsaturated vertices of
, the M-unsaturated vertices of
and the edges of M whose extremities belong to monochromatic sets non-inde- pendent of
and
, namely the edges of M whose extremities don’t belong to
when
and
, and the edges of M whose extremities don’t belong to
and
otherwise. The following Procedure performs these Split operations.
Procedure Split (M, Vs, Vs+1)
1) if
and
then
![]()
2) else ![]()
3) while
and
and
do
Begin while
4) let ![]()
5) ![]()
// assuming that u and x also v and y are of different color
end while
The following Lemma describes the structure of a M-augmenting path whose extremities belong to
and
.
Lemma 12. After the execution of Procedure Split
if there is a M-augmenting path
in G whose extremities in
and
then:
・
or
.
・ P can be reduced to a M-augmenting path
where![]()
,
is any non-independent set of
and
is any non-independent set of
.
Proof. Let
be a M-augmenting path in G where
and
. Since after the execution of Procedure Split
,
and
, the set
must be empty. Therefore, if
and
, every edge of M has an extremity in
or
, and if
or
, every edge of M has an extremity in
or
. Obviously, the color of every vertex of P having an odd index (resp. even index) is as the color of
(resp.
).
Let
be the first vertex of P having an odd index and belongs to a set distinct of
, then
. Since
and
, either
or
. If
then
, a contradiction with our choice of
, therefore
. Since
does not exist when
and
, then
or
. Since
,
. Now the subpath
of P can be reduced to
.
Let
be the last vertex of P having an even index and belongs to a set distinct of
, then
. Since
and
, either
or
. If
then
, a contradiction with our choice of
, therefore
. Since
and
,
. Obviously
. Since
,
. Now the path P can be reduced to the M-augmenting path
. □
Consider now a M-augmenting path in G such that its M-unsaturated vertices are in
and in
. In a similar way, by replacing in the above Procedure and in Lemma 12,
by s, s by
,
by
and
by
, we obtain the Procedure Split
and Lemma 13which describes the structure of a M-augmenting path whose extremities belong to
and
.
Procedure Split (M, Vs+1, Vs+2)
1) if
and
then
![]()
2) else ![]()
3) while
and
and
do
begin while
4) let ![]()
5) ![]()
//assuming that u and x also v and y are of different color
end while
Lemma 13. After the execution of Procedure Split
if there is a M-augmenting path
in G whose extremities in
and
then:
・
or
.
・ P can be reduced to a M-augmenting path
where![]()
,
is any non-independent set of
and
is any non-independent set of
.
We start now by developing a Procedure for a maximum matching in
or
. The order of applying Match operations is defined in following Procedure which called MATCH (G). Recall that either
or
.
Procedure MATCH (G)
1) ![]()
2) ![]()
3) For
to
(or to
if
) do
begin for
4) ![]()
5) while
and
do
begin while
6) ![]()
7) if
then ![]()
end while
8) ![]()
9) ![]()
10) while
and
do
begin while
11) ![]()
12) if
then ![]()
end while
13) ![]()
end for
Procedure MATCH (G) works as following, for every
to
(or to
if
):
・ Add to M the possible edges between
as long as it is non empty and (the non-independent sets of
having indices less than
)
with respect to this order, where l determines the last non empty set in
during the for loop iterations
.
・ Add to M the possible edges between
as long as it is non empty and (the non-independent sets of
having indices less than 2i)
with respect to this order, where h determines the last non empty set in
during the for loop iterations
.
Observation 14. According to Procedure MATCH (G):
・ if
is an edge of M created by the operation
then
.
・ if
(resp.
) then the edges of
have been added to M before adding the edges of
(resp.
).
・ if
then the edges of
have been added to M before adding the edges of
.
The following Table 2 illustrates a trace of the Procedure MATCH (G) for the
in Figure 2. The second and the third column of this table represent the execution of steps 5 and 10 respectively.
The combination of Procedures MATCH (G), M-unsaturated vertices
, Split
, and Split
provides the Procedure MAXMMATCH
. For a maximum matching of
we need
a little addition. Theorem 15 proves their correctness.
Procedure MAXMATCH ![]()
1) MATCH ![]()
2) M-unsaturated vertices ![]()
3) Split ![]()
4) Split ![]()
Procedure MAXMATCH ![]()
1) MATCH ![]()
2) M-unsaturated vertices ![]()
3) Split ![]()
4) Split ![]()
5) if
and
then
//Assuming that x and the vertices of
also y and the vertices of
are of the same color
6) ![]()
7) ![]()
8) while
and
and
and
do
begin while
let ![]()
9) ![]()
10) ![]()
end while
Theorem 15. Procedure MAXMATCH
and Procedure MAXMATCH
produce a maximum matching of
and
respectively.
Proof. Suppose that after execution of Procedure MAXMATCH
or Procedure MAXMATCH
there is a M-augmenting path
. Since
and
are of different color and all the monochromatic sets are empty except at most
and
, there are two cases, either
or
.
Let
when
or
when
. By Lemma 12 and Lemma 13, P can be reduced to a path
where
,
is any non-independent set of
and
is any non-independent set of
. Assume first that
and
.
Claim 1. The edge
is obtained by Split operation.
Proof. Suppose that the edge
is obtained by Match operation. Since
the edge
is obtained either by
or by
. Without loss of generality, assume that
is ob-
![]()
Table 2. Illustration of Procedure MATCH (G) for the
in Figure 2.
tained by
. By Observation 14,
. Since
,
. So the operation ![]()
exists and must precedes the operation
by Observation 14 and since
. Therefore, the
edge
must be added to M instead of adding the edge
, a contradiction. ■
Claim 2.
.
Proof. If
then
. By Claim 1,
is obtained by Split operation, thus the vertex
must belong to
, a contradiction since
and
are independent. ■
Since
, the edge
is obtained by the step 4, that is by Split
. Let
be the edge which was in M and which has been used in step 4 of the Procedure Split
to obtain the edge
. The vertex
must be identical to x or to y. Let x be the vertex
. By the definition of
, the vertices x and y don’t belong to
. Since
and
,
. Obviously,
. Therefore
where
is the set defined in step 4 of the Procedure Split
. But before executing the step Split
, the set
must be empty since
, a contradiction.
Assume that
. Then
and
. By Lemma 12 and Lemma 13,
, ![]()
,
is any non-independent set of
and
is any non-in- dependent set of
. Since
then
and
. Therefore one of the sets
and
in step 8 must be empty. This is contradicted with the fact that
and
.
Assume finally that
. Then
and
. Since in this case
and
must be independent,
. By Lemma 12 and Lemma 13,
,
is any non-independent set of
and
is any non-independent set of
.
Claim 3. The edge
is obtained by Split operation.
Proof. Suppose that the edge
is obtained by Match operation. Since
,
and
, then the edge
is obtained by
. By Observation 14, since
, the operation
exists and must precede the operation
. Therefore, the edge
must be added to M instead of adding the edge
, a contradiction. ■
Claim 4.
.
Proof. If
then
. By Claim 3,
is obtained by Split operation, thus the vertex
must belong to
, a contradiction since
and
are independent. ■
Since
, the edge
is obtained by the step 3, that is by Split
. Let
be the edge which was in M and which has been used in step 4 of the Procedure Split
to obtain the edge
. The vertex
must be identical to x or to y. Let x be the vertex
and let
. By the definition of
,
. Obviously,
was not created by split operation. By Observation 14, if
(resp.
)
then
was created by
(resp.
). Since
(resp.
), the operation
precedes the operation
(resp.
). So the edge
must be added to M instead of adding
, a contradiction. □
Lets apply the Procedure MAXMATCH
on the graph
in Figure 2. As we shown above,
Procedure MATCH (G) produces the matching
. Procedure M-unsa-
turated vertices
gives that
and
does not exist. Procedure Split
gives that
and
.
Since
does not exist, Procedure Split
gives nothing.
3.3. The Whole Algorithm
Let us present now our algorithm for the maximum matching problem on bipartite
-free graphs. Theorems 8, 9, 10, and 15 prove its correctness.
Algorithm Maximum Matching
Input: A bipartite
-free graph G and its binary canonical decomposition tree
.
Output: M a maximum matching of G and U the set of M-unsaturated vertices of G.
1) Let
be a node on a postorder traversal of
.
2) If
is a leaf or
is a
-node then
.
3) Else if
is a N-node then.
4) If
or
then
,
-unsaturated
vertices.
5) Else if
then
,
-unsaturated vertices.
6) Else
,
-unsaturated vertices.
7) Replace
by a leaf
together with M and U.
8) Else let
and
be the two children of
in
.
9) Let
and
be respectively the maximum matchings and.
10)
and
be respectively the sets of unsaturated vertices of
and
.
11) If
is a P-node then
.
12) Else if
is a
-node then
,
-unsaturated vertices.
13) Else
,
-unsaturated vertices
,
-unsaturated vertices.
3.4. Complexity
We show now that the complexity of our algorithm is
.
The total number of Match operations performed by
, is at most
. So the run time of step 4 (Procedure
) is
.
Consider the steps 5 and 6 which are the Procedures MAXMATCH
and MAXMATCH
. The variables l and h in Procedure MATCH (G) assure that the sum of iterations of all while loops in this Procedure
is
. Since
and the number of Match operation performed by
is at most
then MATCH (G) runs in
time. The Procedure M-unsaturated vertices
runs in
time since
.
Since the size of the matching obtained by MATCH (G) is less than or equal to
, the construction of the set
and
defined in Procedures Split
, Split
and MAXMATCH
, as well as the while loops defined in these Procedures costs
time. So steps 5 and 6 runs in
time.
The total number of Match or Split operations performed in steps 8 to 13 is bounded by the size of maximum matching obtained, which is less or equal to
( [2] ), so the run time of steps 8 to 13 is
.
Finally, since the number of visited nodes in
is
, this algorithms runs with
time complexity.
4. Conclusion
The maximum matching is computed in
time, given a binary canonical decomposition tree of a bipartite
-free graph. The canonical decomposition of a bipartite
-free graph can be done in
time [14] including the binary canonical decomposition tree construction. Thus, the whole process is in
time.
Acknowledgements
This research is funded by the Deanship of Research and Graduate Studies in Zarqa University/Jordan. The author is grateful to anonymous referee’s suggestion and improvement of the presentation of this paper.