A mathematical instance
This small distinction fixes the scale of the entire running-time analysis. The machine works on the symbols of
Time counts local transitions
A computation is a sequence of configurations
If
Each transition reads one tape cell, may overwrite that cell, and moves the head by at most one position. This locality makes the step count concrete. A machine cannot inspect distant input without moving to it, and it cannot write
The input string is the yardstick
Fix an instance encoding and let
The worst-case complexity of
A numeric value
Changing from binary to decimal therefore changes the length only by a constant factor. By contrast,
For
Binary and unary instance encodings are not polynomially related when their numeric fields are unrestricted: unary may be exponentially longer than binary.
Knapsack opens the hidden range
Consider a 0-1-Knapsack instance of the 0-1-Knapsack profit-maximisation problem
and the standard dynamic programme with running time
Let
so the capacity dimension contains
states even though the capacity field occupies only
Nothing about the dynamic programme changed. What changed is the length against which its work is measured. This is why
Expansion must still be paid for
One cannot evade the binary bound by translating a binary-encoded instance to a unary-encoded instance first. Take
Its binary representation has
transitions. The proposed translation performs the exponential expansion before the algorithm rather than removing it.
The representation fixes the scale
Complexity is therefore attached to an algorithm under a fixed instance encoding. Ordinary changes between polynomially related encodings preserve polynomial-time solvability. Binary and unary instance encodings do not satisfy this condition in general, so they may place the same numerical problem on different complexity scales.
The corrected mental model is simple: a compact encoding can place an exponentially large numeric range behind a short input string, and the locality of a Turing machine prevents that range from being expanded for free.