Asymptotic f(n) Notation lim = 1 n g(n) Albert R Meyer, - - PowerPoint PPT Presentation

asymptotic
SMART_READER_LITE
LIVE PREVIEW

Asymptotic f(n) Notation lim = 1 n g(n) Albert R Meyer, - - PowerPoint PPT Presentation

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


slide-1
SLIDE 1

1

Mathematics for Computer Science MIT 6.042J/18.062J

Asymptotic Notation

Albert R Meyer, April 10, 2013 theOhs.1

Asymptotic Equivalence

Def: f(n) ~ g(n)

f(n) lim = 1

n→∞ g(n)

Albert R Meyer, April 10, 2013 theOhs.2

Asymptotic Equivalence ~

n2 ~ n2 + n

because

n2 + n 1 lim n2 = lim 1+ = 1

n→∞ n→∞

n

Albert R Meyer, April 10, 2013 theOhs.3

Asymptotic Equivalence ~ Lemma: ~ is symmetric

Proof: Say f ~ g. Now

g 1 1 1 lim =lim = = f ⎛ f⎞ ⎛ f⎞ 1 lim ⎜ g⎟ ⎜ ⎟ ⎝ ⎠ ⎝ g⎠

Albert R Meyer, April 10, 2013 theOhs.4

slide-2
SLIDE 2

2

Asymptotic Equivalence ~ Lemma: ~ is symmetric

Proof: so g ~ f. 

g 1 1 1 lim =lim = = f ⎛ f⎞ ⎛ f⎞ 1 lim ⎜ g⎟ ⎜ ⎟ ⎝ ⎠ ⎝ g⎠

Albert R Meyer, April 10, 2013 theOhs.5

transitivity of ~

Suppose f~g and g~h, prove f~h.

⎛ f⎞ ⎛ f⎞ ⎜ ⎟ lim f ⎝ h ⎜ ⎠ ⎝ h⎟ ⎠ 1 = lim = lim = g ⎛ g⎞ ⎛ g⎞ ⎜ ⎟ lim⎜ ⎟ ⎝ h⎠ ⎝ h⎠

Albert R Meyer, April 10, 2013 theOhs.6

transitivity of ~

Suppose f~g and g~h, prove f~h.

⎛ f⎞ ⎛ f⎞ ⎟ m f ⎜ li ⎝ h ⎜ ⎠ ⎝ h⎟ ⎠ 1 = lim = lim = g ⎛ g⎞ 1 ⎜ ⎟ ⎝ h⎠

Albert R Meyer, April 10, 2013 theOhs.7

Asymptotic Equivalence ~

Corollary: ~ is an

equivalence relation

Albert R Meyer, April 10, 2013 theOhs.9

slide-3
SLIDE 3

3

Asymptotic Equivalence ~

~ is a relation

  • n functions:

f

~

g

Albert R Meyer, April 10, 2013 theOhs.10

Asymptotically smaller Def: f(n) = o(g(n))

iff

f(n) lim = 0

n→∞ g(n)

Albert R Meyer, April 10, 2013 theOhs.11

Little Oh: o(·)

heOhs.12

Little Oh: o(·)

n2 = o(n3)

because

n2 1 lim

3 = lim

= 0

n→∞ n n→∞ n

Albert R Meyer, April 10, 2013 t

Little Oh: o(·)

Lemma:

  • (·) is a strict

partial order

Albert R Meyer, April 10, 2013 theOhs.13

slide-4
SLIDE 4

4

theOhs.14 Albert R Meyer, April 10, 2013

Big Oh: O(·) Asymptotic Order of Growth:

f = O(g)

⎛ f(n) ⎞ limsup < ∞ ⎜ ⎟

n→∞

⎝ g(n)⎠

a technicality ignore now

theOhs.15

Big Oh: O(·)

3n2 = O(n2)

because

3n2 lim

2 = 3 < ∞ n→∞ n

Albert R Meyer, April 10, 2013 eOhs.16

Theta: Θ(·)

Same Order of Growth:

f = Θ(g)

Def: f = O(g)

and g = O(f)

Albert R Meyer, April 10, 2013 th

Theta: Θ(·)

Lemma:

Θ(·) is an equivalence relation

Albert R Meyer, April 10, 2013 theOhs.17

slide-5
SLIDE 5

5

theOhs.18 Albert R Meyer, April 10, 2013

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

slide-6
SLIDE 6

MIT OpenCourseWare http://ocw.mit.edu

6.042J / 18.062J Mathematics for Computer Science

Spring 2015 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.