Growth of Functions: Asymptotic Notations - PowerPoint PPT Presentation

1 / 11
About This Presentation
Title:

Growth of Functions: Asymptotic Notations

Description:

Growth of Functions: Asymptotic Notations. ?????? O (Asymptotic Notation) ... 2) Reflexivity: f(n)=A(f(n)) 3) Symmetry: if f(n)= (g(n)) then. g(n)= (f(n) ... – PowerPoint PPT presentation

Number of Views:443
Avg rating:3.0/5.0
Slides: 12
Provided by: csBg
Category:

less

Transcript and Presenter's Notes

Title: Growth of Functions: Asymptotic Notations


1
  • Growth of Functions Asymptotic Notations

2
?????? O ? ? (Asymptotic Notation)
  • ????? T(n)O(g(n))?? ???? n0 ????? Cgt0 ??
    ???? n ? n0 ??????
  • T(n)?Cg(n)
  • ?????
  • 4n100O(n)
  • 4n100 ? Cn
  • C?4100/n
  • n0100 , C5

3
?????? O ? ???? ??????
  • 3n1 O(n2)
  • (n1)2O(n2)
  • (n1)2O(n)
  • 8O(1)
  • log(n)O(n)
  • nlog(n)O(n)

4
?????? O ? ? (Asymptotic Notation)
  • ????? T(n) ? (g(n))?? ???? n0 ????? Cgt0 ??
    ???? n ? n0 ??????
  • T(n)?Cg(n)
  • ?????
  • 4n100 ?(n)
  • 4n100 ? Cn
  • C ? 4100/n
  • n01 , C4

5
?????? O ? ???? ??????
  • 3n1 ?(n2)
  • (n1)2 ?(n2)
  • (n1)2 ?(n)
  • 8 ?(1)
  • log(n) ?(n)
  • nlog(n) ?(n)

6
?????? O ? ? (Asymptotic Notation)
  • ????? T(n) ?(g(n))?? ???? n0 ??????? C1,C2gt0
    ?? ???? n ? n0 ??????
  • C1g(n) ? T(n)?C2g(n)
  • ?????
  • 4n100 ?(n)
  • C1 n ? 4n100 ?C2n
  • C2?4100/n
  • C1 ?4100/n
  • n0100 , C25, C14

7
?????? O ? ???? ??????
  • 3n1 ? (n2)
  • (n1)2 ? (n2)
  • (n1)2 ? (n)
  • 8 ? (1)
  • log(n) ? (n)
  • nlog(n) ? (n)

8
?????? ?? O ? ?
  • AO ? ?
  • 1) Transitivity if f(n)A(g(n)) and g(n)A(h(n))
    then f(n)A(h(n))
  • 2) Reflexivity f(n)A(f(n))
  • 3) Symmetry if f(n) ?(g(n)) then
  • g(n) ?(f(n))
  • 3) Transpose symmetry
  • if f(n) O(g(n)) then g(n) ? (h(n))

9
?????

10
?????

11
????? ?????? ?? ?????. ???? ???? Lx1,x2,,
xn
  • ListSearch(value)Ptr
  • Ptr x ? Head()
  • While (not Outside(x)) and Key(x) ltgt value
  • x ? Next(x) (worst case)
  • If Outside(x) ? (n)
  • Return nil
  • Else
  • Return x
Write a Comment
User Comments (0)
About PowerShow.com