Transition matrices of coin-driven maps #
A map next : α → Bool → α moves a state to one of two successors, selected by a coin. On a finite
set s of states closed under next, its count matrix Matrix.coinStepMatrix next s has as
entry (x, y) the number of coins that move x to y. Its powers count coin strings
(Matrix.coinStepMatrix_pow_mulVec): (N ^ t *ᵥ f) x is the sum of f over the endpoints of
the 2 ^ t coin strings of length t replayed from x. Halving the entries gives the stochastic
matrix of the fair-coin random walk.
Keeping only the rows of the live states gives Matrix.liveCoinStepMatrix live next s, which
counts coin strings along which every state before the last is live
(Matrix.liveCoinStepMatrix_pow_mulVec). When the other states are fixed by next, the walk
stops at the first state that is not live, and every coin string is counted by the time it stops
(Matrix.coinStepMatrix_pow_mulVec_eq_sum). When the live walks have bounded length, the live
matrix is nilpotent, and 1 - S has the inverse ∑ i < n, S ^ i
(Matrix.inv_one_sub_eq_sum_pow).
Main definitions #
Matrix.coinStepMatrix: the count matrix of a coin-driven map on a finite set.Matrix.liveCoinStepMatrix: its rows at live states, zero rows elsewhere.
Main results #
Matrix.coinStepMatrix_pow_mulVec: powers sum over coin strings.Matrix.liveCoinStepMatrix_pow_mulVec: powers of the live matrix sum over live coin strings.Matrix.coinStepMatrix_pow_mulVec_eq_sum: first-stop decomposition of the count matrix.Matrix.liveCoinStepMatrix_pow_eq_zero: bounded live walks make the live matrix nilpotent.Matrix.inv_one_sub_eq_sum_pow: the inverse of1 - Sfor nilpotentS.
The count matrix of a coin-driven map on a finite set s: the entry at (x, y) is the
number of coins b with next x b = y.
The live count matrix: the rows of Matrix.coinStepMatrix at states satisfying live,
and zero rows at the other states.
A row of the count matrix, applied to a vector, sums the two coin successors.
A row of the live count matrix sums the two coin successors at a live state and vanishes elsewhere.
Powers of the count matrix sum over coin strings: (N ^ t *ᵥ f) x is the sum of f over
the states reached from x by the 2 ^ t coin strings of length t.
Powers of the live count matrix sum over live coin strings: (S ^ t *ᵥ f) x is the sum
of f over the states reached from x by those coin strings of length t along which every
state before the last is live.
First-stop decomposition. If the states that are not live are fixed by next, and f
vanishes at live states, then counting the coin strings of length T by f at their endpoint
is the same as counting, for each t ≤ T, the live coin strings of length t by f, each
weighted by the 2 ^ (T - t) continuations after the walk has stopped.
Bounded live walks make the live matrix nilpotent: if along every coin string of length
n from a state of s some state before the last is not live, then S ^ n = 0.
Inverse of 1 - S for nilpotent S: if S ^ n = 0, then 1 - S is invertible with
inverse the truncated geometric series ∑ i < n, S ^ i.