Enumerate all combinations columns of a $(0,1)$ matrix are sums of other columns

48 Views Asked by At

Given $(0,1)$ matrix of arbitrary size $\mathbb{R}^{m \times n}$, is there an efficient algorithm to enumerate all combinations that any column is a sum of other columns?

For example:

$$ M=\begin{bmatrix} 1 & 0 & 0 & 0 & 1\\ 0 & 1 & 0 & 1 & 1\\ 0 & 0 & 1 & 1 & 1\\ \end{bmatrix} $$

With $[i]$ representing the $i^{th}$ column, we have three combinations

  • $[4] = [2] + [3]$
  • $[5] = [1] + [4]$
  • $[5] = [1] + [2] + [3]$

Programming in Matlab if that helps.