简体   繁体   English

如何评估以下包含渐近符号的表达式?

[英]How to evaluate below expression involving asymptotic notations?

If 如果

f(n)=ϴ(n),g(n)=ϴ(n) 

and

h(n)=Ω(n) 

Then how to evaluate f(n)g(n)+h(n) ? 那么如何评估f(n)g(n)+h(n)呢?

I approached like f(n)g(n)=ϴ(n^2) , now what will be Ω(n)+ϴ(n^2) . 我接近f(n)g(n)=ϴ(n^2) ,现在将是Ω(n)+ϴ(n^2) According to me the lower bound of this expression should be Ω(n) , and upper bound should be O(n^2) , but what should be the tightest bound for this expression? 根据我的说法,该表达式的下限应该是Ω(n) ,上限应该是O(n^2) ,但是该表达式的最严格的边界应该是什么?

For some constants k1, k2, l1, l2 and m > 0 , we have: 对于某些常数k1, k2, l1, l2 and m > 0 ,我们有:

f(n) is ϴ(n)

    => k1*n < f(n) < k2*n, for n sufficiently large

g(n) is ϴ(n)

    => l1*n < g(n) < g2*n, for n sufficiently large

h(n) is Ω(n)

    => m*n < h(n), for n sufficiently large

Then, f(n)*h(n) : 然后, f(n)*h(n)

for f(n) * h(n): 

    k1*l1*n^2 < f(n)*g(n) < k2*l2*n^2, for n sufficiently large

So we can just write p(n) = f(n)*g(n) and use constants c1=k1*l1 and c2=k2*l2 , and we have: 因此,我们可以只写p(n) = f(n)*g(n)并使用常量c1=k1*l1c2=k2*l2 ,我们有:

p(n) (= f(n)*g(n)) is in ϴ(n^2), since

    c1*n^2 < p(n) < c2*n^2

Then, finally, what complexity does p(n) + h(n) have? 那么,最后, p(n) + h(n)有什么复杂度? We have: 我们有:

c1*n^2 + m*n < p(n) + h(n), for n sufficiently large

Since we never got an upper bound on h(n) , we can't really say anything regarding the upper bound on p(n) + h(n) . 由于我们永远都没有h(n)的上限,因此我们无法真正说出p(n) + h(n)的上限。 This is imperative: h(n) in Ω(n) only says that h(n) grows at least as fast as n (linear) asymptotically, but we don't know if this is a tight lower bound. 这势在必行: h(n) in Ω(n)中的h(n) h(n) in Ω(n)仅表示h(n) )渐近地增长至少与n (线性)一样快,但是我们不知道这是否是严格的下界。 It might be a very sloppy lower bound for a exponential time function. 对于指数时间函数,这可能是一个非常草率的下界。

Subsequently, we can only state something regarding the lower bound: 随后,我们只能声明有关下限的内容:

p(n) + h(n) = f(n)*g(n) + h(n) is in Ω(n^2)

Ie, f(n)*g(n) + h(n) grows at least as n^2 (ie, in Ω(n^2) ) asymptotically. 即, f(n)*g(n) + h(n) )渐近地至少随着n^2 (即,以Ω(n^2) )增长。


A note as to your approach: you are right (as shown above) that f(n)g(n) is in ϴ(n^2) , but note that this implies that a tight lower bound of f(n)g(n) + h(n) can never be less than k*n^2 : ie, f(n)g(n) + h(n) in Ω(n^2) is a given, and a better (tigher) lower bound than what your suggested; 关于您的方法的注释:您正确(如上所示) f(n)g(n) is in ϴ(n^2) ,但是请注意,这意味着f(n)g(n) + h(n)永远不能小于k*n^2 :即,给定f(n)g(n) + h(n) in Ω(n^2)中的f(n)g(n) + h(n) in Ω(n^2)更好,更好(tigher)下限比您的建议低; Ω(n) . Ω(n) Recall that the fastest growing terms dominate asymptotic behavior. 回想一下,增长最快的术语主导着渐近行为。

For reference, see eg 供参考,例如

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

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