Sunteți pe pagina 1din 4

Matching: solutions/hints

Q.1 Let M be a matching in a bipartite graph G. Show that if M is suboptimal, i.e. contains fewer edges than some other matching in G, then G
contains an augmenting path with respect to M .
Solution: Let M 0 be a matching in a bipartite graph G of cardinality more
than |M |.
Observation: M 4M 0 consists of components which are either paths or
even cycles. The edges of M and M 0 alternate in every component of M 4M 0 .
Proof: Follows from the fact that degree of a vertex in M 4M 0 is at most 2
and definition of symmetric difference. 
Even cycles have equal number of edges from M and M 0 . Since |M 0 | > |M |,
it follows that at least one of the component P is a odd path starting and ending
with edges of M 0 . P is a augmenting path for M .
Q.2 Describe an algorithm that finds, as efficiently as possible, a matching
of maximum cardinality in any bipartite graph.
Solution: Considering the contrapositive of Q.1, it is clear that if M is
a matching of maximum cardinality in any bipartite graph, then there is no
augmenting path. So, to compute any maximum cardinality matching in any
bipartite graph G(X Y, E), all we need to do is
1. start with any matching M ,
2. compute an M -augmenting path,
3. augment the path with matching M to obtain a matching M 0 , |M 0 | > |M |,
and repeat steps 2 and 3.
Computing an M -augmenting path:
Input: a bipartite graph G(X Y, E), U be the set of vertices of X saturated
by M .
1. Set S = U , T = . The idea is to follow M -alternating paths starting
from U , S X and T Y be the vertices reached. We mark a vertex in S when
it is used for any path extension or all its incident edges are explored. When
we reach a vertex, we record any one of the vertices from which it is reached.
2. If S has no unmarked vertices, stop and report M as the maximum
matching, T (X \ S) as the minimum vertex cover. Otherwise, choose any
vertex x S.
3. We explore x by choosing an y Y with xy 6 M . If y is unsaturated
by M , report xy as the augmenting path. Otherwise, let w X with yw M .

We add y to T - reachable from x, w to S - reachable from y. We mark x after


exploring all ys.
Correctness: To prove that when algorithm terminates, T (X \ S) is a
vertex cover of cardinality |M |, observe that (1) there is no edge between S and
Y \ T ; (2) edges of M saturating T and (X \ S) are different.
(Draw a picture and do a run of the algorithm to verify.)
Q.3 Show that if there exist injective functions A B and B A between
two infinite sets A and B then there exists a bijection A B.
Solution: Form a bipartite graph with partite sets A and B, and connect
the edges according to the injective relations. Now, look at each component of
the resulting graph. Components are either of the form (1) ab, a A, b B,
or, (2) consists of even cycles, or (3) infinite paths consisting of equal number
of vertices from A and B.
Q.5 Use Konigs theorem to prove Halls theorem.
Solution: Let G(X Y, E) be a bipartite graph. Necessary condition: Any
matching saturating X must satisfy |N (S)| |S|, S X. Sufficiency condition:
Assume for the sake of contradiction, |N (S)| |S|, S X holds and there is no
matching saturating X. M be the maximum matching with |M | < |X|. Using
Konigs theorem, we can find a minimum vertex cover S X Y , |S| = |M | <
|X|. From definition of vertex cover, we infer that N (X \ S) B S - if x X
and x 6 S, its neighbors must be in S. Note that |X| > |S| = |X S| + |Y S|.
However, |X \ S| = |X| |X S| > |Y S| |N (X \ S)| - a contradiction to
our assumption.
Q.6 Find an infinite counterexample to the statement of the marriage theorem.
Solution: Let X = Z+ a and Y = Z+ and join x X to y Y iff x = y
or x = a. Then Halls conditions clearly holds. On the other hand, a matching
saturating X must saturate Z+ X, and since these vertices have degree 1, it
cannot saturate a. Hence, there is no matching saturating X.
Q.7 Let k be an integer. Show that any two partitions of a finite set into
k-sets admit a common choice of representatives.
Solution: Let A1 , . . . , Am and B1 , . . . , Bm be the two partitions. Form a
bipartite graph with parts Ai and Bi , and join Ai to Bj if they have an element
in common. For any given collection of t Ai s, the number of elements in their
union is tk, so the number of Bj s covering these tk elements is at least t. Hence,
the number of neighbors of these t Ai s in the bipartite graph is at least t, so
Halls condition holds. By Halls theorem, we have a perfect matching. Each
edge of this matching corresponds to an element of the ground set, and no two
of these elements are the same since the Ai s form a partition. Hence, this
matching gives a CSDR.
Q.15 Show that a graph G contains k independent edges if and only if q(G
S) |S| + |V (G)| 2k for all sets S V (G).
Solution: Let n = |V (G)| and form the graph G0 by adding n 2k new
vertices each adjacent to every vertex of G. Then, the condition of the problem
corresponds to Tuttes condition on G0 , so by Tuttes theorem, G0 has a perfect
matching M . The number vertices of V (G) that are matched to some other
2

vertex of V (G) is at least n (n 2k) = 2k, so we have at least k edges of M


that lie entirely in G.
Q.16 Find a cubic graph without a 1-factor.

Q.17 Derive the marriage theorem from Tuttes theorem.


Hint: Suppose G = (X Y, E) is a bipartite graph. Let H be the graph
obtained from G by adding one vertex to Y if |X Y | is odd and then adding
the edges of a clique on the vertices in Y .
(i) Prove that G has a matching of size |X| iff H has a 1-factor.
(ii) Prove that if G satisfies Halls condition, that is, |N (S)| |S| for all
S X, then H satisfies Tuttes condition, which is that, q(HT ) |T | for all
T V (H).
(iii) Use items (i) and (ii) to derive Halls theorem from Tuttes theorem.
For proving (ii), assume G satisfies Halls condition but violates Tuttes condition and derive a contradiction.
Solution(i): If G has a matching of size X and let M be such a matching.
Then |X| vertices in Y are matched by M , leaving |Y ||X| vertices in Y unmatched. Since |H| is even, |Y ||X| is even and since H[Y ] is a clique we can
pick a matching M0 of vertices in Y not matched by M . M M0 is a 1-factor
of H. If H has a 1-factor, say M then the maximal subset MX M of edges
incident on X is a matching of X in G.
Solution(ii): Suppose H violates Tuttes condition, i.e., q(HT ) > |T | for some
T V (H). Since Y V (H) is a clique, one of the components C in H T
contains all of Y T and the remanining components are singletons from X. Let
k be the number of singletons in H T . Then, q(H T ) = k+1, if |C| is odd, and
q(H T ) = k, otherwise. If |C| is even, then q(HT ) |T | from Halls theorem.
On the other hand, if |C| is odd, then V (H) = |T | + k + |C|. Since |V (H)| is
even and |C| is odd, |T | + k must be odd. Since q(HT ) = k + 1 > |T |, k |T |.
The fact that |T | + k is odd rules out k = |T | k > |T |. Let S be this set of k
vertices. Then N (S) T Y and therefore |N (S)| |T Y | |T | < k = |S|
violating Halls condition.
Solution(iii): Suppose S X, |N (S)| |S|. Then, by (ii) H satisfies
Tuttes condition and therefore has a 1-factor. By (i) this implies that G has a
3

matching of X.
21. Derive Halls theorem from the Gallai-Milgram theorem.
Solution: Suppose we are given the bipartite graph B = X, Y with |N (S)|
|S| for all S X. Form a directed graph D by directing all edges of B from X
to Y . Pick an independent set I V (D). Then N (I X) Y \ I. So by Halls
condition, |Y \ I| |I X|. Then |I| = |I X| + |I Y | |Y \ I| + |I Y | = |Y |.
So by Gallai-Milgram, D can be covered by at most |Y | directed paths. Each
of these paths must have an endpoint in Y , so X is covered by paths of length
at least 1. These paths provide a matching saturating all of X.
22. Dilworths Theorem is equivalent to Konig-Egervary Theorem.
Solution. Dilworth to Konig-Egervary:
View any n-node bipartite graph G as a bipartite poset. The nodes of one
part are maximal elements, and nodes of the other part are minimal. Every
vertex disjoint path covering of the poset of size n k uses k chains of size 2,
which is actually a matching. Each antichain of size n k corresponds to an
independent set in G, and the rest of k nodes forms a vertex cover.

S-ar putea să vă placă și