CSCI 1112 Lecture 5: Asymptote Behavior

64 views1 pages
7 Feb 2017
School
Course

Document Summary

Running time analysis: for ea(cid:272)h algorith(cid:373) (cid:449)e (cid:449)a(cid:374)t to (cid:272)lassify the asy(cid:373)ptoti(cid:272) (cid:271)eha(cid:448)ior of its (cid:862)(cid:449)ork(cid:863, find the best case and the worst case. Asymptotic notation o (upper bound: you can use. You read it (cid:862)f(cid:894)(cid:374)(cid:895) is (cid:271)ig o of g(cid:894)(cid:374)(cid:895) O gives us the worst case of the algorithm. 100n^2 and 2^n: 64 lg n = o(8n^2) = o(n^2) The absolute minimum that the algorithm must do: notation: omega. Summing up: to preform a running time analysis of an iterative algorithm. Ea(cid:272)h (cid:862)(cid:271)lo(cid:272)k(cid:863) of si(cid:373)ple state(cid:373)e(cid:374)ts: assig(cid:374)(cid:373)e(cid:374)ts, (cid:272)he(cid:272)ks, (cid:272)o(cid:373)puti(cid:374)g the value of a built-in mathematical function is a constant value. If the (cid:271)lo(cid:272)k is (cid:449)ithi(cid:374) a (cid:862)for loop(cid:863) (cid:373)ultiply the (cid:272)o(cid:374)sta(cid:374)t (cid:271)y the (cid:374)u(cid:373)(cid:271)er of iterations of the for loop obtaining a strict bound (i. e. theta value)

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents