You get the solution S(i) for i sets by combining set s_i with all members of S(i-1). For i=2..n and S(1)={s_1}
This can be further optimized - no point in trying (A/B)/C if A/C is empty - but 2**7 is only 128.
To speed up intersection you can use hash slices in Perl or specialized CPAN modules.
In reply to Re: Set intersection problem
by Anonymous Monk
in thread Set intersection problem
by baxy77bax
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |