GateAI
Asymptotic Analysis

GATE CSE 2012 · Q18

MCQ1 markEasy

Time

Let W(nn) and A(nn) denote respectively, the worst case and average case running time of an algorithm executed on an input of size nn. Which of the following is ALWAYS TRUE?

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: C) A(n) = O (W(n))

Asymptotic Analysis

By definition, the worst-case running time W(n)W(n) represents the maximum time taken by the algorithm over all possible inputs of size nn, while the average-case running time A(n)A(n) represents the expected running time over a probability distribution of inputs of size nn.

Since the average cannot exceed the maximum for any input of size nn:

A(n)≤W(n)for all nA(n) \le W(n) \quad \text{for all } n

Hence, W(n)W(n) is an asymptotic upper bound for A(n)A(n):

A(n)=O(W(n))A(n) = O(W(n))

Therefore, option C is always true.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Asymptotic Analysis previous year question is Q18 of the GATE CSE 2012 paper. Find more GATE CSE PYQs on Asymptotic Analysis in Algorithms, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Asymptotic Analysis PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Asymptotic Analysis in GATE CSE

Asymptotic Analysis has 31 GATE CSE PYQs across 19 papers from 2011 to 2026. 15 of them are 1-mark MCQs like this one, and it is the only one in GATE CSE 2012.

How GATE tests Asymptotic Analysis

More from GATE CSE 2012

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2012 · Q18 · MCQ

Let W(n) and A(n) denote respectively, the worst case and average case running time of an algorithm executed on an input of size n. Which of the following is ALWAYS TRUE?

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.