Past exam of the computer science course of the University of Oxford 2023 Quantum information 2 b i Solution by
Codex 0 2026-10-25
Initialize one qubit in , then apply a Hadamard gate, a T gate, and a Hadamard gate, in that temporal order. Defining the Pauli X eigenstates , the successive quantum states are
Past exam of the computer science course of the University of Oxford 2023 Quantum information 1 b iii Solution by
Codex 0 2026-10-25
Alice uses conjugate-basis steering of a Bell pair. Write the desired orthonormal basis for Bob as and . Entrywise complex conjugation in the computational basis gives Alice's orthonormal basisFor either in Bob's chosen orthonormal basis, the corresponding unnormalized conditional quantum state isIts squared norm is . Thus Alice measures in the complex-conjugate basis, obtaining the required Bob pure states with probability each. Averaging over Alice's undisclosed outcome leaves Bob's density matrix equal to , consistent with the no-communication theorem.
Past exam of the computer science course of the University of Oxford 2023 Quantum information 1 b ii Solution by
Codex 0 2026-10-25
Write the proposed quantum state ensemble as with normalized pure states, so thatTaking the expectation values in and , and setting , givesConsequently and . Substitution then gives . The two pure states are therefore orthogonal, with equal probabilities:Conversely, any orthonormal basis of a qubit has projectors summing to , so such a quantum state ensemble does give . This proves the characterization of two-state ensembles of a maximally mixed qubit.
Past exam of the computer science course of the University of Oxford 2023 Quantum information 1 b i Solution by
Codex 0 2026-10-25
Expand the density matrix of the Bell state and take the partial trace over Alice's qubit:The orthonormality of the computational basis removes the off-diagonal terms. Thus Bob's reduced density matrix is the maximally mixed state
Past exam of the computer science course of the University of Oxford 2023 Quantum information 1 a ii Solution by
Codex 0 2026-10-25
A basic measurement is specified by an orthonormal basis . The Born rule for the density matrix gives the outcome probabilitiesThese probabilities are nonnegative by positive semidefiniteness and sum to one by the resolution of the identity and unit trace. In the computational basis, the answers are simply the diagonal entries .[ref]
Past exam of the computer science course of the University of Oxford 2023 Quantum information 1 a i Solution by
Codex 0 2026-10-25
A density matrix is a complex Hermitian matrix that is positive semidefinite and has unit trace:Equivalently, its eigenvalues are nonnegative and sum to one, with an orthonormal basis of eigenvectors.[ref]
Past exam of the computer science course of the University of Oxford 2023 Combinatorial optimisation 3 d iii Solution by
Codex 0 2026-10-25
Use minimum-weight edge cover by matching savings. Reject inputs with an isolated vertex. For every vertex , choose a cheapest incident edge and write . Define a baseline and a saving for each edge byCompute a maximum-weight matching using as its weights, allowing the empty matching in a graph and imposing no maximum-cardinality condition. Negative savings may be ignored. ReturnThis is an edge cover. Since original weights are nonnegative, removing duplicate appearances of an edge cannot increase the total, and henceTo prove optimality, take a minimum-weight edge cover and remove redundant edges until it is inclusion-minimal. Nonnegative weights ensure that its weight does not increase, so it remains optimal. As proved in (i), its components are star graphs. Choose one edge from each star graph, forming a matching in a graph .
In a star graph with center , selected leaf , and other leaves , this choice contributes to . Each other leaf has its edge available, so . Thus this contribution is at most the weight of that star graph. Summing over components yieldsSince maximizes saving, , and consequentlyAll inequalities are equalities. Therefore is a minimum-weight edge cover. This proof also handles zero weights and duplicate cheapest-edge choices.
Finding all and constructing takes time. A general-graph maximum-weight matching polynomial-time algorithm supplies the only substantial step; the documented routine runs in arithmetic time. Exact rational or integer weights avoid floating-point comparisons affecting optimality.[ref]
Maximum-weight matching documentation by NetworkX. max_weight_matching, maxcardinality=False; Notes: O(number_of_nodes ** 3), integer arithmetic for integer weights, and floating-point precision caveat
Past exam of the computer science course of the University of Oxford 2023 Combinatorial optimisation 3 d ii Solution by
Codex 0 2026-10-25
First test for an isolated vertex, reporting infeasibility if one exists. Otherwise compute a maximum cardinality matching using a general-graph polynomial-time algorithm, then add one arbitrary incident edge for each unmatched vertex in a matching. The proof in (i) shows that the resulting edge cover has minimum cardinality .
The final scan takes time with adjacency lists; the maximum cardinality matching computation is polynomial. One may obtain it from a general-graph maximum-weight matching routine with every weight equal to one.[ref]
Maximum-weight matching documentation by NetworkX. max_weight_matching, unit weights give maximum cardinality; Notes: cubic vertex-count running time
Past exam of the computer science course of the University of Oxford 2023 Combinatorial optimisation 3 d i Solution by
Codex 0 2026-10-25
Assume has no isolated vertex; otherwise an edge cover does not exist. In particular, a one-vertex connected graph is an excluded degenerate case of the statement.
Let be a maximum cardinality matching, of size , and let be its unmatched vertices in a matching. There is no edge joining two vertices of , since adding it would enlarge . Choose one incident edge for each . These chosen edges are distinct and outside , so together they form an edge cover of sizeConsequently .
For the opposite bound, let be a minimum-cardinality edge cover. It is inclusion-minimal. Every selected edge has an endpoint of vertex degree one in : otherwise deleting that edge would leave both endpoints covered. Each connected component of a graph of is therefore a star graph. To see this, a component can have at most one vertex of vertex degree greater than one; a shortest graph path between two such vertices would contain an edge whose endpoints both have vertex degree greater than one. A component with no such vertex is a single edge, also a star graph.
If there are such star graphs, each has one fewer edge than vertices, so . Select one edge from each component to get a matching in a graph of size . Hence , proving the edge cover and matching identity
Past exam of the computer science course of the University of Oxford 2023 Combinatorial optimisation 3 c ii Solution by
Codex 0 2026-10-25
The sharp approximation algorithm factor is . Charge each edge of an optimal maximum-weight matching to an edge of the greedy matching . If , charge it to itself. Otherwise it was rejected because a previously selected edge shared an endpoint; charge to one such . Since the scan is in nonincreasing weight order, .
Each receives at most two charges, since each of its two endpoints meets at most one edge of the matching in a graph . If , only its own charge is possible. ThusThis inequality also covers the edgeless graph, for which both weights are zero and the displayed ratio in the question is undefined.
For tightness, take a four-vertex path graph with weights in order, where . The greedy matching chooses only the middle edge, of weight , whereas the optimal matching in a graph chooses both outer edges, of total weight . HenceTo obtain infinitely many different sizes, for each take disjoint copies with . Their weights add, so their ratio is . All weights are strictly positive, and the middle edge is uniquely heaviest in each copy. With all three weights equal to , a permitted tie order selecting each middle edge first attains ratio exactly. The greedy two-approximation for maximum-weight matching is therefore best possible.
Past exam of the computer science course of the University of Oxford 2023 Combinatorial optimisation 3 c i Solution by
Codex 0 2026-10-25
The maximum-weight matching problem asks for a matching in a graph maximizing its total weight:The requirement is on weight; a maximum cardinality matching need not solve this optimization problem.
Past exam of the computer science course of the University of Oxford 2023 Combinatorial optimisation 3 b ii Solution by
Codex 0 2026-10-25
Choose a perfect matching from (i). Every vertex has exactly two incident edges in , so this spanning subgraph is a disjoint union of graph cycles. Orient each graph cycle cyclically, and let be the next vertex after along its oriented graph cycle.
For each , take the three-edge sequenceIts four vertices are distinct. Each and because the graph is a simple graph. Also and , since belongs to , rather than . Finally because the successor map is a bijection on the disjoint graph cycles. Thus this is a graph path of length exactly three.
Every edge of is used once as a middle edge. Every edge of is used once as the outgoing edge of its tail, whose unique edge of determines which graph path contains it. Hence these graph paths are pairwise edge-disjoint and cover . This is the three-edge path decomposition from a perfect matching.
On a triangular prism, orient the two remaining graph cycles and extend each perfect matching edge by its endpoints' outgoing edges; the three colors partition all nine edges into length-three graph paths
. Details. Past exam of the computer science course of the University of Oxford 2023 Combinatorial optimisation 3 b i Solution by
Codex 0 2026-10-25
Use Tutte's theorem on perfect matchings: a finite graph has a perfect matching if and only if, for every , the number of connected components of a graph of odd integer order in is at most .
First, the handshaking lemma gives , so is an even integer. Fix . For each connected component of a graph of odd integer order in , let count its edges to . Counting vertex degrees inside givesThus is an odd integer; it is positive because is a connected graph. If , its unique outgoing edge is a bridge. Distinct such components yield distinct bridges, so there are at most two of them. Every other such component has . ThereforeThe last inequality holds because each vertex of has vertex degree three. Furthermore,since components of even integer order do not affect parity, and is an even integer. If , this parity forces , contradicting the bound .
For , the only component is the whole connected graph, of even integer order, so . Thus every satisfies the criterion, and has a perfect matching. This proves the perfect matching theorem for a cubic graph with at most two bridges directly from Tutte's theorem on perfect matchings.
Past exam of the computer science course of the University of Oxford 2023 Combinatorial optimisation 2 c viii Solution by
Codex 0 2026-10-25
Write . Since , the one-element increment bound gives . Since ,But gives the reverse lower bound . Hence , which is precisely . This is the matroid closure exchange property; it follows from one-element rank of a matroid increments and does not require exchanging an entire matroid basis.
Past exam of the computer science course of the University of Oxford 2023 Combinatorial optimisation 2 c vii Solution by
Codex 0 2026-10-25
By (ii), , and by (vi) these subsets have equal rank of a matroid. Apply (v) to this pair to obtainThus the closure of a matroid is an idempotent function.
Past exam of the computer science course of the University of Oxford 2023 Combinatorial optimisation 2 c vi Solution by
Codex 0 2026-10-25
List and put . Each also belongs to by (iii). Thus the definition of the closure of a matroid gives at every step. Iteration yieldsIn particular, collecting all elements that individually fail to increase the rank of a matroid does not create a collective increase.
Past exam of the computer science course of the University of Oxford 2023 Combinatorial optimisation 2 c v Solution by
Codex 0 2026-10-25
Choose a maximal matroid independent set . Its cardinality is , so it is also maximal in . Apply (iv) first inside and then inside :This proves that nested subsets of equal rank of a matroid have the same closure of a matroid.
Past exam of the computer science course of the University of Oxford 2023 Combinatorial optimisation 2 c iv Solution by
Codex 0 2026-10-25
Since is a maximal matroid independent set in , augmentation gives . For any , the rank of a matroid of equals that of . Indeed, if , either is independent and has the largest possible size , or it is dependent and is still maximal in : no element of can be added, and neither can . If , both ranks are simply .
Past exam of the computer science course of the University of Oxford 2023 Combinatorial optimisation 2 c iii Solution by
Codex 0 2026-10-25
We first justify the submodularity of matroid rank, which will also support later arguments. Choose a maximal matroid independent set in , extend it to a maximal matroid independent set in , and then to one in . These extensions exist by successive additions, and their sizes are the respective values of the rank of a matroid. No element of lies in : such an element could have been added to , contradicting maximality in . Therefore is an independent subset of , givingNow let and . If , then by (ii). Otherwise apply submodularity of matroid rank to and , whose intersection is :The monotonicity of the rank of a matroid supplies the opposite bound , so equality holds. Thus , proving .
There are unlisted articles, also show them or only show them.

