Syntactic read-once parity branching programs #
A read-once parity branching program Volk, Definition 1.1 is a directed acyclic multigraph with a source and a target whose edges are labelled by literals or Boolean constants. It accepts an input when an odd number of source-to-target paths are consistent with it, and it is syntactically read-once when no variable is tested twice on any source-to-target path, whether or not the path is consistent with some input. Its size is its number of edges.
In this library such a program is a nondeterministic branching program NBP with parity acceptance
(NBP.AcceptsParity). Rectifiers are the edges labelled 1, and contacts testing x i = true and
x i = false are the positive and negative literals. An edge labelled 0 is never switched on, so
deleting it changes no path count and lowers the number of edges: lower bounds for programs without
such edges apply to programs with them. This file adds the read-once condition and the size
measure:
NBP.wireCountcounts every wire, rectifiers included. This is the size of Volk, Definition 1.1, which counts edges rather than nodes because in-degrees are unbounded.NBP.sizecounts only contacts (NBP.size_le_wireCount).NBP.tests P vlists, for each path from the nodevto the target, the tests of its contacts in order, andNBP.routes Pdoes the same for the paths from the source. An input switches on a path exactly when it passes all of its tests (NBP.paths_eq_countP,NBP.pathCount_eq_countP).NBP.IsReadOncerequires that no coordinate is tested twice on any route.
Vertices and edges. Parallel wires with the same head and label cancel in pairs under parity
acceptance. NBP.reduce keeps one copy of each wire of odd multiplicity at every node. It accepts
the same inputs by parity (NBP.acceptsParity_reduce_iff), is read-once when the original is
(NBP.IsReadOnce.reduce), and has at most n ^ 2 * (|ι| |α| + 1) wires on n nodes
(NBP.wireCount_reduce_le). So for parity acceptance the number of wires and the number of nodes
are polynomially related.
Main definitions #
Cslib.BranchingPrograms.NBP.wireCount: the number of wires of a program.Cslib.BranchingPrograms.NBP.tests,Cslib.BranchingPrograms.NBP.routes: the tests along the paths from a node, and from the source, to the target.Cslib.BranchingPrograms.NBP.IsReadOnce: the syntactic read-once condition.Cslib.BranchingPrograms.NBP.reduce: cancelling parallel wires in pairs.
Main results #
Cslib.BranchingPrograms.NBP.pathCount_eq_countP: the paths switched on by an input are the routes whose tests it passes.Cslib.BranchingPrograms.NBP.acceptsParity_reduce_iff,Cslib.BranchingPrograms.NBP.IsReadOnce.reduce,Cslib.BranchingPrograms.NBP.wireCount_reduce_le: a program onnnodes has an equivalent one, read-once if the original is, with at mostn ^ 2 * (|ι| |α| + 1)wires.
References #
Size and routes #
The number of wires of a program, rectifiers and contacts: the size of a read-once parity branching program in Volk, Definition 1.1.
A program is syntactically read-once when no coordinate is tested twice on any path from the source to the target Volk, Definition 1.1. The condition concerns all paths, also those that no input switches on.
Instances For
Path counts #
The input x switches on the paths from v whose tests it passes: their number is the path
count P.paths x v.
Path counts by routes. The number of paths from the source to the target that x switches
on is the number of routes whose tests it passes.
Cancelling parallel wires #
The wires of odd multiplicity in a list, each once.
Cancel parallel wires in pairs: at every node keep one copy of each wire, with its head and label, that occurs an odd number of times.
Every route of the reduced program is a route of the original one.
Cancelling parallel wires keeps a program read-once.
Cancelling parallel wires keeps the parity of the number of paths switched on from each node.
Cancelling parallel wires keeps the parity of the number of paths switched on.
Cancelling parallel wires keeps the function computed by parity.
Edges against vertices. After cancelling parallel wires, a program on n nodes has at most
n ^ 2 * (|ι| |α| + 1) wires: each node keeps at most one wire of each head and label.