MathGroup Archive 1998

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

Search the Archive

Re: Permutations.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg14789] Re: [mg14771] Permutations.
  • From: wself at viking.emcmt.edu (Will Self)
  • Date: Wed, 18 Nov 1998 01:28:52 -0500
  • Sender: owner-wri-mathgroup at wolfram.com

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.