next up previous
Next: About this document ... Up: PROBLEM COMPLEXITY Previous: PROBLEM COMPLEXITY

Def:

(Worst case) Complexity of a problem is the min number of operations needed to solve the problem in the worst case using particular resources.

eg. Matrix Multiplication
$C_{nn}=A_{\mbox{n x n} }*B_{\mbox{n x n}}$
$C_{ij}=A_{i1}B_{1j}+A_{i2}B_{2j}+\cdots +A_{in}B_{nj}$

for $i \leftarrow$ 1 to $n$
for $j \leftarrow$ 1 to $n$
$C_{ij}\leftarrow 0$
for $k\leftarrow 1$ to $n$
$C_{ij}=C_{ij}+A_{ik}B_{kj}$

Average-Case Problem Complexity

Space complexity of a problem



Sushil_Prasad 2012-08-23