I have N numbers of sets S i numbers, each of which has a different size. Let m 1 , m 2 , ... m n be the sizes of the corresponding sets (m i = | S i |), and M the size of the largest set. I have to find common subsets in which there are at least two numbers. Example:
Set Items 1 10,80,22 2 72, 10, 80, 26,50 3 80, 4 10, 22 5 22, 72, 10, 80, 26,50
Thus, the result will be such that
Items Found in sets 10, 22 1, 4 10, 80 1, 2, 5 10, 80, 22 1, 5 10, 72, 80, 26, 50 2, 5
So, how to automate this problem and what is the expected complexity for an appropriate solution? I need it to be as fast as possible.
algorithm
Ali
source share