The number of terms L and R in the factorisation is returned.
We remark that if A is a positive unimodular matrix, the factorisation cannot consist wholly of powers of R or powers of L.
If r ≥ p and s ≥ q, we take m = min([r/p], [s/q]) if p > 0 and q > 0, m = [r/p] if q = 0 and m = [s/q] if p = 0 and use the identity
= LmB.
whereas if p ≥ r and q ≥ s, we take m = min([p/r], [q/s]), if r > 0 and s > 0, m = [p/r] if s = 0 and m = [q/s] if r = 0 and use the identity= RmB.
B is a non-negative matrix whose entries are not greater than before and for which at least one entry has strictly decreased.(See On continued fractions and finite automata, George N. Raney, Math. Annalen, 206, 265-283 (1973).)
Last modified 5th February 2009
Return to main page