Partitioning a (1,-1)square matrix into (0,-1,1)summand matrices
Given a square matrix M with entries from {1,-1} how to find all possible sets of matrices A1,A2,A3.....(with entries from {0,-1,1}), such that M=A1+A2+A3....
Welcome to Ask Sage! Thank you for your question.
Do you require the matrices Aj to be pairwise distinct?
That way there would be finitely many tuples of matrices Aj summing to M.
One could also forbid having Aj=0 for any j, and forbid having Aj=−Ak for any j and k.
Homework ?
Question refined at Ask Sage question 63305.