437 views

### A replacement for NextPermutation in Combinatorica [duplicate]

Does anyone know of a replacement for NextPermutation in Combinatorica? The problem with loading Combinatorica is that it interferes with new functionality which I ...
2k views

### Need to create a function to generate all permutations of Range[$n$] [duplicate]

Basically I need a function that takes a list and gives all the possible permutations of it. The reason I can't use Permutations is that I have to apply another ...
236 views

### The i-th element of a permutation [duplicate]

I am trying to run something of the form ...
227 views

### Want to compute the permutations of {1, 2, ..., 11} with only 3 GB of memory [duplicate]

There is another way to calculate Permutations [{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}] without triggering an error, I have 3 GB of RAM with WIN 7 Edit: This ...
72 views

### Permutations of $\{1, 2, \dots, n\}$ [duplicate]

When I try Permutations[Range[1, 12]]; // AbsoluteTiming I get {53.6949, Null} and with ...
2k views

### Faster derangements?

I wonder what is the fastest method to generate derangements? Both the Combinatorica function and Martin Ender's answer to Permutations of lists of fixed even numbers are based on filtering the ...
5k views

### Looking for "Longest Common Substring" solution

I'm looking for robust code to solve the "Longest Common Substring" problem: Find the longest string (or strings) that is a substring (or are substrings) of two or more strings. I can just code it ...
776 views

### How do I iterate through all permutations of a list? [closed]

I need to generate all permutation of a list of integers, but doing so (the list has around 60 elements, is not practical. Is there a way to iterate through all permutations of a list, without first ...
145 views

### Permutations without using the built in function in Wolfram

I suspect this is a really silly question but for the life of me, I am unable to figure out how to define a function that creates all the permutations of a given list. I know I can use the Permutation ...
324 views

### Generating a permutation of elements in chunks

Is there a way for me to generate a list of permutations in "chunks" such that I needn't store everything on RAM all at once? Consider that (WARNING: DO NOT RUN! --- Will generate a list with 13! = ...
356 views

### Generate a list of values with equal number of each value

I want to create a list of 32 values such that from {a,b} I can generate ...