Table of Contents

Chapter 5

Divide and conquer

5.1 A first Recurrence: The Mergesort Algorithm

Approaches to solving recurrences

Unrolling the mergesort solution

Subsituting into the mergesort recurrence - guess and check

An approach using partial substitution

5.2 Further Recurrence Relations

5.3 T(n) ⇐ qT(n/2) + cn, when n > 2 and t(2) ⇐ c. q is not the number subproblems

What to do with q>2 subproblems

What happens when q = 1

Related recurrence

5.3 Counting inversions

The problem

The algorithm

5.4 Finding the closest pair of points

5.5 interger multiplication

The Problem