In the comment to the article Eric replied to an observation that since the size of a permutation grows exponentially, it would quickly outgrow numbers representable with 32 bits. Eric's reply was that he has no intention of indexing permutations, by which he meant defining a numbering scheme to obtain a sequential number of a permutation. That is why, he said, overflowing 32 bits was not one of his concerns: his approach allowed to enumerate, or simply "produce", all permutations in some order, as opposed to providing a way to get N-th
permutation according to some numbering scheme.
Contrast this to a problem discussed in a question about producing N-th
permutation without going through all the preceding ones: here, the author wants to index, or give numbers to, permutations, so the size of an integer is of a concern to them.
Here is an example of indexing permutations discussed in the question linked above:
1 ABC
2 ACB
3 BAC
4 BCA
5 CAB
6 CBA
This indexing scheme lets you answer two questions:
- What is the number of a particular permutation, say,
BCA
? (it's 4) - What is permutation number
X
, say, 5? (it'sCAB
)
This problem could be somewhat harder than enumerating all permutations, because you need to produce a numbering scheme.