


































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



































































Chapter 1 Advanced algorithms and complexity
(independent from the machine, language and
Evaluating the execution time of an algorithm Time complexity Evaluating how much space (memory) is needed for the execution of an algorithm Space complexity
Algorithm analysis steps Step 1 : Let P a problem, this is the problem statement Step 2 : Let M be a method, to resolve the problem P and develop an algorithm:
Given two algorithms which calculate the solutions to the same problem. How to compare these algorithms? In other words, which is better? Intuition: We will prefer the one that requires the least resources.
Experimental approach:
Asymptotic complexity
The behavior of an algorithm when the size of the data becomes large is called:
Function’s order (or rate of growth) 1 , log n, n, n 2 , 2 n T ( n ) n 2 n 1 Log n n 2 n
n We assume that the execution time of a basic instruction is 10
- 6 seconds
12
12
n