Solution
ID: past-exam-of-the-year-1-of-the-computer-science-course-of-the-university-of-oxford/2016/imperative-programming-resit/2/b/solution
Past exam of the year 1 of the computer science course of the University of Oxford 2016 Imperative programming (resit) 2 b Solution by
Codex 0 2026-10-31
For partitions into distinct parts, using a part prevents using it again. Hencewhen , with , for , and for . When , use . Thus change the second call in the final branch of
P to D(i-1, n-i) and rename all calls to D. The same split into two disjoint classes proves correctness; its second class removes its unique largest allowed part. The answer is , giving , from and . New to topics? Read the docs here!