Jump to content

Permutation: Difference between revisions

From Wikibase
 
(9 intermediate revisions by the same user not shown)
Line 55: Line 55:
$$
$$
{{End hidden}}
{{End hidden}}
== Composition ==
Since each permutation is a [[function]], they can be composed:
$$
\pi \circ \sigma=
\begin{pmatrix}
s_1 & s_2 & \cdots & s_n \\
\pi(\sigma(s_1)) & \pi(\sigma(s_2)) & \cdots & \pi(\sigma(s_n))
\end{pmatrix}
$$


== Special permutations ==
== Special permutations ==
Line 178: Line 166:
<blockquote>
<blockquote>
All even permutations have sign $+1$ and all odd ones sign $-1$.
All even permutations have sign $+1$ and all odd ones sign $-1$.
</blockquote>
<blockquote>
For any [[#transposition|transposition]], $\operatorname{sign}(\tau)=-1$
</blockquote>
</blockquote>


<ref>{{#cite:Q2231}}</ref>
<ref>{{#cite:Q2231}}</ref>
== Composition ==
Since each permutation is a [[function]], they can be composed:
$$
\sigma_1 \circ \sigma_2=
\begin{pmatrix}
s_1 & s_2 & \cdots & s_n \\
\sigma_1(\sigma_2(s_1)) & \sigma_1(\sigma_2(s_2)) & \cdots & \sigma_1(\sigma_2(s_n))
\end{pmatrix}
$$
=== Composition properties ===
==== {{Anchor|existence of composite permutation}}Compositions of permutations are permutations ====
If $\sigma_1,\sigma_2$ are permutations of $S$, so is $\sigma_1 \circ \sigma_2$
{{Hidden proof}}
Since $\sigma_1,\sigma_2$ are permutations of $S$, by [[#formal definition|definition]]
$$
\sigma_1:S \to S \\
\sigma_2:S \to S
$$
Hence by [[Function#Composition|composition]]
$$
\sigma_1 \circ \sigma_2: S \to S
$$
which is a bijection of $S$ to $S$.
By [[#Formal_definition|definition]], any bijection of $S \to S$ is also a permutation of $S$, so $\sigma_1 \circ \sigma_2$, is also a permutation of $S$.
{{End hidden}}
==== {{anchor|sign composition}} $\operatorname{sign}(\sigma_1 \circ \sigma_2)= \operatorname{sign}(\sigma_1)\cdot\operatorname{sign}(\sigma_2)$ ====
Where $\sigma_1,\sigma_2$ are permutations of the same set.
{{Hidden proof}}
Let $S=\{s_1,s_2,\cdots,s_n\}$ be a set, $\sigma_1,\sigma_2$ two of its permutations.
For each pair of elements $s_a,s_b \in S: a \lt b$,
$$
\exists s_i,s_j \in S, i \lt j: \{\sigma_2(s_i),\sigma_2(s_j)\}=\{s_a,s_b\} \\
\exists s_m,s_k \in S: \sigma_1(s_a)=s_m,\sigma_1(s_b)=s_k, \\
\exists s_c,s_d \in S: (\sigma_1 \circ \sigma_2(s_i)=s_c,(\sigma_1 \circ \sigma_2)(s_j)=s_d, \\
$$
Define [[boolean-valued function]]s $I,P,Q$ that
$$
I_{a,b}=
\begin{cases}
1 ,& c \gt d \\
0 ,& c \lt d
\end{cases},\,
P_{a,b}=
\begin{cases}
1 ,& m \gt k \\
0 ,& m \lt k
\end{cases},\,
Q_{a,b}=
\begin{cases}
1 ,& s_a=\sigma_2(s_j),s_b=\sigma_2(s_i)\\
0 ,& s_a=\sigma_2(s_i),s_b=\sigma_2(s_j)
\end{cases},\\
$$
* If $Q=0$, $s_a=\sigma_2(s_i),s_b=\sigma_2(s_j)$
$$
I=1 \iff P=1
$$
* Else $Q=1$, $s_a=\sigma_2(s_j),s_b=\sigma_2(s_i)$
$$
I=1 \iff P=0
$$
Hence,
$$
I_{a,b} \equiv P_{a,b}+Q_{a,b} \pmod 2 \text{ for any } s_a,s_b \in S,\, a \lt b \\
\therefore \sum^{s_a,s_b \in S}_{a<b} I_{a,b} \equiv \sum^{s_a,s_b \in S}_{a<b} P_{a,b} + \sum^{s_a,s_b \in S}_{a<b} Q_{a,b} \pmod 2 \\
\therefore \operatorname{inv}(\sigma_1 \circ \sigma_2) \equiv \operatorname{inv}(\sigma_1)+\operatorname{inv}(\sigma_2) \pmod 2 \\
\therefore (-1)^{\operatorname{inv}(\sigma_1 \circ \sigma_2)} \equiv (-1)^{\operatorname{inv}(\sigma_1)+\operatorname{inv}(\sigma_2)} \\
\operatorname{sign}(\sigma_1 \circ \sigma_2)=\operatorname{sign}(\sigma_1)\cdot\operatorname{sign}(\sigma_2) \\
$$
{{End hidden}}
==== {{Anchor|transposition sign composition}}$\operatorname{sign}(\tau \circ \sigma)=-\operatorname{sign}(\sigma)$ ====
Where $\tau$ is a [[#transposition|transposition]] and $\sigma$ is any permutation of same set $S$.
{{Hidden proof}}
From [[#transposition|definition]], $\operatorname{sign}(\tau)=-1$.
From [[#sign composition|property]],
$$
\operatorname{sign}(\tau \circ \sigma)=\operatorname{sign}(\tau) \cdot \operatorname{sign}(\sigma) = - \operatorname{sign}(\sigma)
$$
{{End hidden}}
== {{anchor|inverse permutation}}Inverse permutation $\sigma^{-1}$ ==
If $\sigma$ is a permutation of set $S$, $\sigma^{-1}$ is also a permutation of set $S$.
{{Hidden proof}}
Since for any set $S$, $\sigma:S \to S$ is a bijection, $\sigma^{-1}: S \to S$ is also a bijection of $S$ to $S$.
By [[#Formal_definition|definition]], any bijection of $S \to S$ is also a permutation of $S$, so $\sigma^{-1}$, is also a permutation of $S$.
{{End hidden}}
=== Inverse permutation properties ===
==== {{Anchor|inverse composition}}$\sigma^{-1} \circ \sigma=\sigma_{id}=\sigma \circ \sigma^{-1}$ ====
for any permutation $\sigma$.
{{Hidden proof}}
Let $S=\{s_1,s_2,\cdots,s_n\}$ be a set, $\sigma$ be any one of its permutations.
By [[#Formal_definition|definition]],
$$
\forall s_a \in S: \exists s_b \in S, s_a \mapsto s_b
$$
By [[Function#Formal_definition|definition]],
$$
\sigma^{-1}: s_b \mapsto s_a \\
\therefore (\sigma^{-1} \circ \sigma)(s_a)=\sigma^{-1}[\sigma(s_a)]=\sigma^{-1}(s_b)=s_a,\, \forall s_a \in S \\
\therefore \sigma^{-1} \circ \sigma = \sigma_{id}
$$
Let $\sigma'=\sigma^{-1}$, then $\sigma'^{-1}=\sigma$. Since $\sigma$ is any permutation of $S$, $\sigma'$ can also be any permutation of $S$
$$
(\sigma' \circ \sigma'^{-1})(s_a)=\sigma'[\sigma'^{-1}(s_a)]=\sigma'(s_b)=s_a,\, \forall s_a \in S
\therefore \sigma' \circ \sigma'^{-1}=\sigma_{id}
$$
Hence
$$
\sigma^{-1} \circ \sigma=\sigma_{id}=\sigma \circ \sigma^{-1}
$$
{{End hidden}}
==== $\operatorname{sign}(\sigma)=\operatorname{sign}(\sigma^{-1})$ ====
for any permutation $\sigma$.
{{Hidden proof}}
From [[#inverse composition|property]],
$$
\sigma^{-1} \circ \sigma=\sigma_{id}
$$
From [[#sign composition|property]],
$$
\operatorname{sign}(\sigma^{-1} ) \cdot \operatorname{sign}(\sigma)=\operatorname{sign}(\sigma_{id})=1
$$
Hence
$$
\operatorname{sign}(\sigma)=\operatorname{sign}(\sigma^{-1})
$$
{{End hidden}}

Latest revision as of 18:13, 18 October 2026

Languages: English · français · Esperanto

A permutation represents a particular way of arranging the elements in a set.

Formal definition

Let $S$ be a set.

Any bijective function

$$ \sigma: S \to S $$

is a permutation of set $S$.

Notation

In general, a permutation for set $S=\{s_1,s_2,\cdots,s_n\}$ can be noted:

$$ \sigma = \begin{pmatrix} s_1 & s_2 & \cdots & s_n \\ \sigma_{s_1} & \sigma_{s_2} & \cdots & \sigma_{s_n} \end{pmatrix}. $$

Special permutations

Identity permutation: $\sigma_{id}(s)=s$

The identity permutation for set $S=\{s_1,s_2,\cdots,s_n\}$ is

$$ \sigma_{id} = \begin{pmatrix} s_1 & s_2 & \cdots & s_n \\ s_1 & s_2 & \cdots & s_n \end{pmatrix}. $$

Transposition

A transposition is a permutation that swaps only two elements and do nothing to the rest of the elements.

i.e.,

if $$ \exists i,j \in \{1,2,\cdots,n\}: \begin{cases} \tau(s_i)=s_j \\ \tau(s_j)=s_i \\ \tau(s_k)=s_k ,& \forall k \in \{1,2,\cdots,n\}, k \ne i \lor j \end{cases} $$

then $\tau$ is a transposition of set $\{s_1,s_2,\cdots,s_n\} $.

Symmetric groups $\mathcal{S}_{n}$

$\{\sigma_1,\sigma_2,\sigma_3,\cdots,\sigma_{n!}\}$, the set of all permutations for $\{1,2,3,\cdots,n\}$, is known as the symmetric group of degree n, denoted by $\mathcal{S}_n$.

Properties

$n$ elements $\Rightarrow $ $n!$ permutations

For any set $S:|S|=n$:

$$ |\operatorname{Perm}(S)|=n! $$

Inversion pairs

Let $A$ be a set and

$$ \sigma_1= \begin{pmatrix} a_1&a_2&\cdots&a_n \\ b_1&b_2&\cdots&b_n \end{pmatrix},\, a,b \in A $$

be one of its permutation.

$$ \begin{aligned} \forall a_i,a_j &: i,j \in \{1,2,\cdots,n\}, \\ \exists b_p,b_q &: p,q \in \{1,2,\cdots,n\} \Rightarrow b_p=a_i,\ b_q=a_j \\ &\text{if } p \lt q \land i \gt j \\ &\Rightarrow (p,q) \text{ is an } \textbf{inversion pair} \end{aligned} $$

The number of unique inversion pairs in arbitrary permutation $\sigma$ is often denoted by $\operatorname{inv}(\sigma)$

If $\operatorname{inv}(\sigma) \equiv 0 \pmod 2$, $\sigma$ is called an even permutation. Elsewise it is an odd permutation.

$\operatorname{sign}(\sigma)$

$$ \operatorname{sign}(\sigma) = (-1)^{\operatorname{inv}(\sigma)} $$

All even permutations have sign $+1$ and all odd ones sign $-1$.

For any transposition, $\operatorname{sign}(\tau)=-1$

[1]

Composition

Since each permutation is a function, they can be composed:

$$ \sigma_1 \circ \sigma_2= \begin{pmatrix} s_1 & s_2 & \cdots & s_n \\ \sigma_1(\sigma_2(s_1)) & \sigma_1(\sigma_2(s_2)) & \cdots & \sigma_1(\sigma_2(s_n)) \end{pmatrix} $$

Composition properties

Compositions of permutations are permutations

If $\sigma_1,\sigma_2$ are permutations of $S$, so is $\sigma_1 \circ \sigma_2$

$\operatorname{sign}(\sigma_1 \circ \sigma_2)= \operatorname{sign}(\sigma_1)\cdot\operatorname{sign}(\sigma_2)$

Where $\sigma_1,\sigma_2$ are permutations of the same set.

$\operatorname{sign}(\tau \circ \sigma)=-\operatorname{sign}(\sigma)$

Where $\tau$ is a transposition and $\sigma$ is any permutation of same set $S$.

Inverse permutation $\sigma^{-1}$

If $\sigma$ is a permutation of set $S$, $\sigma^{-1}$ is also a permutation of set $S$.

Inverse permutation properties

$\sigma^{-1} \circ \sigma=\sigma_{id}=\sigma \circ \sigma^{-1}$

for any permutation $\sigma$.

$\operatorname{sign}(\sigma)=\operatorname{sign}(\sigma^{-1})$

for any permutation $\sigma$.