Re: permutations
- To: mathgroup at smc.vnet.net
 - Subject: [mg62450] Re: permutations
 - From: dh <dh at metrohm.ch>
 - Date: Thu, 24 Nov 2005 06:33:50 -0500 (EST)
 - References: <dm1jov$n4c$1@smc.vnet.net>
 - Sender: owner-wri-mathgroup at wolfram.com
 
Hi Francisco,
The number of permutations can easily be calcultaed by n!. For n=20 this 
gives a number of the order of 10^18. You will certainly not be able to 
store this in the near future.
What can you do? Although I can not imagine what you want to do with so 
many permutations, you could still use: NextPermutation from the 
package: DiscreteMath`Combinatorica`. This will give you one permutation 
at a time. Of course, it will take some patience to go through all 
permutations!
Daniel
Francisco Gutierrez wrote:
> 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
> 
> 		
>