How to prove this statement of great notation?

How to prove it:

  • 4 n = O (8 n )
  • 8 n = O (4 n )?

So, what are the implications Cand n0in both cases?

+3
source share
2 answers

EDIT: I tried to clarify that a bit more ...

1. (. Big-O), C n0, 4 n <= C * 8 ​​ n n > n0. - 1, . ... , , :

f(n) = O(g(n))

, C n0 ,

|f(n)| <= C * |g(n)| for all n > n0

f (n) = 4 n g (n) = 8 n

4^n    <= C * 8^n
4^n    <= C * 2^n * 4^n
1      <= C * 2^n

, C 1 n0 1. - , 1 .

2. , - - , .
: C n0, , , C n0 ... ^^

+6

, :

log b (x y) = (y) log b (x)

, . , .;)

UPDATE:

, , - . , C n 0, .

+1

Source: https://habr.com/ru/post/1741775/


All Articles