Please could someone advise on the two questions below. I have to expand the functions first. Admittedly, I have a weak understanding of logs. Then I try to ascertain a Big-O estimate. Any help would be appreciated. 1.) (nlogn + n^2)(n^3 +2) Expanding the above.. Is it correct to say nlogn(n^3) + nlogn(2) + n^2(n^3) + n^2(2) ==> n^3 (due to the cancellation laws) +2nlogn + n^5 +2n^2 ==> therefore a Big-O estimate would be n^5 ?? 2.) nlog(n^2 +1) + n^2logn expanding the above ..is it correct to say 2nlogn + nlogn + n^2logn As n
expanding functions with logs to find Big-O estimate
1
$\begingroup$
asymptotics
logarithms
1 Answers
2
On the first problem, the dominant term is $n^5$, so it's $O(n^5)$. On the second one, your dominant termis $n^2\log(n)$ so it is $O(n^2\log(n))$.
-
0thx ncmathsadist – 2012-10-08