10 minute read

参考文献:

1. Permutation GroupsPermalink

Definition 1: Let X be a set. A permutation of X is simply a bijection f:XX

  • 那既然 permutation 是一个双射函数,那 permutation 的 composition fg 也是一个 permutation
  • 同时,双射函数的逆函数存在,且也是双射的,所以 f1 也是 permutation

Lemma 2: Let X be a set. The set of all permutations on X, under the operation of composition , forms a Group S(X).

Group 的概念见 Is vector space a field? And what are: Groups / Rings / Fields / Vector Spaces?。简而言之,我们说 S(X) 是 Group 是因为它满足 Group 的 4 个 axiom:

  1. Closure: f,gS(X),fgS(X)
  2. Associativity: f,g,hS(X),(fg)h=f(gh)
  3. Identity element: IS(X) such that I(X)=X
  4. Inverse element: fS(X),f1S(X) such that ff1=I
  • 注意交换律 Commutativity 不是 Group 的 axiom
    • i.e. fggf

Lemma 3: If |X|=n, then |S(X)|=n!

Definition 4: The Group Sn is the set of permutation of the first n natural numbers {1,2,,n}

2. Permutation Notations / Order of A PermutationPermalink

第一种写法是把 permutation f 的 domain X 列在第一行,把 image f(X) 列在第二行,形如:

f=(x1x2xnf(x1)f(x2)f(xn))

以下我们为了方便我们主要研究 Sn。第一种写法的举例:

σ=(12342341)S4

这种写法的问题在于:看不出 σ 的 order。那具体啥是 permutation 的 order?

Definition 5: Let σSn. The order of σ, denoted order(σ)=m is the smallest positive integer m such that σm=I where I is the identity permutation.

举例:

σ=(12344321)σσ=(12344321)(12344321)=(12341234)=I

为此我们需要一种 “表达能力” 更强的 notation,于是我们有了下文的 cycle notation.

Definition 6: Let σSn. We say that σ is a k-cycle if there are integers x1,x2,,xk such that σ(x1)=x2,σ(x2)=x3,,σ(xk)=x1 and σ holds for every other integer (i.e. σ(xj)=xj,j>k)

  • 注意这里并没有说 x1=1,比如你可以有 σ(2)=3,σ(3)=4,σ(4)=2,这也算是一个 3-cycle

由此我们可以有第二种写法:如果 permutation σ 是一个 k-cycle,我们可以写成 σ=(x1,x2,,xk)。举例:

σ=(12342341)σ=(1,2,3,4)
  • 注意这个表达方式不唯一,明显你写成 σ=(xk,x1,x2,,xk1) 也是可以的
  • 明显,此时我们可以直接得出:σ 的 order 是 k
    • 好比你一路往右 shift,shift 了一圈 (k 次) 又回到了起点

但并不是每个 permutation 都能写成一个完整的 k-cycle,所以我们我们扩展一下第二种写法,称为 cycle decomposition of permutation:

Definition-Lemma 7: σSn,σ can be expressed as a product of disjoint cycles. This decomposition is unique, ignoring 1-cycles, up to order. The cycle type of σ is the lengths of cycles in the decomposition.

  • 注意这里这个 “up to order” 指 “从 order 的角度来看 (是 unique 的)”,这是数学教材里的一个常用的表达式,具体可以参考 How do I understand the meaning of the phrase “up to~” in mathematics?
  • 因为 cycle 的写法不唯一,所以这里它这里 “up to order” 的具体含义就是:如果两个 cycle 的 order 是相同的,就认为是 cycle 是相同的,而不算是违反了 unique

举例:

σ=(1234534152)σ=(1,3)(2,4,5) cycle type of σ is (2,3)

注意这里应该这么看:k-cycle 本身也是 permutation,所以上面其实是说:任意一个 permutation 都能看做是几个 disjoint 的 k-cycle-styled 的 permutation 的 composition, i.e. σ=ck1ck2ckl

  • 换言之 cycle decomposition 是严格意义上的 function decomposition

Lemma 8: Let σSn be a permutation with cycle type (k1,k2,,kl). The order of σ is the least common multiple of k1,k2,,kl

3. TranspositionsPermalink

Definition: A transposition is simply a 2-cycle.

E.g. τ=(1)(3)(5)(2,4)S5 就是一个 transposition;一般也简写成 τ=(2,4)

permutation 可以被 cycle decomposition;类似地,cycle 也能被 transposition decomposition,进而也可以认为 permutation 能被 transposition decomposition

  • 我们可以特别定义 1-cycle (xi) 等价于两个 transposition (xi,xj)(xj,xi) where xj is a random member in X other than xi,为 transposition decomposition 的合法性铺路

3.1 Transposition Decomposition and CommutativityPermalink

但在讲 transposition decomposition 之前,我要强调一下 Commutativity 的问题。

前面有讲,Sn 或者 S(X) 作为一个 group 是不保证 Commutativity 的。但要注意,在 cycle decomposition 的定义里,我们有一个很关键的修饰语——disjoint。可以证明,disjoint 的 k-cycles 是满足 Commutativity 的

但在 transposition decomposition 的时候,我们并没有强调 disjoint,实际情况也不可能要求它 disjoint,所以一般情况下 transposition 是没有 Commutativity 的。举例:对 X={1,2,3} 而言:

(1,2)=(123213)(1,3)(1,2)=(123231)(1,3)(1,2)=(1,2,3) (1,3)=(123321)(1,2)(1,3)=(123312)(1,2)(1,3)=(1,3,2)

3.2 How to Decompose a k-Cycle into Transpositions: ck=τ1τ2τk1Permalink

一个 k-cycle (x1,x2,,xk) 可以有两种 decomposition:

  1. (x1,x2,,xk)=(x1,x2)(x2,x3)(xk1,xk)
  2. (x1,x2,,xk)=(x1,xk)(x1,xk1)(x1,x2)

注意根据 function composition 的定义,是右边的 transposition 先执行

第一种分解方式:

(x1x2xk3xk2xk1xk) original X(x1x2xk3xk2xkxk1)(xk1,xk) applied(x1x2xk3xk1xkxk2)(xk2,xk1) applied(x1x2xk2xk1xkxk3)(xk3,xk2) applied(x1x3xk2xk1xkx2)(x2,x3) applied(x2x3xk2xk1xkx1)(x1,x2) applied

第二种分解方式:

(x1x2x3x4xk1xk) original X(x2x1x3x4xk1xk)(x1,x2) applied(x2x3x1x4xk1xk)(x1,x3) applied(x2x3x4x1xk1xk)(x1,x4) applied(x2x3x4x5x1xk)(x1,xk1) applied(x2x3x4x5xkx1)(x1,xk) applied

3.3 How to Compose a Permutation with A Transposition: στ=?,τσ=?Permalink

考虑这么一个问题:假设有一个 permutation σSnnc 个 disjoint cycles,现在有一个 transposition τ=(a,b)Sn,问 τσστ 会有多少个 disjoint cycles?

这个问题要分两种情况考虑:

(1) 假设 a,b 处在 σ 的一个 cycle 内,假设这个 cycle 是 γ=(a,x1,x2,,xr,b,y1,y2,,ys)。为了演示方便,我们不妨假设有一个 X={1,2,,n} 的子集刚好就是 X={a,x1,x2,,xr,b,y1,y2,,ys},那么 γ 可以简写成:

γ=(ax1x2xrby1y2ysx1x2xrby1y2ysa)

那么 τγ 就相当于把 γ permuate 后的结果里的 a,b 再 swap 一次,于是有:

τγ=(|ax1x2xr|by1y2ys||x1x2xra|y1y2ysb|)

相当于把 γ 切成了两个新的 disjoint cyles

同理,γτ 相当于先把 X 里的 a,b swap 之后,再按 γ permutate,于是有:

γτ=(ax1x2xrby1y2ysx1x2xrby1y2ysa)(ax1x2xrby1y2ysbx1x2xray1y2ys)=(a|x1x2xrb|y1y2ysy1|x2xrbx1|y2ysa)

同样也是相当于把 γ 切成了两个新的 disjoint cyles

因为 τ 不会影响其他的 cycle,所以 τσστ 在这中情况下会有 nc+1 个 disjoint cycles

(2) 假设 a,b 处在 σ 的两个 cycle 内,假设这两个 cycles 分别为 γ1=(a,x1,x2,,xr),γ2=(b,y1,y2,,ys)

类似地,有:

τ(γ1γ2)=(ax1x2xrby1y2ysbx1x2xray1y2ys)(ax1x2xr|by1y2ysx1x2xra|y1y2ysb)=(ax1x2xrby1y2ysx1x2xrby1y2ysa) (γ1γ2)τ=(ax1x2xr|by1y2ysx1x2xra|y1y2ysb)(ax1x2xrby1y2ysbx1x2xray1y2ys)=(ax1x2xrby1y2ysy1x2xrax1y2ysb)=重排列一下(bx1x2xray1y2ysx1x2xray1y2ysb)

相当于把 γ1γ2 合并成了一个新的大 cyle

因为 τ 不会影响其他的 cycle,所以 τσστ 在这中情况下会有 nc1 个 disjoint cycles

3.4 Inversions / Parity / Sign of A PermutationPermalink

Definition: Let σS(X) be a permutation. An inversion of σ is an pair (i,j)X2 such that i<j while σ(i)>σ(j)

  • 按照这个定义,任意一个 transposition 都算是一个 inversion

Definition: Permutaion σ is odd when its number of inversions, inv(σ), is odd; otherwise even

Definition: The sign of permutation σ is the parity of its number of inversions, i.e sgn(σ)=(1)inv(σ)

Lemma: inv(σ)=inv(σ1),sgn(σ)=sgn(σ1)

Lemma: inv(στ)inv(σ)+inv(τ)(mod2)

  • ab(modp) 表示 (a - b) % p == 0

Lemma: sgn(στ)=sgn(σ)×sgn(τ)

Lemma: Suppose there are Nc disjoint cycles, including 1-cycles, in permutation σSn, then sgn(σ)=(1)nNc

Proof: 根据 transposition decomposition,任意一个 k-cycle (k2) 都可以分解成 k1 个 decompositions,相当于贡献了 k1 个 inversions

特别地,我们认为 1-cycle 贡献了 0 个 inversion

于是 inv(σ)=i=1Ncki1=nNc.

Categories:

Updated:

Comments