The circuit value problem is P-complete #
Ladner proved [Lad75b] that the circuit value problem is P-complete under
logarithmic-space many-one reductions Arora and Barak, Section 6.7,
Papadimitriou, Theorem 8.1.
A problem A ∈ P enc is decided by a machine tm within C (n + 1) ^ d steps on encoded
instances of length n. The reduction maps an instance a to the tableau circuit of tm for
C (n + 1) ^ d + n + 1 steps on inputs of length n = |enc a|
(Cslib.Circuits.Boolean.Tableau.circuit), together with the input enc a. The circuit outputs
whether tm, started on enc a, has written exactly [true] after that many steps
(Cslib.Circuits.Boolean.Tableau.eval_circuit); since tm has halted by then with the answer on
its output, this is whether a ∈ A. The circuit reads the bits of enc a as its inputs; it does
not hardwire them as constants. The reduction is
computable in logarithmic space: a read machine (Turing.ReadMachine) on the framed input counts
its length n, then writes the gates one by one, keeping only the number of the current gate,
since each gate is computed from its number within work space linear in the binary lengths of n,
the time bound and the number (Cslib.Circuits.Boolean.Tableau.gateCode_inSpace), and finally
copies the input.
Main definitions #
Cslib.Complexity.CircuitValue.tableauInstance: the instance of the circuit value problem for an input of a machine.Cslib.Complexity.CircuitValue.writer: the read machine writing the instance.Cslib.Complexity.CircuitValue.tableauCode: the circuit code, with all input wires free.
Main results #
Cslib.Complexity.CircuitValue.run_writer: the writer writes the encoded instance.Cslib.Complexity.CircuitValue.computableInLogSpace_tableauInstance: the instances are computable in logarithmic space.Cslib.Complexity.CircuitValue.computableInPolyTime_tableauCode: the whole code is constructed in polynomial time from the unary input length.Cslib.Complexity.CircuitValue.eval_tableau_of_computesFun: the tableau circuit of a machine computingfwithin the time bound evaluates tof aon the encoding ofa.Cslib.Complexity.CircuitValue.exists_uniformCircuits: polynomial-time Boolean functions admit polynomial-time circuit constructors, correct on the encoding's image.Cslib.Complexity.CircuitValue.logSpaceHard: the circuit value problem isP-hard under logarithmic-space reductions.Cslib.Complexity.CircuitValue.logSpaceComplete: the circuit value problem isP-complete under logarithmic-space reductions.Cslib.Complexity.CircuitValue.mem_L_iff_forall_P_eq_L: the circuit value problem is inLexactly whenP = L.
References #
The writer #
The number of steps of the tableau for inputs of length n: C (n + 1) ^ d + n + 1.
The instance of the circuit value problem for the input w: the tableau circuit of tm
for timeBound C d |w| steps on inputs of length |w|, with the input w.
Gate i of the tableau, as the writer emits it.
The encoded instance: the length in unary, the gates and the output wire, framed twice, and the input.
The uniform writer specification for tableau circuit instances.
The writer of encoded tableau instances, on framed inputs.
The writer halts with the encoded tableau instance.
The writer in logarithmic space #
Evaluating the fixed polynomial tableau time bound preserves a space budget.
Computing the tableau gate count preserves a space budget.
The end of a gate list, a framed wire number and a fixed suffix preserve a space budget: the shape of the trailer emitted by the tableau writers after their gates.
The instances are computable in logarithmic space, from the framed input.
Constructing circuit codes #
The tableau code for inputs of length n. The input wires remain free; the constructor
receives only the length, in unary, rather than any assignment to those wires.
Writing the tableau code takes polynomial time in the unary input length. This reuses the certified logarithmic-space writer and discards its dummy input assignment.
Correctness of the tableau. If tm decides f within time t ≤ C (n + 1) ^ d on inputs
of length n, the tableau circuit for timeBound C d |enc a| steps evaluates to f a on the
encoding of a.
Every polynomial-time Boolean function has circuits whose codes are constructed in polynomial time from the unary encoded input length. Correctness is required on the encoding's image; no decoder or efficient membership test for that image is assumed.
P-completeness #
Every problem in P reduces to the circuit value problem in logarithmic space: an
instance is mapped to the tableau circuit of a polynomial-time decider on inputs of the length of
the encoded instance, with the encoded instance as its input.
The circuit value problem is P-hard under logarithmic-space reductions [Lad75b].
The circuit value problem is P-complete under logarithmic-space
reductions [Lad75b], Arora and Barak, Section 6.7.
The circuit value problem is in L exactly when P = L, for every encoding of instances
Arora and Barak, Section 6.7.