Permanents of tables as counting problems #
A table A : List (List R) is read as the square matrix tableMatrix A with one row and one
column per row of A: entry (i, j) is entry j of row i, and missing entries are 0. Every
table is therefore an instance, and the matrix size is the number of rows. The counting problems
of Valiant's theorem Valiant are the permanents of such tables: IntPermanent
for integer tables and ZeroOnePermanent for Boolean tables, read as 0/1 matrices.
zeroOnePermanent_eq_card counts the permutations supported on the true entries, that is the
perfect matchings of the bipartite graph whose biadjacency matrix is the table.
Tables are encoded row by row (encIntTable, encBoolTable), so the encoded length of an
n × n table is at least n²: a dense matrix encoding, as in the books.
Main definitions #
Cslib.Complexity.tableMatrix,Cslib.Complexity.boolTableMatrix: tables as square matrices.Cslib.Complexity.IntPermanent,Cslib.Complexity.ZeroOnePermanent: their permanents.Cslib.Complexity.encIntTable,Cslib.Complexity.encBoolTable: dense table encodings.
Main results #
Cslib.Complexity.zeroOnePermanent_eq_card: the 0/1 permanent counts permutations supported ontrueentries.