CSC263H1 Lecture Notes - Lecture 2: Sample Space, Big O Notation, Upper And Lower Bounds

61 views2 pages
27 Oct 2015
School
Course
Professor

Document Summary

For algorithm a, t(x) represents the number of steps executed by a on input x. Worst case running time of a on inputs of size n is denoted ta(n). T (n) = max{t(x) : x is an input of size n} Linkedsearch(l, k): z = l. head while z != none and z. key != k: z = z. next return z. L. length (# of elements in l) n. T (n) = an + b for constants a, b t (n) (n) We have 2: z != none, z. key != key. For algorithm a, consider sn = sample space of all inputs of size n. to de ne average , we require a probability distribution over sn speci ying the likelihood of each input. Let tn(x) = num of steps executed by a on input x in sn. note: tn is a random variable (assigns numerical value to each element of probability space).

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents

Related Questions