Talk:Factorial base numbers indexing permutations of a collection: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) (Mojibake and misspellings) |
Thundergnat (talk | contribs) m (→Mojibake and misspellings: Actually rotate left.) |
||
Line 49: | Line 49: | ||
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 |
* If '''g''' is greater than zero, rotate left the elements from '''m''' to '''m+g''' in '''Ω''' (see example) |
||
* Increment '''m''' and repeat the first step using the next most significant digit until the factorial base number is exhausted. |
* Increment '''m''' and repeat the first step using the next most significant digit until the factorial base number is exhausted. |
||
For example: using the factorial base number 2.0.1 and '''Ω''' = 0 1 2 3 |
For example: using the factorial base number 2.0.1 and '''Ω''' = 0 1 2 3 |
||
* Step 1: '''m=0 g=2'''; Rotate places 0 through 2 |
* 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 3 through 3 |
* Step 3: '''m=2 g=1'''; Rotate places 3 through 3 left. '''Ω''' becomes 2 0 3 1 |
||
<br> |
<br> |