I just realized that proving upper bounds and lower bounds are easy if you are given whether its true or false. However, coming across a3 I realized an issue that stumped me. When proving or disproving, I feel like the choice of c is given too much freedom and I feel like I'm able to disprove and prove both ways. For example,
5n^3 - 3n^2 + 2n + 3 is in Big O of 2n^3 - n^2 + n + 1
So proving this would mean that
/exists a c in the positive reals, /exists a b in the naturals, such that for any n in the naturals, n is greater or equal to B implies that 5n^3 - 3n^2 + 2n + 3 <= c(2n^3 - n^2 + n + 1) (where <= means less than or equal to)
Pick c = ___
Pick B = ___
Assume n in natural, s.t n >= B
5n^3 - 3n^2 + 2n + 3 <= 5n^3 + 2n + 3
5n^3 - 3n^2 + 2n <= 5n^3 + 2n # cancel 3 from each side, preserve inequality
5n^3 + 2n <= 5n^3 + 2n^3 = 7n^3
Now we must go the other way to prove that 2n^3 - n^2 + n + 1 >= 7n^3
2n^3 - n^2 + n + 1 >= 2n^3 -n^3 + n + 1
2n^3 - n^2 + n >= 2n^3 - n^3 + n # cancel 1 from each side
= n^3 + n >= c(n^3)
So we have that c(n^3) >= 7n^3, well if we choose c = 8, then our equality would hold true as long as
n >= 1, so B = 1.
Now if I wanted to disprove it, so we want to prove the negation of it
For any c in the positive reals, for any B in the naturals, there exists a n in the naturals such that n>= B and
5n^3 - 3n^2 + 2n + 3 > c(2n^3 - n^2 + n + 1)
Assume for any c in positive reals
Assume for any B in the naturals
Pick n = ___, s.t. n >= B
c(2n^3 - n^2 + n + 1) < c(2n^3 + n + 1)
2n^3 - n^2 + n < c(2n^3 + n) # subtract 1 from each side
< c(2n^3 + n^3)
= c(3n^3)
Now we work our way on the other side
5n^3 - 3n^2 + 2n + 3 > 5n^3 - 3n^3 + 2n + 3
= 2n^3 + 2n + 3
> 2n^3 + 2n
> 2n^3
So we've reduced it to
2n^3 > c(3n^3)
This inequality holds if we choose c = 1/3 and our n = 1 then our inequality holds.
So it seems as though I'm able to disprove/prove both but I know I've probably gone wrong somewhere in this problem.
Anyways, that's my thought on this problem solving session and I hope you guys enjoyed reading it.
Thanks!
No comments:
Post a Comment