简体   繁体   English

渐近上界与紧界

[英]Asymptotic Upper Bounds vs Tight Bounds

我在 CLRS (Introduction to Algorithms) 中遇到过这样一句话:“区分渐近上界和渐近紧界是算法文献中的标准”虽然我理解文本想要传达的本质,但会更好地理解如果我得到一个说明差异的例子。

O-notation gives us asymptotic upper bound. O 符号为我们提供了渐近上限。
Consider a function f(x), We can define a function g(x), such that f(x) = O(g(x)).考虑一个函数 f(x),我们可以定义一个函数 g(x),使得 f(x) = O(g(x))。
Here g(x) is the asymptotic upper bound of f(x), meaning for all values of x >= c, f(x) grows at the same rate or slower than g(x) as x increases.这里 g(x) 是 f(x) 的渐近上限,这意味着对于 x >= c 的所有值,随着 x 的增加,f(x) 以相同或慢于 g(x) 的速度增长。
Another thing to be noticed is that if h(x) is the asymptotic upper bound of g(x) then it could easily be concluded that h(x) is also the asymptotic upper bound of f(x).另一件要注意的事情是,如果 h(x) 是 g(x) 的渐近上界,那么可以很容易地得出结论,h(x) 也是 f(x) 的渐近上界。 After all, if f(x) can only grow at an equal or smaller rate than g(x), it is bound to grow at an equal of smaller rate than h(x) as g(x) cannot grow at any faster than h(x).毕竟,如果 f(x) 只能以等于或小于 g(x) 的速度增长,那么它必然会以小于 h(x) 的速度增长,因为 g(x) 不能以任何比 g(x) 更快的速度增长h(x)。

Eg.例如。 if f(x) = 10x + 2, g(x) = 12x + 1 and h(x) = 2x^2.如果 f(x) = 10x + 2,g(x) = 12x + 1 且 h(x) = 2x^2。

We can safely say that f(x) = O(g(x)), g(x) = O(h(x)) and f(x) = O(h(x)).我们可以有把握地说 f(x) = O(g(x))、g(x) = O(h(x)) 和 f(x) = O(h(x))。
Here g(x) is said to be asymptotic tight upper bound and h(x) is said to be the asymptotic upper bound of f(x).这里 g(x) 被称为渐近紧上界,h(x) 被称为 f(x) 的渐近上界。

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

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