Hi, Andy
I think you can try some like...
#
param N := 10;
set A := 1..N;
set B{i in A} := setof{j in A : j<=i} j;
/* testing... */
printf "\n";
for {i in A}{
printf{j in A : j<=i} " %s", j;
printf "\n";
}
#
On 8/21/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hi, here is my problem:
>
> I have defined a set:
> set A := 1 .. N # where N may be 1000 as a param
>
> Is there any easy way to generate all the N subsets from A as follows:
>
> A1={1}, A2={1,2}, A3={1,2,3} ..., An-1= {1, ..., N-1}, An={1, 2, ..., N}?
>
> thanks very much.
>
>
> _______________________________________________
> Help-glpk mailing list
> [email protected]
> http://lists.gnu.org/mailman/listinfo/help-glpk
>
>
--
Leandro B. Barcelos
_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk