Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

11
  • $\begingroup$ That seems to work great with two lists, given my simple example question. In my real problem I am actually working with 6 lists with up to 25+ items in each list (and the item count may not be equal). I will try and study your code and see if I can work it out. The little manipulators like #,&,/,@ kind of seem kind of confusing, probably cause just because I am not clear on what they do in all cases. Thanks for the help! $\endgroup$ Commented Feb 17, 2012 at 17:02
  • $\begingroup$ Join @@ (Thread[{#, #, DeleteCases[cc, #]}] & /@ {aa, bb}) I tried this, expanding to three lists for a try, it keeps the 3rd list unique, but won't make the first two unique. I get almost the opposite! :) {1,1,4}, {2,2,8}, {3,3,12} etc. $\endgroup$ Commented Feb 17, 2012 at 17:17
  • $\begingroup$ @Sinistar please see my update $\endgroup$ Commented Feb 17, 2012 at 17:21
  • $\begingroup$ Perhaps, I misunderstood the question, but for the example lists a and b your first function outputs a list that contains both {2, 3}, {2, 4}, {2, 6}, {3, 4}, {3, 6}, {4, 6} and their reversed versions. $\endgroup$ Commented Feb 17, 2012 at 17:37
  • 2
    $\begingroup$ It's an Urn Ball problem. Remove a ball, and don't put it back in the choices (i.e. 'select without replacement') and ordering doesn't matter, Red, Blue, Black is the same as Blue, Red, Black. So with the list version, 1,2,4 is identical in this consideration to 4,2,1 (and lexicographically those are undesireable in this application). $\endgroup$ Commented Feb 17, 2012 at 18:03