Permutation Generation Methods [pdf]
homepage.divms.uiowa.edu
homepage.divms.uiowa.edu
Surprisingly, we only have optimal superpermutations for really low values on N [4].
I tried my hand at auto-generating symmetric patterns (which turn out to not be optimal after some value of N (6?)), but the problem is quite tough. Currently the best approaches appear to be achieved by using a TSP solver.
[1] https://www.gregegan.net/SCIENCE/Superpermutations/Superperm...
[2] https://oeis.org/A180632/a180632.pdf
[3] https://groups.google.com/g/superpermutators
[4] https://github.com/superpermutators/superperm/tree/master/su...
I guess it makes sense as an implication of the idea that "On the Internet, nobody knows you're a dog." [0]
I was surprised when I went to implement some of them a decade ago that it's actually very readable, if Knuth's reputation scares you.
I made visualizations of a few of them way back then: https://billmill.org/permvis.html
I also found an article by James McCaffrey named "Using Permutations in .NET for Improved Systems Security" but I can't find it again.
I used them a few years ago to enumarate all possible permutations to find the best solution to a small sample of TSP and compare it to the approximate solution found by an algorithm.
EDIT: looks like my source was just https://en.wikipedia.org/wiki/Factorial_number_system
IIRC Iverson presents the isomorphism between factoradic ([R]adix) and indexed ([D]irect) permutation representations in his Turing Award Lecture[0] (p456, via a pair of APL functions):
DFR:ω[1],X+ω[1]≤X←DFR 1↓ω:O=pω:ω
RFD:ω[1],RFD X-ω[1]≤X←1↓ω:O=pω:ω
[0] https://dl.acm.org/ft_gateway.cfm?id=1283935&type=pdf int[] array = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
do {
print(array);
} while (nextPermutation(array));
https://www.nayuki.io/page/next-lexicographical-permutation-...This even works with duplicate values.
Any mention of symmetric crypto in there?
After all, permutation generation is what a sizable chunk symmetric crypto is about.
[edit]: and now that I've skimmed through the paper, I see it is not really about permutation generation but rather permutation enumeration, so symmetric crypto is out.