Exercise

Compare Growth Against Encoded Input Length

Rank mixed growth rates and distinguish a number from its binary encoding length.

Problem

Let an input contain a positive integer NN in binary, so the numeric field has length n=⌈log⁡2(N+1)⌉n=\lceil\log_2(N+1)\rceil. Rank

(log⁡N)4,N1/3,2log⁡N,Nlog⁡N,2N(\log N)^4,\quad N^{1/3},\quad 2^{\sqrt{\log N}},\quad N\log N,\quad 2^N

by eventual growth. Then classify each bound as polynomial, superpolynomial, or exponential as a function of the actual input length nn. Prove every non-obvious comparison rather than relying on names.

Prerequisites

Know the unit definitions and how resources are measured against encoded input length. Distinguish a conditional theorem, a reduction, and an algorithm.

Hint 1

Substitute N=2Θ(n)N=2^{\Theta(n)} only after ranking the functions of NN.

Hint 2

Take logarithms when comparing positive exponentials.

Hint 3

To compare 2log⁡N2^{\sqrt{\log N}} with powers of NN, write Nc=2clog⁡NN^c=2^{c\log N}.

Full solution

Put L=log⁡2NL=\log_2 N. Taking logarithms where appropriate gives the exponent scales 4log⁡L4\log L, L\sqrt L, L/3L/3, L+log⁡LL+\log L, and NN. Since log⁡L=o(L)\log L=o(\sqrt L), L=o(L)\sqrt L=o(L), and L/3<L+log⁡LL/3<L+\log L, the eventual order is

(log⁡N)4≪2log⁡N≪N1/3≪Nlog⁡N≪2N.(\log N)^4 \ll 2^{\sqrt{\log N}}\ll N^{1/3}\ll N\log N\ll 2^N.

For example,

2LL4=2L−4log⁡L→∞,2LNε=2L−εL→0\frac{2^{\sqrt L}}{L^4}=2^{\sqrt L-4\log L}\to\infty, \qquad \frac{2^{\sqrt L}}{N^\varepsilon}=2^{\sqrt L-\varepsilon L}\to0

for every fixed ε>0\varepsilon>0. Thus the second expression is larger than every fixed polylogarithm in NN but smaller than every positive power of NN.

Now measure against the encoded length. Because NN lies between 2n−12^{n-1} and 2n−12^n-1, replacing NN by 2Θ(n)2^{\Theta(n)} preserves the relevant classes. We obtain

(log⁡N)4=Θ(n4),(\log N)^4=\Theta(n^4),

which is polynomial in the input length. Next,

2log⁡N=2Θ(n).2^{\sqrt{\log N}}=2^{\Theta(\sqrt n)}.

This is superpolynomial because for every constant kk, n−klog⁡n→∞\sqrt n-k\log n\to\infty, so 2n/nk→∞2^{\sqrt n}/n^k\to\infty. It is subexponential because n=o(n)\sqrt n=o(n).

The remaining three become

N1/3=2Θ(n),Nlog⁡N=2Θ(n)Θ(n)=2Θ(n),N^{1/3}=2^{\Theta(n)},\qquad N\log N=2^{\Theta(n)}\Theta(n)=2^{\Theta(n)},

and

2N=22Θ(n).2^N=2^{2^{\Theta(n)}}.

The first two are single-exponential in the encoded input length, whereas the last is double-exponential. The polynomial/exponential labels therefore depend on the declared size measure. Calling an O(N)O(N) algorithm polynomial is correct only when NN symbols are explicitly present; it is generally exponential when NN is a binary value.

All conclusions tolerate the ceiling in nn and a constant-base change of logarithm. Those changes multiply logarithms or exponents by constants and do not alter eventual domination or the classifications above.

Checkpoints

Check both logical directions, halting of every relevant branch, and that output length and construction time are polynomial in the encoded input length.

Common mistakes

  • Ranking before fixing the size measure.
  • Calling 2n2^{\sqrt n} polynomial because its exponent is sublinear.
  • Treating 2N2^N as merely single-exponential in log⁡N\log N.

Sources and verification

  • Merged summary, pp. 8-13
  • 2026 transcript 1
  • Sipser 3e, sec. 7.1
  • Catalog mapping: data/exercises.json; statements and solutions are independently written; personal submissions are non-authoritative.

Provenance and confidence

The exercise is an original synthesis. Confidence reflects verification of the mathematical claim against the textbook sources listed above; course sources are used only where direct coverage is identified.