This is a simple linear equation: $\mathbf{M}*A=\mathbf{S}$
M is a square matrix whose values are only 0 or 1.
A is the unknown vector
S is a data vector.
There are many random samples of M ans S, and is necessary to find the statistical distribution of each value in A, or at least his average values.
Expressed in other way, I have many random samples of s, but each sample of s is a sum of different combinations of $a_i$
I don't know how to solve it. I would just calculate $A_i=\mathbf{M_i}^{-1}*\mathbf{S_i}$, and just make a statistic of each value of A, but that may be a naive approach with wrong results.
I guess that this is a common problem with known solutions, but don't know what the name of the problem is, and where I should look for the solution.