Are the following TRUE or FALSE. explain
n2 = O(n2)
n3 = O(n2)
n log n = O(n2)
n2 = O(n log2 n)
1
Expert's answer
2016-12-02T08:35:17-0500
Answer on Question #63787 – Math – Algorithms | Quantitative Methods
Question
Are the following TRUE or FALSE. Explain
n2=O(n2)n3=O(n2)nlogn=O(n2)n2=O(nlog2n)
Solution
a) n2=O(n2)
**TRUE.** We can see this if we set c=1, then n2≤cn2=n2 for all n≥1.
Thus, the definition of big-0 holds for c=1 and n0=1.
b) n3=O(n2)
**FALSE.** For it to be true, we would need that there exist positive constants c and n0 such that n3≤cn2 for all n≥n0. By dividing both sides by n2, we see that "n3≤cn2 for all n≥n0" is true if and only if "n≤c for all n≥n0" is true, but clearly there are no constants c and n0 for which the last statement is true.
c) nlogn=O(n2)
**TRUE.** Because ln(1+x)≤x for all x>−1, hence ln(1+x)≤(x+1)−1<2(x+1).
Therefore, logn=O(n). There exist positive constants c and n0 such that logn≤cn for all
n≥n0. Multiplying both sides by n gives nlogn≤cn2 for all n≥n0 for the same positive constants c and n0, so nlogn=O(n2).
d) n2=O(nlog2n)
**FALSE.** First, note that n2=O(nlog2n) if and only if there exist positive constants c and n0 such that n2≤cnlog2n for all n≥n0, which holds if and only if
nlog2nn2 for all n≥n0
By cancelling out the n from the numerator and the denominator, we can rewrite expression in (1) as
log2nn≤c for all n≥n0.
Writing n=n21n21, we see that the last statement is true if and only if
[lognn21]2≤c for all n≥n0.
Because we know that logn=o(n21) (in other words, limn→∞nlogn=0), we have that
lognn21→∞ as n→∞.
So [lognn21]2≤c cannot be true for all n≥n0 and for a constant c.
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments