q9 Sols
q9 Sols
• This quiz should be taken in an “in-class, closed book, double-sided cheat-sheet” environment.
• The time allocated should be 120 minutes, but the student should note down how long they took in
their submission.
• If a student is submitting this quiz, then they also may be asked to grade another peer’s quiz. Or they
may be asked to self-grade.
1
Problem 1 (Bipartite Graphs and Matchings).
a. Consider the following graph G = (V, E). The vertex set is V = {1, 2, . . . , n} for some integer n ≥ 2.
The edge set is described in the set-builder notation as
b. For what n ∈ N does the above graph have a perfect matching? Give reasons.
Solution: When n is an even number, the graph has a perfect matching. The matching is precisely
(i, i + 1) for all odd i ∈ L. When n is odd, the graph doesn’t because |L| , |R|.
c. In the following graph is there a perfect matching? That is, is there a matching which matches all the
vertices. If so, show it. If not, give a short reason as to why not.
Solution: As the picture shows, the graph is bipartite. The red vertices, say, form the L-side, and the
blue vertices forms the R-side. There are no red-red or blue-blue vertices.
Now, we observe that |L| = 7 while R = NG (L) has 5 vertices. Since |NG (L)| < |L|, Hall’s condition is
violated and thus there is no L-matching. In particular, no perfect matching.
Problem 2 (Graph Induction).
Recall from the problem sets: a graph G = (V, E) is k-degenerate if every subgraph H of G has a vertex
v ∈ V(H) with degH (v) ≤ k. The degeneracy of a graph G, denoted as κ(G), is the smallest value of k for
which G is k-degenerate.
Prove by induction that given any k-degenerate graph G = (V, E), one can find a mapping f : V →
{1, 2 . . . , k + 1} such that for any edge (u, v) ∈ E, we have f (u) , f (v). Such a mapping is called a valid
(k + 1)-coloring.
Solution: Let P(n) be the predicate which is true if all graphs G = (V, E) with |V| = n and degeneracy ≤ k
has a valid (k + 1)-coloring. We prove ∀n ∈ N : P(n) is true by induction.
Base Case. When n = 1, then there is only one graph with a single edge and its degeneracy is 0. Such a
graph has a 1-coloring setting f (v) = 1 for the unique vertex v ∈ V.
Inductive Case. Fix n ≥ 1 and assume P(n) is true. We now assert P(n + 1) is true. To this end, fix a graph
G = (V, E) with |V| = n + 1 and degeneracy ≤ k. We now describe a valid (k + 1)-coloring.
By definition of degeneracy, there is a vertex v ∈ G with degG (v) ≤ k. Consider H := G − v. So,
|V(H)| = n. The key observation is that κ(H) ≤ k as well — this is simply because every subgraph of H is a
subgraph of G, and therefore, that subgraph must have a vertex with degree ≤ k. By the induction hypothesis,
there is a mapping f : V(H) → {1, 2, . . . , k + 1} such that for any (x, y) ∈ E(H), we have f (x) , f (y). We
now extend the map to the deleted vertex v. Note that v has t ≤ k neighbors; call them v1 , . . . , vt . The set
X := { f (vi ) : 1 ≤ i ≤ t} has at most t ≤ k elements. By pigeon hole principle, there is some number j in
{1, 2, . . . , k + 1} which isn’t present in X. We pick one such number arbitrarily and set f (v) = j. Note that all
edges of G that aren’t in H are of the form (v, vi ) and by design f (v) , f (vi ). Thus, we have found a valid
(k + 1)-coloring of G.
Problem 3.
Suppose 20 teams play in a round-robin tournament, that is, every team will play every other team exactly
once. These go over a period of 19 days, and in each day every team plays exactly one other team (so 10
matches occur in a day) and no two teams play each other twice. There are no ties, and so on every day,
3
there are 10 winning teams and 10 losing teams. Show that for each day we can select a winning team,
without selecting the same team twice.
To show this clearly describe a bipartite graph G = (L ∪ R, E) and show, using Hall’s theorem, that G has an
L-matching.
Solution: Let G = (L ∪ R, E) be a bipartite graph where the L vertices correspond to the 19 days and the
R vertices correspond to the 20 teams. We have an edge between i ∈ L and j ∈ R if the team j is a winning
team on day i. Note that every day i has degree 10 since 10 teams win on any given day. We claim that G
has an L-matching; if so, we are done since the (i, j) edges of the matching tell us how to pick a winning
team every day without repeating.
We do so by showing Hall’s condition holds. To that end, fix an arbitrary subset S ⊆ L of days with
s := |S |. We wish to show |NG (S )| ≥ s. Now suppose, for the sake of contradiction, |NG (S )| =: t < s. That
is, t < s teams are the only winners on these s days. Perhaps pejoratively, let is call the remaining 20 − t
teams “loser” teams; they lose on all of the games they play these s days. Consider any such “loser” team
a, and consider which teams it plays in each of these s days; if t < s, then a must play another “loser” team
b; there are just not too many winners to play with. But that means one of a or b is not a loser since one of
them wins their bout (since there are no ties). This gives our contradiction, implying t ≥ s. That is, Hall’s
condition holds implying G has an L-matching.
(A much cleaner and conciser argument due to Dung Tran ’27.) As before, fix an arbitrary subset S ⊆ L.
Case 1: every team r ∈ R wins on some day d ∈ S . In that case, NG (S ) = R, and so |NG (S )| = 20 > 19 =
|L| ≥ |S |. So in this case, Hall’s condition trivially holds. Case 2: there is a team r ∈ R that loses on all days
d ∈ S . Then consider the teams that beat r; since r plays a different team each day, we get |S | different teams
which win on some day in S . That is, we get |NG (S )| ≥ |S |. Done!