Circuits for canonical cycle labels #
Let c be a circuit of size s computing f on n-bit states. Some circuit of size at most
60000 * powerBudget n s (2 ^ n) L computes the canonical label of every state: the
lexicographically least state of its eventual cycle, the cycle length and its phase
(cycle_label_circuit), for every 0 < L ≤ 2 ^ n; with the balanced parameter the size is at
most 180000 * optimizedBudget n s (2 ^ n) (cycle_labels_optimized).
The construction first applies f^[(2 ^ n)!] with a fixed-power circuit. This moves every state
onto its cycle without changing its label. On a periodic state, choose checkpoints as for fixed
powers and hardwire the label of each. The first 2 L + 1 states of the orbit are looked up in
one shared dictionary (lookupOr); a checkpoint hit at time j gives the label after shifting
its phase back by j (correctLabel_canonicalLabel). Without a hit the orbit repeats within L
steps, so its cycle is short and is read off the orbit prefix (shortLabel_eq_canonicalLabel).
The circuits are native De Morgan circuits: every NOT, AND and OR gate and every constant is
charged, while wiring and fanout are free. The checkpoints and their labels are chosen
nonconstructively, so the circuits exist for each L; nothing here bounds the time to construct
them.
Main definitions #
Cslib.Circuits.Boolean.Iteration.labelCost: the gate count of the checkpoint construction.
Main results #
Cslib.Circuits.Boolean.Iteration.cyclic_labels_from_checkpoints: labels of periodic states from given checkpoints.Cslib.Circuits.Boolean.Iteration.cyclic_label_circuit: labels of periodic states.Cslib.Circuits.Boolean.Iteration.cycle_label_circuit,Cslib.Circuits.Boolean.Iteration.cycle_labels_optimized: labels of all states.
References #
- Adapted from lean/Proofs/LabelCircuits.lean in
S. Schlesinger,
Square-root circuit bounds for iterated functions, whose
bounds have the constants
10040000and30120000. The dictionary here is the library'sbatchOrCircuitlookup.
The gate count of the label construction from M checkpoints with parameter L: constants,
the orbit prefix, the shared dictionary, one label correction per prefix state, the short-cycle
label and the final selection.
Instances For
Labels from checkpoints. Let cp be injective checkpoints such that every orbit repeats
among its first L states or reaches a checkpoint in fewer than 2 L steps. Then some circuit of
size at most labelCost n c.size M L computes the canonical label of every periodic state.
Labels of periodic states. For every 0 < L ≤ 2 ^ n, some circuit of size at most
20000 * powerBudget n c.size (2 ^ n) L computes the canonical label of every periodic state.
Moving a state onto its cycle with f^[(2 ^ n)!] does not change its label.
Cycle labels. For every 0 < L ≤ 2 ^ n, some circuit of size at most
60000 * powerBudget n c.size (2 ^ n) L computes the canonical label of every state: the
lexicographically least state of its eventual cycle, the cycle length and its phase.
Square-root cycle labels. Some circuit of size at most
180000 * optimizedBudget n c.size (2 ^ n) computes the canonical label of every state.