Setup:
I have a boolean matrix e.g.
1 0 1 1 0 1
where rows are named m1, m2, m3 (as methods) and columns t1 and t2 (as tests).
Definition:
An explanation is a set of rows (methods) which in union have at least one "1" in any column (every test hast to be matched by at least one method).
in our example, the set of explanations would be:
{
{m2},
{m1,m2},{m1,m3},{m2,m3},
{m1,m2,m3}
}
Problem:
I want now to calculate all explanations.
Now, I already have two implementations which can solve the problem, one searching explanations top-down, the other bottom-up, but both suffer in exponential growth in computing time (doubles by increasing the number of rows by one).
Is this a known (maybe solved efficiently) mathematical problem?
What could make things easier is that at the end, I only need the number of occurrences in explanations for every method. In our example this would be for m1 three occurrences, for m2 four occurrences and for m3 three occurrences.
My current algorithms work fine until let's say 26 rows. But further on, it is getting very slow.
Thank you for your help!