I need help finding an efficient algorithm to solve this problem:
Given n unsorted sets of integers, find all possible combinations of n and their intersections.
Using your example, just note that
1 n 2 n 3
is also
(1 n 2) n 3
So if you cache your (1 n 2) solution, you can reuse it, so that computing 1 n 2 n 3 will only require one additional intersection calculation. Generally, if there are, as in your example, four possible set combinations, then only four intersections will ultimately have to be done if you save and reuse prior results.