GATE / CS ARCHIVE

GATE CSE 1994 / QUESTION 1.23

Piecewise functions and multiple big-O answers

Algorithms · Asymptotic Analysis & Recurrences · Full GATE CSE 1994 paper

GATE 1994, Q1.23 MCQ
Report issue

Asymptotic Analysis & Recurrences

Question 1.23, GATE 1994: Eventually g1(n)=n² and g2(n)=n³; below fixed cutoffs the formulas differ. Assess A g1=O(g2), B g1=O(n³), C g2=O(g1) in GateForum but g2=O(g2) in GFG, D g2=O(n).
Tap to enlarge
Your answer
Answer & solution

Answer: A, B, C (no official key was published)

Big-O ignores any fixed finite prefix, so only the eventual n² and n³ behavior matters. Since n²≤n³ for n≥1, both A and B are true. C instead compares g2 with itself and is trivially true. Thus the paper supports a unique single-choice answer.

Original paper, page 3