The asymptotic complexities of four functions are: f1(n) = 2n f2(n) = n3/2…

2023

The asymptotic complexities of four functions are:

  • f1(n) = 2n

  • f2(n) = n3/2

  • f3(n) = n log n

  • f4(n) = nlog n

Which option gives the functions in increasing order of asymptotic growth (lowest to highest)?

Answer: C. f3, f2, f4, f1Concept: To rank functions by asymptotic growth, compare their growth rates using limits of ratios, or equivalently compare the natural logarithms of the…

  1. A.

    f2, f3, f4, f1

  2. B.

    f1, f2, f3, f4

  3. C.

    f3, f2, f4, f1

  4. D.

    f3, f1, f2, f4

Attempted by 463 students.

Show answer & explanation

Correct answer: C

Concept: To rank functions by asymptotic growth, compare their growth rates using limits of ratios, or equivalently compare the natural logarithms of the functions (since log is monotonic increasing, ordering the logs orders the original positive, increasing functions). For functions of this shape the standard hierarchy is: a poly-log factor such as n log n grows slower than any fixed-degree polynomial nk (k > 1); a fixed-degree polynomial grows slower than a quasi-polynomial function such as nlog n; and nlog n itself grows slower than a true exponential function such as 2n, because log(nlog n) = (log n)2 grows far slower than log(2n) = n·ln 2.

Application:

  1. Compare f3(n) = n log n with f2(n) = n3/2 using the ratio (n log n) / n3/2 = (log n) / n1/2. As n → ∞, log n grows slower than n1/2, so this ratio → 0, meaning f3(n) is o(f2(n)): f3(n) grows slower than f2(n).

  2. Compare f2(n) = n3/2 with f4(n) = nlog n by taking logarithms: log f2(n) = (3/2) log n, while log f4(n) = (log n)2. Since (log n)2 eventually exceeds (3/2) log n for large n (as log n → ∞), log f4(n) > log f2(n), so f2(n) is o(f4(n)): f2(n) grows slower than f4(n).

  3. Compare f4(n) = nlog n with f1(n) = 2n by taking logarithms: log f4(n) = (log n)2, while log f1(n) = n · ln 2. Since (log n)2 is o(n) (a squared logarithm grows far slower than n itself), log f4(n) < log f1(n) for large n, so f4(n) is o(f1(n)): f4(n) grows slower than f1(n).

  4. Chaining these three results in sequence: f3(n) is o(f2(n)), f2(n) is o(f4(n)), and f4(n) is o(f1(n)). Together these give the growth ordering f3(n)f2(n)f4(n)f1(n).

Cross-check: Substituting a concrete large value, n = 106, gives: f3(n) ≈ 1.38 × 107, f2(n) = 109, f4(n)1083, and f1(n)10301,030. These magnitudes independently confirm the same ordering as the limit-based derivation above.

Result: The increasing order of asymptotic growth (lowest to highest) is n log n, then n3/2, then nlog n, then 2n — i.e. f3(n), f2(n), f4(n), f1(n).

Explore the full course: Iocl Engineers Officers Grade A Paper 2

Loading lesson…