Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Lists - Splits - Combination' topicStudent Support Forum > General > Archives > "Lists - Splits - Combination"

Next Comment >Help | Reply To Topic
Author Comment/Response
EG
08/11/02 11:07am

Hello,

I would like to pose the following research question:
Suppose I have a list = {a,b,c,d,e,f,g,h} and suppose I wand to split this list into 2 lists resulting into,e.g.,
list(2) = {{a,b,c,d,e,f,g,h}}.

And now I want to find all possible "combinations" (not permutations) of elements being either in the first list or in the second,i.e.,(the same element is not allowed to be in both lists):

list(3) = {a,b,c,d,e,f,g,h},{}
list (4) = {a,b,c,d,e,f,g},{h}
list (5) = {a,b,c,d,e,f,},{g,h}
.......
......
.....
....
...
..
list (10) = {a}, {b,c,d,e,f,g}

Now I would like to exclude the next list(11} (due to the symmetry with list(3):
list (11) = {}, {a,b,c,d,e,f,g}

list (12) = {a,g},{b,c,d,e,f}
.......
.....
.....
....

Now, I was not able to find a "Combination" function in Mma. I only found the "Permutation" function which is not what I was looking for. Moreover I was not able to "split" the lists into 2 lists with an appriate existing function.

Please let me know if there is any elegant way to achieve the aforementioned. (Or: be so kind to point me into the right direction).

Thanks in Advance,
EG

URL: ,

Subject (listing for 'Lists - Splits - Combination')
Author Date Posted
Lists - Splits - Combination EG 08/11/02 11:07am
Re: Lists - Splits - Combination Henry Lamb 08/16/02 00:18am
Next Comment >Help | Reply To Topic