8 ms·
Reminds of the french article by Laisant published in 1888 about the factorial number system (factoradic) and its application to permutations. http://www.numdam
by lkuty 4y ago
Reminds of the french article by Laisant published in 1888 about the factorial number system (factoradic) and its application to permutations. http://www.numdam.org/item/?id=BSMF_1888__16__176_0 http://www.numdam.org/item/?id=BSMF_1888__16__176_0
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 https://en.wikipedia.org/wiki/Factorial_number_system
- qsort 4y agoInterestingly, this is basically what CPython does to implement its native permutations function. The C source is, as always, extremely easy to understand: https://github.com/python/cpython/blob/main/Modules/itertoolsmodule.c#L3356 https://github.com/python/cpython/blob/main/Modules/itertool...
- 082349872349872 4y agonice find in Numdam; chouette ! 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 https://dl.acm.org/ft_gateway.cfm?id=1283935&type=pdf