Talk:Factorial base numbers indexing permutations of a collection: Difference between revisions
Content added Content deleted
(minor correction and comment (hopefully correct)) |
|||
Line 47: | Line 47: | ||
Starting with '''m=0''' and '''Ω''', an array of elements to be permutated, for each digit '''g''' |
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 |
starting with the '''most''' significant digit in the factorial base number. |
||
* If '''g''' is greater than zero, rotate left the elements from '''m''' to '''m+g''' in '''Ω''' (see example) |
* If '''g''' is greater than zero, rotate left the elements from '''m''' to '''m+g''' in '''Ω''' (see example) |
||
Line 56: | Line 56: | ||
* Step 1: '''m=0 g=2'''; Rotate places 0 through 2 left. '''Ω''' becomes 2 0 1 3 |
* 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 2: '''m=1 g=0'''; no action |
||
* Step 3: '''m=2 g=1'''; Rotate places |
* Step 3: '''m=2 g=1'''; Rotate places 3 through 3 left. '''Ω''' becomes 2 0 3 1 |
||
<br> |
<br> |