Computational Complexity
Go through the introduction of computational complexity given in this lesson.
We'll cover the following
Introduction
The analysis of algorithms involves studies about the scaling of their resource requirements, namely the amount of time and space (or memory) they use when the input size increases (
In general, the complexity of an algorithm increases with the size of the input , thus the complexity of an algorithm is expressed as a function of the input size (in bits), and as a consequence, the complexity is a function of (
Running time
The running time or time complexity of an algorithm is the function , where is the maximum number of steps that uses on any input of length .
The order of growth of the requirements of an algorithm, especially its running time, gives a characterization of the algorithm’s efficiency and thus allows a comparison with the performance of alternative algorithms. Since the exact running time of an algorithm is normally a very complex expression, its efficiency usually has to be estimated. Such estimation is usually done by studying the asymptotic efficiency of algorithms, i.e., we want to understand how the running time increases when the size of the input increases without any upper bound.
Get hands-on with 1400+ tech skills courses.