GATE 2012 CS (CS1) – Question 28
W(n) and A(n) are worst-case and average running times on inputs of size n. Which always holds?
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (C) $A(n)=O(W(n))$
Explanation
An average over inputs cannot exceed the maximum running time on those inputs, so A(n)≤W(n) and A(n)=O(W(n)), C. Equality in Θ need not hold, while little-o fails when average and worst case have the same order.
More Asymptotic Analysis and Time/Space Complexity questions
- GATE 2013 CS (CS1) Q40
- GATE 2013 CS (CS1) Q41
- GATE 2011 CS (CS1) Q47
- GATE 2010 CS (CS1) Q22
- GATE 2015 CS (CS2) Q16
- GATE 2015 CS (CS2) Q26
All Asymptotic Analysis and Time/Space Complexity questions →