我想证明一些渐近符号。并想要获取c1,c2,n的值
证明 f(n)= n ^ 4 + 3n ^ 3 =θ(n ^ 4) f(n)= n ^ 4 + 3n ^ 3不等于θ(n ^ 3)
如何获取C1,C2和n的值?
答案 0 :(得分:0)
第一个
n^4 + 3n^3 = Theta(n^4)
Guess c1 = 1/2 and c2 = 2.
Find n0 that works.
(1/2)n^4 <= n^4 + 3n^3
0 <= (1/2)n^4 + 3n^3
0 <= (1/2)n + 3
-6 <= n
Any choice for n0 works there.
n^4 + 3n^3 <= 2n^4
3 <= n
The smallest choice for n0 is 3.
combined, guess n0 = 3.
Proof is by induction
Base: (1/2)3^4 <= 3^4+(3)3^3 <= (2)3^4
Hypothesis: true up to k
Step:
(1/2)(k+1)^4 <= (k+1)^4 + 3(k+1)^3 <= 2(k+1)^4
1/2(k+1) <= (k+1) + 3 <= 2(k+1)
(1/2)k + 1/2 <= (k+3)+1 <= 2k + 2
From hypothesis (1/2)k <= k+3 <= 2k
also 1/2 <= 1 <= 2
So checks out.
第二个
n^4 + 3n^3 is not Theta(n^3)
Proof of first one is proof of this too
Can't be theta of funcs that aren't theta of each other
Otherwise, it is Omega(n^3)
Show it's not O(n^3)
Assume it were
Then there exist c, n0 such that
n^4 + 3n^3 <= cn^3 for n >= n0
n + 3 <= c for n >= n0
but then for any constant c just choose n' > c - 3
this gives a contradiction
the only assumption was that f(n) = O(n^3)
must have been wrong