Anonymous user
Talk:Factorial base numbers indexing permutations of a collection: Difference between revisions
Talk:Factorial base numbers indexing permutations of a collection (view source)
Revision as of 23:01, 8 December 2018
, 5 years agominor correction and comment (hopefully correct)
Thundergnat (talk | contribs) m (→Mojibake and misspellings: Actually rotate left.) |
(minor correction and comment (hopefully correct)) |
||
Line 47:
Starting with '''m=0''' and '''Ω''', an array of elements to be permutated, for each digit '''g'''
starting with the '''most''' significant digit in the factorial base number. Note: '''Ω''' is also indexed from most significant ('''Ω'''[0] is the left most digit).
* If '''g''' is greater than zero, rotate left the elements from '''m''' to '''m+g''' in '''Ω''' (see example)
Line 56:
* Step 1: '''m=0 g=2'''; Rotate places 0 through 2 left. '''Ω''' becomes 2 0 1 3
* Step 2: '''m=1 g=0'''; no action
* Step 3: '''m=2 g=1'''; Rotate places
<br>
|