Discussion
If \(f(n) = 4n^{2}\) for all n and \(g(n) = n\) if \(n \gt 100\) and \(n^{3}\) if \(n \le 100\), then :
Answer: A
The answer is \(g(n)\) is of \(O(f(n))\).
Big-O describes behaviour for large n. For \(n \gt 100\), \(g(n) = n\) while \(f(n) = 4n^{2}\), and \(n \le 4n^{2}\) for all such n, so \(g(n) = O(f(n))\). The definition of \(n^{3}\) for small n does not matter, because only values beyond some threshold count.
For the same reason \(f(n) = 4n^{2}\) grows faster than \(g(n) = n\), so \(f(n)\) is not \(O(g(n))\), \(g(n)\) is not \(\Omega(f(n))\), and hence not \(\theta(f(n))\).
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development