Blum's speedup theorem #
For every Blum complexity measure Φ and every computable r, there is a computable
0/1-valued function f with no fastest program: every program c for f is beaten by
another program c' for f with r n (Φ c' n) < Φ c n for almost all n
Blum, A machine-independent theory of the complexity of recursive functions.
Taking r n m = 2 ^ m, for instance, every program for f can be sped up exponentially, and the
speedup can be repeated forever.
Construction #
The proof is Blum's priority construction combined with the recursion theorem. For a program e,
parameters u, d and an input x, the version vers e u d runs the following cancellation run
(Cslib.BlumComplexity.Cancellation.canc). At stage y, the program numbered i is
eligible when u ≤ i ≤ y and, for some d' ≤ y, Φ i y ≤ r y (Φ (vers e (i + 1) d') y).
The least eligible program not cancelled earlier is cancelled, and the version outputs
1 - φ_i y there, so that φ_i differs from it at y. Stages without a cancellation output 0.
The data d encodes a finite table that fixes the output at some of the first stages; nothing is
cancelled at such a stage. By the recursion theorem (Nat.Partrec.Code.fixed_point₂), the
program e can run its own versions.
- Every version is total, by induction on
x - u: deciding eligibility at stagey ≤ xonly runs versions with a largeru. - The version
vers e 0 d₀with the empty table computes a functionf. Ifccomputesf, thencis never cancelled, since a cancellation ofcatywould forcef y ≠ φ_c y. Socis eligible only finitely often. - For
u = encode c + 1, the run ofvers e u dskips the programs belowu. Those are cancelled only finitely often. A tabledrecordingfat those finitely many stages makesvers e u dcomputefexactly. - Eventually
cis not eligible, and in particularΦ c y > r y (Φ (vers e (encode c + 1) d) y).
Strength #
The conclusion r n (Φ c' n) < Φ c n is strict, so it implies the non-strict form
r n (Φ c' n) ≤ Φ c n. The function r takes the input n as an extra argument, as in Blum's
paper. The one-argument form r (Φ c' n) < Φ c n is the special case fun _ m => r m
(speedup'). The statement is not vacuous: f is computable, so it has a program, and every
program for f halts on every input, so both costs in the conclusion are defined everywhere
(Cslib.BlumComplexity.BlumMeasure.dom_cost_of_total).
Main results #
Cslib.BlumComplexity.BlumMeasure.speedup: Blum's speedup theorem.Cslib.BlumComplexity.BlumMeasure.speedup': the one-argument form.Cslib.BlumComplexity.BlumMeasure.exists_no_fastest: the functionfhas no program that is fastest up tor.
References #
The construction #
Computability of the construction #
Semantics of the construction #
Blum's speedup theorem [Blu67]. For every computable r, there is a computable
function f with values in {0, 1} such that every program c for f has another program c'
for f with r n (Φ c' n) < Φ c n for all sufficiently large n.
Blum's speedup theorem, one-argument form: for every computable r, there is a
computable function f with values in {0, 1} such that every program c for f has another
program c' for f with r (Φ c' n) < Φ c n for all sufficiently large n.
The function of Blum's speedup theorem has no program that is fastest up to r: for each
program c for it, some program c' for it is faster than c by r almost everywhere, so c
is not within r of every other program.