I know that it's possible to assign to each permutation its cycle type. I found two definitions of the cycle type and its relation to a partition of $n$:
First definition
Given $\sigma \in S_n$ written as product of $l$ cycles of lengths $(k_1,\dots,k_l)$, the cycle type is just $(k_1,\dots,k_l)$. Then by ordering the product so that $k_1 \geq k_2 \geq \dots \geq k_l$ and seeing that $\sum_i k_i = n$, one obtains that $(k_1,\dots,k_l)$ is a partition of $n$.
Second definition
Given $\sigma \in S_n$ the cycle type is the list $(w_1,...,w_n)$ where $w_i$ is the number of $i$-cycles in the product. Then it's possible to build a partition $\lambda = (\lambda_1,\dots,\lambda_n)$ of $n$ in the following manner:
- $\lambda_1 = \sum_{i=1}^{n} w_i$
- $\lambda_2 = \sum_{i=2}^{n} w_i$
- $\dots$
- $\lambda_n = w_n$
since $\lambda_1 \geq \lambda_2 \geq \dots \geq \lambda_n$ and $\sum_{i=1}^{n} \lambda_i = n$ we know that $\lambda$ is indeed a partition of $n$.
Young Diagram
I know that we can show a partition graphically using a Young diagram where each row, starting from the top (in the English style), contains a number of boxes that is equal to the i-th number listed in the partition.
So, by the previous definitions, a Young diagram would have $k_1$ or $\lambda_1$ in its first row, then $k_2$ or $\lambda_2$ in its second row, and so on.
Question I'm getting confused because when I apply these two definitions, given a $\sigma \in S_n$ I get two different partitions and hence two different Young diagrams.
For example let $\sigma = (123)(45) \in S_5$. If we use the first definition, the cycle type would be $(3,2)$ and the corresponding Young diagram would have $3$ boxes in the first row and $2$ boxes in the second.
However, if we use the second definition the cycle type ($w$) would be $(0,1,1,0,0)$ while the partition ($\lambda$) would be $(2, 2, 1, 0, 0)$ so that the Young diagram would have $2$ boxes in the first row, $2$ boxes in the second row and $1$ box in the third row.
Which one is the correct definition?
Thanks.