ZEP 01 SlozitostAlgoritmu
ZEP 01 SlozitostAlgoritmu
Resources needed
◦ specific hardware
◦ time, memory, money
ALGORITHM 1
…
ALGORITHM n
Complexity of algorithms
Intuition: resources (e.g., time) grow with the size of the input (n)
◦ But may also depend on the concrete values of the input ➔ we will
distinguish the best-case, expected (average) case, and worst-case
Is it a good deal?
◦ Sometimes yes, sometimes not, sometimes it is more complicated
Glut Max 19 752 540 281 855 157 464 000 1 549 690
Add Magn 13 920 360 191 607 46 656 000 1 009 690
Bi Fem 12 390 144 168 465 2 985 984 566 60
Iliacus 7 966 216 103 236 10 077 696 410 142
Rect Fem 5 258 36 64 990 46 656 100 2
KIV/ZEP-E
ASSESSMENT OF ALGORITHMS, TIME, MEMORY AND
OTHER COMPLEXITY, AMORTISATION
Complexity of algorithms
Recurrent formula
◦ they arise in algorithms based on the divide and conquer