# Decomposing a permutation into multiplication of transpositions [duplicate]

I have a permutation in cyclic notation, for example $(132)$, and i want to represent it as multiplication of transpositions.

What is the fastest way to do it?

• – amWhy Oct 21 '16 at 20:25
• In your example $(132)$, the first method defined would yield: $(12)(13)$, and the second method would yield, as in the answer below, $(13)(32)$. Both products yield $(132)$. – amWhy Oct 21 '16 at 20:30

First, it matters what $(132)$ means (i.e. whether it means $1\to3\to2\to1$ or $2\to3\to1\to2$). If it means the former (which is the convention I use), then $(132)=(13)(32)=(13)(23)$. In general, you can write $$(a_1,a_2,\ldots,a_n)=(a_1a_2)(a_2a_3)\cdots(a_{n-1}a_n).$$