Find witnesses (or not) I have just started learning Analysis of Algorithms and I came across these set of questions:


Find witnesses c and m such that rn+1 = O(rn) for r>1
Show that there are no witnesses for n2 = O(n)
From 2, deduce no witnesses for 22n = O(2n)


So, I have tackled some as:



rn+1 &le; rn+1
rn+1 &le; r.rn
rn+1 &le; (r+1).rn
Therefore, c = r + 1; m = 1


n2 &le; n2
No value for c satisfies the above inequality, therefore no witnesses (??)


22n &le; 22n
No value for c satisfies the above inequality, therefore no witnesses (??)


I am not sure how to go about the last 2.
Can anyone please tell me whether what I have done is correct?

Thanks.
Part 1 looks OK.

For part 2, to show no witnesses exist, you have to proceed by contradiction. Assume witnesses $c,m$ exist, so we have $n^2 \leq cn$ for all $n\geq m$. Now, to reach a contradiction, find at least one value of $n \geq m$ for which $n^2 &gt; cn$. The value for $n$ can be defined in terms of $c,m$. It shouldn't be too hard to find one.

For part 3, the text suggests to use 2. That is, to prove that if we had (by contradiction) witnesses for 3, we could derive from them some witnesses for 2. 

(Honestly, to me this way sounds harder than simply tackling 3 on its own, without exploiting 2. Maybe you were introduced to some theorem which can apply here to shorten the exercise? I have no idea.)