Big O Notation Of Exponential Functions

后端 未结 3 1196
庸人自扰
庸人自扰 2021-02-07 08:09

I have noticed that big-O of 1000n or 10n is the same thing as O(n), but big-O of 2^n and 3^n are different: O(2^n) and O(3^n), what I don\'t get is why can\'t we ignore the con

3条回答
  •  误落风尘
    2021-02-07 09:05

    Because there is no constant value of k that satisfies the inequality 3^n <= k * 2^n for arbitrarily large n. Thus f(n) = 3^n is not a member of O(2^n).

    See http://en.wikipedia.org/wiki/Big_O_notation#Family_of_Bachmann.E2.80.93Landau_notations.

提交回复
热议问题