Complexity Of Algorithms:
There are two case for describing in the complexity of algorithms:
(1) Worst Case: The Maximum value of f(n) for any possible input.
(2) Average Case: The expected value of f(n)
Sometimes we also consider the minimum possible value of f(n), called the best case.
Suppose, The numbers of n1, n2, ......, nk occur with respective probabilities p1,p2, ........., pk. Then the expectation of average value E is given by
0 comments:
Post a Comment