Entries of a product of matrices as a sum over paths #
The entry (a, b) of a product M 0 * M 1 * ⋯ * M (d - 1) of square matrices is the sum, over
all paths p 0, p 1, …, p d of indices from p 0 = a to p d = b, of the products
∏ i, M i (p i) (p (i + 1)) of the entries along the path. This is the standard expansion behind
algebraic branching programs. Taking all factors equal and summing the diagonal, the trace of a
power M ^ d is the sum, over the closed paths of length d, of the products of the entries along
them.
Main results #
Matrix.list_prod_ofFn_apply: the path expansion of an entry of(List.ofFn M).prod.Matrix.trace_pow_eq_sum: the trace of a power as a sum over closed paths.
The path expansion: the entry (a, b) of the product of the matrices M 0, …, M (d - 1)
is the sum, over the paths p : Fin (d + 1) → ι from a to b, of the product of the entries
M i (p i) (p (i + 1)) along the path.
The trace of a power as a sum over closed paths: tr (M ^ d) is the sum, over the paths
p : Fin (d + 1) → ι with p 0 = p d, of the product of the entries M (p i) (p (i + 1)) along
the path.