I'm wondering how to perform a worst case analysis on a such algorithm. The basic operation is function
.
for (i=1; i<=N; i++) for (j=i; j<=i*i; j++) for (k=1; k<=N; k++) if (condition(i,j,k)) b[i][k] = function (b[i][j]); else b[i][k] = b[j][k];
I don't know how to start and to justify my intuitions.
Does worst case analysis mean that I must assume that condition(x,y,z)
will always be true
and so I will execute function
?