Past exam of the mathematics course of the University of Cambridge 2011 ii Paper 3 17F Solution Created 2026-09-24 Updated 2026-09-24
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 38 4 b Solution Created 2026-10-03 Updated 2026-10-07
Let the bipartite graph have parts . Add a source , a sink , capacity-one edges for and for , and capacity on each original edge directed . Use the max-flow min-cut theorem: maximum flow value equals minimum cut capacity. Also use Integrality of the Ford-Fulkerson algorithm: integral capacities admit an integral maximum flow, found by integral augmenting paths.
An integral flow selects a matching in a graph, because each left and right vertex carries at most one unit. Conversely every matching gives a unit flow along its selected paths. Hence maximum flow value equals maximum matching cardinality.
A minimum cut has capacity at most , whereas crossing even one original edge would cost . For its source side , no edge of the original graph runs from to . Thereforeis a vertex cover, and its cardinality is exactly the cut capacity. Conversely, given any cover , use . No original edge crosses this cut, because both its endpoints would otherwise be outside the cover; its capacity is . Thus minimum cut capacity equals minimum cover size, proving König's theorem for bipartite matching:For the algorithm, repeatedly find augmenting paths in the residual network, then take to be the vertices reachable from . Each integral augmentation increases flow by at least one; the total value is at most . Each reachability search takes time, so this procedure takes time. The network uses only polynomially many edges and integer capacities, yielding the requested polynomial-time algorithm and an explicit cover.
Past exam of the mathematics course of the University of Cambridge 2015 ii Paper 4 14I Solution Created 2026-09-24 Updated 2026-10-06
A matching in a graph from to is a collection of edges with disjoint endpoints covering every vertex of ; equivalently it chooses a distinct neighbour in for each . For a finite bipartite graph, the Hall marriage theorem says this exists exactly when for every . Necessity follows by counting the distinct matched neighbours.
For sufficiency, induct on . If a nonempty proper subset is tight, , Hall's condition holds on . It also holds on : for , the original condition applied to gives . Induction provides two disjoint matching in a graph whose union covers . If no nonempty proper subset is tight, choose an edge , possible by Hall's condition. Delete its endpoints. Each nonempty subset of had at least one extra neighbour, so deleting leaves Hall's condition intact. Induction and then the edge finish the proof. The single-vertex case is immediate.
For the degree condition, fix and double-count with weights:Every denominator is nonzero; the last inequality uses along each edge. The Hall marriage theorem therefore proves the required matching exists. Finiteness, as in the usual course version of the theorem, is understood; the same proof covers a finite with arbitrary and finite degrees.
Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 212 3 Solution Created 2026-10-03 Updated 2026-10-06
Use a directed bipartite graph with one vertex for each job and one for each agent. Job vertices have supply and agent vertices demand . An arc from job to agent has cost and nonnegative flow ; an upper bound may be added, but is already implied by the balances. The minimum-cost flow formulation of the assignment problem isInteger supplies and demands give an integral optimum by integrality of the transportation problem. Its positive arcs form a perfect matching, hence give one job per agent.
A network simplex algorithm basis for this connected -vertex network has tree arcs, whereas an integral assignment has only positive flows. For , at least basic tree arcs therefore carry zero flow. This unavoidable degeneracy in linear programming can cause zero-step pivots, extra bookkeeping and cycling unless an appropriate pivot rule is used. The Hungarian algorithm exploits the assignment structure directly rather than maintaining many zero-flow basic arcs.
Suppose the assignment dual potentials satisfy . For every feasible assignment ,If the selected assignment uses only arcs with , its cost equals this lower bound. Weak duality and complementary slackness certify optimality. The PDF correctly denotes the feasible assignment by ; the TeX aid mistakenly replaces it with .
The Hungarian algorithm maintains feasible assignment dual potentials and a matching in a graph of zero reduced cost edges, where . Search for an augmenting path in a matching in this equality graph. If there is none, let be the reachable jobs and the reachable agents in the alternating search from unmatched jobs. Every agent in is matched to a job in . SetReduced costs from to its complement decrease by , those from outside into increase, and the remaining ones do not change. Thus feasibility and current matching equalities are preserved, while at least one new equality edge appears. Continue until an augmenting path in a matching increases the matching size. A perfect matching in the equality graph then has the same value as the dual linear program and is optimal.
For the example, start with the row minima and . The reduced cost matrix isMatch job to agent . Searching from both unmatched jobs gives and ; the minimum cost to an agent outside is . Update to and :The new equality edge augments the matching. From unmatched job , the next alternating search reaches agent and its matched job , giving and . Now . The updated feasible assignment dual potentials and reduced costs areThe augmenting path in a matching uses job to agent , the reversed matched edge to job , then the new edge to agent . It gives the optimal assignmentThe dual linear program value is , an independent optimality certificate.
Past exam of the mathematics course of the University of Cambridge 2017 ii Paper 2 15H Solution Created 2026-09-24 Updated 2026-10-05
For a finite bipartite graph with left vertex set , Hall marriage theorem says that a matching in a graph covering exists exactly when for every . Necessity follows because distinct matched neighbors of lie in .
For sufficiency, induct on , the empty case being immediate. If a nonempty proper subset has , apply the induction hypothesis to the graph on . For the remaining graph, every satisfiesso induction matches the remaining vertices too. If there is no such tight subset and , every nonempty proper subset has at least one extra neighbor. Select an edge and remove its endpoints. Each subset of the remaining left vertices loses at most one neighbor, so it still satisfies the required condition; induction supplies the rest of the matching in a graph. The case follows directly from the condition.
For a doubly stochastic matrix , make a bipartite graph joining row to column when . For a row subset ,Hall marriage theorem therefore gives a perfect matching, or a permutation , with .
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 109 3 i Solution Created 2026-10-03 Updated 2026-10-05
We prove the edge-isoperimetric theorem for binary initial segments by counting edges of the induced subgraph. Identify each vertex of the hypercube graph with an integer via its binary digits; the binary order on the discrete cube is increasing integer order. Let be its Hamming weight, and setA vertex in the initial segment has exactly neighbours of smaller label, obtained by changing a one to zero. Each induced edge is counted once, so an initial segment of size has induced edges.
The arithmetic ingredient is the binary digit-sum inequalityHere is a proof, including the parity cases needed for arbitrary sizes. Pair the numbers to obtainWrite and induct on , assuming . If , the claim is immediate. Otherwise the recurrences express as follows:Every pair on the right has smaller total size. The induction hypothesis bounds the right sides below by zero: the required lower bounds for the two terms are respectively , , and in the last three rows. This establishes the binary digit-sum inequality.
Now induct on to show that every -vertex subset of has at most induced edges. The zero-dimensional case is immediate. Split a set into its two coordinate sections , of sizes . By induction the edges within the sections number at most . The edges between the sections form a matching in a graph, so at most are present. HenceFinally, is a regular graph of degree , so its edge boundary in a graph satisfies . For the binary initial segment , equality holds. Therefore
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 110 1 Solution Created 2026-10-03 Updated 2026-10-05
Write . The Erdős-Stone theorem states that, for a fixed graph with chromatic number ,Here is the extremal number, and copies are subgraphs, not necessarily induced subgraphs. We write for the balanced complete multipartite blow-up with classes of vertices each. All asymptotic errors below concern with the forbidden graphs fixed.
The stability subgraph. We prove the high-minimum-degree multipartite stability subgraph assertion directly from the Erdős-Stone theorem. For , the edgeless spanning subgraph suffices. Suppose .
First repeatedly remove a vertex whose degree of a vertex is less than times the current order, where sufficiently slowly. The Erdős-Stone theorem gives, uniformly for every -free subgraph of order at most ,Indeed, apply the asymptotic bound at large orders; the contribution from bounded or sufficiently small orders is negligible relative to . If vertices survive, the removed edges number at mostComparing with shows that , provided dominates , the initial relative error, and . Consequently . The surviving induced subgraph satisfies and .
By the Erdős-Stone theorem, contains for some as slowly as necessary. This follows because exceeds the extremal number density for each fixed by the positive gap . Choose so slowly that and , and denote its root classes by .
An outside vertex having at least neighbours of a vertex in every determines one choice of a -subset in each . At most outside vertices can determine any fixed choice, since otherwise these vertices and the chosen root sets form . Thus at most outside vertices have this property. Exclude those vertices and the root classes; put each remaining vertex in a class for which it has fewer than neighbours of a vertex in .
Write , with . Counting missing incidences with givesSince , it follows that for every . The total missing incidences from all root vertices to assigned vertices are at most . At least of them are incidences with a vertex's own assigned root class. Hence only missing incidences go to other root classes.
Choose slowly and discard the assigned vertices with more than missing incidences to other root classes. Each remaining vertex of is adjacent to all but at most vertices of every , . If its class contained a complete bipartite graph , the vertices of this copy would have at least common neighbours of a vertex in each other root class. These sets extend the copy to , a contradiction. By the bipartite case of the Erdős-Stone theorem, the number of internal edges in each surviving class is .
The surviving graph still has edges, whereas the total possible cross-class edges, with these balanced classes, is . Thus only cross-class edges are missing. Discard the vertices missing more than cross-class edges, with slowly, and delete all internal edges. The resulting -partite subgraph has classes of size andFor the lower bound, every surviving vertex misses only vertices outside its class; the upper bound follows from the class sizes. This also records the uniform cross-class error that we need next.
Minimum degree in an extremal graph. Fix with . Choose large enough that embeds in . An extremal -free graph is therefore -free, and its edge count has the required asymptotics by the Erdős-Stone theorem. For take as above.
For any vertex , remove and introduce a new vertex whose vertex neighbourhood consists precisely of the vertices in other than . The new degree of a vertex is . This new graph remains -free. Indeed, a new copy of must use , and all its neighbours of a vertex in that copy lie in the other classes of . There are only boundedly many of them. Each misses only vertices in , so an unused vertex is adjacent to all of them. Replacing by would give in , which is impossible.
Extremality now forces , uniformly in . The upper bound for the minimum degree of a graph follows from . For , already gives . ThusThis is the minimum degree of an extremal forbidden-subgraph graph principle.
The exact extremal graph for disjoint cliques. DefineThe plus sign denotes the join of graphs. The Turan graph contains no , so every such clique in uses a vertex of . Therefore contains no vertex-disjoint such cliques, and the extremal number is at least .
Induct on , with supplied by the Turan theorem, including its equality characterization. Let and let be extremal for . The preceding results give and the -partite subgraph . Keep its classes fixed and assign each of the remaining vertices to a class in which it has fewest neighbours of a vertex in . Write the resulting classes as ; all have size . Choose a positive so slowly that dominates the outside count, every cross-class error in , and every error in the minimum degree of a graph bound.
Suppose some vertex has at least internal neighbours of a vertex. If , the assignment rule shows that has at least neighbours of a vertex in every . If , it has this many in and in the other . If contained disjoint , we could choose one vertex in each , successively avoiding those copies and the missing cross-neighbours of the already chosen vertices. This produces a further through . For , this just chooses an unused neighbour of . Hence is -free, and induction givesSince the candidate attains , equality holds throughout: is a universal vertex and is the inductively unique extremal graph. Thus is isomorphic to .
It remains to show that this case must occur. Otherwise all internal vertex degrees are less than . Together with the lower bound on and , this implies that every vertex misses only vertices outside its own class. If some contains a matching in a graph of edges, extend its edges one by one to , choosing one vertex from each other class. At every step only cross-neighbours and boundedly many used vertices are excluded. This gives disjoint forbidden cliques, a contradiction.
A maximal matching in each class therefore has at most edges, and its at most endpoints form a vertex cover of the internal edges. Their internal vertex degrees are all , so the total internal edge count is . The cross-class edge count is at most , whenceBut the balanced part sizes of the Turan graph givecontradicting extremality for . This argument also works for . Consequently, for all sufficiently large ,The uniqueness is up to isomorphic graphs, as usual for an extremal graph for disjoint cliques.
Past exam of the mathematics course of the University of Cambridge 2019 ii Paper 4 17G Solution Created 2026-09-24 Updated 2026-10-03
The Hall marriage theorem states that a finite bipartite graph with vertex classes and has a matching in a graph saturating if and only ifNecessity is immediate: distinct vertices of must be matched to distinct vertices of .
For sufficiency, induct on . If every nonempty proper satisfies the strict bound , choose any edge and delete its endpoints. Every loses at most the neighbour , so Hall's condition remains true; induction supplies a matching of the smaller graph, to which is added.
Otherwise there is a nonempty proper tight set with . Hall's condition holds on the induced graph with parts , so induction matches . For , Hall's condition on givesand hence . Induction therefore matches into . The two matchings are disjoint and together saturate , completing the proof through Hall induction through a tight set.
Identify a subset of with its binary characteristic vector. Then is the hypercube graph, and every edge changes set size by exactly one. The induced subgraph on is therefore bipartite with those two levels as its vertex classes.
Let . Every member of has neighbours in , obtained by adding one element, while every member of is incident with at most of these edges. Double-counting the edges between the two families givesSince , we have , and hence . Hall's theorem yields the requested adjacent-level matching in a Boolean lattice, saturating .
Finally, every chain in a partially ordered set in the Boolean lattice contains at most one member of the middle level . Any chain partition therefore uses at leastchains.
For every , choose one of the matchings just constructed and orient its edges upward. These edges partition all levels at or below into chains ending at distinct middle-level sets. Taking complements gives, for every , a matching from into ; orienting its edges upward extends those chains through all upper levels. Every subset belongs to exactly one resulting chain and every chain meets exactly once. Thus this symmetric chain decomposition of a Boolean lattice has one chain per middle-level set, and the minimum is
Past exam of the mathematics course of the University of Cambridge 2020 ii Paper 4 17G Solution Created 2026-09-24 Updated 2026-09-29
Vizing theorem states that every finite simple graph of maximum degree haswhere is its edge chromatic number. The lower bound follows because all edges incident with a vertex of degree need different colours.
For the upper bound, induct on the number of edges. Delete an edge and colour the remaining graph with the palette . We use the Vizing fan lemma: in a partial proper edge colouring with one uncoloured edge , if the palette has one more colour than the maximum degree, a sequence of fan rotations and two-colour Kempe-chain interchanges makes some colour missing at both ends of the uncoloured edge.
Here is the fan argument. Build a maximal sequence of distinct neighbours of such that, for , the colour on is missing at an earlier fan vertex. Rotating an initial fan segment means moving each colour on to the preceding edge where it is missing; this preserves properness and moves the uncoloured edge to the end of that segment. Choose a colour missing at and a colour missing at . On the maximal - alternating path from , interchange and . If the path does not reach , is then missing at both and , so rotate the fan and colour its final uncoloured edge . If it reaches , its last edge at has colour . Maximality of the fan forces the other endpoint of that edge to be a fan vertex; rotate up to that vertex first. This breaks the alternating path before , reducing to the preceding case. This proves the fan lemma and extends the colouring to , completing the induction.
For , label both vertex classes by and colour edge by . Each colour is a perfect matching, so this is an -edge-colouring. Since , . If , embed into and restrict its -edge-colouring. The degree lower bound then gives
Past exam of the mathematics course of the University of Cambridge 2023 ii Paper 4 17H b Solution Created 2026-09-24 Updated 2026-09-25
The Hall marriage theorem says that a bipartite graph with classes has a matching saturating if and only ifwhere is the graph neighbourhood of . Necessity follows because the matching sends the vertices of to distinct vertices of .
For sufficiency, add vertices , join to every vertex of , and join every vertex of to . Let be an - vertex separator, and write and . If an edge joined a vertex of to a vertex of , it would give an - path avoiding . HenceHall's condition givesand therefore . By Menger theorem, there are internally vertex-disjoint - paths. Each has the form with and ; disjointness makes all the and all the distinct. Their middle edges form a matching saturating .
Vertex cover 2026-10-05
A vertex cover is a set of vertices meeting every edge of a graph. The endpoints of any maximal matching form a vertex cover: an edge avoiding all endpoints would enlarge that matching in a graph. Consequently a graph with no matching in a graph of size has a vertex cover of size at most .