Asymptotic Equivalence Mathematics for Computer Science MIT 6.042J/18.062J Def: f(n) ~ g(n) Asymptotic f(n) Notation lim = 1 n →∞ g(n) Albert R Meyer, April 10, 2013 Albert R Meyer, April 10, 2013 theOhs.1 theOhs.2 Asymptotic Equivalence ~ Asymptotic Equivalence ~ n 2 ~ n 2 + n Lemma: ~ is symmetric because Proof: Say f ~ g. Now n 2 + n 1 g 1 1 1 lim = lim 1+ = 1 lim =lim = = n n 2 n → ∞ f ⎛ f ⎞ ⎛ f ⎞ 1 n → ∞ lim ⎜ g ⎟ ⎜ ⎟ ⎝ g ⎠ ⎝ ⎠ Albert R Meyer, April 10, 2013 Albert R Meyer, April 10, 2013 theOhs.3 theOhs.4 1
transitivity of ~ Asymptotic Equivalence ~ Suppose f~g and g~h, Lemma: ~ is symmetric prove f~h. Proof: so g ~ f. ⎛ f ⎞ ⎛ f ⎞ lim g 1 1 1 ⎜ ⎟ ⎝ h ⎟ ⎜ ⎝ h f ⎠ ⎠ lim =lim = = 1 = lim = lim = ⎛ f ⎞ ⎛ f ⎞ f 1 g ⎛ g ⎞ ⎛ g ⎞ lim ⎜ g ⎟ lim ⎜ ⎜ ⎟ ⎝ g ⎠ ⎜ ⎟ ⎟ ⎝ ⎠ ⎝ h ⎠ ⎝ h ⎠ Albert R Meyer, April 10, 2013 Albert R Meyer, April 10, 2013 theOhs.5 theOhs.6 transitivity of ~ Asymptotic Equivalence ~ Suppose f~g and g~h, prove f~h. Corollary: ~ is an ⎛ f ⎞ ⎛ f ⎞ equivalence relation li m ⎜ ⎟ ⎜ ⎝ h ⎟ f ⎝ h ⎠ ⎠ 1 = lim = lim = g ⎛ g ⎞ 1 ⎜ ⎟ ⎝ h ⎠ Albert R Meyer, April 10, 2013 Albert R Meyer, April 10, 2013 theOhs.7 theOhs.9 2
Asymptotic Equivalence ~ Little Oh: o(·) Asymptotically smaller ~ is a relation Def: f(n) = o(g(n)) on functions: iff f(n) ~ f g lim = 0 n →∞ g(n) Albert R Meyer, April 10, 2013 Albert R Meyer, April 10, 2013 theOhs.10 theOhs.11 Little Oh: o(·) Little Oh: o(·) n 2 = o(n 3 ) Lemma: because o(·) is a strict n 2 1 lim 3 = lim = 0 partial order n → ∞ n n →∞ n Albert R Meyer, April 10, 2013 Albert R Meyer, April 10, 2013 t heOhs.12 theOhs.13 3
Big Oh: O(·) Big Oh: O(·) 3n 2 = O(n 2 ) Asymptotic Order of Growth: f = O(g) because 3n 2 ⎛ f(n) ⎞ lim 2 = 3 < ∞ limsup < ∞ n → ∞ n ⎜ ⎟ ⎝ g(n) ⎠ n →∞ a technicality ignore now - Albert R Meyer, April 10, 2013 Albert R Meyer, April 10, 2013 theOhs.14 theOhs.15 Theta: Θ (·) Theta: Θ (·) Lemma: Same Order of Growth: f = Θ (g) Θ (·) is an Def: f = O(g) equivalence and relation g = O(f) Albert R Meyer, April 10, 2013 Albert R Meyer, April 10, 2013 th eOhs.16 theOhs.17 4
Asymptotics: Intuitive Summary f ~ g: f & g nearly equal f = o(g): f much less than g f = O(g): f roughly ≤ g f = Θ (g): f roughly equal g Albert R Meyer, April 10, 2013 theOhs.18 5
MIT OpenCourseWare http://ocw.mit.edu 6.042J / 18.062J Mathematics for Computer Science Spring 20 15 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
Recommend
More recommend