chouria ali

0 Reputation

4 Badges

10 years, 171 days

MaplePrimes Activity

These are replies submitted by chouria ali

i don't find the solution in this link :

I wont to eliminate  {} .

G:=(S,n)->map(T->{T ,S minus T},combstruct[allstructs](Combination(S)));
> #G:=(S,n)->map(T->{T,S},combstruct[allstructs](Combination(S)));
G := (S, n) -> map(T -> {S minus T, T},


> EnsL := G({a, b, c, d, e});

EnsL := {{{}, {a, b, c, d, e}}, {{a}, {b, c, d, e}},

{{b}, {a, c, d, e}}, {{c}, {a, b, d, e}}, {{d}, {a, b, c, e}},

{{e}, {a, b, c, d}}, {{a, b}, {c, d, e}}, {{a, c}, {b, d, e}},

{{a, d}, {b, c, e}}, {{a, e}, {b, c, d}}, {{b, c}, {a, d, e}},

{{b, d}, {a, c, e}}, {{b, e}, {a, c, d}}, {{c, d}, {a, b, e}},

{{c, e}, {a, b, d}}, {{d, e}, {a, b, c}}}


how I can eliminate the {} in the first sub-set {{}, {1, 2, 3, 4, 5}} ??

yes that's what I wanna do , thx .


Is there a Maple procedure that generates all possible partitions of a given set? For example, for the set {1,2,3} it should give {1,2,3}, {1,{2,3}}, {2,{1,3}}, {3,{1,2}}, {{1,2,3}}.

If not, how could I write one?

Thank you!

Page 1 of 1