We have a set of sets A_1, ..., A_n. The goal is to find new sets for each of the old sets.
newA_i = {a_i in A_i such that there exist (a_1,..,a_n) in (A1,..,An) with no a_k = a_j for all k and j}
So, the words say that we remove all elements from A_i that cannot be used to form a tuple (a_1, .. a_n) from sets (A_1, .., A_n), so the set does not matter, t contain duplicates.
My question is how to quickly figure out these new sets. If you simply implement this definition, generating all possible v, it will take exponential time. Do you know the best algorithm?
Edit: here is an example. Take
A_1 = {1,2,3,4}
A_2 = {2}.
Now the new sets look like this:
newA_1 = {1,3,4}
newA_2 = {2}
2 A_1, , , (2,2), , . , 1,3,4 , (1,2), (3,2) (4,2) .
:
A_1 = {1,2,3}
A_2 = {1,4,5}
A_3 = {2,4,5}
A_4 = {1,2,3}
A_5 = {1,2,3}
:
newA_1 = {1,2,3}
newA_2 = {4,5}
newA_3 = {4,5}
newA_4 = {1,2,3}
newA_5 = {1,2,3}
1 2 2 3, , 1 2 , 2 1, 4 5, , (_,1,_,_,_) (_,_,2,_,_).
, , .
- A_i , , , .