Skip to content

Commit

Permalink
Added english answer to 3.1-4
Browse files Browse the repository at this point in the history
  • Loading branch information
DevDoggo authored Nov 27, 2017
1 parent 26762d4 commit 4a90d7e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions C03-Growth-of-Functions/3.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ Is ![](http://latex.codecogs.com/gif.latex?2^{n+1}=O\(2^n\)?)Is![](http://latex.

(2)不成立,假设存在常数c使得2^(2*n)<=c*2^n,则有2*n<=lg c+n,即n<=lg c,并不存在一个常数c使得这个不等式对n成立。

English:
for f(n) = O(g(n)), the definition of O-notation is:
0 <= f(n) <= c(g(n)) for all n > n0.

(1) 2^n+1 = 2*2^n <= c*2^n. If c = 2, the inequality holds and we prove 2^n+1 = O(2^n) to be True! Answer: Yes.

(2) 2^2n = (2^n)^2. There is no possible constant c that can make 2^n into (2^n)^2. Thus, 2^2n =/= O(2^n). Answer: No.


### Exercises 3.1-5
***
Prove Theorem 3.1. *For any two functions f(n) and g(n), we have f(n) = Θ(g(n)) if and only if f(n) = O(g(n)) and
Expand Down

0 comments on commit 4a90d7e

Please sign in to comment.