I’ve determined that the following expression gives me the correct answer in a programming challenge:
$$ (A \circledast M) \times H) \circledast M) \times H) \circledast M) \times H) \circledast M) \times H) \circledast M) \times H) $$
… for a certain number of $(\circledast M \times H)$ iterations, where A, M, and H are matrices (M is symmetric, and H is binary (each entry is either zero or one)), $\circledast$ is convolution, and $\times$ is Hadamard (pointwise) multiplication.
However this approach is slightly too slow to be an acceptable solution. If I could only simplify the above expression to something like:
$$A \circledast ( M \circledast M \circledast M ... \circledast M ) $$
then I would be able to speed up calculating the M-convolutions by grouping it into calculating M2=(M*M), M4=(M2*M2), etc, finishing with $(A \circledast M300)$ and the runtime would be well within acceptable bounds.
However I cannot figure out how to include the pointwise multiplication in any simplified equation resembling the second form. $(A \times H) \circledast (M \times H)$ doesn't seem to give an equivalent expression, for example, nor does any of my attempts at splitting up A into (A1-A2) corresponding to the binary entries of H and subtracting the results back together at the end.
Is there a way to use properties of Hadamard multiplication and/or convolution to achieve this simplification?