Given a matrix of boolean values (example):
a b c
+--------
X | 1 0 1
Y | 1 1 1
Z | 0 1 1
+--------
What's the optimum way to find all sequences [a|b|c] such that each sequence has at least one "true" (1) value for each of X, Y and Z.
In the example above, the set of sequences is (in no particular order):
abc, ab, ac, bc, c
Whereas these sequences do not satisfy the requirement:
a (doesn't provide Z)
b (doesn't provide X)
I'm actually looking for a generalized algorithm for an arbitrary matrix.
Any ideas?