Permutation: Permute randomly (blocks)...

Generates a new Permutation by randomly permuting blocks of size blocksize.

## Settings

Index range
  the range of elements whose blocks will be permuted.
Block size
  the size of the blocks that will be permuted. There must fit an integer number of blocks in the chosen range.
Permute within blocks
  when on, the elements in each block are also randomly permuted.
No doublets
  guarantees that the first element in each block does not equal the last element of the previous block modulo the block size. E.g. the numbers 3, 6, 9 are all equal modulo 3. This parameter only has effect when Permute within blocks is on.

## Examples

1. With Index range = [0,0], Block size = 3 and Permute within blocks is off, the permutation ((1,2,3),(4,5,6),(7,8,9)) is turned into one of six possible permutations, for example into ((4,5,6),(7,8,9),(1,2,3)). (The option No doublets will be ignored and the parentheses are only there to indicate the blocks.)

2. With Index range = [0,0], Block size = 3, Permute within blocks is on and No doublets is off, the permutation ((1,2,3),(4,5,6),(7,8,9)) might turn into ((5,4,6),(9,8,7),(3,1,2)).

3. With the same options as 2 but No doublets is on, the previously given outcome is forbidden because the last element of the first block (6) and the first element of the next block (9) are equal modulo 3 (the blocksize). A valid outcome might then be ((5,4,6),(8,9,7),(3,1,2)).

### Links to this page

- Strings & Permutation: Permute strings