in reply to Permutations in binary
UPDATE: And I'd have made the problem worse. That turns it into a factorial or 18! which is 6_402_373_705_728_000 permutations. (Even with the most efficient means I can think of to store this, pack it and push the result onto an array, it'd be 14,000 terabytes, not counting the internal overhead for the data structure. *sigh*). This comes about (and is why a uniq and sort would be necessary) because we have elements which are indistinguishable from one another. In the 425756 permutations I generated I had 420376 duplicates, or only 5380 results.
--
perl -pe "s/\b;([st])/'\1/mg"
|
|---|