STQC-NIELIT SC-B 2021
November 29, 2023Data-Communication
November 29, 2023Question 9754 – Time-Complexity
Let f(n) = n2logn and g(n) = n(logn)10 be two positive functions of n. Which of the following statements is correct?
Correct Answer: B
Question 13 Explanation:
f(n) = n2logn; g(n) = n(logn)10
Cancel nlogn from f(n), g(n)
f(n) = n; g(n) = (logn)9
n is too large than (logn)9
So f(n)! = O(g(n)) and g(n) = O(f(n))
Cancel nlogn from f(n), g(n)
f(n) = n; g(n) = (logn)9
n is too large than (logn)9
So f(n)! = O(g(n)) and g(n) = O(f(n))
f(n) = O(g(n) and g(n) ≠ O(f(n))
g(n) = O(f(n) and f(n) ≠ O(g(n))
f(n) ≠ O(g(n)) and g(n) ≠ O(f(n))
f(n) = O(g(n)) and g(n) = O(f(n))