Download presentation

Presentation is loading. Please wait.

1
**한양대학교 정보보호 및 알고리즘 연구실 2008. 1. 28 이재준 담당교수님 : 박희진 교수님**

Growth of function Chapter 3. Growth of function 한양대학교 정보보호 및 알고리즘 연구실 이재준 담당교수님 : 박희진 교수님

2
**Contents of Table Asymptotic notation O-notation Ω-notation Θ-notation**

Asymptotically lager/smaller notation o-notation ω-notation 3. Relationship between this notations

3
**Asymptotic notation 1. Asymptotic notation**

- Which one is better algorithm for enough inputs? we are studing asymptotic efficiency of algorithms ( size of the input in the limit, as the size of the inputs increases without bound. )

4
**g(n) is asymptotically upper bound for f(n)**

1. Asymptotic notation O-notation Asymptotically upper bound - Definition for all n, n ≥ n0 , 0 ≤ f(n) ≤ c g(n), the function f(n) is smaller or equal to g(n) to within constant factor. g(n) is asymptotically upper bound for f(n)

5
**O-notation 1. Asymptotic notation - Definition**

O(g(n)) = { f(n) : there exist positive constant c and n0 such that 0 ≤ f(n) ≤ c g(n) for all n ≥ n0 } f(n) cg(n) n0 n

6
**O-notation 1. Asymptotic notation**

- f(n) = O(g(n)) means f(n) ∈ O(g(n)) means f(n) = θ(g(n)) implies f(n) = O(g(n)). since θ-notation stronger notation than O-notation O(g(n)) f(n)

7
**O-notation Example 1. Asymptotic notation , ( )**

, ( ) Use the definition of O-notation to prove the following property.

8
**O-notation Solution to example**

1. Asymptotic notation O-notation Solution to example To show that , we need to find c and n0 For maximize value of , we make n0 = 1 Thus, c=a+\b\ and, n0 = 1 (because c is positive contant)

9
**g(n) is asymptotically lower bound for f(n)**

1. Asymptotic notation Ω-notation Asymptotically lower bound - Definition for all n, n ≥ n0 , 0≤ c g(n) ≤ f(n) , the function f(n) is larger or equal to g(n) to within constant factor. g(n) is asymptotically lower bound for f(n)

10
**Ω-notation 1. Asymptotic notation - Definition**

Ω (g(n)) = { f(n) : there exist positive constant c and n0 such that 0 ≤ c g(n) ≤ f(n) for all n ≥ n0 } n0 cg(n) f(n) n

11
**g(n) is asymptotically tight bound for f(n)**

1. Asymptotic notation θ-notation Asymptotically tight bound - Definition for all n, n ≥ n0 , 0≤ c1g(n) ≤ f(n) ≤ c2g(n), the function f(n) is equal to g(n) to within constant factor. g(n) is asymptotically tight bound for f(n)

12
**θ-notation - Definition 1. Asymptotic notation**

θ(g(n)) = { f(n) : there exist positive constant c1, c2 and n0 such that 0 ≤ c1 g(n) ≤ f(n) ≤ c2 g(n) for all n ≥ n0 } c1g(n) n0 f(n) c2g(n) n

13
**θ-notation 1. Asymptotic notation**

- f(n) = θ(g(n)) means f(n) ∈ Θ(g(n)) - Definition of θ(g(n)) requires that every member f(n) ∈ Θ(g(n)) be asymptotically nonnegative (=asymptotically positive) θ(g(n)) f(n) f(n) n0

14
**θ-notation Example 1. Asymptotic notation ,**

Use the definition of θ-notation to prove the following property.

15
**θ-notation Solution to example**

1. Asymptotic notation θ-notation Solution to example When n0=6 then c1 ≤ 0 c1 need to be positive constant so n0=6 is wrong. When n0=1 then ≤ 1/2 (n0=1) When n0=7 then c1 ≤ 1/14 (n0=7) thus, (n0=7)

16
**θ-notation Example 1. Asymptotic notation ,**

Use the definition of θ-notation to prove the following property.

17
**θ-notation Solution to example**

1. Asymptotic notation θ-notation Solution to example To show that , we need to find c1 , c2 and n0 so, the more value of n is larger, the more value of is smaller So, value of will be smaller than 6. Thus,

18
**Theorem 3.1 Relationship 1. Asymptotic notation**

For any two functions f(n) and g(n), we have f(n) = Θ(g(n)) if and only if f(n) = O(g(n)) and f(n) = Ω(g(n)). θ(g(n)) O(g(n)) Ω(g(n))

19
**equal sign to mean set membership**

1. Asymptotic notation Asymptotic notation in equations and inequalities - Stands alone on the right-hand side of an equation equal sign to mean set membership n ∈ O(n2)

20
**interpret is as standing for some anonymous function**

1. Asymptotic notation Asymptotic notation in equations and inequalities - Asymptotic notation appears in a formula interpret is as standing for some anonymous function f(n) ∈ Θ(n)

21
**Eliminate inessential detail and clutter**

1. Asymptotic notation Asymptotic notation in equations and inequalities - Asymptotic notation appears in a formula There is no point in specifying all lower-order terms exactly Eliminate inessential detail and clutter

22
**Number of anonymous functions Number of times the asymptotic notation**

Asymptotic notation in equations and inequalities - Number of anonymous functions Number of anonymous functions Number of times the asymptotic notation

23
**Asymptotic notation in equations and inequalities **

- Asymptotic notation appears in left-hand side of an equation right-hand side of an equation provides a coarser level of detail than the left-hand side. There is a way to choose the anonymous functions on the right of the equal sign to make the equation valid. <수학> 하나의 위상(位相) 공간의 위상에 있어서 그 개집합(開集合)이 그 공간의 다른 특정한 위상을 가진 개집합에 포함되어 있는. 이 말은 , 등호의 왼쪽에서 anonymous function을 골라냄으로써, 등호를 valid 하게 할수 있습니다.

24
**Asymptotic notation in equations and inequalities **

- A number of such relationships can be chained together f(n) ∈ Θ(n) h(n) ∈ Θ (n2) <수학> 하나의 위상(位相) 공간의 위상에 있어서 그 개집합(開集合)이 그 공간의 다른 특정한 위상을 가진 개집합에 포함되어 있는. g(n) ∈ Θ(n)

25
**f(n) is asymptotically smaller than g(n)**

2. Asymptotically larger/smaller notation o-notation Asymptotically smaller - Definition for all n, n ≥ n0 , any positive constant c, c>0, 0 ≤ f(n)< cg(n), the function f(n) is smaller to g(n) to within constant factor. f(n) is asymptotically smaller than g(n)

26
**o-notation 2. Asymptotically larger/smaller notation - Definition**

o(g(n)) = { f(n) : for any positive constant c>0, there exist a constant n0 >0 such that 0 ≤ f(n) < cg(n) for all n ≥ n0 } f(n) o(g(n)) n0

27
**o-notation 2. Asymptotically larger/smaller notation**

- We use o-notation to denote an upper bound that is not asymptotically tight. - this limit shows the function f(n) becomes insignificant relative to g(n) as n approaches infinity

28
**o-notation Example 1. Asymptotic notation**

Use the definition of o-notation to prove the following property. f(n) = o(n2)

29
**o-notation Solution to example**

2. Asymptotically larger/smaller notation o-notation Solution to example 2n = o(n2) If f(n) = o((g(n)) then

30
**f(n) is asymptotically larger than g(n)**

2. Asymptotically larger/smaller notation ω -notation Asymptotically larger - Definition for all n, n ≥ n0 , any positive constant c, c>0, 0 ≤ cg(n) < f(n), the function f(n) is larger to g(n) to within constant factor. f(n) is asymptotically larger than g(n)

31
**ω-notation 2. Asymptotically larger/smaller notation - Definition**

ω(g(n)) = { f(n) : for any positive constant c>0, there exist a constant n0 >0 such that 0 ≤ cg(n) < f(n) for all n ≥ n0 } f(n) ω(g(n))

32
**ω -notation 2. Asymptotically larger/smaller notation**

- We use ω-notation to denote a lower bound that is not asymptotically tight. - f(n) ∈ ω(g(n)) if and only if g(n) ∈ o(f(n)). - if the limit exists. That is, f(n) becomes arbitrarily large relative to g(n) as n approaches infinity. Arbitrarily : 독단적으로, 제멋대로, 마음대로

33
**ω -notation Example 2. Asymptotically larger/smaller notation**

Use the definition of o-notation to prove the following property. f(n) = ω(n)

34
**ω -notation Solution to example**

2. Asymptotically larger/smaller notation ω -notation Solution to example =ω(n) If f(n) = ω((g(n)) then

35
**3. Relationship between this notations**

f(n) O(g(n)) o(g(n)) ω(g(n)) Ω(g(n)) θ(g(n)) O(g(n)) Ω(g(n)) ω(g(n)) o(g(n))

36
**Transitivity Transpose symmetry 3. Relationship between this notations**

f(n) = Θ(g(n)) and g(n) = Θ(h(n)) imply f(n) = Θ(h(n)) , f(n) = O(g(n)) and g(n) = O(h(n)) imply f(n) = O(h(n)) , f(n) = Ω(g(n)) and g(n) = Ω(h(n)) imply f(n) = Ω(h(n)) , f(n) = o(g(n)) and g(n) = o(h(n)) imply f(n) = o(h(n)) , f(n) = ω(g(n)) and g(n) = ω(h(n)) imply f(n) = ω(h(n)). f(n) O(g(n)) o(g(n)) ω(g(n)) Ω(g(n)) f(n) = O(g(n)) if and only if g(n) = Ω(f(n)), f(n) = o(g(n)) if and only if g(n) = ω(f(n)).

37
**Reflexivity Symmetry f(n) = Θ(f(n)) f(n) = O(f(n)) f(n) = Ω(f(n))**

3. Relationship between this notations Reflexivity f(n) = Θ(f(n)) f(n) = O(f(n)) f(n) = Ω(f(n)) Symmetry f(n) = Θ(g(n)) if and only if g(n) = Θ(f(n)). θ(g(n)) O(g(n)) Ω(g(n))

38
4. Question and Answer Q&A

Similar presentations

OK

Constant, Linear and Non-Linear Constant, Linear and Non-Linear

Constant, Linear and Non-Linear Constant, Linear and Non-Linear

© 2018 SlidePlayer.com Inc.

All rights reserved.

To make this website work, we log user data and share it with processors. To use this website, you must agree to our Privacy Policy, including cookie policy.

Ads by Google

Ppt on water activity vs moisture Ppt on natural resources for class 5 Presentation ppt on motivation theory Ppt on pricing policy Ppt on going places Ppt on effect of global warming on weather radio Ppt on high power transmission Shown by appt only Convert a pdf to ppt online for free Ppt on the environmental pollution its causes effects and solutions