MathGroup Archive 2007

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

Search the Archive

Re: All permutations of a sequence

  • To: mathgroup at smc.vnet.net
  • Subject: [mg76233] Re: All permutations of a sequence
  • From: "digrpat" <digrpat at aol.com>
  • Date: Fri, 18 May 2007 06:11:50 -0400 (EDT)
  • References: <f2h8t7$v4$1@smc.vnet.net>

permutationlist = {1, 2, 3, 4, 5, 6,}

allpermutations[list_List] := Drop[Permutations[list], -Length[list]!/2]

allpermutations[permutationlist]



"Virgil Stokes" <vs at it.uu.se> wrote in message 
news:f2h8t7$v4$1 at smc.vnet.net...
>I would like to get all unique permutations of a sequence (e.g.
> {1,2,3,4,5,6,7,8,9,10,11,12,13}) with the constraint that all sequences
> that have an opposite ordering are not included (e.g. {13, 12,
> 11,10,9,8,6,5,4,3,2,1}) would not be included.
>
> Are there some Mathematica commands that can be used to efficiently
> generate these permutations?
>
> --V. Stokes
>
> 



 Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
    ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------        
                http://www.usenet.com


  • Prev by Date: Re: Fit
  • Next by Date: Re: Permutations of a sequence - variation 2
  • Previous by thread: Re: All permutations of a sequence
  • Next by thread: Re: All permutations of a sequence