Computing an output one bit at a time #
A polynomial-time function is usually easiest to describe not as a string
transformation but as a rule for each output bit: "the i-th bit of f x is
whatever this decision procedure says". This module turns such a description
into f ∈ FP.
The two inputs are a unary length function — how long the output is, given in
unary so that it is itself a plausible FP output — and a bit oracle, a
polynomial-time function reading pair x (unary i) and returning the single
bit. The construction is an iteration of an append-one-bit step, run once per
output position, and iterate_mem_FP supplies the closure of FP under such
iterations.
This is the bridge that lets a decision procedure written on the RAM surface
(where RAM_P_eq_P transfers it to P) be used to build a function in FP,
for which no direct RAM bridge exists.
Main definitions #
Complexity.bitStep— the append-one-bit step
Main results #
Complexity.bitwise_mem_FP— a bitwise description puts the function inFPComplexity.bitwise_mem_FP_of_mem_P— the same with the bit rule given as a language inP, which is the form the RAM surface produces
One step of the construction: consult the oracle at the current output
length and append the bit it returns. The state is pair (output so far) input.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A function described bit by bit is polynomial time. If the output length
is computable in unary and each output bit is computable from the input and the
position in unary, the function itself is in FP.
The same, from a language in P. The bit rule is usually established as
a decision problem — "does position i of the output carry a one?" — and this
is the form in which RAM_P_eq_P delivers it.