Why are constants ignored in asymptotic analysis?

Why are constants ignored in asymptotic analysis?

+2
source share
3 answers

Constant factors are ignored, since runtime and memory consumption (two properties that are most often measured using O-notation) are much more difficult to reason when considering constant factors.

If we define U( f(n) )as the totality of all functions gfor which there Nis such that for all N > n: g(n) <= f(n)(i.e., the same as Owithout a constant factor), it is much more difficult to show that the running time of the algorithm is in U( f(n) )than O( f(n) ).

-, . CPU , , , .

: ( ). , , 64- , 32- . , : " C- O(23 * n) 32- Intel. O(42 * n) 64- " .

.

+1

- .

, n f (n) c > 0, , c f ( n) ( , c f ( n) < 1), , c = ½, . , c = 1/ 1000000, !

( : , ).

+1

http://www.cs.cornell.edu/courses/cs312/2004fa/lectures/lecture16.htm

( - ) , -

 n ^ 2  + k

, O - k, , n . n ^ 2 k - .

0

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


All Articles