且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

寻找谐波系列的大O

更新时间:2022-05-07 23:23:51

根据微积分中的一个简单事实,很容易做到这一点:

This follows easily from a simple fact in Calculus:

我们有以下不等式:

在这里我们可以得出结论,S = 1 + 1/2 + ... + 1/n都是Ω(log(n))和O(log(n)),因此它是Ɵ(log(n) ),实际上边界是紧密的.

Here we can conclude that S = 1 + 1/2 + ... + 1/n is both Ω(log(n)) and O(log(n)), thus it is Ɵ(log(n)), the bound is actually tight.