Uploaded by Aika Kz

algos

advertisement
https://www.youtube.com/watch?v=9TlHvipP5yA&list=PLDN4rrl48XKpZkf03iYFl-O29szjTrs_O&i
ndex=7
In big-O() notation, constant factors are removed. Converting from one logarithm base to
another involves multiplying by a constant factor.
So O(log N) is equivalent to O(log2 N) due to a constant factor.
Unset
log2(n)=log(n)/log(2)=O(log(n))
log10(n)=log(n)/log(10)=O(log(n))
logE(n)=log(n)/log(E)=O(log(n))
worst-case running time of insertion sort is n^2
We say that g.n/ is an
asymptotically tight bound for f .n/.
https://nu-edu-kz.zoom.us/j/95437356157?pwd=V0U3WHZIeGVOOEZ6UVNaVzhRTmVIdz09
3209 ainur rakhimbay
12 hours deifference
contact by email
Correctness-correct output
Modularity - remove module , make change in small module, divide conquer
Simplicity - kiss, simplest is the best occam's razor
Maintainability - can be updated
Robustness stability - hardware performance still stable
Damping factor - probability that you keep clicking
Linear equation
2 unknowns, 2 equations so can this system can be solved
Space we can add or remove, time not, so time preferable
Multiplication faster bit switch
Ricardo
In place = dont use space
In place sorting = using the array initial no extra arrays etc
Out of place
Line 1 extra check that will be false
Line 5 we check the loop but dont enter
C6 we check but dont enter
Asymptotic behaviour = look at sufficiently large value
Step find dominating term an^2_bn+c
Dominating square
n^2 order fo growth of worst case, theta
Asymptotic notation
Insertion sort = incremental algo = Incrementing search space by 1
Recursion = do the same problem again an again , search space becomes smaller and smaller
until we reach basic problem and then we combine
Put special character = infinity
Compare 7 and infinity, 7 smaller, put 7 in original
Theta bounded frop and down
Intersection fn and gn n0 where gn will be always smaller than fn
Omega lower bounded
Lowest bound theta can be n, so cant be omega n^2
No flare line if not equal
Polynomial loosely bounded by exponential
In quiz 1 until lecture 2
September 6
Download