3 3 votes $f(n)=2n^2+ n log n$ $g(n)= \dfrac{n}{logn} + log^2n$ then $f(n)\times g(n)$ is: $n^2logn$ $\dfrac{n^3}{logn}$ $n^3log^2n$ $n^2log^2n$ Algorithms time-complexity algorithms + – sumit_kumar 595 views answer comment Share Follow Print See 1 comment 1 1 comment reply Kushagra Chatterjee commented Apr 30, 2018 reply Follow flag First is O(n^2) Second is O(n/logn) Reason log(n/logn) = log n - log(log n) = O (logn) Again log (log ^2 n) = 2 * log(logn) Now, log n > log (logn) asymptotically So, n/logn > log ^2 n asymptotically So, the answer is n^2 * n/logn = n^3 /logn 0 0 replyShare Please log in or register to add a comment.
1 1 vote $f(n) = 2n^2 + nlogn$ $2n^2 > nlogn$ $f(n)\approx 2n^2$ $g(n) = n/logn + log^2n$ $n/logn > log^2n$ put $n = 2^{16}$ $n/logn = 2^{16} / log 2^{16} = 2^{16} / 2^4 = 2^{12}$ $log^2n = log^2 \ 2^{16} = loglog2^{16} = 4$ $g(n)\approx n/logn$ $f(n)*g(n) \approx 2n^3/logn$ $n^3/logn$ pankaj_vir answered Apr 30, 2018 pankaj_vir comment Share Follow 0 reply Please log in or register to add a comment.