Conditional circuit complexity #
For a target f and a finite family supplied of functions of the same input,
Circuit.conditionalGateComplexity interpretation f supplied is the minimum
number of gates in a circuit h satisfying h(x, supplied(x)) = f(x).
The original input coordinates and the supplied values are free; only the
gates of h are charged. Correctness is required on these consistent tuples,
with no restriction on h(x, y) when y ≠ supplied(x).
The family is represented as supplied : Target U n k, so a list of scalar
functions g : Fin k → ScalarFunction U n is supplied as fun x i => g i x.
Targets may have multiple outputs and share gates. The weighted version is
Circuit.conditionalCostComplexity; both measures take values in ℕ∞, with
⊤ for targets that cannot be computed even with the supplied values.
CSLib's Boolean Synthesis instead bounds additional gates relative to every
program already making a source family available, while preserving all of
that program's available functions. It is a budget predicate, not this
minimum over circuits with formal supplied inputs. The implication from a
conditional gate bound to Synthesis is in
Algebraic.ConditionalComplexity.Boolean.
References #
Stephen Wayne Boyack, The Robustness of Combinatorial Measures of Boolean
Matrix Complexity, MIT PhD thesis (1985), p. 30, defines circuit complexity
relative to supplied functions and proves the triangle inequality in
Proposition 2.2. Here the original coordinates are always supplied as well:
our C(f | G) corresponds to supplying (id, G) in that convention.
See https://hdl.handle.net/1721.1/15322.
Compute target from the original inputs and the free values of supplied.
Only inputs of the form (x, supplied x) constrain the circuit.
Equations
- circuit.ComputesGiven interpretation target supplied = circuit.ComputesFrom interpretation target fun (input : Fin n → U) => Fin.append input (supplied input)
Instances For
Minimum weighted cost of computing target with the values of supplied
supplied as free extra inputs. Unrepresentable targets have value ⊤.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Minimum number of gates computing target from the original inputs and
the free values of supplied.
Equations
- Cslib.Circuits.Circuit.conditionalGateComplexity interpretation target supplied = Cslib.Circuits.Circuit.conditionalCostComplexity interpretation Algebraic.OperationCost.unit target supplied
Instances For
A concrete conditional implementation bounds the minimum weighted cost.
A bound holding for every conditional implementation bounds the minimum.
A finite budget bounds conditional complexity exactly when some circuit meets that budget. In particular, every finite minimum is attained.
Conditional complexity is finite exactly when some conditional implementation exists; the supplied functions need not be representable.
An impossible conditional computation has complexity ⊤.
Equivalently, minimize ordinary complexity over all functions h with
h(x, supplied(x)) = target(x). Values outside these consistent tuples are free.
A conditional circuit gives an upper bound on conditional gate count.
A conditional gate bound is equivalent to a circuit with that many gates.
Zero conditional gate complexity means that each output is a fixed selection from the original input coordinates and the supplied functions. No input-dependent selection is possible without gates.
Supplying extra values cannot increase the cost: they may be ignored.
Conditioning on the empty family recovers ordinary weighted complexity.
Selecting any of the supplied outputs needs no gates.
A supplied target has zero conditional cost, whether or not it has an ordinary circuit over the chosen basis.
Reordering, duplicating, or extending the supplied family cannot increase conditional complexity if all the old values remain accessible.
Free supplied values cannot increase gate complexity.
Empty conditioning recovers ordinary gate complexity.
A supplied target requires zero gates.
Boyack's triangle inequality (Proposition 2.2), with the original inputs always available and arbitrary natural-number operation costs: compute the intermediate supplied family, then the target.
Boyack's triangle inequality specialized to unit gate cost.
Supplying a family can save at most its ordinary computation cost.
A family that is already free to compute gives no complexity advantage.
The chain upper bound: compute the supplied family, then the target, retaining both as outputs. Equality need not hold because a joint circuit can share intermediate wires that are absent from the supplied output family.
The chain upper bound for gate complexity.