Which of the given options provides the increasing order of complexity of functions f1, f2, f3 and f4:
f1(n) = 2^n
f2(n) = n^(3/2)
f3(n) = nLogn
f4(n) = n^(Logn)
Good solution:
- n < nlog(n)
- n^x < n^y if x < y
- n^x < c^n where c is a constant (polynomials will eventually grow slower than exponentials)
- log(n) < n
- c^n < n! < n^n where c is a constant
'Algorithms > Time Complexity' 카테고리의 다른 글
REC_CMPL3 (0) | 2018.10.14 |
---|---|
REC_CMPL2 (0) | 2018.10.14 |
GCD_CMPL (0) | 2018.10.12 |
CHOOSE1 (0) | 2018.10.12 |
LOOP_CMPL2 (0) | 2018.10.12 |