Monotone circuits for Boolean matrix product #
The Boolean product of an I × K matrix x and a K × J matrix y has
entries z i j = ⋁ k, x i k ∧ y k j. Every circuit over the binary AND/OR basis
(AndOr.signature, which has neither negations nor constants) computing it has
at least I * J * K AND gates (Pratt 1975; Paterson 1975; Mehlhorn--Galil 1976;
see Wegener, The Complexity of Boolean Functions, Theorem 6.8.1). AND gates
are counted by AndOr.andCost, which charges one per AND gate and nothing per
OR gate; every gate of the program is counted, used or not. The schoolbook
circuit attains the bound.
Main results #
mul_mul_le_andCost: the bound for any injective placement of the entries ofxandyamong the circuit inputs and any placement of the outputs.cube_le_andCost: for twon × nmatrices in a fixed row-major layout, at leastn ^ 3AND gates.
The proof is in Complexitylib.Algebraic.LowerBound.Monotone.MatrixProduct.Internal.
Monotone Boolean matrix product. Place entry (i, k) of an I × K
matrix at input x i k and entry (k, j) of a K × J matrix at input y k j,
all at distinct inputs. An AND/OR circuit whose output z i j computes
⋁ k, x i k ∧ y k j for every i and j has at least I * J * K AND gates.
The input carrying entry (i, k) of the left n × n matrix: the first
n * n inputs, in row-major order.
Equations
- Algebraic.Monotone.MatrixProduct.leftEntry n i k = Fin.castAdd (n * n) (finProdFinEquiv (i, k))
Instances For
The input carrying entry (k, j) of the right n × n matrix: the last
n * n inputs, in row-major order.
Equations
- Algebraic.Monotone.MatrixProduct.rightEntry n k j = Fin.natAdd (n * n) (finProdFinEquiv (k, j))
Instances For
The output carrying entry (i, j) of the product, in row-major order.
Equations
Instances For
The row-major layout puts the entries of both matrices at distinct inputs.
Monotone Boolean matrix product, square case. An AND/OR circuit computing
the Boolean product of two n × n matrices has at least n ^ 3 AND gates.