a general definition of the big oh notation for algorithm
play

A general definition of the big oh notation for algorithm analysis - PowerPoint PPT Presentation

Algorithm analysis O -notation Prevailing definition Implied properties A general definition of the big oh notation for algorithm analysis Kalle Rutanen Department of Mathematics Tampere University of Technology June 3, 2014 1 / 101


  1. Algorithm analysis Definition O -notation Primitive properties Prevailing definition Uniqueness and existence Implied properties Transitivity Definition f ∈ O X ( g ) and g ∈ O X ( h ) ⇒ f ∈ O X ( h ) ∀ f , g , h ∈ F X Intuition If f does not scale worse than g , and g does not scale worse than h , then f does not scale worse than h . 32 / 101

  2. Algorithm analysis Definition O -notation Primitive properties Prevailing definition Uniqueness and existence Implied properties Transitivity Definition f ∈ O X ( g ) and g ∈ O X ( h ) ⇒ f ∈ O X ( h ) ∀ f , g , h ∈ F X Intuition If f does not scale worse than g , and g does not scale worse than h , then f does not scale worse than h . Example and n 2 ∈ O N n 2 � n 3 � n 3 � � � � n ∈ O N ⇒ n ∈ O N . 33 / 101

  3. Algorithm analysis Definition O -notation Primitive properties Prevailing definition Uniqueness and existence Implied properties Order-consistency 34 / 101

  4. Algorithm analysis Definition O -notation Primitive properties Prevailing definition Uniqueness and existence Implied properties Order-consistency Definition f ≤ g ⇒ O X ( f ) ⊂ O X ( g ) ∀ f , g ∈ F X 35 / 101

  5. Algorithm analysis Definition O -notation Primitive properties Prevailing definition Uniqueness and existence Implied properties Order-consistency Definition f ≤ g ⇒ O X ( f ) ⊂ O X ( g ) ∀ f , g ∈ F X Intuition If all values of f are at most that of g , then those functions which do not scale worse than f do not scale worse than g either 36 / 101

  6. Algorithm analysis Definition O -notation Primitive properties Prevailing definition Uniqueness and existence Implied properties Order-consistency Definition f ≤ g ⇒ O X ( f ) ⊂ O X ( g ) ∀ f , g ∈ F X Intuition If all values of f are at most that of g , then those functions which do not scale worse than f do not scale worse than g either Examples 37 / 101

  7. Algorithm analysis Definition O -notation Primitive properties Prevailing definition Uniqueness and existence Implied properties Order-consistency Definition f ≤ g ⇒ O X ( f ) ⊂ O X ( g ) ∀ f , g ∈ F X Intuition If all values of f are at most that of g , then those functions which do not scale worse than f do not scale worse than g either Examples O X (0) ⊂ O X ( f ) ∀ f ∈ F X 38 / 101

  8. Algorithm analysis Definition O -notation Primitive properties Prevailing definition Uniqueness and existence Implied properties Order-consistency Definition f ≤ g ⇒ O X ( f ) ⊂ O X ( g ) ∀ f , g ∈ F X Intuition If all values of f are at most that of g , then those functions which do not scale worse than f do not scale worse than g either Examples O X (0) ⊂ O X ( f ) ∀ f ∈ F X ∀ α, β ∈ R ≥ 0 : α ≤ β O R ≥ 1 ( x α ) ⊂ O R ≥ 1 x β � � 39 / 101

  9. Algorithm analysis Definition O -notation Primitive properties Prevailing definition Uniqueness and existence Implied properties Order-consistency Definition f ≤ g ⇒ O X ( f ) ⊂ O X ( g ) ∀ f , g ∈ F X Intuition If all values of f are at most that of g , then those functions which do not scale worse than f do not scale worse than g either Examples O X (0) ⊂ O X ( f ) ∀ f ∈ F X ∀ α, β ∈ R ≥ 0 : α ≤ β O R ≥ 1 ( x α ) ⊂ O R ≥ 1 x β � � � � 1 ∀ α, β ∈ R > 0 ⊂ O R ≥ 1 ( x α ) O R ≥ 1 α e log e ( β ) log β ( x ) 40 / 101

  10. Algorithm analysis Definition O -notation Primitive properties Prevailing definition Uniqueness and existence Implied properties Multiplicativity 41 / 101

  11. Algorithm analysis Definition O -notation Primitive properties Prevailing definition Uniqueness and existence Implied properties Multiplicativity Definition O X ( f ) O X ( g ) = O X ( fg ) ∀ f , g ∈ F X 42 / 101

  12. Algorithm analysis Definition O -notation Primitive properties Prevailing definition Uniqueness and existence Implied properties Multiplicativity Definition O X ( f ) O X ( g ) = O X ( fg ) ∀ f , g ∈ F X Intuition The product of a function which does not scale worse than f and a function which does not scale worse than g does not scale worse than fg . Every function in O X ( fg ) is a product of such functions. 43 / 101

  13. Algorithm analysis Definition O -notation Primitive properties Prevailing definition Uniqueness and existence Implied properties Multiplicativity Definition O X ( f ) O X ( g ) = O X ( fg ) ∀ f , g ∈ F X Intuition The product of a function which does not scale worse than f and a function which does not scale worse than g does not scale worse than fg . Every function in O X ( fg ) is a product of such functions. Examples 44 / 101

  14. Algorithm analysis Definition O -notation Primitive properties Prevailing definition Uniqueness and existence Implied properties Multiplicativity Definition O X ( f ) O X ( g ) = O X ( fg ) ∀ f , g ∈ F X Intuition The product of a function which does not scale worse than f and a function which does not scale worse than g does not scale worse than fg . Every function in O X ( fg ) is a product of such functions. Examples n 2 � n 3 � � � O N ( n ) O N = O N 45 / 101

  15. Algorithm analysis Definition O -notation Primitive properties Prevailing definition Uniqueness and existence Implied properties Multiplicativity Definition O X ( f ) O X ( g ) = O X ( fg ) ∀ f , g ∈ F X Intuition The product of a function which does not scale worse than f and a function which does not scale worse than g does not scale worse than fg . Every function in O X ( fg ) is a product of such functions. Examples n 2 � n 3 � � � O N ( n ) O N = O N O R > 0 (1 / x ) O R > 0 ( x ) = O R > 0 (1) 46 / 101

  16. Algorithm analysis Definition O -notation Primitive properties Prevailing definition Uniqueness and existence Implied properties Locality 47 / 101

  17. Algorithm analysis Definition O -notation Primitive properties Prevailing definition Uniqueness and existence Implied properties Locality Definition f ∈ O X ( g ) ⇔ ∀ D ∈ C : ( f | D ) ∈ O D ( g | D ) ∀ f , g ∈ F X , C ⊂ P ( X ) : C is a finite cover of X . 48 / 101

  18. Algorithm analysis Definition O -notation Primitive properties Prevailing definition Uniqueness and existence Implied properties Locality Definition f ∈ O X ( g ) ⇔ ∀ D ∈ C : ( f | D ) ∈ O D ( g | D ) ∀ f , g ∈ F X , C ⊂ P ( X ) : C is a finite cover of X . Intuition An f does not scale worse than g if and only if that holds when restricted to a set of a finite cover, for all such sets. 49 / 101

  19. Algorithm analysis Definition O -notation Primitive properties Prevailing definition Uniqueness and existence Implied properties Zero-separation 50 / 101

  20. Algorithm analysis Definition O -notation Primitive properties Prevailing definition Uniqueness and existence Implied properties Zero-separation Definition O X (1) �⊂ O X (0) 51 / 101

  21. Algorithm analysis Definition O -notation Primitive properties Prevailing definition Uniqueness and existence Implied properties Zero-separation Definition O X (1) �⊂ O X (0) Intuition There exists a function which scales worse than 0, but does not scale worse than 1. 52 / 101

  22. Algorithm analysis Definition O -notation Primitive properties Prevailing definition Uniqueness and existence Implied properties One-separation 53 / 101

  23. Algorithm analysis Definition O -notation Primitive properties Prevailing definition Uniqueness and existence Implied properties One-separation Definition O N > 0 ( n ) �⊂ O N > 0 (1) 54 / 101

  24. Algorithm analysis Definition O -notation Primitive properties Prevailing definition Uniqueness and existence Implied properties One-separation Definition O N > 0 ( n ) �⊂ O N > 0 (1) Intuition There exists a function which scales worse than 1, but does not scale worse than n . 55 / 101

  25. Algorithm analysis Definition O -notation Primitive properties Prevailing definition Uniqueness and existence Implied properties Composition rule 56 / 101

  26. Algorithm analysis Definition O -notation Primitive properties Prevailing definition Uniqueness and existence Implied properties Composition rule Definition O X ( f ) ◦ s ⊂ O Y ( f ◦ s ) ∀ f ∈ F X , s : Y → X . 57 / 101

  27. Algorithm analysis Definition O -notation Primitive properties Prevailing definition Uniqueness and existence Implied properties Composition rule Definition O X ( f ) ◦ s ⊂ O Y ( f ◦ s ) ∀ f ∈ F X , s : Y → X . Intuition A function which does not scale worse than f , mapped through s , does not scale worse than f mapped through s . 58 / 101

  28. Algorithm analysis Definition O -notation Primitive properties Prevailing definition Uniqueness and existence Implied properties Uniqueness and existence 59 / 101

  29. Algorithm analysis Definition O -notation Primitive properties Prevailing definition Uniqueness and existence Implied properties Uniqueness and existence Primitive properties The given properties are called the primitive properties . 60 / 101

  30. Algorithm analysis Definition O -notation Primitive properties Prevailing definition Uniqueness and existence Implied properties Uniqueness and existence Primitive properties The given properties are called the primitive properties . Existence There exists a function O with the primitive properties. 61 / 101

  31. Algorithm analysis Definition O -notation Primitive properties Prevailing definition Uniqueness and existence Implied properties Uniqueness and existence Primitive properties The given properties are called the primitive properties . Existence There exists a function O with the primitive properties. Uniqueness There exists at most one function O with the primitive properties. 62 / 101

  32. Algorithm analysis Definition O -notation Primitive properties Prevailing definition Uniqueness and existence Implied properties Uniqueness and existence Primitive properties The given properties are called the primitive properties . Existence There exists a function O with the primitive properties. Uniqueness There exists at most one function O with the primitive properties. Explicit definition f ∈ O X ( g ) : ⇔ ∃ c ∈ R > 0 : f ≤ cg 63 / 101

  33. Algorithm analysis Definition O -notation An example of failure Prevailing definition Characterization of failure Implied properties Prevailing definition 64 / 101

  34. Algorithm analysis Definition O -notation An example of failure Prevailing definition Characterization of failure Implied properties Prevailing definition Definition f ∈ O X ( g ) : ⇔ ∃ c ∈ R > 0 , y ∈ X : ( f | X ≥ y ) ≤ c ( g | X ≥ y ) where X ⊂ R d and d ∈ N . 65 / 101

  35. Algorithm analysis Definition O -notation An example of failure Prevailing definition Characterization of failure Implied properties Prevailing definition Definition f ∈ O X ( g ) : ⇔ ∃ c ∈ R > 0 , y ∈ X : ( f | X ≥ y ) ≤ c ( g | X ≥ y ) where X ⊂ R d and d ∈ N . Problem Our definition is different to the prevailing definition, which has been used for decades. Is there something wrong with the prevailing definition? 66 / 101

  36. Algorithm analysis Definition O -notation An example of failure Prevailing definition Characterization of failure Implied properties Prevailing definition Definition f ∈ O X ( g ) : ⇔ ∃ c ∈ R > 0 , y ∈ X : ( f | X ≥ y ) ≤ c ( g | X ≥ y ) where X ⊂ R d and d ∈ N . Problem Our definition is different to the prevailing definition, which has been used for decades. Is there something wrong with the prevailing definition? Solution The prevailing definition fulfills all of the primitive properties, except for the composition rule! 67 / 101

  37. Algorithm analysis Definition O -notation An example of failure Prevailing definition Characterization of failure Implied properties Fundamental The composition rule is fundamental; without it the complexity analysis of an algorithm cannot be approached by dividing it into parts, and studying the complexity of each part. 68 / 101

  38. Algorithm analysis Definition O -notation An example of failure Prevailing definition Characterization of failure Implied properties An example of failure 69 / 101

  39. Algorithm analysis Definition O -notation An example of failure Prevailing definition Characterization of failure Implied properties An example of failure Algorithm 2 An algorithm which takes as input ( m , n ) ∈ N 2 , and has time-complexity O N 2 (1) according to the prevailing definition. 1: procedure constantComplexity ( m , n ) j ← 0 2: if m = 0 then 3: for i ∈ [0 , n ] do 4: j ← j + 1 5: end for 6: end if 7: return j 8: 9: end procedure 70 / 101

  40. Algorithm analysis Definition O -notation An example of failure Prevailing definition Characterization of failure Implied properties Algorithm 3 An algorithm which takes as input n ∈ N , and calls another O N 2 (1) algorithm n times with varying arguments. 1: procedure basicAnalysis ( n ) for i ∈ [0 , n ) do 2: constantComplexity (0 , i ) 3: end for 4: 5: end procedure 71 / 101

  41. Algorithm analysis Definition O -notation An example of failure Prevailing definition Characterization of failure Implied properties Algorithm 4 An algorithm which takes as input n ∈ N , and calls another O N 2 (1) algorithm n times with varying arguments. 1: procedure basicAnalysis ( n ) for i ∈ [0 , n ) do 2: constantComplexity (0 , i ) 3: end for 4: 5: end procedure Composition Computed via the composition rule, the complexity of this algorithm is O N ( n ). 72 / 101

  42. Algorithm analysis Definition O -notation An example of failure Prevailing definition Characterization of failure Implied properties Algorithm 5 An algorithm which takes as input n ∈ N , and calls another O N 2 (1) algorithm n times with varying arguments. 1: procedure basicAnalysis ( n ) for i ∈ [0 , n ) do 2: constantComplexity (0 , i ) 3: end for 4: 5: end procedure Composition Computed via the composition rule, the complexity of this algorithm is O N ( n ). Substitution Computed via substitution, the complexity of this algorithm is � n 2 � . A contradiction! O N 73 / 101

  43. Algorithm analysis Definition O -notation An example of failure Prevailing definition Characterization of failure Implied properties Characterization of failure 74 / 101

  44. Algorithm analysis Definition O -notation An example of failure Prevailing definition Characterization of failure Implied properties Characterization of failure Theorem (Asymptotic composition rule) Let X ⊂ R d 1 , Y ⊂ R d 2 , and s : Y → X. The composition rule holds for s under the prevailing definition if and only if ∀ x ∗ ∈ X : ∃ y ∗ ∈ Y : s ( Y ≥ y ∗ ) ⊂ X ≥ x ∗ . (1) 75 / 101

  45. Algorithm analysis Definition O -notation An example of failure Prevailing definition Characterization of failure Implied properties Characterization of failure Theorem (Asymptotic composition rule) Let X ⊂ R d 1 , Y ⊂ R d 2 , and s : Y → X. The composition rule holds for s under the prevailing definition if and only if ∀ x ∗ ∈ X : ∃ y ∗ ∈ Y : s ( Y ≥ y ∗ ) ⊂ X ≥ x ∗ . (1) Subset-sum Since the subset-sum rule implies the composition rule, the former does not hold for the prevailing definition either. 76 / 101

  46. Algorithm analysis Definition O -notation An example of failure Prevailing definition Characterization of failure Implied properties Characterization of failure Theorem (Asymptotic composition rule) Let X ⊂ R d 1 , Y ⊂ R d 2 , and s : Y → X. The composition rule holds for s under the prevailing definition if and only if ∀ x ∗ ∈ X : ∃ y ∗ ∈ Y : s ( Y ≥ y ∗ ) ⊂ X ≥ x ∗ . (1) Subset-sum Since the subset-sum rule implies the composition rule, the former does not hold for the prevailing definition either. Subset-sum or composition Actually, assuming the other properties, the composition rule and the subset-sum rule are equivalent. 77 / 101

  47. Algorithm analysis O -notation Prevailing definition Implied properties Implied properties 78 / 101

  48. Algorithm analysis O -notation Prevailing definition Implied properties Implied properties More properties The following properties are implied by the primitive properties. 79 / 101

  49. Algorithm analysis O -notation Prevailing definition Implied properties Implied properties More properties The following properties are implied by the primitive properties. Implied properties 80 / 101

  50. Algorithm analysis O -notation Prevailing definition Implied properties Implied properties More properties The following properties are implied by the primitive properties. Implied properties Monotonicity: O X ( O X ( f )) ⊃ O X ( f ) 81 / 101

  51. Algorithm analysis O -notation Prevailing definition Implied properties Implied properties More properties The following properties are implied by the primitive properties. Implied properties Monotonicity: O X ( O X ( f )) ⊃ O X ( f ) Idempotence: O X ( O X ( f )) = O X ( f ) 82 / 101

  52. Algorithm analysis O -notation Prevailing definition Implied properties Implied properties More properties The following properties are implied by the primitive properties. Implied properties Monotonicity: O X ( O X ( f )) ⊃ O X ( f ) Idempotence: O X ( O X ( f )) = O X ( f ) Membership rule: f ∈ O X ( g ) ⇔ O X ( f ) ⊂ O X ( g ) 83 / 101

  53. Algorithm analysis O -notation Prevailing definition Implied properties Implied properties More properties The following properties are implied by the primitive properties. Implied properties Monotonicity: O X ( O X ( f )) ⊃ O X ( f ) Idempotence: O X ( O X ( f )) = O X ( f ) Membership rule: f ∈ O X ( g ) ⇔ O X ( f ) ⊂ O X ( g ) Bounded translation-invariance: ( ∃ β ∈ R > 0 : f ≥ β ) ⇒ O X ( f + α ) = O X ( f ) 84 / 101

  54. Algorithm analysis O -notation Prevailing definition Implied properties Implied properties More properties The following properties are implied by the primitive properties. Implied properties Monotonicity: O X ( O X ( f )) ⊃ O X ( f ) Idempotence: O X ( O X ( f )) = O X ( f ) Membership rule: f ∈ O X ( g ) ⇔ O X ( f ) ⊂ O X ( g ) Bounded translation-invariance: ( ∃ β ∈ R > 0 : f ≥ β ) ⇒ O X ( f + α ) = O X ( f ) Positive homogenuity: α O X ( f ) = O X ( α f ) 85 / 101

  55. Algorithm analysis O -notation Prevailing definition Implied properties Implied properties More properties The following properties are implied by the primitive properties. Implied properties Monotonicity: O X ( O X ( f )) ⊃ O X ( f ) Idempotence: O X ( O X ( f )) = O X ( f ) Membership rule: f ∈ O X ( g ) ⇔ O X ( f ) ⊂ O X ( g ) Bounded translation-invariance: ( ∃ β ∈ R > 0 : f ≥ β ) ⇒ O X ( f + α ) = O X ( f ) Positive homogenuity: α O X ( f ) = O X ( α f ) Positive power-homogenuity: O X ( f ) α = O X ( f α ) 86 / 101

  56. Algorithm analysis O -notation Prevailing definition Implied properties Implied properties More properties The following properties are implied by the primitive properties. Implied properties Monotonicity: O X ( O X ( f )) ⊃ O X ( f ) Idempotence: O X ( O X ( f )) = O X ( f ) Membership rule: f ∈ O X ( g ) ⇔ O X ( f ) ⊂ O X ( g ) Bounded translation-invariance: ( ∃ β ∈ R > 0 : f ≥ β ) ⇒ O X ( f + α ) = O X ( f ) Positive homogenuity: α O X ( f ) = O X ( α f ) Positive power-homogenuity: O X ( f ) α = O X ( f α ) Additive consistency: uO X ( f ) + vO X ( f ) = ( u + v ) O X ( f ) 87 / 101

  57. Algorithm analysis O -notation Prevailing definition Implied properties Implied properties More properties The following properties are implied by the primitive properties. Implied properties Monotonicity: O X ( O X ( f )) ⊃ O X ( f ) Idempotence: O X ( O X ( f )) = O X ( f ) Membership rule: f ∈ O X ( g ) ⇔ O X ( f ) ⊂ O X ( g ) Bounded translation-invariance: ( ∃ β ∈ R > 0 : f ≥ β ) ⇒ O X ( f + α ) = O X ( f ) Positive homogenuity: α O X ( f ) = O X ( α f ) Positive power-homogenuity: O X ( f ) α = O X ( f α ) Additive consistency: uO X ( f ) + vO X ( f ) = ( u + v ) O X ( f ) Multiplicative consistency: O X ( f ) u O X ( f ) v = O X ( f ) u + v 88 / 101

  58. Algorithm analysis O -notation Prevailing definition Implied properties Implied properties More implied properties 89 / 101

  59. Algorithm analysis O -notation Prevailing definition Implied properties Implied properties More implied properties Maximum-consistency: max( O X ( f ) , O X ( f )) = O X ( f ) 90 / 101

  60. Algorithm analysis O -notation Prevailing definition Implied properties Implied properties More implied properties Maximum-consistency: max( O X ( f ) , O X ( f )) = O X ( f ) Restriction rule: ( O X ( f ) | D ) = O D ( f | D ) 91 / 101

  61. Algorithm analysis O -notation Prevailing definition Implied properties Implied properties More implied properties Maximum-consistency: max( O X ( f ) , O X ( f )) = O X ( f ) Restriction rule: ( O X ( f ) | D ) = O D ( f | D ) Additivity: O X ( f ) + O X ( g ) = O X ( f + g ) 92 / 101

  62. Algorithm analysis O -notation Prevailing definition Implied properties Implied properties More implied properties Maximum-consistency: max( O X ( f ) , O X ( f )) = O X ( f ) Restriction rule: ( O X ( f ) | D ) = O D ( f | D ) Additivity: O X ( f ) + O X ( g ) = O X ( f + g ) Maximum rule: max( O X ( f ) , O X ( g )) = O X (max( f , g )) 93 / 101

  63. Algorithm analysis O -notation Prevailing definition Implied properties Implied properties More implied properties Maximum-consistency: max( O X ( f ) , O X ( f )) = O X ( f ) Restriction rule: ( O X ( f ) | D ) = O D ( f | D ) Additivity: O X ( f ) + O X ( g ) = O X ( f + g ) Maximum rule: max( O X ( f ) , O X ( g )) = O X (max( f , g )) Summation rule: O X ( f + g ) = O X (max( f , g )) 94 / 101

  64. Algorithm analysis O -notation Prevailing definition Implied properties Implied properties More implied properties Maximum-consistency: max( O X ( f ) , O X ( f )) = O X ( f ) Restriction rule: ( O X ( f ) | D ) = O D ( f | D ) Additivity: O X ( f ) + O X ( g ) = O X ( f + g ) Maximum rule: max( O X ( f ) , O X ( g )) = O X (max( f , g )) Summation rule: O X ( f + g ) = O X (max( f , g )) Maximum-sum rule: max( O X ( f ) , O X ( g )) = O X ( f ) + O X ( g ) 95 / 101

  65. Algorithm analysis O -notation Prevailing definition Implied properties Implied properties More implied properties Maximum-consistency: max( O X ( f ) , O X ( f )) = O X ( f ) Restriction rule: ( O X ( f ) | D ) = O D ( f | D ) Additivity: O X ( f ) + O X ( g ) = O X ( f + g ) Maximum rule: max( O X ( f ) , O X ( g )) = O X (max( f , g )) Summation rule: O X ( f + g ) = O X (max( f , g )) Maximum-sum rule: max( O X ( f ) , O X ( g )) = O X ( f ) + O X ( g ) Injective composition rule: O X ( f ) ◦ s = O Y ( f ◦ s ) ( s injective) 96 / 101

  66. Algorithm analysis O -notation Prevailing definition Implied properties Implied properties More implied properties Maximum-consistency: max( O X ( f ) , O X ( f )) = O X ( f ) Restriction rule: ( O X ( f ) | D ) = O D ( f | D ) Additivity: O X ( f ) + O X ( g ) = O X ( f + g ) Maximum rule: max( O X ( f ) , O X ( g )) = O X (max( f , g )) Summation rule: O X ( f + g ) = O X (max( f , g )) Maximum-sum rule: max( O X ( f ) , O X ( g )) = O X ( f ) + O X ( g ) Injective composition rule: O X ( f ) ◦ s = O Y ( f ◦ s ) ( s injective) Subset-sum rule: � � �� � f ∈ O Y ( g ) ⇒ x �→ � y ∈ S ( x ) f ( y ) ∈ O X y ∈ S ( x ) g ( y ) 97 / 101

  67. Algorithm analysis O -notation Prevailing definition Implied properties Prevailing definition The prevailing definition fulfills all of the implied properties, except for the subset-sum rule, and the injective composition rule. 98 / 101

  68. Algorithm analysis O -notation Prevailing definition Implied properties Relation definitions Given the O -notation O X : F X → P ( F X ), we define the relations � , � , ≺ , ≻ , ≈ ⊂ ( F X × F X ) such that g � f ⇔ g ∈ O X ( f ) , g � f ⇔ f ∈ O X ( g ) , g ≺ f ⇔ f �∈ O X ( g ) and g ∈ O X ( f ) , (2) g ≻ f ⇔ f ∈ O X ( g ) and g �∈ O X ( f ) , g ≈ f ⇔ f ∈ O X ( g ) and g ∈ O X ( f ) , for all f , g ∈ F X . 99 / 101

  69. Algorithm analysis O -notation Prevailing definition Implied properties Relation definitions Using these relations, we define the traditional related notations Ω X , o X , ω X , Θ X : F X → P ( F X ) such that Ω X ( f ) := { g ∈ F X : g � f } , o X ( f ) := { g ∈ F X : g ≺ f } , (3) ω X ( f ) := { g ∈ F X : g ≻ f } , Θ X ( f ) := { g ∈ F X : g ≈ f } , for all f ∈ F X . 100 / 101

Recommend


More recommend