Part II · The Classic Theory

Matching, Covering and Packing

Created by

Pairing workers with jobs, students with schools, donors with patients: after this chapter you will know exactly when a perfect pairing exists, how to build one step by step, and what the visible obstruction looks like whenever one does not.

Why pairing problems matter

Here is the chapter's opening question. You have a set of workers and a set of jobs. Lines connect each worker to the jobs they can do. Can you assign every worker a different job? In graph language: pick as many edges as possible so that no two picked edges touch the same vertex. Each picked edge marries its two endpoints. Such a set of edges is called a matching.

The first surprise of the chapter is not that matchings can fail to exist. It is that failure always leaves fingerprints. When a full pairing is impossible, the graph contains a small, checkable obstruction that proves it: a group of workers who collectively know too few jobs, or a set of vertices whose removal shatters the graph into too many odd-sized pieces. Theorems of this shape say: either the thing you want exists, or an obvious blocker exists, and never neither. They are called min-max theorems, and this chapter is the place where you meet them for the first time.

The second half of the chapter widens the lens. Matching is a special case of packing: fitting as many disjoint copies of some structure into a graph as possible. Disjoint edges give matchings; disjoint cycles and edge-disjoint spanning trees give the other two packing problems studied here. The natural opposite of packing is covering: using as few vertices or as few trees as possible to touch every structure of a given kind. The two are dual forces. You can never pack more disjoint structures than any cover has elements, because each packed structure uses up at least one cover element. The deep results of this chapter say that in many settings the gap between the best packing and the smallest cover is zero, and in others it is bounded by a formula.

These are not museum pieces. The stable matching algorithm in this chapter runs hospital residency assignment in the United States, and the theory behind kidney exchange programs is the matching theory of general graphs. Network engineers use edge-disjoint spanning trees for routing that survives link failures. Beyond the applications, the chapter teaches a habit of thought: whenever you want something and cannot get it, hunt for the certificate that proves you cannot.

The section says a packing can never be larger than a cover. Why does that hold before any theorem is proved?

  1. Covers are always chosen as small as possible
  2. Each packed structure uses up at least one cover element
  3. Packing problems are computationally harder than covering ones
  4. Every graph has more vertices than edges
Answer: B. A cover has to touch every packed copy, and the copies are disjoint, so distinct copies consume distinct cover elements. Option A sounds reasonable but proves nothing: how you choose a cover cannot by itself force an inequality.

New notation in this chapter

Thirteen symbols are new here. Everything else comes from Chapter 1 and is re-explained briefly where it appears. If set language such as \(S \subseteq A\) ("S is a subset of A") still feels shaky, Chapter 0 is the bootstrap.

SymbolRead it asMeaningTiny example
\(M\)"the matching M"The standard letter for a matching: a set of edges of which no two share an endpoint.In a square with corners 1,2,3,4, the edge set \(\{12, 34\}\) is a matching.
\(N(S)\)"the neighbourhood of S"(From Chapter 1.) The set of all vertices that have at least one neighbour inside the set \(S\).If \(a_1\) knows \(b_1\) and \(a_2\) knows \(b_1, b_2\), then \(N(\{a_1,a_2\}) = \{b_1, b_2\}\).
\(q(G)\)"the number of odd components of G"How many connected pieces of \(G\) have an odd number of vertices.A lone vertex plus a triangle plus a square: \(q = 2\).
\(\mathcal{C}_G\)"the components of G"The set whose members are the connected pieces of \(G\).Two separate triangles: \(\mathcal{C}_G\) has 2 members.
\(G_S\)"G contracted onto S"Squash each component of \(G - S\) to a single point and delete the edges inside \(S\): a bipartite graph with \(S\) on one side and the shrunken components on the other.Used in the Gallai–Edmonds theorem; see Figure 2.9.
\(e <_v f\)"v prefers f to e"In a set of preferences, each vertex \(v\) ranks the edges ending at it; this says \(v\) strictly prefers edge \(f\) to edge \(e\).Worker \(a\) may rank \(ab_1 <_a ab_2\), preferring job \(b_2\).
\(\mathcal{H}\)"the class H"A collection of target shapes for packing and covering, such as the class of all cycles.With \(\mathcal{H}\) = all cycles, packing means finding disjoint cycles.
\(f(k)\)"f of k"A bound that depends only on the number \(k\), never on the graph.In the Erdős–Pósa theorem, \(f(k)\) grows like \(4k\log k\).
\(\mathcal{T} = (T_1, \dots, T_k)\)"a family of spanning trees"An indexed list of \(k\) spanning trees of a graph; repeats are allowed.Two different spanning paths of a square form a family with \(k = 2\).
\(E(\mathcal{T})\)"the edges of the family"Every edge that lies on at least one tree of the family, each counted once.If two trees share an edge, \(E(\mathcal{T})\) lists it once.
\((e_0, \dots, e_n)\)"an exchange chain"A recorded cascade of possible tree swaps that frees the starting edge \(e_0\); the last edge \(e_n\) lies on no tree of the family.A single edge outside all trees is an exchange chain of length 0.
\(\mathrm{ter}(\mathcal{P})\)"the terminal vertices of P"For a set \(\mathcal{P}\) of directed paths, the set of their last vertices.For a path ending at \(y\) plus the lone vertex \(z\): \(\mathrm{ter} = \{y, z\}\).
\((P, \le)\)"a partially ordered set"A set \(P\) with an order in which some pairs are comparable and others are not.Numbers under divisibility: 2 divides 6, but 4 and 6 are incomparable.

How should you read \(e <_v f\)?

  1. Edge \(e\) is shorter than edge \(f\)
  2. Vertex \(v\) prefers \(e\) to \(f\)
  3. Vertex \(v\) prefers \(f\) to \(e\)
  4. Edge \(e\) was added to the matching before edge \(f\)
Answer: C. The ranking belongs to the vertex \(v\) written under the symbol, and the edge on the larger side is the preferred one. Option B is the standard slip: it reads the ranking backwards.

Matchings, factors, and the trap of "maximal"

We start with the central definition, then immediately defuse the most common misunderstanding about it.

Definition — matching

A matching in a graph \(G = (V, E)\) is a set \(M\) of edges no two of which share a vertex. In plain terms: a pairing-up of some of the vertices, where each vertex is used at most once. The "no shared vertex" rule is exactly what pairing means; nobody can be married twice.

Definition — matching of a set; matched and unmatched

\(M\) is a matching of a vertex set \(U \subseteq V\) ("U a subset of V") if every vertex in \(U\) is the endpoint of some edge in \(M\). Vertices touched by an edge of \(M\) are matched; all others are unmatched. Plainly: a matching of \(U\) leaves nobody in \(U\) single, though vertices outside \(U\) may stay single. We often need only one side covered, as when every worker gets a job but some jobs stay unfilled.

Definition — k-factor

A \(k\)-factor of \(G\) is a spanning subgraph (one that uses all of \(G\)'s vertices) in which every vertex has degree exactly \(k\), that is, exactly \(k\) edges of the subgraph touch it. A 1-factor is the same thing as a perfect matching: a matching of the whole vertex set \(V\), pairing every single vertex. A 2-factor is a collection of disjoint cycles that together visit every vertex. Stating this through degrees puts perfect matchings, cycle covers, and their higher cousins into one family.[1]

One warning before anything else. A matching is called maximal if you cannot add one more edge to it. It is called maximum if no matching in the whole graph has more edges. These sound alike and are not the same. Figure 2.1 shows the smallest example: a path on four vertices.

maximal: 1 edge, stuck maximum: 2 edges, best possible a b c d a b c d
Figure 2.1. The path \(a\)–\(b\)–\(c\)–\(d\). Left: the matching \(\{bc\}\) (violet) is maximal, since both remaining edges touch it, yet it has only one edge. Right: \(\{ab, cd\}\) has two. Greedy choices can strand you at "maximal"; reaching "maximum" needs a way to rearrange.
Common mistake

"I kept adding edges until I could not add any more, so my matching is the biggest." No. Unextendable (maximal) does not mean biggest possible (maximum). Escaping the trap requires undoing choices, not just adding, and the tool for that is the augmenting path of the next section.

Which subgraph of a graph on six vertices is a 1-factor?

  1. Three disjoint edges that between them touch all six vertices
  2. A single cycle visiting all six vertices
  3. A spanning tree with five edges
  4. The matching you reach by adding edges greedily until stuck
Answer: A. A 1-factor is a spanning subgraph in which every vertex has degree exactly 1, which is precisely a perfect matching. Option B gives every vertex degree 2, so it is a 2-factor instead.

On the path \(v_1v_2v_3v_4v_5v_6\) you pick \(v_2v_3\), then \(v_4v_5\), and now no further edge fits. Which statement is true?

  1. It is maximum, because no edge can be added to it
  2. It is neither maximal nor maximum, since \(v_1\) and \(v_6\) stay single
  3. It is maximum but not maximal
  4. It is maximal but not maximum: \(\{v_1v_2, v_3v_4, v_5v_6\}\) has three edges
Answer: D. Nothing can be added, so the two-edge set is maximal, yet a three-edge matching exists, so it is not maximum. Option A is exactly the trap: unextendable is not the same as biggest.

Alternating and augmenting paths

For this section and the next two, our graphs are bipartite: the vertex set splits into two sides \(A\) and \(B\), and every edge runs between the sides, never inside one. Think of \(A\) as workers and \(B\) as jobs. Following Diestel's convention, vertices called \(a, a'\) sit in \(A\) and vertices called \(b, b'\) sit in \(B\).[1]

Definition — alternating path

Fix a matching \(M\). An alternating path is a path that starts at an unmatched vertex of \(A\) and then alternates between edges not in \(M\) and edges in \(M\). The trivial path consisting of one unmatched vertex counts. In plain terms: start at a single worker, step along a non-matching edge, then a matching edge, then a non-matching edge, and so on.

Definition — augmenting path

An augmenting path is an alternating path whose last vertex is an unmatched vertex of \(B\). It connects two singles through a corridor of alternating edges. Flipping the path, meaning swapping its matching and non-matching edges, produces a new matching with one more edge and two fewer singles.

Why alternation? Because alternation is exactly the structure you can flip. Along an augmenting path the edges outside \(M\) outnumber the edges inside \(M\) by one. Exchange the two kinds and every interior vertex stays matched (it just changes partners), while the two endpoints go from single to matched. Figure 2.2 shows the whole move.

before: 2 edges after the flip: 3 edges a1 a2 a3 b1 b2 b3 a1 a2 a3 b1 b2 b3
Figure 2.2. Left: matching \(\{a_1b_1, a_2b_2\}\) in violet; the gold vertices \(a_3\) and \(b_3\) are unmatched. The augmenting path is \(a_3\, b_2\, a_2\, b_1\, a_1\, b_3\). Right: after flipping it, the matching \(\{a_3b_2, a_2b_1, a_1b_3\}\) covers all six vertices. Two matching edges were traded for three.
Worked example

Trace the flip in Figure 2.2. The path starts at single worker \(a_3\), uses the non-matching edge \(a_3b_2\), the matching edge \(b_2a_2\), the non-matching edge \(a_2b_1\), the matching edge \(b_1a_1\), and finally the non-matching edge \(a_1b_3\), ending at single job \(b_3\). Three edges of the path are outside \(M\) and two are inside. Swap them: the outsiders \(a_3b_2, a_2b_1, a_1b_3\) enter the matching and the insiders \(a_2b_2, a_1b_1\) leave. Each of \(a_1, a_2, b_1, b_2\) merely changes partner; \(a_3\) and \(b_3\) gain one. The matching grew from 2 edges to 3.

Augmenting paths are the engine of every practical matching algorithm: repeatedly find one and flip it, and when none exists, stop. The theorems of this chapter explain what the world looks like at that stopping point.

You flip an augmenting path that has seven edges. What happens to the size of the matching?

  1. It grows by 3, one for each matching edge on the path
  2. It grows by 1: the path holds one more non-matching edge than matching edge
  3. It grows by 4, one for each non-matching edge on the path
  4. It stays the same; only the partners change
Answer: B. A seven-edge augmenting path alternates 4 non-matching with 3 matching edges, and the swap trades 3 away for 4, a net gain of one. Option D describes what happens to the interior vertices, which do only change partners.

König's theorem: the first min-max tie

What certifies that a matching cannot be improved? Here is the natural upper bound.

Definition — vertex cover

A set \(U \subseteq V\) is a (vertex) cover of the edges of \(G\) if every edge of \(G\) has at least one endpoint in \(U\). Picture guards standing on vertices: \(U\) is a cover when every edge is watched by a guard at one of its two ends.

Covers bound matchings for free. Each guard can watch at most one matching edge, since matching edges share no vertices. So every cover is at least as large as every matching. The question with content is whether the two meet, and in bipartite graphs the answer is yes.

Theorem — König's theorem (König, 1931)

In a bipartite graph, the maximum number of edges in a matching equals the minimum number of vertices in a cover of its edges.[1]

A grainy black and white head-and-shoulders photograph of a man with dark hair and a small moustache, in a suit, white shirt and dark tie.
Plate 2.A. Dénes Kőnig in 1928, three years before the theorem above and eight before his Theorie der endlichen und unendlichen Graphen, the first textbook on graph theory. Before that book the field had no textbook at all, and every result had to be chased back to the paper it first appeared in. 1928. Wikimedia Commons, public domain.

Proof idea. Take a maximum matching \(M\). From each of its edges choose one endpoint by a rule: choose the \(B\)-side endpoint if some alternating path reaches it, otherwise the \(A\)-side endpoint. That selects \(|M|\) vertices, one per matching edge. Suppose some edge dodged all chosen guards. Following alternating paths to that edge's \(B\)-end, one checks: since \(M\) is maximum, no alternating path can be augmenting, and this forces the \(B\)-end to have been chosen after all, a contradiction. So the chosen \(|M|\) vertices watch every edge, and cover size \(|M|\) meets matching size \(|M|\). The full details are in Diestel §2.1.[1]

bipartite: matching 2 = cover 2 triangle: matching 1, cover 2 u1 u2 w1 w2 w3 x y z
Figure 2.3. Left: the complete bipartite graph \(K_{2,3}\). The violet matching \(\{u_1w_1, u_2w_2\}\) has 2 edges, and the gold cover \(\{u_1, u_2\}\) has 2 vertices: they tie, as König promises. Right: a triangle. The violet edge \(xy\) is a maximum matching (any second edge would touch it), but no single vertex covers all 3 edges; the gold cover \(\{y, z\}\) needs 2. Bipartiteness is doing real work.
Common mistake

Two traps. First, König's equality is a bipartite privilege: in the triangle of Figure 2.3, matching 1 and cover 2 genuinely differ. The general-graph substitute is Menger's theorem in Chapter 3. Second, "cover" will change meaning as the chapter proceeds: vertices covering edges here, vertices meeting cycles in the Erdős–Pósa section, trees blanketing edges later, paths containing vertices at the end. Always ask: covering what, using what?

König's theorem is the model min-max theorem. Whether or not your matching is best, a short proof exists either way: exhibit a bigger matching, or exhibit a cover of the same size. This two-sided checkability is the conceptual ancestor of the duality that runs through Chapter 6's flows and much of optimization.

In a bipartite graph you exhibit a matching with 5 edges and a cover with 5 vertices. What follows?

  1. Only that the graph has at least 10 vertices
  2. The cover is the smallest one, but a larger matching may still exist
  3. Both are optimal: no matching beats 5 and no cover is smaller than 5
  4. Nothing, unless the graph is complete bipartite
Answer: C. Every cover is at least as large as every matching, so a matching and a cover of equal size pin each other down. Option B forgets that the 5-vertex cover already caps every matching in the graph at 5 edges.

Hall's marriage theorem

König answers "how big is the best matching?" The employment question is more pointed: can every worker be placed? Here is the obvious obstacle. If some group of 5 workers only knows 4 jobs between them, no assignment can place all 5. Hall's theorem says this obvious obstacle is the only one.

Definition — the marriage condition

A bipartite graph with sides \(A\) and \(B\) satisfies the marriage condition if \(|N(S)| \ge |S|\) for every subset \(S \subseteq A\). Read it aloud: for every group \(S\) of workers, the neighbourhood \(N(S)\), the set of jobs known to at least one member of the group, is at least as large as the group itself. Every gang of any size must collectively know at least that many jobs.

Theorem — Hall's marriage theorem (Hall, 1935)

A bipartite graph contains a matching of \(A\) if and only if \(|N(S)| \ge |S|\) for all \(S \subseteq A\).[1]

A black and white photograph of a man in a dark suit standing outdoors at a wooden handrail, with a wooded hillside and the roofs of a town behind him.
Plate 2.B. Philip Hall at Erlangen in 1960, photographed by Konrad Jacobs. Hall's subject was group theory, and his 1935 paper says nothing about workers or jobs: it asks when a family of finite sets has a system of distinct representatives, one member picked from each set. The bipartite graph is a translation. Konrad Jacobs, 1960. Wikimedia Commons, CC BY-SA 2.0 DE.

Proof idea. Necessity is the paragraph above. For sufficiency, suppose the condition holds but some worker \(a\) stays single under a maximum matching. Gather everything reachable from \(a\) by alternating paths. If any reachable job is unfilled, an augmenting path exists and the matching was not maximum. Otherwise every reachable job is matched back to a reachable worker, which makes the set of reachable workers exactly one larger than the set of reachable jobs. The marriage condition then forces an edge from a reachable worker to a new job, which extends reachability, a contradiction. Diestel gives two further proofs, including a slick one by taking an edge-minimal subgraph satisfying the condition, which turns out to be precisely a matching.[1]

a1 a2 a3 b1 b2
Figure 2.4. Hall's condition failing. Take \(S\) to be all three violet applicants: their neighbourhood is the two gold jobs, so \(|N(S)| = 2 < 3 = |S|\). No matching can place all of \(A\), even though each applicant individually has two options. The starved group is the visible certificate of failure.
Common mistake

Two more traps. First, the condition quantifies over every subset, not just individuals: in Figure 2.4 each worker has options, yet the group of three is starved. Second, Hall matches \(A\), not everyone. Jobs in \(B\) may stay unfilled. A perfect matching (1-factor) additionally needs \(|A| = |B|\), where \(|A|\) counts the members of \(A\).

Hall's theorem has a clean consequence for regular graphs. Recall from Chapter 1 that a graph is \(k\)-regular if every vertex has degree exactly \(k\), meaning \(k\) edges touch it.

Theorem — regular bipartite graphs pair up (Corollary 2.1.3)

Every \(k\)-regular bipartite graph with \(k \ge 1\) has a perfect matching.[1]

Proof idea. Counting edges from each side, \(k|A| = k|B|\), so the sides have equal size. Any group \(S \subseteq A\) sends out exactly \(k|S|\) edges, and all of them land inside \(N(S)\), which can receive at most \(k|N(S)|\) edges in total. So \(k|S| \le k|N(S)|\), Hall's condition holds, and a matching of \(A\), here perfect, exists. This corollary is why a fixture list between two equal leagues, each club drawn against \(k\) opponents from the other league, always splits into \(k\) rounds with every club playing in each.

The same corollary powers a much older theorem, through a trick worth seeing.

Theorem — Petersen's 2-factor theorem (Petersen, 1891)

Every regular graph whose common degree is positive and even has a 2-factor: a set of disjoint cycles visiting every vertex.[1]

Proof idea. A connected \(2k\)-regular graph has an Euler tour, a closed walk using every edge exactly once (Chapter 1). Split each vertex \(v\) into an "out" copy and an "in" copy, and turn each step of the tour into an edge from one vertex's out-copy to the next vertex's in-copy. The result is a \(k\)-regular bipartite graph, which has a perfect matching by the corollary above. Merging the copies back, that matching becomes a subgraph of the original where every vertex has degree exactly 2: a 2-factor. Petersen's original 1891 argument was hard; with bipartite matching machinery it takes three sentences. Recasting a problem into bipartite form is a trick you will see again.

Every worker in \(A\) knows at least two jobs. Must a matching of \(A\) exist?

  1. No: three workers who all know only the same two jobs starve as a group
  2. Yes: two options each is enough for the marriage condition
  3. Yes, provided \(A\) and \(B\) have the same size
  4. Yes, provided no single job is known by every worker
Answer: A. The marriage condition has to hold for every subset of \(A\), and Figure 2.4 is this exact failure. Option B checks only the one-worker subsets, which is where the condition is easiest to satisfy and least informative.

Stable matchings: adding preferences

So far, any job would do. Real people have rankings. What should a good assignment even mean when everyone ranks their options? Maximizing total edges ignores preferences entirely. The right target, discovered by Gale and Shapley, is stability.

Definition — set of preferences; stable matching

A set of preferences for \(G\) is a family \((\le_v)_{v \in V}\): for each vertex \(v\), a ranking of the set \(E(v)\) of edges ending at \(v\), where \(e <_v f\) means \(v\) strictly prefers \(f\) to \(e\). A matching \(M\) is stable if for every edge \(e \notin M\) there is an edge \(f \in M\) sharing an endpoint \(v\) with \(e\) such that \(e <_v f\). In plain terms: every edge left out of the matching is blocked at one of its two ends by something that end likes better. No two vertices both prefer each other to their current situation, so nobody elopes.

Theorem — stable marriage theorem (Gale & Shapley, 1962)

For every set of preferences on a bipartite graph, a stable matching exists.[1][6]

Proof idea: run a proposal process. Repeatedly pick an unmatched \(A\)-vertex that some neighbour would still accept (the neighbour prefers that new edge to its current matching edge, if it has one). Add the best such edge from the proposer's point of view, and drop the neighbour's old edge. Watch the \(B\)-side: every change makes some \(B\)-vertex strictly happier, and a given \(B\)-vertex can improve at most once per edge it has, so the process must stop. When it stops, no unmatched \(A\)-vertex is acceptable to any neighbour, and that is exactly stability. The argument is a template for proving that decentralized processes settle down.

unstable: a1 and b1 would elope stable: smaller, but nobody defects a1 a2 b1 b2 a1 a2 b1 b2
Figure 2.5. Preferences: \(a_1\) prefers \(b_1\) to \(b_2\), and \(b_1\) prefers \(a_1\) to \(a_2\). Left: the violet matching \(\{a_1b_2, a_2b_1\}\) has two edges, yet the dashed gold edge \(a_1b_1\) is preferred by both of its ends, so the matching unravels. Right: \(\{a_1b_1\}\) is stable even though \(a_2\) and \(b_2\) stay single (they are not connected to each other). Stability and size can genuinely conflict.
Common mistake

A stable matching need not be a maximum matching, and a maximum matching need not be stable; Figure 2.5 shows both failures at once. Stability is about the absence of a mutually preferred outside edge, not about size. And outside bipartite graphs, a stable matching may fail to exist altogether.

In the real world

Each year the National Resident Matching Program assigns graduating medical students in the United States to hospital residency programs, using exactly the proposal process above at national scale: applicants propose down their rank lists, programs tentatively hold their best proposals and release the rest, and rounds continue until all lists are processed, at which point tentative matches become binding.[7] Roth and Peranson, who redesigned the clearinghouse in the 1990s, report it filling approximately 20,000 physician jobs per year as of 1999.[8] The founding paper is Gale and Shapley's 1962 "College Admissions and the Stability of Marriage".[6] Shapley and Roth received the 2012 Nobel Memorial Prize in economics for this line of work, as Diestel's chapter notes.[1] Inside the book, the theorem returns in Chapter 5 to prove Galvin's list-colouring theorem.

A colour photograph of an elderly man with a white beard and untidy grey hair, in a dark overcoat, scarf and tie, in front of a blurred pale wall.
Plate 2.C. Lloyd Shapley in Stockholm for Nobel week, December 2012, fifty years after the paper with David Gale that this theorem comes from. The proposal process below is their algorithm, unchanged. He shared the prize with Alvin Roth, who had redesigned the American medical match around it. Bengt Nyman, 2012. Wikimedia Commons, CC BY 2.0.

Your stable matching has fewer edges than a maximum matching of the same graph. What does that tell you?

  1. The proposal process was run in the wrong order
  2. An error somewhere: a stable matching is always maximum
  3. The graph cannot have been bipartite
  4. Nothing is wrong; stability rules out mutually preferred pairs, not small size
Answer: D. Figure 2.5 shows a stable matching of one edge sitting beside an unstable one of two edges. Option B is the natural wish, but stability and size are separate goals that can genuinely conflict.

Beyond bipartite: Tutte's theorem

Drop the two-sides assumption. When does an arbitrary graph have a perfect matching? Hall's condition no longer even makes sense, so we need a new kind of obstruction. Parity supplies it.

Definition — odd component; q(G)

A component of a graph is odd if it has an odd number of vertices; \(q(G)\) denotes the number of odd components of \(G\). Think of components as islands: \(q(G)\) counts the islands with odd population. An odd island can never pair up internally, since a perfect matching pairs vertices two by two; at least one islander must marry off-island.

Now delete a set \(S\) of vertices and look at the wreckage \(G - S\), the graph left after removing \(S\) and all edges touching it (Chapter 1 notation). Every odd component of \(G - S\) must send at least one matching edge into \(S\), and each vertex of \(S\) can receive at most one such edge. So if \(G\) has a perfect matching, then \(q(G - S) \le |S|\): the number of odd components left is at most the number of vertices deleted. Tutte's theorem says this is the whole story.

Theorem — Tutte's 1-factor theorem (Tutte, 1947)

A graph \(G\) has a perfect matching if and only if \(q(G - S) \le |S|\) for every set \(S\) of vertices, including the empty set.[2]

Proof idea. Necessity is the counting above. Sufficiency is genuinely clever: assume \(G\) satisfies the condition but has no perfect matching, and make \(G\) edge-maximal with this property (adding edges never destroys the condition). In such a maximal graph one examines the set of vertices joined to all others. If every component of the rest were a complete graph, a direct pairing would succeed. If some component is not complete, one manufactures two "near-miss" matchings from the maximality and splices them along an alternating walk into a genuine perfect matching, a contradiction. The full construction is in Diestel §2.2, and it rewards a careful read.[2]

c x y z
Figure 2.6. Tutte's condition failing in the star \(K_{1,3}\) (a complete bipartite graph; Diestel writes complete graphs as \(K^n\), where many other books write \(K_n\)). Delete \(S = \{c\}\), shown faded with its edges: the three violet leaves become three odd components, so \(q(G - S) = 3 > 1 = |S|\). No perfect matching exists, even though the graph has an even number of vertices.
Common mistake

Two subtleties in the condition. First, \(q\) counts only the odd components: even pieces can potentially pair up internally and do not testify against the graph. Second, \(S = \emptyset\) is a legitimate choice, and it forces \(q(G) = 0\): every component of \(G\) itself must be even. Learners forget the empty set constantly.

Tutte's theorem has a famous corollary. Recall from Chapter 1 that a graph is cubic if every vertex has degree 3, and that a bridge is an edge whose removal disconnects its component.

Theorem — Petersen's 1-factor theorem (Petersen, 1891)

Every cubic graph without a bridge has a perfect matching.[2]

Proof idea: verify Tutte's condition by counting. Fix \(S\) and an odd component \(C\) of \(G - S\). The degrees inside \(C\) sum to an odd-ish total that forces an odd number of edges to leave \(C\) toward \(S\); "no bridges" rules out exactly one, so at least 3 edges leave each odd component. That is at least \(3\,q(G-S)\) edges arriving in \(S\), while cubic-ness lets \(S\) absorb at most \(3|S|\). Divide by 3 and Tutte's condition holds. The bridge hypothesis is not decoration, as the next figure shows.

c w1 d e f g w2 h i j k w3 l m n p
Figure 2.7. A cubic graph with no perfect matching. Each of the three gadgets is a \(K^4\) (complete graph on 4 vertices) with one edge subdivided by a new vertex \(w_i\), and each \(w_i\) is joined to the centre \(c\). Every vertex has degree 3. The three gold edges \(cw_i\) are bridges, so Petersen's theorem does not apply, and indeed deleting \(S = \{c\}\) leaves three components of 5 vertices each: \(q(G - S) = 3 > 1\).
In the real world

Some kidney patients have a willing living donor whose organ they cannot medically accept. Roth, Sönmez and Ünver proposed pooling such incompatible pairs into a centralized exchange: pair one's donor gives to pair two's patient while pair two's donor gives to pair one's patient.[9] In graph terms, each pair is a vertex, compatibility gives the edges, and a feasible set of two-way swaps is exactly a matching in a general, non-bipartite graph: the territory of Tutte's theorem and the algorithmic theory descending from it. Their simulations showed that organized exchange substantially increases the number of feasible transplants.[9]

\(G\) has 8 vertices. Deleting the single vertex \(v\) leaves three components with 3, 2 and 2 vertices. What does Tutte's condition say here?

  1. It fails, because three components appeared after deleting one vertex
  2. It holds for this \(S\): only the 3-vertex component is odd, so \(q(G-S) = 1 \le 1\)
  3. It fails, because \(q(G-S) = 3 > 1 = |S|\)
  4. It holds for this \(S\), so \(G\) has a perfect matching
Answer: B. Only odd components are counted, so one odd component against one deleted vertex passes. Option D over-reads the result: the condition must hold for every set \(S\), so one passing set settles nothing.

The Gallai–Edmonds structure theorem

Tutte's theorem is a yes/no answer. The Gallai–Edmonds theorem is the anatomy textbook: it describes what every graph, with or without a perfect matching, looks like from a matching's point of view. Its atomic pieces are graphs that just barely miss.

Definition — factor-critical

A non-empty graph \(G\) is factor-critical if \(G\) itself has no perfect matching, but \(G - v\) has one for every vertex \(v\). In plain terms: the graph has an odd number of vertices, yet whichever single vertex you remove, the survivors pair up perfectly. The simplest example is an odd cycle.

v1 v2 v3 v4 v5 v1 v2 v3 v4 v5
Figure 2.8. The 5-cycle is factor-critical. Left: with 5 vertices it cannot pair up completely. Right: delete \(v_1\) (faded) and the rest is a path with the perfect matching \(\{v_2v_3, v_4v_5\}\) in violet. The same works after deleting any other vertex, by symmetry.
Definition — matchable to the components

For a vertex set \(S\), build the bipartite graph \(G_S\): squash each component of \(G - S\) to a single point, delete all edges inside \(S\), and join \(s \in S\) to a squashed component whenever \(s\) had a neighbour inside it. We say \(S\) is matchable to \(\mathcal{C}_{G-S}\), the set of components of \(G - S\), if \(G_S\) contains a matching of \(S\). Plainly: each vertex of \(S\) can claim a private component that it actually touches. This packaging lets Hall's theorem, a bipartite tool, speak about general graphs.

Theorem — Gallai–Edmonds structure theorem (Gallai, 1964; Edmonds, 1965)

Every graph \(G\) contains a vertex set \(S\) such that (i) \(S\) is matchable to \(\mathcal{C}_{G-S}\), and (ii) every component of \(G - S\) is factor-critical. For any such \(S\), the graph \(G\) has a perfect matching if and only if \(|S| = |\mathcal{C}_{G-S}|\), that is, the number of components equals the size of \(S\).[2]

Proof idea. Choose \(S\) to maximize the deficiency \(q(G - T) - |T|\) over all vertex sets \(T\), taking a largest maximizer. Each property then falls out of the maximizing choice: a component that failed to be factor-critical, or a failure of Hall's condition in \(G_S\), would let you enlarge \(S\) or shift a vertex and increase the deficiency, contradicting maximality. Hall's theorem is the engine inside step (i), which is why this chapter proved it first. The bookkeeping around the theorem also shows what every maximum matching of \(G\) must look like: it matches all of \(S\) into distinct components and pairs each component's remainder internally.[2]

s1 s2 s3 x t1 t2 t3 c1 c2 c3 c4 c5 y
Figure 2.9. The Gallai–Edmonds picture. The gold hub \(S = \{s_1, s_2, s_3\}\) faces four factor-critical components of \(G - S\): the single vertex \(x\), the triangle \(t_1t_2t_3\), the 5-cycle \(c_1 \dots c_5\), and the single vertex \(y\). Violet edges form a maximum matching: each hub vertex is matched into its own component, and each component pairs its remainder internally. Since \(|S| = 3\) but there are 4 components, one component (here \(y\)) is always left short: no perfect matching.

Which of these graphs is factor-critical?

  1. The 5-cycle: it has no perfect matching, yet deleting any one vertex leaves one
  2. The 4-cycle, in which either pair of opposite edges pairs everyone up
  3. A single edge, the smallest graph with a perfect matching
  4. The star \(K_{1,3}\), which has no perfect matching either
Answer: A. Factor-critical demands two things at once: no perfect matching, but a perfect matching after any single vertex is deleted. Option D passes the first test and fails the second, since deleting a leaf leaves three vertices that cannot pair up.

Packing versus covering: the Erdős–Pósa theorem

Time to widen the lens as promised. Fix a class \(\mathcal{H}\) of target shapes, say the class of all cycles. Two rival goals appear. Packing: fit as many vertex-disjoint copies of shapes from \(\mathcal{H}\) into \(G\) as possible. Covering: pick as few vertices as possible so that every copy in \(G\) is touched. Each packed copy eats at least one cover vertex, so a cover is never smaller than a packing. König's theorem said the two are equal when \(\mathcal{H}\) is "a single edge" and the graph is bipartite. For cycles, equality fails, but it fails by a bounded amount, and that is the next theorem.

Definition — the Erdős–Pósa property

A class \(\mathcal{H}\) has the Erdős–Pósa property if there is a function \(f\colon \mathbb{N} \to \mathbb{N}\) such that for every number \(k\) and every graph \(G\): either \(G\) contains \(k\) disjoint copies of shapes from \(\mathcal{H}\), or some set of at most \(f(k)\) vertices meets every copy in \(G\). In words: either you can pack \(k\) copies, or a bounded number of vertices, bounded by a formula in \(k\) alone no matter how enormous the graph, destroys every copy.

Theorem — Erdős–Pósa theorem (Erdős & Pósa, 1965)

The class of cycles has the Erdős–Pósa property. Concretely, there is a function \(f(k)\), of size roughly \(4k\log k\), such that every graph contains either \(k\) vertex-disjoint cycles or a set of at most \(f(k)\) vertices meeting all of its cycles.[3]

Proof idea. The quantitative heart is a lemma about cubic multigraphs (multigraphs, from Chapter 1, allow parallel edges and loops): once a cubic multigraph has at least \(s_k\) vertices, where \(s_k\) is about \(4k \log k\), it must contain \(k\) disjoint cycles. The lemma is proved by induction on \(k\): grab a shortest cycle \(C\), which is short because minimum degree 3 forces a short girth (Chapter 1), delete it, tidy the remainder back into cubic form, and apply induction. For the theorem, one takes inside \(G\) a maximal subgraph \(H\) whose degrees are all 2 or 3. Maximality forces every cycle of \(G\) to interact with \(H\), and a case analysis shows each cycle either belongs to a small collectable family or passes through the degree-3 vertices of \(H\), to which the lemma applies. Either the packing or the bounded cover falls out.[3]

pack 1, cover 1 pack 2, no 1-vertex cover p q v r s d e f g h i
Figure 2.10. Erdős–Pósa duality in miniature. Left: a bowtie. Every cycle passes through the gold vertex \(v\), so two disjoint cycles are impossible, and deleting \(v\) alone kills every cycle. Right: two disjoint triangles (violet and green) pack 2 cycles, and correspondingly no single vertex meets both. Small packing forces a small cover; large packing excuses a large one.
Common mistake

The content of the theorem is that \(f(k)\) does not depend on the graph. "Every graph has either \(k\) disjoint cycles or some covering set" is vacuously true and says nothing. Also, "disjoint" here means vertex-disjoint; the edge-disjoint version is a separate result.

Computer scientists call a vertex set meeting every cycle a feedback vertex set; it is the standard object for breaking circular dependencies, and the Erdős–Pósa theorem guarantees a small one whenever large cycle packings are absent.[3] The theorem also returns in Chapter 12, where graph-minor theory yields a sweeping generalization.

What is the actual content of the Erdős–Pósa property for cycles?

  1. A graph with enough cycles always contains \(k\) disjoint ones
  2. Every graph has \(k\) disjoint cycles, or else some vertex set meeting all of its cycles
  3. The largest cycle packing always equals the smallest cycle cover
  4. When \(k\) disjoint cycles are missing, \(f(k)\) vertices kill every cycle, and \(f\) depends on \(k\) alone
Answer: D. The force of the theorem is that the covering bound ignores the graph entirely, however enormous it is. Option B holds for every graph for a trivial reason, since the whole vertex set meets all cycles, so it carries no information.

Tree packing and arboricity

Matching packed disjoint edges; Erdős–Pósa packed disjoint cycles. The third packing problem concerns spanning trees, and here the disjointness moves to the edges. Recall from Chapter 1 that a spanning tree of a connected graph is a subgraph reaching every vertex, connected, with no cycles, and that a spanning tree of an \(n\)-vertex graph always has exactly \(n - 1\) edges. Two spanning trees are edge-disjoint if they share no edges (they necessarily share all vertices). How many edge-disjoint spanning trees fit inside a given graph?

In the real world

Diestel motivates this section with communication networks.[4] If a network contains \(k\) edge-disjoint spanning trees, then any two nodes are connected by \(k\) routes, one per tree, no two of which share a link. Losing the links of any one tree still leaves the other trees intact and the network connected. Corollary 2.4.2 below turns this into a design rule with no case-checking: build the network so that at least \(2k\) links must fail before it can disconnect, and \(k\) edge-disjoint spanning trees are automatically present.[4]

The exact criterion counts edges between districts. Given a partition \(P\) of the vertex set into \(r\) classes (districts), a cross-edge is an edge with its two ends in different classes. Any spanning tree must reconnect the \(r\) districts, and reconnecting \(r\) things needs at least \(r - 1\) connections, so each spanning tree uses at least \(r - 1\) cross-edges. If \(k\) edge-disjoint spanning trees exist, then every partition into \(r\) classes must have at least \(k(r-1)\) cross-edges. That much is forced. What is not obvious is that this requirement is also sufficient.

Theorem — tree packing theorem (Nash-Williams, 1961; Tutte, 1961)

A multigraph contains \(k\) edge-disjoint spanning trees if and only if every partition \(P\) of its vertex set has at least \(k\,(|P| - 1)\) cross-edges, where \(|P|\) is the number of partition classes.[4]

Theorem — edge-connectivity buys spanning trees (Corollary 2.4.2)

Every \(2k\)-edge-connected multigraph, one that stays connected whenever fewer than \(2k\) edges are deleted, contains \(k\) edge-disjoint spanning trees.[4]

Proof idea for the corollary: in any partition into \(r\) districts, each district has at least \(2k\) edges leaving it, since deleting those edges would disconnect the graph. Summing over districts counts every cross-edge at most twice, so there are at least \(\tfrac{1}{2} \cdot 2kr = kr \ge k(r-1)\) cross-edges, and the packing theorem applies. Note that plain \(k\)-edge-connectivity is not enough, as Figure 2.11 shows; the doubling is honest.

1 2 3 4 5 6 7 8 w x y z
Figure 2.11. Left: the cycle \(C_8\) is 2-edge-connected, but a single spanning tree of its 8 vertices already needs 7 edges and the whole graph has only 8, far short of the 14 that two edge-disjoint spanning trees would need. Right: \(K^4\) does the packing: the violet tree \(wx, xy, yz\) and the green tree \(xz, zw, wy\) are edge-disjoint spanning trees using all 6 edges between them.

Covering is the mirror question: how few trees, overlaps now allowed, are needed so that every edge of \(G\) lies on at least one of them? The obstruction is density. Any tree can carry at most \(|U| - 1\) edges inside a vertex set \(U\), so if some \(U\) induces more than \(k(|U|-1)\) edges, \(k\) trees cannot cover them. Recall the notation \(\|G[U]\|\) from Chapter 1: the number of edges of the induced subgraph \(G[U]\), which keeps exactly the edges with both ends in \(U\).

Theorem — tree covering theorem (Nash-Williams, 1964)

The edges of a multigraph \(G\) can be covered by at most \(k\) trees if and only if \(\|G[U]\| \le k\,(|U| - 1)\) for every non-empty vertex set \(U\). The least such \(k\) is called the arboricity of \(G\).[4]

Arboricity is worth remembering as a single number measuring maximum local density: it is small exactly when no group of vertices anywhere in the graph is edge-rich. For \(K^4\): the whole vertex set gives \(\|G[U]\| = 6 \le 2 \times 3\), the condition holds with \(k = 2\), and the two coloured trees of Figure 2.11 achieve the cover, so the arboricity of \(K^4\) is 2 (one tree cannot cover 6 edges with only 3).

Diestel derives both classical theorems from one modern statement that needs no hypotheses at all.

Theorem — packing-covering theorem (Bowler & Carmesin, 2015)

For every connected multigraph \(G\) and every \(k\), there is a partition \(P\) of the vertex set such that every district \(G[U]\) with \(U \in P\) contains \(k\) edge-disjoint spanning trees, while the contracted graph \(G/P\) (squash each district to a point, keep edges between districts) can have its edges covered by \(k\) spanning trees.[4]

In words: every connected multigraph splits into districts that are individually rich, each holding \(k\) edge-disjoint spanning trees, while the map of districts is globally poor, needing only \(k\) trees to blanket it. Packing succeeds locally exactly where covering succeeds globally. The proof takes \(k\) spanning trees whose union covers as many distinct edges as possible, and studies exchange chains: domino lines of swaps of the form "add this edge to that tree, remove one edge of the cycle it closes" (the cycle in question is the fundamental cycle \(C_e\) from Chapter 1). The key lemma says a duplicated edge that starts an exchange chain is wasted capacity: executing the cascade grows the union, contradicting maximality. The districts are then read off from where exchange chains can start. This exchange argument foreshadows matroid theory, and the theorem's infinite version appears in Chapter 8.[4]

Common mistake

Covering is not decomposition. Covering trees may overlap on edges, and they need not even be subgraphs of \(G\) (they are then trimmed or extended). An edge-decomposition, where the edge sets partition \(E\), is the stricter notion, and packing \(k\) spanning trees is about disjointness, not about using every edge. Keep the three ideas separate.

The cycle \(C_8\) is 2-edge-connected. Why does it still fail to contain two edge-disjoint spanning trees?

  1. A cycle has no spanning tree at all
  2. Two of them would need 14 edges and \(C_8\) has only 8
  3. The tree packing theorem applies only to simple graphs
  4. Its vertex partitions have too many cross-edges
Answer: B. One spanning tree of 8 vertices already uses 7 edges, so the count alone rules two out; this is why the corollary asks for \(2k\)-edge-connectivity rather than \(k\). Option D reverses the criterion: too few cross-edges is what blocks a packing.

The arboricity of \(K^4\) is 2. Which statement says what arboricity measures?

  1. \(K^4\) contains two edge-disjoint spanning trees
  2. Every vertex of \(K^4\) lies on exactly two trees
  3. Two trees suffice to cover every edge of \(K^4\), and one does not
  4. \(K^4\) splits into two trees that share no vertices
Answer: C. Arboricity is a covering number: the fewest trees whose union contains every edge, overlaps allowed. Option A is a true fact about \(K^4\) but states the packing question, which is about disjointness rather than coverage.

Path covers and Dilworth's theorem

The chapter closes with directed graphs, where each edge points from one vertex to another (Chapter 1). A directed path is a one-way trail through distinct vertices, each edge pointing forward along it; its last vertex is where it ends, and a single vertex counts as a path of length zero. For a set \(\mathcal{P}\) of such paths, \(\mathrm{ter}(\mathcal{P})\) collects their last vertices.

Definition — path cover

A path cover of a directed graph is a set of disjoint directed paths that together contain all its vertices. Plainly: chop the whole vertex set into one-way trails, where a lone vertex is a legitimate trail. The interesting question is how few paths suffice.

What limits a path cover from being small? Independent vertices. Recall the independence number \(\alpha(G)\) from Chapter 1: the largest number of vertices no two of which are joined by an edge. A directed path can contain at most one vertex from a set with no edges among its members... almost. A path could revisit the neighbourhood of such a set. The theorem of Gallai and Milgram makes the bound genuine, and sharper than expected.

Theorem — Gallai–Milgram theorem (Gallai & Milgram, 1960)

Every directed graph has a path cover \(\mathcal{P}\) together with an independent set of vertices containing exactly one vertex from each path of \(\mathcal{P}\). In particular, the minimum number of paths in a path cover is at most the maximum size of an independent set.[5]

Proof idea. Among all path covers, take one whose set of last vertices \(\mathrm{ter}(\mathcal{P})\) is minimal: no other path cover's last-vertex set sits properly inside it. Then induct on the number of vertices: delete a last vertex, shorten its path, and re-check minimality in three small cases. The induction is delicate, and what it hands back is a path cover together with an independent set of representatives, one drawn from each path. The theorem simultaneously generalizes König's theorem: orient every edge of a bipartite graph from \(A\) to \(B\), and a minimum path cover is exactly a maximum matching plus leftover lone vertices.[5]

The most famous consequence lives in order theory. In a partially ordered set \((P, \le)\), such as numbers ordered by divisibility, a chain is a subset whose elements are pairwise comparable, a ladder; an antichain is a subset whose elements are pairwise incomparable, a shelf. An antichain can meet each chain at most once, so covering \(P\) by chains needs at least as many chains as the largest antichain has elements. Dilworth's theorem says this bound is always achieved.

Theorem — Dilworth's theorem (Dilworth, 1950)

In every finite partially ordered set, the minimum number of chains whose union is the whole set equals the maximum size of an antichain.[5]

Proof from Gallai–Milgram in three sentences. Build the directed graph on \(P\) with an edge from \(x\) to \(y\) whenever \(x < y\). Directed paths are then exactly chains, and independent sets are exactly antichains. Gallai–Milgram supplies a path cover with one representative per path forming an antichain, so the number of chains used is at most the largest antichain, and the easy direction closes the gap.

1 2 3 4 6 12
Figure 2.12. The divisors of 12 ordered by divisibility, arrows pointing from divisor to immediate multiple. The violet chain \(1 \mid 2 \mid 4 \mid 12\) and the green chain \(3 \mid 6\) form a path cover with 2 paths. The gold vertices 4 and 6 form a maximum antichain of size 2: neither divides the other. Minimum chains = maximum antichain = 2, with 4 and 6 as the promised one-per-path independent representatives.

Dilworth's theorem earns its keep in scheduling. If tasks are partially ordered by "must finish before", then a chain is a to-do list a single machine can process in order, an antichain is a set of tasks no two of which are sequenced, and the theorem says the minimum number of machines needed equals the largest such set.[5]

A directed graph has five vertices and no edges at all. How few paths can a path cover of it use?

  1. Five: a lone vertex counts as a path, and no two can be joined
  2. One: a single path may list all five vertices in any order
  3. Zero: with no edges there are no paths to use
  4. It is undefined; a path cover needs at least one edge
Answer: A. Paths of length zero are legitimate, so a cover exists and needs one path per vertex. It also meets the Gallai–Milgram bound exactly, since all five vertices are independent and \(\alpha = 5\).

Tasks are ordered by "must finish before". The largest set of pairwise unsequenced tasks has 4 members. How many machines does Dilworth's theorem call for?

  1. At least 4, but possibly many more
  2. At most 3, since chains can merge tasks
  3. Exactly 4
  4. It depends on how many tasks there are in total
Answer: C. Those 4 tasks are pairwise incomparable, so no single chain holds two of them and 4 machines are forced; Dilworth adds that 4 always suffice. Option A keeps only the easy half of the equality and misses that the bound is tight.

What to carry forward

Four things deserve permanent residence in your head. First, the min-max habit: when an object you want fails to exist, look for the small certificate that proves it, whether a starved group (Hall), an over-shattering vertex set (Tutte), or a cover matching your packing (König, Dilworth). Second, augmenting paths: improvement by rearrangement, not just addition, the engine of matching algorithms. Third, the packing-covering duality, exact in this chapter's best theorems and bounded in Erdős–Pósa's. Fourth, the trick of recasting problems into bipartite form, which turned an 1891 struggle into three lines.

The threads continue. König's theorem reappears in Chapter 3 as the bipartite case of Menger's theorem, and the min-max style matures into the max-flow min-cut duality of Chapter 6. The stable marriage theorem proves Galvin's list-colouring theorem in Chapter 5. The tree packing theorem returns in infinite form in Chapter 8, and the Erdős–Pósa theorem is reborn in Chapter 12 as an early corollary of graph-minor theory.

The chapter names the min-max habit as its first takeaway. What does it tell you to do when the object you want fails to exist?

  1. Check whether the graph is bipartite, since that is usually the fault
  2. Accept that no short proof of the failure can exist
  3. Search every subgraph by computer
  4. Hunt for the small certificate that proves the failure
Answer: D. A starved group (Hall), an over-shattering vertex set (Tutte), or a cover the size of your packing (König) each proves impossibility on sight. Option B is the reverse of the chapter's point: the certificate is the short proof.

Check your understanding

In this chapter, \(q(G)\) denotes:

  1. The number of components of \(G\) with an odd number of vertices
  2. The number of edges of \(G\)
  3. The number of cycles of \(G\)
  4. The maximum degree of \(G\)
Answer: A. \(q(G)\) counts the odd components, the islands with odd population. It is the star of Tutte's condition \(q(G - S) \le |S|\). Edge count is written \(\|G\|\), a different symbol.

A 1-factor of a graph \(G\) is:

  1. Any matching in \(G\)
  2. A single edge
  3. A spanning tree of \(G\)
  4. A spanning subgraph in which every vertex has degree exactly 1
Answer: D. A 1-factor is a 1-regular spanning subgraph, which is the same thing as a perfect matching: every vertex is paired. Option A is the tempting near-miss, but an arbitrary matching may leave vertices unmatched.

For a set \(S\) of vertices, \(N(S)\) denotes:

  1. The number of vertices in \(S\)
  2. The set of edges inside \(S\)
  3. The set of all vertices having at least one neighbour in \(S\)
  4. The components of \(G - S\)
Answer: C. \(N(S)\) is the neighbourhood of the set \(S\). Hall's marriage condition compares its size against \(|S|\), which is option A's number, a different thing entirely.

A bipartite graph with sides \(A\) and \(B\) has a matching covering all of \(A\) exactly when:

  1. Every vertex of \(A\) has at least one neighbour
  2. Every subset \(S \subseteq A\) satisfies \(|N(S)| \ge |S|\)
  3. \(|A| \le |B|\)
  4. The graph is connected
Answer: B. This is Hall's marriage theorem, and the condition must hold for every group, not just individuals. Options A and C are necessary but not sufficient: three applicants sharing the same two jobs satisfy both and still cannot all be placed (Figure 2.4).

König's theorem says maximum matching size equals minimum vertex cover size in bipartite graphs. Which graph shows the equality can fail without bipartiteness?

  1. A triangle
  2. A path on 4 vertices
  3. A 4-cycle
  4. The star \(K_{1,3}\)
Answer: A. The triangle has maximum matching 1 but needs 2 vertices to cover its 3 edges (Figure 2.3). The other three graphs are bipartite, so König's equality holds in them automatically.

With preferences given, a matching \(M\) is unstable exactly when:

  1. Some vertex is unmatched
  2. \(M\) is not of maximum size
  3. Two edges of \(M\) share a vertex
  4. Some edge outside \(M\) is preferred by both of its endpoints to their current matching edges (if any)
Answer: D. Instability means a blocking edge whose two ends would jointly defect. Unmatched vertices (A) and non-maximum size (B) are fully compatible with stability, as Figure 2.5 shows, and option C contradicts \(M\) being a matching at all.

The cycle \(C_{10}\) (10 vertices in a ring) is 2-edge-connected. How many edge-disjoint spanning trees does it contain?

  1. 0
  2. 1
  3. 2
  4. 5
Answer: B. A spanning tree of 10 vertices needs 9 edges, so two edge-disjoint spanning trees would need 18, but \(C_{10}\) has only 10 edges. One spanning tree exists since the graph is connected (drop any single edge). So \(k\)-edge-connectivity does not buy \(k\) trees; the sufficient threshold is \(2k\) (Corollary 2.4.2).

Consider the star \(K_{1,3}\): a centre joined to three leaves. By Tutte's theorem, why does it have no perfect matching?

  1. It has an odd number of vertices
  2. It is bipartite
  3. Deleting the centre leaves 3 odd components, but only 1 vertex was deleted
  4. It has a vertex of degree 3
Answer: C. With \(S\) = {centre}, we get \(q(G - S) = 3 > 1 = |S|\), violating Tutte's condition (Figure 2.6). Option A is false: the star has 4 vertices, an even number. Bipartiteness and high degree are no obstacles to perfect matchings.

A graph consists of two triangles sharing exactly one common vertex \(v\) (a bowtie). Which statement matches the Erdős–Pósa picture?

  1. It has no 2 disjoint cycles, and the single vertex \(v\) meets every cycle
  2. It contains 2 vertex-disjoint cycles
  3. No single vertex meets all of its cycles
  4. It has no cycles at all
Answer: A. Every cycle of the bowtie passes through \(v\), so two vertex-disjoint cycles are impossible, and deleting \(v\) leaves a cycle-free graph (Figure 2.10). Small packing comes with a small cover, exactly the trade-off the theorem guarantees in general with a bound \(f(k)\) depending only on \(k\).

Order the divisors \(\{1, 2, 3, 5, 6, 10, 15, 30\}\) of 30 by divisibility. The set \(\{6, 10, 15\}\) is an antichain (none divides another), and no larger antichain exists. By Dilworth's theorem, the minimum number of chains needed to cover all eight elements is:

  1. 2
  2. 3
  3. 4
  4. 8
Answer: B. Dilworth's theorem: minimum chain cover = maximum antichain = 3. For instance the chains \(1 \mid 2 \mid 6 \mid 30\), then \(3 \mid 15\), then \(5 \mid 10\) cover everything. Fewer than 3 chains cannot work, since each chain contains at most one of 6, 10, 15.

Sources and further reading

  1. R. Diestel, Graph Theory, 6th ed., Springer GTM 173 (2024), §2.1 (König's theorem 2.1.1; Hall's theorem 2.1.2; Corollary 2.1.3; stable marriage theorem 2.1.4; Petersen's 2-factor theorem, Corollary 2.1.5).
  2. R. Diestel, Graph Theory, 6th ed., Springer GTM 173 (2024), §2.2 (Tutte's 1-factor theorem 2.2.1; Petersen's 1-factor theorem, Corollary 2.2.2; Gallai–Edmonds structure theorem 2.2.3).
  3. R. Diestel, Graph Theory, 6th ed., Springer GTM 173 (2024), §2.3 (Lemma 2.3.1; Erdős–Pósa theorem 2.3.2).
  4. R. Diestel, Graph Theory, 6th ed., Springer GTM 173 (2024), §2.4 (tree packing theorem 2.4.1; Corollary 2.4.2; tree covering theorem 2.4.3; packing-covering theorem 2.4.4; exchange lemma 2.4.5).
  5. R. Diestel, Graph Theory, 6th ed., Springer GTM 173 (2024), §2.5 (Gallai–Milgram theorem 2.5.1; Dilworth's theorem, Corollary 2.5.2).
  6. D. Gale, L. S. Shapley, "College Admissions and the Stability of Marriage", The American Mathematical Monthly 69(1) (1962), 9–15. Full text.
  7. National Resident Matching Program, "How the Matching Algorithm Works", official explainer. nrmp.org.
  8. A. E. Roth, E. Peranson, "The Redesign of the Matching Market for American Physicians: Some Engineering Aspects of Economic Design", American Economic Review 89(4) (1999). aeaweb.org.
  9. A. E. Roth, T. Sönmez, M. U. Ünver, "Kidney Exchange", NBER Working Paper 10002 (2003); Quarterly Journal of Economics (2004). nber.org.