Quiz — Lecture 22

Section A from memory, one line each. Section B shows your reasoning - marks are for method, not final answers. Answers are discussed in class; the exit ticket goes on a card.

Section A

A1. What two parts must every recursive function have?

A2. What proves a recursion terminates?

A3. Why is power-by-halving O(log n)?

A4. What are overlapping subproblems?

Section B

B1. Trace dsum(49206): calls and unwind.

B2. ways(8) = ? and what does memoisation change (conceptually)?

Exit ticket

Answer one of these on your card in 60 seconds (choose any one):

  1. What grounds a recursion?
  1. When does a table beat the tree?
  1. What did cs-087 buy with halving?

Homework