Order of a permutation

### 11.2.13 Order of a permutation

If any permutation p on a finite set [0,…,n−1] is repeated often enough, it reach be the identity permutation. The smallest m such that pm is the identity is called the order of p.

The permuorder command computes the order of a permutation.

- permuorder takes p, a permutation.
- permuorder(p) returns the order of the permutation p.

#### Examples

permuorder([0,2,1])

2 |  |  |  |  |  |  |  |  |  |

permuorder([3,2,1,4,0])

6 |  |  |  |  |  |  |  |  |  |