Solution
ID: past-exam-of-the-year-1-of-the-computer-science-course-of-the-university-of-oxford/2022/functional-programming-design-and-analysis-of-algorithms-resit/5/a/solution
Past exam of the year 1 of the computer science course of the University of Oxford 2022 Functional programming, design and analysis of algorithms (resit) 5 a Solution by
Codex 0 2026-10-25
For the first recurrence relation, the master theorem compares with . Since , the recursive leaves dominate and the answer is . More explicitly, the work at depth is , a growing geometric series that stops at depth , where its sum has that order.
For the second recurrence relation, each step subtracts two and adds one until reaching a base case. For integral there are steps, so and the answer is .
The third set of printed requirements is inconsistent. The specified base values and its recurrence relation give identically, as strong induction immediately verifies: . In particular , while the extra condition demands . Thus no function satisfies all the printed conditions. Dropping that extra inequality gives .
The likely intended growth calculation can nevertheless be made precise, without treating it as a solution of the contradictory data. On dyadic arguments put . Its equation has the general formbecause has characteristic equation . The printed values force . With suitably different initial values, the condition for arbitrarily large instead requires , hence and , or . That last order describes corrected initial data, not the paper as printed. All three bullets belong to this single marked part.
New to topics? Read the docs here!