SETS:
elem;
subsets:x,c;
fam(subsets,elem);
ENDSETS
DATA:
elemnumb=8;
elem=1..elemnumb;
subsetsnumb=20;
subsets=1..subsetsnumb;
fam=
1 1 1 2 1 5 1 7
2 1 2 4 2 8
3 3 3 4 3 7 3 8
4 2 4 5 4 7
5 1 5 2 5 7
6 3 6 8 6 1
7 3 7 5 7 7 7 8
8 2 8 4 8 8
9 2 9 5 9 6
10 2 10 7 10 8
11 3 11 6
12 4 12 6 12 8
13 1 13 2 13 3
14 5 14 6 14 3
15 7 15 6 15 3 15 4
16 3 16 5 16 6
17 4 17 6 17 8
18 2 18 5 18 7 18 8
19 1 19 2 19 5
20 2 20 4 20 6 20 8
;
c=
41 28 37 30 32
34 27 43 30 32
30 22 26 27 31
29 27 40 30 38;
ENDDATA
min=@SUM(subsets(j):c(j)*x(j));
@FOR(elem(i): @SUM(fam(j,i): x(j)) > 1);
@FOR(subsets(j):@BIN(x(j)));