Introduction To Algorithms: 6.046J/18.401J/SMA5503
Introduction To Algorithms: 6.046J/18.401J/SMA5503
6.046J/18.401J/SMA5503
Lecture 3
Prof. Erik Demaine
The divide-and-conquer
design paradigm
1. Divide the problem (instance)
into subproblems.
2. Conquer the subproblems by
solving them recursively.
3. Combine subproblem solutions.
n
cij = ∑ aik ⋅ bkj
k =1
Day 4 Introduction to Algorithms L3.17
Standard algorithm
for i ← 1 to n
do for j ← 1 to n
do cij ← 0
for k ← 1 to n
do cij ← cij + aik⋅ bkj
H(n)
Area = Θ(n)