A deterministic implementable algorithm is a total function
where and are finite sets of inputs and outputs, respectively.
A stochastic implementable algorithm is either
Every deterministic implementable algorithm is extensionally equivalent to a lookup table.
Proof. Let with finite. The function is completely specified by the finite set of pairs
This set is a lookup table representation of . Hence and are extensionally equivalent. ∎
Every stochastic implementable algorithm is extensionally equivalent to a finite lookup table of probability distributions (or equivalently, to a deterministic lookup table on extended input space).
Proof. By definition, a stochastic algorithm specifies for each a distribution over . Thus it is represented by the finite table
Equivalently, if the algorithm is implemented as a deterministic map with random seed , then the induced conditional distribution is
Since is finite, is representable by the finite table
Thus both formulations reduce to finite tables. ∎
If and are implementable algorithms, then is also extensionally a lookup table. The same holds if are stochastic.
Proof. For the deterministic case,
Thus is specified by the finite table
For stochastic maps, let induce a distribution on , and let induce on . Then the composition induces
which is again a finite table of distributions. Hence closure holds. ∎
Any finite tower of algorithms (base functions, stochastic samplers, masks, controllers, etc.) is extensionally equivalent to a single finite lookup table.
This result depends crucially on finiteness. If one allows unbounded memory or infinite-precision real inputs, then may be infinite, in which case the lookup table analogy does not hold. However, physically implementable systems are finite.
Intensional differences (e.g., whether an algorithm is realized via neural networks, circuits, or symbolic rules) affect efficiency, compressibility, and generalization properties, but not extensional equivalence. Extensionally, all such realizations reduce to finite tables.