Past exam of the computer science course of the University of Oxford 2020 Computational game theory 2 e Solution by
Codex 0 2026-10-25
Every subgame perfect equilibrium outcome is Pareto optimal under the stated consecutive-friend and bonus conditions. Partition the choosing order into blocks: a single student without a friend, or two friends who choose consecutively. Their slots in the choosing order are adjacent; the proof must separately establish when their allocated rooms will be adjacent.
Let be the rooms remaining before a friend block, with leader and follower . Because and , each friend strictly prefers every adjacent-to-friend allocation to every nonadjacent one. After leader takes room with an available adjacent room, follower therefore takes their uniquely highest-valued room among the available neighbors of . The leader consequently knows they will receive the adjacency bonus.
If contains at least one pair of adjacent rooms, let be its nonisolated rooms: the rooms having an available neighbor. Leader must choose from , because choosing there guarantees utility greater than , whereas an isolated choice gives at most . Since the bonus is then fixed and room values are distinct, the leader chooses their unique maximum-value room in . The follower chooses their unique best neighbor. Later students cannot change either allocated room, so later play cannot alter these two students' utilities.
If contains no adjacent pair, neither friend can obtain the bonus under any allocation of rooms from . Both simply choose their uniquely most valuable remaining room in turn. Removing rooms cannot create a new physical adjacency, so no hidden later move can change that conclusion. A one-student block likewise chooses their unique best available room.
Now compare the equilibrium assignment with any proposed Pareto improvement . Induct over these blocks, assuming earlier blocks' rooms are already fixed. Thus and have the same remaining set at the present block. A lone student's room must stay fixed by strict preferences.
For a friend block obtaining adjacency in , both students must retain adjacency in : losing a bonus larger than cannot be compensated by any room-value increase. The leader's room in must therefore belong to . It cannot differ from the unique highest-valued room the leader selected there without reducing that leader's utility. Once the leader's room is fixed, the follower likewise must retain the uniquely best available neighbor. If has no adjacent pair, both rooms stay fixed by the ordinary strict-ranking argument.
Thus every block's rooms are unchanged. The only assignment weakly improving all students is itself, so no strict improvement is possible. This proves Pareto efficiency of serial dictatorship with consecutive friends. The proof applies to every subgame perfect equilibrium, since the required choices at each block are strict best responses determined by the available rooms.
Past exam of the computer science course of the University of Oxford 2020 Computational game theory 2 d Solution by
Codex 0 2026-10-25
No. Strict room values do not remove the allocation externalities generated by friends. Consider the following new instance, with the same friendship pairs and and friendship bonus for each student:Each row is strictly ranked and every room value is positive. In picking order , backward induction gives the following continuations. Room numbers in a tuple are listed in student order.To check 's incentives behind these continuations, the resulting utilities for their available choices, in ascending room order, are respectively , , and . Student 's own best responses determine those figures, and again takes the remaining room. All comparisons selecting these continuations are strict.
Hence chooses and the subgame perfect equilibrium outcome isBut the feasible assignmentstrictly improves and and leaves unchanged. Thus is not Pareto optimal. This is compatible with equilibrium: a Pareto improvement can require several players' actions to change. If alone takes , the later best responses lead to , not to ; anticipating that reaction gives only .
Past exam of the computer science course of the University of Oxford 2020 Computational game theory 2 c Solution by
Codex 0 2026-10-25
The equilibrium assignment is , with utility vector . Apply backward induction to the finite perfect-information game, accounting for the two friendship pairs in every terminal assignment. Student receives the last room and has no remaining choice. Given the first two rooms, chooses the remaining room maximizing their own room value plus if adjacent to .
The following complete third-stage comparisons summarize the continuations. The utility in the last column is 's resulting utility, after makes the indicated best response.
| room | room | Optimal room | Resulting |
|---|---|---|---|
| or | |||
For example, after takes and takes , student compares , giving , with , giving . Choosing also gives the adjacency bonus, making . The last room is adjacent to 's .
The table makes choose after first-stage choices , respectively. Their resulting consequences for are , and either or . Thus strictly prefers , proving the displayed outcome.
There is an off-path tie for after , so the entire subgame perfect equilibrium strategy profile need not be unique. Either choice, or any mixture of them, gives at most after choosing , below . The equilibrium assignment on the played path is therefore unaffected by this tie. Specifying these optimal continuations at every history, including the unplayed ones, supplies a subgame perfect equilibrium rather than merely a proposed path.
Past exam of the computer science course of the University of Oxford 2020 Computational game theory 2 b Solution by
Codex 0 2026-10-25
No: arbitrary ties can produce an assignment that is not Pareto optimal. A two-student counterexample suffices. Give the first student value for both rooms; give the second student value for and for . If the first student breaks the tie by taking , the second must take , and the utility vector is .
Past exam of the computer science course of the University of Oxford 2020 Computational game theory 2 a Solution by
Codex 0 2026-10-25
The assignment is Pareto optimal. Write for the room selected by the th student. Suppose another assignment makes every student at least as well off. The first student already selected their uniquely most valuable room, so . Once the rooms of students are fixed, the rooms available to student in the original serial dictatorship are exactly the rooms that remain after those fixed assignments. Student chose the unique maximum among them, so weak improvement requires .
Mathematical induction fixes every student's room. Thus and nobody can be strictly better off, contradicting the definition of a Pareto improvement. Strict room rankings and the absence of allocation externalities are the essential assumptions: a student's utility is determined solely by their own room.[ref]
Past exam of the computer science course of the University of Oxford 2020 Computational game theory 1 f Solution by
Codex 0 2026-10-25
Write . Ifthen both players prefer buying against a buyer, since . Both prefer not buying against a nonbuyer: and . These strict opposite best responses give the interior crossing of a coordination game.
An explicit fully mixed Nash equilibrium follows from indifference. Let be X's probability of buying and Y's. X is indifferent whenand Y is indifferent whenSolving givesBoth numerators and denominators are positive. For the required inequality is , equivalent to ; the same comparison for again reduces to . Thus , and the equations make both actions best responses for each player. By linearity of expected payoff, neither player can profit by any other mixed strategy. At these formulas reach and are not fully mixed; the strict threshold matters.
Past exam of the computer science course of the University of Oxford 2020 Computational game theory 1 e Solution by
Codex 0 2026-10-25
Neither asymmetric purchase outcome is a Nash equilibrium for any permitted . At , X's chosen purchase requires , but Y's chosen nonpurchase, against X buying, requires . These requirements are incompatible because .
At , Y's chosen purchase requires , whereas X's nonpurchase against a buying Y requires . Again the inequalities are incompatible. Thus every Nash equilibrium in pure strategies has both players taking the same action; the conclusion is stronger than merely observing symmetry in their available actions, since their original market shares differ.
Past exam of the computer science course of the University of Oxford 2020 Computational game theory 1 d Solution by
Codex 0 2026-10-25
When neither buys, X's unilateral deviation gains , while Y's gains . For both to be nonpositive, must exceed the larger threshold. HenceEquality is included because a zero-gain deviation does not violate a Nash equilibrium. Consequently both joint-purchase and joint-nonpurchase Nash equilibria exist throughout , a coordination region.
Past exam of the computer science course of the University of Oxford 2020 Computational game theory 1 c Solution by
Codex 0 2026-10-25
At joint purchase, each player's gain from continuing to buy rather than deviating to is . Both actions are best responses exactly when this is nonnegative. ThereforeAt equality both players are indifferent to their individual unilateral deviations, which is permitted in a Nash equilibrium. The condition is less restrictive than requiring either player's action to be a weakly dominant strategy: only the opponent's actual action needs to be considered.
Past exam of the computer science course of the University of Oxford 2020 Computational game theory 1 b Solution by
Codex 0 2026-10-25
A weakly dominant strategy must be a best response to either opponent action. For X this requiresThe first is stronger because . ThusFor Y the comparisons are and , givingBelow each upper endpoint the corresponding strategy is strictly better against both opponent actions; at the endpoint one comparison ties and the other is strict. Thus the answers also satisfy the convention that weak dominance requires a strict advantage somewhere. Since expected payoffs are linear in the opponent's mixing probability, checking both opponent pure strategies suffices for every opponent mixed strategy.
Past exam of the computer science course of the University of Oxford 2020 Computational game theory 1 a Solution by
Codex 0 2026-10-25
Use a simultaneous two-player normal-form game, with X choosing the row and Y the column. Each player's pure strategies are and ; a payoff pair lists X first. Measure every dataset size in millions and use the stated normalization . The source's reference to a shared half as “points” is interpreted in the same million-point units as the corpus, so the shared addition is to each initial dataset.
The bimatrix game has payoffsFor example, joint purchase gives dataset sizes and , total , and each buyer pays . A sole buyer gets the full corpus and pays . The total payoff is whenever a purchase occurs and when neither buys: the game is not a zero-sum game, even though gross market shares always sum to one.
For the following calculations, setThe payoff differences “buy minus do not buy,” with the other player's action held fixed, areThese four differences give all the best response comparisons without mixing up row and column payoffs.
Past exam of the computer science course of the University of Oxford 2020 Artificial intelligence 3 g Solution by
Codex 0 2026-10-25
Consider a B-node whose parent is an A-node with an already completed incumbent outcome having A-coordinate . At the B-node, let be the best completed child pair found so far according to B's coordinate. Every remaining child can be skipped, and this B-option discarded by its parent, ifUse a strict inequality if ties must remain open; equality is safe under the fixed rule that the parent retains its already selected child on an A-coordinate tie. This is a nearly-zero-sum pruning rule.
To prove it, note first that a completed max-n search value is some terminal utility pair: each backup copies one entire child pair. Thus the nearly-zero-sum inequality holds at every completed subtree, not just at leaves. Since B maximizes its own coordinate, the ultimately selected pair at this B-node has . ThereforeThe already available A-option is at least as good, so remaining children of this B-node cannot alter the parent's selected continuation under the stated tie rule. The second half of the two-sided nearly-zero-sum condition also gives , henceConsequently is another sufficient cutoff, useful if one phrases the test using the observed A-coordinate. The pair-based test is sharper: the value of can certify a cutoff even when the conservative test cannot.
When , every pair satisfies , and the rule reduces to , the ordinary MIN-node alpha-beta pruning cutoff. The extra in the A-coordinate-only condition is necessary in general: an observed pair satisfies the bound for , but B prefers an unseen for . A increases by almost ; using just as the upper bound would be invalid.
Implementation must discard the ruled-out B-option at its parent rather than return as an exact completed utility pair. The proof uses an actual completed alternative at that parent; it does not authorize passing arbitrary distant ancestor bounds through general-sum game backups as if every scalar alpha-beta pruning invariant still held. With these local certified cutoffs, an induction over completed subtrees preserves the selected pair and hence the root outcome.
Past exam of the computer science course of the University of Oxford 2020 Artificial intelligence 3 f Solution by
Codex 0 2026-10-25
The usual alpha-beta pruning inference fails because increasing B's utility need not decrease A's utility. A partially explored B-node may have found a child unfavorable to A, but B may prefer an unseen child favorable to A as well. An observed low A-coordinate therefore supplies no upper bound on the A-coordinate ultimately propagated by B.
For a concrete counterexample, let a root A-node already have an alternative outcome . In another B-node, the first explored child yields . A zero-sum-style cutoff would discard its remaining children because . But an unseen child with outcome is preferred by B, and makes the complete B-node return , which A strictly prefers to its incumbent. Such a cutoff changes the answer.
The problem persists even after observing a large B-coordinate: without a known relation between coordinates or useful global utility bounds, an unseen pair may have still larger values for both players. Hence there is no generally valid ordinary scalar alpha-beta pruning rule for unrestricted general-sum games. This does not rule out all search pruning: additional bounds, dominance information or a relationship between players' utilities can justify specific cutoffs, as in (g).
Past exam of the computer science course of the University of Oxford 2020 Artificial intelligence 3 e Solution by
Codex 0 2026-10-25
Propagate an entire utility pair from a child chosen to maximize the component of the player whose turn it is. This is the two-player case of max-n search. At a terminal node let . At an A-node chooseand at a B-node replace by . Do not maximize the two coordinates independently: their separate maxima may belong to incompatible outcomes. Fix a tie rule, such as the first child in the specified order. The rule recursively gives a pure strategy subgame perfect equilibrium in a finite perfect-information game: backward induction makes the moving player's selected continuation a best response at every node.[ref]
CS 188 stochastic and general game notes. §3.4, entire utility tuples selected by the moving player's component
In the original Figure 2, each of the three children of the root belongs to B. The left B-node prefers its first leaf because , the middle B-node prefers its first leaf because , and the right B-node prefers its second leaf because . Their propagated utility pairs, from left to right, areAt the root A compares and chooses the left child. Thus the root pair is , with play following the root's left branch and then that B-node's first branch. No tie affects this outcome.
Past exam of the computer science course of the University of Oxford 2020 Artificial intelligence 3 d Solution by
Codex 0 2026-10-25
Expectiminimax adds chance nodes to the MAX and MIN decisions. A chance node usesso exact evaluation generally needs all outcomes with positive probability. An unfavorable child does not determine the expected value: a later, sufficiently favorable child can offset it. Ordinary alpha-beta pruning therefore does not directly discard the remaining outcomes.
Random outcomes also enlarge the effective branching factor. If each player decision has choices and each action has chance outcomes, exploring player decisions can require order leaves rather than . Under the same budget, this gives roughlybefore additional pruning benefits available in the deterministic game are considered. Exact probability calculations add overhead as well. These effects explain the typically shallower horizon; randomness alone is not a theorem of inevitable slowdown. Known utility bounds permit some expected value bounds and specialized pruning, and chance sampling can trade exactness for speed.[ref]
CS 188 stochastic and general game notes. §3.3, chance-node expected-value backup; §3.3.1, mixed layer types
Past exam of the computer science course of the University of Oxford 2020 Artificial intelligence 3 c Solution by
Codex 0 2026-10-25
With excellent move ordering, the new horizon is approximately ; without a move ordering assumption, no doubling is guaranteed. For , a full minimax search to depth visits search nodes, so the budget has . Perfectly ordered alpha-beta pruning evaluates only about leaves at depth . More precisely, for a complete uniform game tree, the best leaf count is . Equating the dominant costs givesConstant factors and rounding affect the exact horizon. Poor move ordering can leave the cost at , giving no asymptotic depth improvement. For , there is no branching to prune and the doubling argument does not apply.[ref]
Past exam of the computer science course of the University of Oxford 2020 Artificial intelligence 3 b Solution by
Codex 0 2026-10-25
Use utilities from A's viewpoint, with A maximizing and B minimizing. The following alpha-beta pruning code assumes a finite horizon or terminating game tree; leaf evaluation uses terminal utility when available and a specified horizon estimate otherwise.
ALPHABETA(state, depth, alpha, beta, maximizing):
if state is terminal or depth == 0:
return EVALUATE(state)
if maximizing:
value := -infinity
for child in SUCCESSORS(state):
value := max(value, ALPHABETA(child, depth-1, alpha, beta, false))
alpha := max(alpha, value)
if alpha >= beta: break
return value
else:
value := +infinity
for child in SUCCESSORS(state):
value := min(value, ALPHABETA(child, depth-1, alpha, beta, true))
beta := min(beta, value)
if alpha >= beta: break
return valueCall the root with and record the child giving the greatest root value. In a nonterminal game state, SUCCESSORS must supply the game's legal moves, including any mandatory pass; a player with no moves must be handled according to the rules rather than left as an accidental empty loop.
The bound records an outcome already available to MAX on the active ancestor path; records one already available to MIN. At a MIN node, once a child gives value at most , further children can only decrease the node's minimum, so MAX need not choose that branch. The dual argument applies at MAX when its current value is at least . Returned values from cut-off subtrees can be bounds rather than exact local minimax search values, while the unrestricted root value is exact. Equal-value pruning preserves that value; retaining the first best root action gives a fixed tie rule.[ref]
Past exam of the computer science course of the University of Oxford 2020 Artificial intelligence 3 a Solution by
Codex 0 2026-10-25
Depth-first search computes minimax search values with much less live storage and naturally supports alpha-beta pruning. A parent's value needs only its current best child value and the next child to visit. Once a child subtree has been evaluated, its internal search nodes can be discarded; a final value cannot usually be computed from a nonterminal frontier alone.
With branching factor and horizon , breadth-first search stores a frontier of order . A depth-first search implementation storing sibling lists uses space complexity; lazy successor generation can reduce this to frames plus game-state storage. Both unpruned traversals have time complexity for . Depth-first search also supplies a completed sibling outcome early, allowing alpha-beta pruning to reject later subtrees before generating them.
Past exam of the computer science course of the University of Oxford 2020 Artificial intelligence 2 f Solution by
Codex 0 2026-10-25
The translation gives a sound and complete route through an optimized SAT solver; it trades access to general-purpose SAT machinery against encoding cost and the possible loss of constraint-specific structure. Modern SAT solvers use efficient unit propagation, adaptive branching and clause learning. Learned Boolean clauses can summarize conflicts involving many original variables, allowing later branches to avoid repeating the same failed combination. The reduction also offers a standard, reusable interface: improvements to a SAT solver can benefit many finite-domain constraint satisfaction problems.
The Boolean formula may be much larger than the original constraint satisfaction problem, especially for a succinct high-arity relation. One original variable becomes many indicators, and general branching may lose the interpretation that the minimum remaining values and degree heuristic exploit directly. Native constraint propagation can exploit a relation without enumerating all its forbidden tuples. Even in the binary case, stronger propagation does not follow just from switching to SAT.
For example, take , , and let the only allowed pairs be . The forbidden-pair encoding contains and . If becomes false, arc consistency deletes because it has no support. Yet the direct encoding has no unit Boolean clause forcing : both remain possible individually, so plain unit propagation does not make that deletion. A SAT solver can eventually derive it through additional reasoning or search. Conversely, clause learning can combine information beyond the local consistency enforced by AC-3. Neither approach uniformly dominates: performance depends on representation, propagation strength and the instance's structure; both still face exponential worst-case search on general inputs.
Past exam of the computer science course of the University of Oxford 2020 Artificial intelligence 2 e Solution by
Codex 0 2026-10-25
Use an exactly-one constraint for each finite-domain variable and a Boolean clause forbidding each disallowed constraint tuple. Let the variables be , with explicitly listed finite constraint domains , and let constraint have distinct-variable scope and allowed relation . Introduce a Boolean variable for every , interpreted as . The direct SAT encoding of finite-domain constraints isIn the middle logical conjunction, each unordered distinct pair is included once. The first Boolean clause requires at least one value, the pairwise Boolean clauses permit at most one, and a final Boolean clause is false exactly when all coordinates of one forbidden tuple are selected. The formula is in conjunctive normal form. An empty constraint domain produces an empty Boolean clause, correctly making the instance unsatisfiable.
For soundness of the reduction, a solution of the constraint satisfaction problem gives the Boolean valuation exactly when . Every exactly-one constraint holds; a forbidden tuple differs from on at least one scoped coordinate, making its negative Boolean clause true. Thus supplies a satisfying assignment for .
Conversely, a satisfying assignment selects a unique value for every . If a constraint failed, the selected scoped tuple would belong to , and its entire negative Boolean clause would be false. That contradicts satisfiability. Hence is a solution. Decoding takes by scanning the value indicators. This proves has a solution if and only if is satisfiable.
For explicit size accounting, put , and . There are Boolean variables,Boolean clauses, andliteral occurrences. These formulas count nonempty scopes; a false zero-arity constraint contributes an empty Boolean clause, while a true one contributes none. Formula storage is literal-sized records; a bit-level encoding also stores indicator indices. With maximum constraint domain size , constraints and maximum arity , this is bounded by for nontrivial domains and scopes. In the common binary case it is .
The input representation matters: listing all forbidden tuples costs up to tests per constraint. This is polynomial for bounded arity and explicitly represented domains, but can be exponential in the description length of a succinct high-arity constraint. The translation is valid in that case without constituting a polynomial-size reduction. If a compact constraint is supplied as a polynomial-size Boolean circuit, one may instead encode that circuit using auxiliary Boolean variables and local conjunctive normal form equivalences, with size proportional to the circuit. No compact representation is silently assumed.
For the instance in (c), after unary filtering there are indicators. The five at-least-one Boolean clauses, pairwise at-most-one Boolean clauses and forbidden-equality Boolean clauses give Boolean clauses. Setting only true encodes the displayed solution.
There are unlisted articles, also show them or only show them.