Dear Forum,

Abdulsatar Al-Juburie asked:

> Let X be a finite set and let x be a fixed element of X.
> Is there any function in GAP that generates all subsets of X that contains x.

Provided that the set X is small enough such that the desired list
of subsets fits into the memory of the computer, the following statement
will do what you want:

List(Combinations(Difference(X,[x])),Y->Union(Y,[x]));

Hope this helps,

    Stefan Kohl



_______________________________________________
Forum mailing list
Forum@mail.gap-system.org
http://mail.gap-system.org/mailman/listinfo/forum

Reply via email to