This is not homework. I have the solution but it's not what I'm getting. I know there are multiple solutions to the problem but I want to make sure that I'm not missing anything.
The question is as follows:
Prove that 2$n^2$ - 4n + 7 = Θ ($n^2$). give the values of the constants and show your work.
Here is how I approached the problem:
From the definition of Θ(g(n)):
0 ≤ C1$n^2$ ≤ 2$n^2$ - 4n + 7 ≤ C2$n^2$
Divide the inequality by the largest order n-term. (This is the only way I know how to solve these equations.)
0 ≤ C1 ≤ 2 - (4/n - 7/$n^2$) ≤ C2
Split the problem into two parts: LHS and RHS.
We start with the RHS:
Find constant C2 that will satisfy
0 ≤ 2 - (4/n - 7/$n^2$) ≤ C2
n=1, (2 - (4/1 - 7/$1^2$)) = 5
n=2, (2 - (4/2 - 7/$2^2$)) = 7/4
n=3, (2 - (4/3 - 7/9)) = 13/9
We choose C2 to be 2, n≥2 to satisfy the RHS.
LHS: we try to find a constant that will satisfy
0 ≤ C1 ≤ 2 - (4/n - 7/$n^2$)
From above, we know that after n=2, the equation approaches 2 as n grows larger, so if we pick a constant that is less than 2 then it should satisfy the LHS.
We choose C1 to be 1. For n, choosing 1 would satisfy the left hand side, but since the RHS needs n≥2, we stick with it.
So the constants that prove 2$n^2$ - 4n + 7 = Θ ($n^2$) are
C1 = 1 , C2 = 2 , n≥2
The given solution to this problem chooses n≥4, but I'm not sure why. It seems that n≥2 would work fine. Am I wrong somewhere?
If I'm not wrong, if I would have picked C1 to also be 2, wouldn't that also satisfy the left hand side since the inequality allows it to be ≤?