-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Matrix power via square decomposition #83
Labels
enhancement
New feature or request
Comments
This was referenced Jan 27, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
The
k
-th integer power of an interval matrixM
,M^k
, is not well-defined. The reason is that interval-matrix multiplication is not associative. Furthermore, even for a fixed order, the multiplication induces an error due to the intervals. The only safe case is squaring (i.e.,k = 2
) (see #79).Idea
Decompose the power
k
such that many squares are used. In other words: use as few non-square multiplications as possible.Example
In the example below, we compute
M^9
.A
andB
use the naive power operation, which are the worst options. (Interestingly,^
does something slightly more intelligent.?> ^
says equivalent to\exp(p\log(A))
).C
,D
,E
use the fact that 9 = 2² + 2² + 1.F
,G
,H
use the fact that 9 = (2 + 1)³ + 2 + 1 (I only tried three permutations).Heuristics
Presumably there is no optimal way to decompose the power, even when ignoring the order of the multiplications. A heuristics could be to decompose into the largest square numbers.
Sharing results
There is another issue: In the above algorithm/heuristics we may compute certain matrix powers several times. It might be better to have some symbolic representation of the decomposition (as we had in the example) and then compute each term only once. However, that sounds more complicated.
The text was updated successfully, but these errors were encountered: