Solution
ID: past-exam-of-the-year-1-of-the-computer-science-course-of-the-university-of-oxford/2019/functional-programming-design-and-analysis-of-algorithms/6/d/ii/solution
Past exam of the year 1 of the computer science course of the University of Oxford 2019 Functional programming, design and analysis of algorithms 6 d ii Solution by
Codex 0 2026-10-25
Let be the final
A set produced by the algorithm. It contains the initial A set, and every vertex outside has at most half its neighbours in : otherwise its final key would still be positive. Thus is closed under the activation rule.Now consider any legal sequence, including sequences which change some
A preferences back to B. We prove by induction that its current A set is always a subset of . This is true initially. A switch to B preserves the inclusion. If a vertex outside were to switch to A, its A neighbours would all lie in , so their number could not exceed half its degree. Such a switch is forbidden. A switch inside also preserves the inclusion.Consequently every attainable final
A set has size at most . The algorithm supplies a legal sequence attaining itself, so its sequence is optimal. This closure dominance for asynchronous threshold switching proves more than a local-greedy claim: temporary losses of A vertices cannot unlock an additional vertex outside the activation closure. New to topics? Read the docs here!