Exercise 3: Eight Recursive Calls on Half-Sized Subproblems — Possible Solution ==================================================================== GIVEN ------------------------------ 8 recursive calls, each on a half-sized (n/2) subproblem, plus O(n^2) non-recursive work. STEP 1: WRITING THE RECURRENCE ------------------------------ Following this chapter's own general shape, and Chapter 5's own translation method: T(n) = 8T(n/2) + n^2 STEP 2: IDENTIFYING a, b, AND f(n) ------------------------------ a = 8 b = 2 f(n) = n^2 STEP 3: COMPUTING n^(log_b a) ------------------------------ log_b(a) = log base 2 of 8 = 3 n^(log_b a) = n^3 STEP 4: COMPARING f(n) TO n^(log_b a) ------------------------------ f(n) = n^2 n^(log_b a) = n^3 n^3 grows faster than n^2 - the recursive branching term wins here. STEP 5: IDENTIFYING THE CASE AND THE RESULT ------------------------------ Since n^(log_b a) grows faster than f(n), per this chapter's own Master Theorem table this is CASE 1 - the recursion dominates the non-recursive work entirely. T(n) = Theta(n^(log_b a)) = Theta(n^3) WHY THIS WORKS AS AN ANSWER ------------------------------ The recurrence is constructed directly from the given description using Chapter 5's own translation method, a, b, and f(n) are identified explicitly, n^(log_b a) is computed precisely (log base 2 of 8 equals exactly 3, not estimated), and the case is selected by directly comparing the two growth rates per this chapter's own three- case table.