From 4a90d7e9bb7d24bfddd505d8445a7803b399fa97 Mon Sep 17 00:00:00 2001 From: Succ <33795198+DevDoggo@users.noreply.github.com> Date: Mon, 27 Nov 2017 15:15:07 +0100 Subject: [PATCH] Added english answer to 3.1-4 --- C03-Growth-of-Functions/3.1.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/C03-Growth-of-Functions/3.1.md b/C03-Growth-of-Functions/3.1.md index bad21d46..1f172702 100644 --- a/C03-Growth-of-Functions/3.1.md +++ b/C03-Growth-of-Functions/3.1.md @@ -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