0
$\begingroup$

Say you have a permutation $f$, and you want to know the smallest $m$ such that $f^m$ is the identity, how would you go about this? I'm assuming I have to square, cube etc, but is there a quicker method?

  • 0
    are you asking for an algorithmic or mathematical approach?2017-02-26
  • 0
    classic mathematical on paper by hand approach2017-02-26

2 Answers 2

1

You could indeed exponentiate the permutation until you get the identity. There is a less direct method that is faster in an asymptotic sense in the worst case.

A permutation can be written uniquely as a product of disjoint cycles. This essentially is a way to break the indices into a set of subsets ("cycles") of possibly varying sizes depending on the arrangement of the numbers. These are determined by which numbers "point" to each other. This can be done in linear time.

Let us do an example. Take the permutation $$345216$$ Start with the first position: $1$. At position $1$ there is a $3$, so we look to position $3$, where there is a $5$. At position $5$ there is a $1$, so we are back to where we started. This chain is the cycle $(135)$.

Next we move to the next element not in a cycle we've found already, which is $2$. At position $2$ there is a $4$, and at position $4$ there is a $2$. This is the cycle $(24)$. The last cycle contains only $6$. Thus the permutation is the product $$(135)(24)(6)$$ The $(6)$ is often omitted since it is the identity.

Now how do we determine the order from this? Well the order of an $n$-cycle is $n$, and the cycles commute with each other. Thus the order of a permutation is the least common multiple of the lengths of its cycles, so in this case $6$.

Though you may not be able to use the full power of this result, the exponentiation will be easier in terms of the cycle decomposition.

0

Use decomposition of $f$ in cyclic permutations $$f = \left(k_{11},k_{12},\dots,k_{1i_1}\right)\left(k_{11},k_{12},\dots,k_{1i_2}\right)\dots\left(k_{11},k_{12},\dots,k_{1i_l}\right).$$

Then $f^m = \text{id}$ if and only if $i_j\mid m$, namely each cycle is identity after being raised in power $m$. So that the minimum $m$ is LCD of $\{i_1,\dots,i_l\}$.