I have a program for calculating a type of list.
ff[num_Integer] :=
Union[
Select[Subsets[Tuples[Range[2 num], {2}], {num}],
Sort @ Flatten @ # == Sort @ Range[2 num] &],
SameTest -> (Sort[Sort /@ #1] == Sort[Sort /@ #2] &)];
Now, the problem is that ff[num_] doesn't work on my computer when num >= 5. I would really like to get ff[8], even ff[10]. How can I change this program to use a better method for producing these types of list?
Lengthof the output list can be calculated withProduct[2*i-1,{i,1,num}]. Fornum=10the length would be 654729075. At least this is for sure too much for my computer. – partial81 Jun 15 '13 at 20:24