Module 5 Notes
Module 5 Notes
Matchings 231
Shortest paths:
4.5 Matchings
Consider a bipartite graph G = G(V,, V2; E), where VË and V½ are as usual the two partitions
(bipartites) of the vertex set of the graph G, and E is the edge set of G. In this graph, every
edge has one end vertex in V and the other end vertex in V2.
Asubset MofE is called a matching in G if no two edges that belong to M share a common
vertex in Vor V2.
Amatching Min G is called a complete matching from V; to Vy if every vertex in Vis an
end vertex of some edge that belongs to M.
For example, consider the bipartite graph shown in Figure 4.53.
e1
ne-Sne
e2
e4
e6
V
Figure 4.53
In this graph, the set M =(e1, e4, e6} is a matching but not a complete matching from V; to
V2; because this matching does not include all the vertices of Vj. But the set M, = (e,, e3, e5, es)
is a matching which is a complete matching from V; and V2. This complete matching is shown
separately in Figure 4.54.
232 4. Optimization and
Mutching
C,
Figure 4.54
In the same graph, the set of edges (e,,e, e3,ea, e6} is not a matching at all, although every
vertex in Vis an end vertex of some cdge that belongs to this set; because, the cdges ej and e
have a common vertex in V.
The following facts are direct consequences of the definition of a complete matching:
(1) In a complete matching from V and V2, corresponding to every vertex in V there must
exist a unique vertex in V½ such that there is an edge between the two vertices. But, corre
sponding to a vertex in V2 there may not be a vertex in Vto which it is joincd by an edge.
See Figure 4.54.
Figure 4.55
Hence, by Hall's theorem, there does not exist acomplete matching from VË to V2 (although
½ has more vertices than V).
Example 2 Three boys bË, b2, b, and four girls g1. g2. g3, 84 are such that
91
b S
b
V2
Figure4.56
'A problem of this type is known as the marriage problem, first studied by the English mathematician Philin
problem.
the
Hallin l1935. Theorem 1is an outcome of his analysis of
234 4. Optimization and
The problem is one of finding whether a complete matching exists from V to
Matching
us employ the criterion (usually called the marriage condition) indicated in Theorem
V. Let
have to consider every subset of V, with k = 1, 2,3 elements and find whether cach subset is
collectively adjacent to k or more vertices in ½. The subsets S; of V; and their collectively
adjacent subsets S in V, are shown in the following Table:
S; S
k= 1 (gi.g3,g4}
lg2.g4)
lg2,83)
k= 2 {bj, b} g1.g2, 83, g4}
(bj,bs} lgig2,g3,g4}
g2.83 g4)
k=3 lbi.b2, bs) lgi82.g3,84}
We observe that, for each S;, the number of
elements is S, is
number of elements in S,. Therefore, the graph has a complete greater than or equal to the
means that each boy can marry a girl whois one of his cousins. matching (by Theorem l). This
By examining the graph in Figure 4.56 or the Table
above, we find the following five
possible couple-sets:
Set 1: (b1, g), (b2, g2), (b3, g3)
Set 2:
(bi, g), (b2. g4). (b3, g2)
Set 3: (b1, g1), (b2, g4), (b3, g3)
Set 4:
(bi, g3), (b2, g4), (b,, g2)
Set 5: (b1, g4), (b2, g2). (b3, g3)
R
S
Figure 4.57
In the graph, there are 8 edges. Of these, 4
edges can be choosen in 8C, wavs. Also, there
4.5. Matchings 235
Therefore, if 4 edges are chosen, the probability that they fornn a complete matching is
5 4! 4! 5x4x3x2×1 1
p=
8x7x6x5
8CA 8! 14
Returning to the general discussion, we remark that the Hall's criterion in Theorem Iis too
very tedious to verify if the sets V and V have very large number of vertices. The following
theorem gives a simpler sufficient condition for the existence of a complete matching.
Theorem 2 In abipartite graph G(V,, V2; E), if there is a positive integer m such that the
degree of every vertex in V m2 the degree of every vertex in V½, then there exists a complete
matching from VË to Vz.
Proof: Consider any subset W ofk vertices in V. If the degree of every vertex in V is greater
than or equal to m for some positive integer m (as per the condition given), then there are at
least m edges incident on each vertex in V. Therefore, a total of at least mk cdges are incident
on k vertices in W. Each of these mk edges is incident on some vertex in V. Thus, there are
at least mk edges from WV to V2. Since the degree of every vertex in V½ is at most m (as per the
vertices in
condition given), at most m edges go to any vertex in V½. Therefore, if there are k'
½ that are the end vertices of edges from W, then the number of edges from W to V, is at most
such,
mk'. Accordingly, the number of edges from W to b is at least mk and at most mk'. As
mk < mk', or k >k.
Thus, under the given condition, any subset W of k vertices in V; is collectively adjacent
to k > k vertices in V2. Therefore, by Hall's Theorem (Theorem 1), there exists a complete
matching from Vi to V2. This completes the proof of the theorcm.
Example 4 By using Theorem 2, show that in the bipartile graph shown in Figure 4.56 there
exists acomplete matching from V; to V2.
By examining the graph, we note that:
degree of every vertex in V22 degrce of every vertex in V.
Therefore, there is a complete matching from Vto V.*
(3d ed).
"Recall the definition of Probability. See, for example, D.S.C. : Diserete Mathematical Structures
Section 1.5.
"In turn, this answers the question posed in Example 2, in the aftirmative.