Documentation

Complexity.Computability.Circuit.Boolean.SparseSynthesisConstruction

Sparse and partial synthesis: the constructions #

This file builds De Morgan circuits, with explicit gate budgets, for two kinds of Boolean functions that carry little information: the indicator of a small set of inputs (complexity_indicator_le_indicatorBound), and a function that only has to be correct on a small set of inputs (complexityOn_le_partialBound). The file Complexity.Computability.Circuit.Boolean.SparseSynthesis chooses the parameters and shows that, for sets of 2 ^ p of the 2 ^ (2 p) inputs, the budgets are (1 + o(1)) 2 ^ p and (1 + o(1)) 2 ^ p / p. No asymptotics happen here. The constructions follow Chashkin's account Chashkin, Sections 2 and 3 of the methods of Lupanov [Lup65], Nechiporuk [Nec65], Sholomov [Sho69] and Andreev [And89].

Tables #

Split k + l input bits into k column bits and l row bits, and view a truth table as a matrix with 2 ^ l rows and 2 ^ k columns. Every column minterm and every row minterm is built once. Each row is a disjunction of patterns, sets of columns that are built once from the column minterms and shared by all rows, so beyond a fixed overhead a table costs one gate per pattern chosen in a row.

Hashing #

A table only has few patterns when it has few columns, so the inputs are first hashed to k + l bits by a linear map over the field with two elements. Two distinct inputs collide under a 2 ^ -(k + l) fraction of the linear maps, so some linear map makes at most that fraction of any given pairs of distinct inputs collide Chashkin, Lemmas 2.3 and 2.4.

The collision bound uses the shared BitString.LinearHash API; the circuit implementation uses finite-set parity masks to retain its exact gate bound.

Main definitions #

Main results #

References #

Tables with shared column patterns #

Blocks of consecutive elements #

Sparse tables #

The gate budget of a sparse table on k + l inputs with w true entries and chunks of K columns: the shared minterms of the 2 ^ k columns and the 2 ^ l rows, every one of the (2 ^ k + 1) ^ K patterns of at most K columns, one gate per chunk, about w / K of them, and four gates per row.

Instances For

    Banks of extensions #

    Partial tables #

    The gate budget of a partial table on k + l inputs with w specified entries and chunks of J specified entries: the shared minterms of the columns and the rows, the at most (2 ^ k + 1) ^ 2 (2 · 2 ^ k + 1) 2 ^ J patterns given by an interval of columns and an assignment from a bank of extensions, each of at most 2 ^ k columns, one gate per chunk, about w / J of them, and four gates per row.

    Instances For

      Linear hashing #

      Sparse indicators #

      The gate budget of the construction for the indicator of a set of at most 2 ^ p of the 2 ^ n inputs: t filters, each hashing to k + l = p + a bits and looking the hash up in a sparse table with chunks of K columns, and explicit minterms for the at most 2 ^ n / 2 ^ (a t) inputs that wrongly pass every filter.

      Instances For
        theorem Cslib.Circuits.Boolean.SparseSynthesis.complexity_indicator_le_indicatorBound {n p a k l K : ℕ} (B : Finset (BitString n)) (hB : B.card ≤ 2 ^ p) (hkl : k + l = p + a) (hK : 0 < K) (t : ℕ) :
        complexity interpretation (single fun (x : Fin n → Bool) => decide (x ∈ B)) ≤ indicatorBound n k l K p a t

        Sparse indicators. The indicator of a set of at most 2 ^ p inputs costs at most indicatorBound n k l K p a t gates, whenever k + l = p + a and K > 0.

        Partial functions #

        The gate budget of the construction for a function on a set of w of the 2 ^ n inputs: a hash to k + l bits, a partial table with chunks of J entries for the values on the image, and explicit minterms correcting the at most w ^ 2 / 2 ^ (k + l) inputs whose hashes collide with others.

        Instances For

          Partial functions. A Boolean function on a set D of inputs costs at most partialBound n k l J |D| gates on D, whenever J > 0.