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: [mg62473] Re: permutations
  • From: "Dana" <Dana.OnTheBeach at>
  • Date: Fri, 25 Nov 2005 02:25:28 -0500 (EST)
  • Sender: owner-wri-mathgroup at

> I would need to do permutations of lists of Length 20, perhaps 25.

Here are some other ideas.

lst = Range[25]; 

The size is too big to do anything meaningful:

n = 25!


Perhaps you just want to work with a random sample from that "large" list:

Table[RandomPermutation[lst], {3}]; 

If you would like to see the Permutation that is half-way in that "large"
list, perhaps more efficiently would be:

NthPermutation[n/2, lst]


The 2nd from the end of that "large" list:

NthPermutation[n - 2, lst]


HTH.  :>)
Dana DeLouis
Mathematica Windows, 5.2

"Francisco Gutierrez" <fgutiers2002 at> wrote in message
news:dm1jov$n4c$1 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

  • Prev by Date: Re: How to print on paper big matrixes ?
  • Next by Date: Re: How does NIntegrate suppress messages?
  • Previous by thread: Re: permutations
  • Next by thread: Re: permutations