Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: permutations

  • To: mathgroup at
  • Subject: [mg62421] Re: permutations
  • From: "Scout" <Scout at>
  • Date: Thu, 24 Nov 2005 06:33:20 -0500 (EST)
  • References: <dm1jov$n4c$>
  • Sender: owner-wri-mathgroup at

"Francisco Gutierrez" <fgutiers2002 at>
> Dear Group:
>  If I do for example:
>  Permutations[{x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12}],
>  my computer runs out of memory.
>  This is not such a poor computer.  Actually, I would need to do 
> permutations of lists of Length 20, perhaps 25.  I am aware these 
> calculations are big (Length[x]!), but I wonder if there is some way 
> around the problem. Compilating Permutations? But then how? Can somebody 
> help me?
>  Francisco Gutiérrez
Hi Francisco,
have you already tried to use the NextPermutation[] function?
Let's say

NextPermutations[ l ]  gives
that differ from the previous list in only one change.
So, applying repeatedly NextPermutation[] you can cover
all the Length[l]! permutations.
I hope this help you,

  • Prev by Date: Avoiding divide by zero error in NDSolve
  • Next by Date: Re: permutations
  • Previous by thread: Re: permutations
  • Next by thread: Re: permutations