29/07/2011

What is Complexity??

Some algorithms are more efficient than others.So, we always like to choose that algorithm which is better;but how to decide which is better.Therefore we have units for comparing algorithms.

The complexity of an algorithm is that which determines the efficiency of the algorithm in terms of the input data which is to be processed.There are two main types of complexities ; namely time complexity and space complexity.As the name suggests time complexity distinguishes on the basis of the run-time and space complexity differentiates algorithms on the basis of the amount of memory space the algorithm requires.

Although there are other complexities as well like communication complexity(amount of communication),circuit complexity(the amount of gates used) but we are not much bothered about these.

No comments:

Post a Comment