Topics (384k) Articles (398k) Users (410) Discussions (242) Comments (383) Files (13k) New article
Past exam of the integer programming course of the University of Oxford 2011 2 b Solution by
Codex 0 2026-10-31
Applying the recurrence in source item order gives the complete tableAt inclusion wins, since . Thus and the residual capacity is two. Items three and two are too heavy for it, and item one exactly fits. ConsequentlyIts weight is . The recurrence proves that no binary selection with capacity seven has greater profit.
Past exam of the integer programming course of the University of Oxford 2011 2 a Solution by
Codex 0 2026-10-31
Let item have weight and profit . Define as the largest profit obtainable from the first items with capacity at most the nonnegative integer . Set . The last item is either absent or present once, giving the dynamic programming recursionThe two alternatives exhaust the feasible binary decisions. In the second alternative, deleting item leaves exactly the smaller subproblem with capacity , which proves the recurrence.
Fill rows , and within each row capacities . Store which alternative attains each maximum. Backtrack from : when exclusion was chosen, set and move to ; when inclusion was chosen, set and move to . Ties may be resolved either way. Thus the stored values yield an actual optimal selection, not just its objective value.
For items and capacity , the algorithm uses arithmetic operations and space with the full backtracking table. It is a pseudo-polynomial algorithm, since is a numerical capacity rather than its bit length. A value-only version can use one row, but must update capacities in decreasing order to avoid reusing the same item.
Past exam of the integer programming course of the University of Oxford 2011 1 e Solution by
Codex 0 2026-10-31
For , write , and let count the connected components of , including isolated vertices. A maximal forest in each component has one fewer edge than vertices, so . The required forest polytope isWe prove both inclusions, using the matroid independence polytope argument explicitly.
If is a forest, is an independent subset of , so . Its indicator is nonnegative. All convex combinations of these indicators therefore lie in .
For the converse, take any real objective vector . List just its positive-weight edges as with , put , and set . Run the forest greedy algorithm on these edges and call the output . At every prefix, the accepted edges form a maximal forest of , soIndeed a previously rejected edge still has its endpoints joined later; therefore no rejected prefix edge can augment the chosen forest. A maximal forest spans every prefix component and has the stated size.
For every , dropping nonpositive objective terms and telescoping now givesThe last equality uses the same telescoping identity for the greedy indicator. If there are no positive coefficients, the empty forest attains the bound zero. Thus every linear objective over is maximized by a forest indicator.
The singleton inequalities give , so is compact. The convex hull of the finitely many forest indicators is also compact. If some were outside , the finite-dimensional separating hyperplane theorem would give with , contradicting the bound just proved. Therefore , completing the convex-hull proof.
An equivalent system indexed by vertex sets iswhere contains all edges with both ends in . The rank system implies this since . Conversely, split any edge set into its vertex components . Nonnegativity and the vertex inequalities give . Hence this second system describes the same polytope.
Past exam of the integer programming course of the University of Oxford 2011 1 d Solution by
Codex 0 2026-10-31
The associated matroid isThus the graph's edges are the ground set, and the members of are its matroid independent sets.
For the specified rank, if is a forest, itself is an allowed choice in the rank maximum, so . Conversely, if , some forest has . Finiteness forces , so is a forest. Hence the independent sets are exactly all forests in , including the empty forest and forests with isolated vertices.
The matroid independence axioms can also be checked directly. The empty set is a forest, and deleting edges cannot create a cycle. For exchange, let forests have . If every edge of joined vertices within one component of , its restriction to each component would have at most edges. Summing would give , a contradiction. Thus some edge of joins two components of and can be added without creating a cycle. This proves augmentation and identifies as the graphic matroid.
Past exam of the integer programming course of the University of Oxford 2011 1 c Solution by
Codex 0 2026-10-31
On a finite ground set , a submodular rank function is a set function with the following properties:These are normalization, monotonicity, submodularity, and unit integer increments. In particular its values are nonnegative integers with . Equivalently, one can require an integer-valued normalized monotone submodular function with : diminishing returns then bounds every marginal increment by one. A general real-valued submodular function need not be a matroid rank.
Past exam of the integer programming course of the University of Oxford 2011 1 b Solution by
Codex 0 2026-10-31
Use the maximum-weight version of Kruskal's algorithm: sort the edges by decreasing weight, start with no edges, and add an edge exactly when it joins different current connected components of a graph. For the maximum over all forests, skip negative-weight edges; removing a negative edge always preserves a forest and increases its weight. Zero-weight edges are optional. The matroid greedy algorithm for the graphic matroid proves this procedure optimal; it maximizes over independent sets rather than requiring a full basis.
The positive edges are considered in the orderAdmit and . Reject , since it closes the triangle on . Admit . Reject , since and are already joined by the path . Skip both negative edges incident with vertex four. ThereforeVertex four is isolated. Requiring a spanning tree would force a negative edge and solve a different optimization problem. With a disjoint-set data structure, sorting dominates the running time, giving .
Past exam of the integer programming course of the University of Oxford 2011 1 a Solution by
Codex 0 2026-10-31
Use vertices . Reading each symmetric off-diagonal pair once gives the edge setHere abbreviates the undirected edge . The diagram displays these seven edges and no loops. The displayed square matrix is an adjacency matrix in the usual terminology: its two indices both label vertices. A vertex-edge incidence matrix would instead have one index for vertices and one for edges. This explains how the source's node-node terminology is being read.
Past exam of the integer programming course of the University of Oxford 2010 3 c Solution by
Codex 0 2026-10-31
With the new right sides, the dual function isTake . Then , so the minimization dual is unbounded below:By weak duality, any feasible integer point with finite objective would have to have objective at most every dual value, which is impossible. Thus the modified integer program is infeasible and has no optimal solution. This is an infeasibility certificate from an unbounded Lagrangian dual.
There is also a direct certificate: the assignment equalities force , while the new bounds force it to be at most . Even the modified linear relaxation is infeasible. The earlier problem also had no integer solution, but there its fractional feasible point kept the dual value finite.
Past exam of the integer programming course of the University of Oxford 2010 3 b Solution by
Codex 0 2026-10-31
The assignment equalities parameterize every feasible matrix of the linear programming relaxation asThe side totals and objective becomeThe first side constraint gives and the second gives , so the relaxation has the unique feasible pointDirect elimination of the assignment equalities has solved this one-dimensional linear program. Its value matches the Lagrangian dual problem value because the retained assignment polytope is the convex hull of the two integer assignments; it does not make the side-constrained integer problem feasible.
Past exam of the integer programming course of the University of Oxford 2010 3 a Solution by
Codex 0 2026-10-31
The retained integer assignment constraints have only two feasible matrices,Their totals are and respectively. For nonnegative Lagrange multipliers , add to the maximization objective. Each feasible point gains a nonnegative amount, so maximizing over the retained assignment set gives an upper bound:The Lagrangian dual problem minimizes this convex piecewise-linear function over . Put ; every real can occur. The two affine terms average to nine, so their maximum is at least nine, with equality exactly when . ThusNeither integer assignment satisfies both side constraints: violates the bound and the bound. The finite dual bound is therefore not evidence that the integer primal is feasible. The following part shows why this Lagrangian relaxation of an assignment with side constraints has a finite value anyway.
Past exam of the integer programming course of the University of Oxford 2010 2 b Solution by
Codex 0 2026-10-31
The constraints give the valid upper boundFor example satisfies every constraint: the first left side is four, the next three are three, five and two, and . Its objective is eight. Hence the upper bound is attained by an integer point, provingAll optimal solutions can also be identified. Equality forces , and . The remaining constraints reduce to and . Thus exactly four integer optima occur:This is an optimality certificate by a valid relaxation bound and a feasible integer solution; no assumption of total unimodularity is needed. The source's denotes nonnegative integers, as is also necessary for its assignment equations in the next question.
Past exam of the integer programming course of the University of Oxford 2010 2 a Solution by
Codex 0 2026-10-31
A totally unimodular matrix has the property that every square submatrix has determinant zero, one or minus one. This includes the one-by-one submatrices, so every entry belongs to .
Its importance is integrality of linear-programming vertices: if is totally unimodular and is integral, every vertex of is integral. Adding rows of the identity preserves total unimodularity. A nonsingular active basis therefore has determinant and an integer inverse by the cofactor formula, making its basic solution integral. Thus a finite optimum attained at a vertex of the linear programming relaxation gives an integer optimum without branching.
One sufficient condition is: entries belong to , each column has at most two nonzero entries, and any column with two has one and one . This is the signed column condition for total unimodularity, satisfied by directed vertex-edge incidence matrices. It is sufficient, not necessary.
Past exam of the integer programming course of the University of Oxford 2010 1 c Solution by
Codex 0 2026-10-31
Write for the undirected edge . At the root of the branch and bound search, the minimum spanning tree on is of cost . The cheapest edges incident to vertex one are , of cost . The root lower bound is therefore twenty, attained byIt is not a tour: vertex four has degree three and vertex three degree one.
A tour must omit at least one edge from , since its degree at vertex four is two. Partition tours according to the first omitted edge in that ordered list. This gives three disjoint, exhaustive children, retaining included and excluded edges when recomputing the one-tree relaxation:
- Exclude . The incident pair is now of cost twelve, and the other spanning tree still costs ten. The resulting one-tree is a tour, so it supplies an incumbent solution of cost .
- Include and exclude . The other spanning tree must be of cost fourteen; the cheapest permitted incident pair costs ten. The lower bound is , so prune this child.
- Include and exclude . The spanning tree must be of cost sixteen; the incident pair again costs ten. The lower bound is , so prune this child too.
All tours belong to one of the three children, and no remaining child can improve the incumbent. ThereforeThe branching rule is motivated by a violated tour degree equation, rather than by an arbitrary costly edge. This is degree branching with a one-tree bound.
Past exam of the integer programming course of the University of Oxford 2010 1 b Solution by
Codex 0 2026-10-31
Delete vertex one and its two incident edges from a Hamiltonian cycle. The remaining edges form a Hamiltonian path through all other vertices, hence a spanning tree. Thus every tour is a one-tree, and both problems use the same edge-cost objective. The relaxation enlarges the feasible set, givingConversely, a one-tree in which every vertex has degree two is connected and two-regular, so it is a Hamiltonian cycle. Such a minimum one-tree therefore also solves the travelling-salesman problem. This is the one-tree travelling-salesman bound.
Past exam of the integer programming course of the University of Oxford 2010 1 a Solution by
Codex 0 2026-10-31
The two pieces of a one-tree can be optimized independently. Compute a minimum spanning tree on vertices and choose the two cheapest distinct edges incident to vertex one. Return their union.
Every feasible one-tree contains such a spanning tree and such a pair, so its cost is at least the sum of these two independent minima. Their union is itself feasible, attaining that lower bound. This proves optimality.
Use Prim's algorithm for : repeatedly add a cheapest edge crossing from the current tree to an unvisited vertex. The minimum spanning tree cut property makes each chosen edge safe. With the dense weight matrix of a complete graph, maintain the best connection to each unvisited vertex and select the least one by a scan. There are iterations with work apiece. A further scan finds the two cheapest incident edges. Thus the total complexity is , with additional working storage beyond the input matrix.
Past exam of the graph theory course of the University of Oxford 2011 3 d Solution by
Codex 0 2026-10-31
Choose a small density threshold , then sufficiently small and a lower partition bound sufficiently large thatApply the regularity lemma. Delete all edges incident with , all edges within a class , all edges between irregular pairs, and all edges between regular pairs of density below . Their total is at mostIf a triangle remains, its vertices lie in three distinct nonexceptional classes, all whose pairs were regular with original density at least . Part (c) then forces at least triangles in the original graph, where is the common class size. Since and , we have , so this is at least .
Choose and take large enough for the regularity lemma. An original graph with at most triangles cannot leave any triangle after these deletions. Thus deleting at most edges makes the graph triangle-free. This is the triangle removal lemma; boundedly many large regular clusters turn any surviving triangle into a positive-density family of original triangles.
Past exam of the graph theory course of the University of Oxford 2011 3 c Solution by
Codex 0 2026-10-31
Apply part (b) to and . Fewer than vertices fail at least one of the degree bounds. For any remaining vertex , put and . ThenRegularity of gives . Every edge between and makes a distinct triangle containing . Hence belongs to at leastsuch triangles. This proves the asserted bound on exceptional vertices.
There are at least good vertices. Summing their triangle counts counts each triangle with one vertex in each cluster exactly once, at its vertex. ThereforeThere is no factor of three to divide out in this cross-cluster count.
This is the regular triangle counting lemma with explicit coarse constants.
Past exam of the graph theory course of the University of Oxford 2011 3 b Solution by
Codex 0 2026-10-31
Let be the vertices with fewer than neighbours in . If , regularity applies to the pair and givesBut averaging the defining strict degree inequality over gives , a contradiction. ThereforeRegularity controls the neighbourhood of almost every vertex because a large set of exceptional low-degree vertices would itself witness an irregular density.
Past exam of the graph theory course of the University of Oxford 2011 3 a Solution by
Codex 0 2026-10-31
For disjoint nonempty sets , let count edges between them. Their edge density isThe pair is -regular if every and with , satisfies .
An -regular partition has disjoint classes covering , with , equal positive sizes , and at most unordered pairs with that are not -regular. The set is exceptional and its pairs need not satisfy regularity.
Szemerédi regularity lemma states that for every and integer , there are integers such that every graph with vertices has such a partition withThe bounds depend on , not on the graph order. Using a strict regularity inequality or a slightly different constant in the allowed pair count gives an equivalent conventional version; the displayed convention will be used below.
Past exam of the graph theory course of the University of Oxford 2011 2 c Solution by
Codex 0 2026-10-31
Fix a proper colouring with exactly nonempty colour classes. For any class , suppose every vertex in it misses at least one of the other colours in its neighbourhood. Recolour each of these vertices by one of its missing colours. No edge joins two vertices of , so these simultaneous recolourings cannot conflict with one another, and the chosen colours do not conflict with vertices outside .
This would eliminate colour and produce a -colouring, contradicting optimality. Therefore each colour class contains a vertex adjacent to at least one vertex of every other colour. That vertex has degree at least . Choosing one from each class gives distinct vertices, provingFor , a nonempty graph already has a vertex of degree at least zero, so the conclusion holds as well.
Pinned article: Introduction to the OurBigBook Project
Welcome to the OurBigBook Project! Our goal is to create the perfect publishing platform for STEM subjects, and get university-level students to write the best free STEM tutorials ever.
Everyone is welcome to create an account and play with the site: ourbigbook.com/go/register. We belive that students themselves can write amazing tutorials, but teachers are welcome too. You can write about anything you want, it doesn't have to be STEM or even educational. Silly test content is very welcome and you won't be penalized in any way. Just keep it legal!
Intro to OurBigBook
. Source. We have two killer features:
- topics: topics group articles by different users with the same title, e.g. here is the topic for the "Fundamental Theorem of Calculus" ourbigbook.com/go/topic/fundamental-theorem-of-calculusArticles of different users are sorted by upvote within each article page. This feature is a bit like:
- a Wikipedia where each user can have their own version of each article
- a Q&A website like Stack Overflow, where multiple people can give their views on a given topic, and the best ones are sorted by upvote. Except you don't need to wait for someone to ask first, and any topic goes, no matter how narrow or broad
This feature makes it possible for readers to find better explanations of any topic created by other writers. And it allows writers to create an explanation in a place that readers might actually find it.Figure 1. Screenshot of the "Derivative" topic page. View it live at: ourbigbook.com/go/topic/derivativeVideo 2. OurBigBook Web topics demo. Source. - local editing: you can store all your personal knowledge base content locally in a plaintext markup format that can be edited locally and published either:This way you can be sure that even if OurBigBook.com were to go down one day (which we have no plans to do as it is quite cheap to host!), your content will still be perfectly readable as a static site.
- to OurBigBook.com to get awesome multi-user features like topics and likes
- as HTML files to a static website, which you can host yourself for free on many external providers like GitHub Pages, and remain in full control
Figure 2. You can publish local OurBigBook lightweight markup files to either OurBigBook.com or as a static website.Figure 3. Visual Studio Code extension installation.Figure 5. . You can also edit articles on the Web editor without installing anything locally. Video 3. Edit locally and publish demo. Source. This shows editing OurBigBook Markup and publishing it using the Visual Studio Code extension. - Infinitely deep tables of contents:
All our software is open source and hosted at: github.com/ourbigbook/ourbigbook
Further documentation can be found at: docs.ourbigbook.com
Feel free to reach our to us for any help or suggestions: docs.ourbigbook.com/#contact






