A Turing machine has no external clock. Its time is the number of transitions it has taken: read, write, and move.

On a Turing machine, time is the count of transitions needed to reach some point in the computation — termination, or a specific state. The machine cannot step over the tape. Each transition acts on one symbol and moves the head by at most one cell.

Because each transition touches one cell, input length is part of the terrain the machine crosses. An encoding that spreads a value across many cells makes that terrain longer. The meaning may be the same, but the path has more tape in it.

Knapsack

The distinction is easiest to see from a capacity value in the knapsack problem. Take . In binary, this is written as , so the capacity field has cells. In unary, the same value is written with cells.

A pseudo-polynomial knapsack algorithm does not only read the capacity field. It builds or scans states for capacities

For , that means capacity states. With unary input, this is close to the length already written on the tape. With binary input, the machine was given only capacity cells, but the algorithm opens a line of capacity states behind them.

The same calculation scales. If a binary capacity field has length , it can encode a value around . A loop over all capacities up to is then a loop of length about , measured against an input field of length . Unary does not remove the work; it writes the distance down in advance.

This is why encoding matters. It fixes the scale against which time is measured. A compact encoding can shorten the input while leaving a large numeric space behind it; a verbose encoding can expose that space directly on the tape.