MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Permutations.


Alan W.Hopper speaks of

>wanting to find all the permutation subsets (with no 
>duplication and order not counting), of a numerical or symbolic list


Alan,

The following is an easy way to get what you want.  It may not be as
efficient as code written from scratch.

Sort[Flatten[Permutations/@KSubsets[{a,b,c,d},3],1]]

Of course, the Sort is optional, or you may want to sort by some other
comparison function than the default.

Will Self


  • Prev by Date: Making a large matrix
  • Next by Date: RE: Simplify
  • Previous by thread: Re: Permutations.
  • Next by thread: Re: Permutations.