Inneke, this looks like a straightforward programming task: think of elements of your product as indexed by lists, or better, as "numbers in mixed base" (e.g. if all yours sets are of size 10 then these numbers will be usual decimal numbers). All you need to implement is a function that computes the "next number", and this is really less than 10 lines of GAP code. Then you call this function in a repeat/until loop, and store the elements that satisfy your conditions only.
HTH, m.v.g., Dmitrii On 11/29/07 8:01 PM, "Inneke Van Gelder" <[EMAIL PROTECTED]> wrote: > Hi, > > > > > > I need to compute the Cartesian product of an arbitrary number of sets and > test the members of the Cartesian product to some conditions. But only a few > satisfy the conditions. My problem is that I exceed the permitted memory to > soon. Is there a way to compute the Cartesian product member by member and > test before saving? If the number of sets is known, it isn't difficult, > because you can avoid recursion. But what about an arbitrary number of sets? > > > > > > Thanks for helping, > > > > Inneke > > _______________________________________________ > Forum mailing list > [email protected] > http://mail.gap-system.org/mailman/listinfo/forum -- Dima Pasechnik http://www.ntu.edu.sg/home/dima/ _______________________________________________ Forum mailing list [email protected] http://mail.gap-system.org/mailman/listinfo/forum
