Any way to determine the applied sequence of a matrix chain multiplication? (or simpler cases tetrahedron attachment, finite field, rotation)

52 Views Asked by At

General problem
Given a starting matrix $S$ and an ending matrix $E$ and $m$ ($>1$) transforming square matrices $M_i$.
It is know that $E$ can be constructed out of $S$ by applying a sequence of matrix multiplications like: $$E = ((SM_{i_1})M_{i_2})M_{i_3}... = S \prod_{j=1}^{N_M} M_{i_j}$$ $$i_j \in \{1,..,m\}$$

Given $E$, $S$ and all $M_i$ is there any (efficient) way to determine any sequence of matrix multiplications which is able to construct $E$ out of $S$?
($N_M$ is unknown. If there are multiple solutions just one is sufficient. In best case this with smallest $N_M'$)


Example
Let $m = 4$ and $E = SM_3M_2M_1M_4M_1M_4M_3M_2M_4$
Given $E,S,M_1,M_2,M_3,M_4$. I'm looking for a way to efficiently determine the sequence $[3,2,1,4,1,4,3,2,4]$ (or any other sequence with same result) without testing any possible multiplication.


Possible simplification for tetrahedrons
More specific I'm looking for a solution related to attached regular tetrahedrons (triangular pyramid)
Given a the vertices of regular tetrahedron $A,B,C,D$ an attached tetrahedron (attached to one side triangular face) can be constructed by reflection one vertex at the plane defined by the three other vertices. E.g. to construct A' out of A this would be: $$A' = (B+C+D)\cdot \frac{2}{3}-A$$ The starting matrix $S$ would be defined as: $$S = [A\text{ }B\text{ } C\text{ } D] = \begin{bmatrix} A_x & B_x & C_x & D_x\\ A_y & B_y & C_y & D_x\\ A_Z & B_z & C_z & D_y\\ \end{bmatrix}$$ $m=4$ transformation matrices $M_1,M_2,M_3,M_4$ would exist which are very similar to each other. E.g. $$M_1 =M_A = \begin{bmatrix} -1 & 0 & 0 & 0\\ \frac{2}{3} & 1 & 0 & 0\\ \frac{2}{3} & 0 & 1 & 0\\ \frac{2}{3} & 0 & 0 & 1\\ \end{bmatrix}$$

As those $M_i$ are similar to each other and much more limited than a random $M$ would this make finding a multiplication chain in between $S$ and $E$ easier?


Simplification 2 or even harder in finite field?
Even more specific I'm looking for a solution applied to attached regular tetrahedrons in a finite field $\mathbb{F}_P$ with $P$ a prime.
Not much would change at the formula above. Just the the division need to be replaced by the inverse (for $M_i$ as well). $$A' \equiv (B+C+D)\cdot 2 \cdot (3)^{-1}-A \mod P$$

Would this make finding a sequence for given $S$, $E$ easier or even harder?


Simplification 3 rotation
Instead of storing the tetrahedron position just storing the rotation would be enough for target application. The tetrahedron center would be: $$ T = (A+B+C+D)\cdot (4)^{-1} \mod P$$ And the starting rotation would be: $$S = [A\text{ }B \text{ } C \text{ }D]-T \mod P $$ This would define the direction vector from center to each vertex.
($M_1,M_2,M_3,M_4$ need to be changed as well.)

Finding a sequence from $S$ to $E$ would reducing the problem to finding a tetrahedron with same rotation. (This won't be to be the same solution as for above including the position)


Or is this problem equivalent to another (better studied) problem?