0

I would to prove the following example:

n^k = O (c^n) for every k and c>1

It is noticeable that the polynomial function grows faster than exponential function. We try to find k0 > 0 satisfying the condition

fn > = k0 * g(n)

Than

n^k <= k0 * c^n
log(n^k) <= log (k0 * c^n)
log(n^(k/n)) <= log (k0 * c)
k0 >= 1/c*n^(k/n)

So, k0 > 0, positive and small enough, while the value of c is irrelevant... Is it OK?

Ian
  • 1
  • Without taking the time to write it out, step 3 bothers me, I am not convinced you can do that with logs. (note- ever read Lamport's paper on proofs? it's worth a read). – Paul Nathan Oct 05 '10 at 20:50
  • Paul is correct, you can't do that with logs in step 3. log(c^n) = n * log (c). Therefore step 3 should be: (log(n^k))/n <= log (k0 * c) – mpd Oct 05 '10 at 21:00
  • Thanx, there is a mistake in step 3, I wrote it fast and did not check it. – Ian Oct 05 '10 at 21:17

1 Answers1

0
log(n^k) <= log (k0 * c^n)
k log n <= log k0 + n log c

k log n - n log c <= log k0
log (n^k) - log (c^n) <= log k0
log ((n^k) / (c^n)) <= log k0 | expo
(n^k) / (c^n) <= k0
n^k <= k0 * c^n

=> n^k = O(c^n)

Your step 3 seems wrong, at least I don't see where you got it from. Your conclusion also doesn't seem to prove what was asked for.

IVlad
  • 43,099
  • 13
  • 111
  • 179