简体   繁体   English

证明复杂性证明的顺序如果 f(n) 是 Ω(n∗g(n)),那么 f(n) 不是 O(g(n))

[英]Proving Order of complexity proofs if f(n) is Ω(n∗g(n)), then f(n) is not O(g(n))

Show that if f(n) is Ω(n∗g(n)), then f(n) is not O(g(n))证明如果 f(n) 是 Ω(n∗g(n)),那么 f(n) 不是 O(g(n))

Assume f(n) is Ω(n ∗ g(n)) and f(n) is O(g(n)).假设 f(n) 是 Ω(n ∗ g(n)) 并且 f(n) 是 O(g(n))。 Need to show a contradiction.需要表现出矛盾。 The approach is to find a value of n that violates the definitions.该方法是找到违反定义的 n 值。 Proof: f(n) is Ω(n ∗ g(n)) implies there exists positive values C and k such that n > k implies f(n) ≥ C ∗ n ∗ g(n).证明:f(n) 是 Ω(n ∗ g(n)) 意味着存在正值 C 和 k,使得 n > k 意味着 f(n) ≥ C ∗ n ∗ g(n)。 f(n) is O(g(n)) implies there exists positive values C′ and k′ such that n > k′ implies f(n) ≤ C ∗ g(n). f(n) 是 O(g(n)) 意味着存在正值 C' 和 k' 使得 n > k' 意味着 f(n) ≤ C ∗ g(n)。

So what value of n violates the definition and how can I show a contradiction?那么 n 的什么值违反了定义,我该如何表现出矛盾呢?

Your approach to prove the statement by contradiction is possible.您通过矛盾证明该陈述的方法是可能的。 But first of all, you need to be a bit more precise:但首先,你需要更精确一点:

  1. f and g are positive non-decreasing functions on integers fg是整数上的正非递减函数
  2. C and C' are >= 0 CC' >= 0
  3. Your last implication should read C' * g(n) (as opposed to C * g(n) ).你的最后一个含义应该是C' * g(n) (而不是C * g(n) )。

So we start with:所以我们开始:

(a) There exist positive integers C , C' , k , k' such that for all n > k and n' > k' : (a) 存在正整数C , C' , k , k'使得对于所有n > kn' > k'

C * n * g(n) <= f(n) and f(n') <= C' g(n')

By chaining together your two implications and merging the two universal quantifiers into one (by noting that for all n > k and n' > k' implies for all n > max(k,k') ), you immediately get:通过将您的两个含义链接在一起并将两个全称量词合并为一个(注意for all n > k and n' > k'意味着for all n > max(k,k') ),您立即得到:

(b) There exist positive integers C , C' , k , k' such that for all n > max(k,k') : (b) 存在正整数C , C' , k , k'使得对于所有n > max(k,k')

C * n * g(n) <= C' g(n)

Dividing by g(n) on both sides, which is valid by assumption 1. above, yields the equivalent:在两边除以g(n) ,这对上面的假设 1 有效,产生等价物:

(c) There exist positive integers C , C' , k , k' such that for all n > max(k,k') : (c) 存在正整数C , C' , k , k'使得对于所有n > max(k,k')

C * n <= C'

This is equivalent to:这相当于:

(d) There exist positive integers C , C' , k , k' such that for all n > max(k,k') : (d) 存在正整数C , C' , k , k'使得对于所有n > max(k,k')

n <= C'/C

The last statement is equivalent to false.最后一条语句等价于 false。 This is a contradiction and hence the original statement is true.这是一个矛盾,因此最初的陈述是正确的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM