Permutations - Mathematics

11/12/2014
Ma/CS 6a
Class 17: More Permutations
𝑦𝑠
π‘Ž
π‘Ž
𝑦𝑠
π‘Ž
…
π‘₯1
…
π‘₯1
𝑦1
π‘₯2
𝑦1
π‘₯2
𝑏
π‘₯π‘Ÿ
𝑏
𝑏
π‘₯π‘Ÿ
By Adam Sheffer
Reminder: The Permutation Set 𝑆𝑛
ο‚— 𝑆𝑛
– The set of permutations of
ℕ𝑛 = 1,2,3, … , 𝑛 .
ο‚— The set 𝑆3 :
1 2 3
↓ ↓ ↓
1 2 3
1 2 3
↓ ↓ ↓
1 3 2
1 2
↓ ↓
2 1
3
↓
3
1 2 3
↓ ↓ ↓
2 3 1
1 2 3
↓ ↓ ↓
3 1 2
1 2
↓ ↓
3 2
3
↓
1
1
11/12/2014
Reminder: Cycle Notation
ο‚—
We can consider a permutation as a set of
cycles.
1 2 3 4 5 6
↓ ↓ ↓ ↓ ↓ ↓
5 6 3 2 1 4
1β†’5
ο‚—
2β†’6β†’4
3
We write this permutation as
15 264 3 .
Reminder: Classification of
Permutations
ο‚—
Both (1 2 4)(3 5) and (1 2 3)(4 5) are of
the same type: one cycle of length 3 and
one of length 2.
β—¦ We denote this type as 2 3
ο‚—
In general, we write a type as
1𝛼1 2𝛼2 3𝛼3 4𝛼4 … .
2
11/12/2014
The 15 Puzzle and Permutations
ο‚—
How a configuration of the puzzle can be
described as a permutation?
β—¦ Denote the missing tile as 16.
β—¦ The board below corresponds to the
permutation
1 16 3 4 6 2 11 10 5 8 7 9 14 12 15 13
The 15 Puzzle Revisited
ο‚—
What kind of permutations describe a
move in the 15 Puzzle?
β—¦ Permutations that switch 16 with an element
that was adjacent to it.
3
11/12/2014
Transpositions
ο‚—
Transposition: a permutation that
interchanges two elements and leaves the
rest unchanged.
β—¦ 1 3 5 24
12345
14325
Decomposing a Cycle
ο‚—
Problem. Write the cycle (1 2 3) as a
composition of transpositions.
123
(1 2)(3)
213
(1 3)(2)
231
123 = 13 12
4
11/12/2014
Decomposing a Cycle (2)
ο‚—
Problem. Write the cycle (π‘₯1 π‘₯2 … π‘₯π‘˜ ) as
a composition of transpositions.
π‘₯1 π‘₯2 π‘₯3 … π‘₯π‘˜
(π‘₯1 π‘₯2 )
π‘₯2 π‘₯1 π‘₯3 … π‘₯π‘˜
(π‘₯1 π‘₯3 )
π‘₯1 π‘₯2 … π‘₯π‘˜ =
π‘₯1 π‘₯π‘˜ π‘₯1 π‘₯π‘˜βˆ’1 β‹― π‘₯1 π‘₯2
π‘₯2 π‘₯3 π‘₯1 … π‘₯π‘˜
π‘₯2 π‘₯3 π‘₯4 … π‘₯1
Decomposing a Permutation
ο‚—
Problem. Can any permutation be written
as a composition of transpositions?
ο‚—
Yes! Write the permutation in its cycle
notation and decompose each cycle.
136 2457
= 16 13 27 25 24
5
11/12/2014
Unique Representation?
ο‚—
ο‚—
Problem. Does every permutation have a
unique decomposition into transpositions
(up to their order)?
123 456 :
β—¦ 13 12 46 45 .
β—¦ 14 16 15 34 24 14 .
β—¦ No… But the decompositions of a
permutation have a common property.
Composing a Permutation with a
Transposition
ο‚—
Problem.
β—¦ 𝛼 – a permutation of 𝑆𝑛 that consists of 𝑐
cycles in its cycle notation.
β—¦ 𝜏 – a transposition of 𝑆𝑛 .
β—¦ What can we say about the number of cycles
in πœπ›Ό? And of π›Όπœ?
6
11/12/2014
Solution: Case 1
Write 𝜏 = π‘Ž 𝑏 .
ο‚— First, assume that π‘Ž, 𝑏 are in the same
cycle of 𝛼.
ο‚—
β—¦ Write the cycle as
π‘Ž π‘₯1 π‘₯2 … π‘₯π‘Ÿ 𝑏 𝑦1 𝑦2 … 𝑦𝑠 .
β—¦ Then πœπ›Ό contains the cycles π‘Ž π‘₯1 π‘₯2 … π‘₯π‘Ÿ
and 𝑏 𝑦1 𝑦2 … 𝑦𝑠 (and similarly for π›Όπœ).
π‘Ž
↓
π‘₯1
π‘₯1
↓
π‘₯2
… π‘₯π‘Ÿ
↓ ↓
… π‘Ž
𝑏
↓
𝑦1
𝑦1 … 𝑦𝑠
↓ ↓ ↓
𝑦2 … 𝑏
Solution: Case 1
Write 𝜏 = π‘Ž 𝑏 .
ο‚— First, assume that π‘Ž, 𝑏 are in the same
cycle of 𝛼.
ο‚—
β—¦ Write the cycle as
π‘Ž π‘₯1 π‘₯2 … π‘₯π‘Ÿ 𝑏 𝑦1 𝑦2 … 𝑦𝑠 .
β—¦ Then πœπ›Ό contains the cycles π‘Ž π‘₯1 π‘₯2 … π‘₯π‘Ÿ
and 𝑏 𝑦1 𝑦2 … 𝑦𝑠 (and similarly for π›Όπœ).
𝑦𝑠
π‘Ž
𝑦𝑠
π‘Ž
π‘Ž
…
π‘₯1
…
π‘₯1
𝑦1
π‘₯2
𝑦1
π‘₯2
𝑏
π‘₯π‘Ÿ
𝑏
𝑏
π‘₯π‘Ÿ
7
11/12/2014
Solution: Case 2
Write 𝜏 = π‘Ž 𝑏 .
ο‚— Assume that π‘Ž, 𝑏 are in different cycles of
𝛼.
ο‚—
β—¦ Write the cycles as π‘Ž π‘₯1 π‘₯2 … π‘₯π‘Ÿ and
𝑏 𝑦1 𝑦2 … 𝑦𝑠 .
β—¦ Then πœπ›Ό contains the cycle
π‘Ž π‘₯1 π‘₯2 … π‘₯π‘Ÿ 𝑏 𝑦1 𝑦2 … 𝑦𝑠 .
π‘Ž
↓
π‘₯1
π‘₯1
↓
π‘₯2
… π‘₯π‘Ÿ
↓ ↓
… 𝑏
𝑏
↓
𝑦1
𝑦1 … 𝑦𝑠
↓ ↓ ↓
𝑦2 … π‘Ž
Solution
𝛼 – a permutation of 𝑆𝑛 that consists of 𝑐
cycles in its cycle notation.
ο‚— 𝜏 – a transposition of 𝑆𝑛 .
ο‚— The number of cycles in πœπ›Ό (or π›Όπœ) is
either 𝑐 + 1 or 𝑐 βˆ’ 1.
ο‚—
8
11/12/2014
Parity of a Permutation
ο‚—
Theorem. Consider a permutation 𝛼 ∈ 𝑆𝑛 .
Then
β—¦ Either every decomposition of 𝛼 into transpos.
consists of an even number of elements,
β—¦ or every such decomposition consists of an
odd number of elements.
ο‚—
123 456 :
β—¦ 13 12 46 45 .
β—¦ 14 16 15 34 24 14 .
Proof
𝑐 – the number of cycles in 𝛼.
ο‚— (WLOG) Assume that 𝑛 is even.
ο‚— Consider a decomposition 𝛼 = 𝜏1 𝜏2 β‹― πœπ‘˜ .
ο‚—
β—¦
β—¦
β—¦
β—¦
β—¦
ο‚—
The number of cycles in πœπ‘˜ is 𝑛 βˆ’ 1.
The number of cycles in πœπ‘˜βˆ’1 πœπ‘˜ is even.
The number of cycles in πœπ‘˜βˆ’2 πœπ‘˜βˆ’1 πœπ‘˜ is odd.
…
The number of cycles in 𝜏1 𝜏2 β‹― πœπ‘˜ is 𝑐.
Thus, π‘˜ has the same parity as 𝑐.
9
11/12/2014
Even and Odd Permutations
ο‚—
We say that a permutation is even or odd
according to the parity of the number of
transpositions in its decompositions.
Parity of Inverse
ο‚—
Problem. Prove that any permutation
𝛼 ∈ 𝑆𝑛 has the same parity as its inverse
𝛼 βˆ’1 .
ο‚—
Proof.
β—¦ Decompose 𝛼 into transpositions 𝜏1 𝜏2 β‹― πœπ‘˜ .
β—¦ We have 𝛼 βˆ’1 = πœπ‘˜ β‹― 𝜏2 𝜏1 , since the product
of these two permutation is obviously id.
10
11/12/2014
The 15 Puzzle
ο‚—
Problem. Start with the configuration on
the left and move the tiles to obtain the
configuration on the right.
Solution (Finally!)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Even permutation
1 2 3 4 5 6 7 8 9 10 11 12 13 15 14 16
Odd permutation
ο‚—
The number of moves is even since
β—¦ For every time that we move the empty tile
left/up, we must move it back right/down.
11
11/12/2014
Solution (Finally!)
Even permutation
Odd permutation
ο‚—
ο‚—
The number of moves/ transpositions is even.
To move from an even transposition to an odd
one, there must be an odd number of
transpositions.
Even and Odd Permutations of 𝑆5
Type
Example
15
13 2
12 3
122
14
23
5
Number
id
1
1 2 (3)(4)(5)
(1 2 3)(4)(5)
1 2 (3 4)(5)
1234 5
123 45
12345
10
20
15
30
20
24
Even: 60
Even
Odd
Even
Even
Odd
Odd
Even
Odd: 60
12
11/12/2014
Even and Odd Permutations of 𝑆𝑛
ο‚—
Theorem. For any integer 𝑛 β‰₯ 2, half of
the permutations of 𝑆𝑛 are even and half
are odd.
Proof
𝜏 – an arbitrary transposition of 𝑆𝑛 .
ο‚— If 𝛼 ∈ 𝑆𝑛 is even, then πœπ›Ό is odd.
ο‚— If 𝛼 ∈ 𝑆𝑛 is odd, then πœπ›Ό is even.
ο‚— For any 𝛼 ∈ 𝑆𝑛 , we have πœπœπ›Ό = 𝛼.
ο‚— 𝜏 defines a bijection between the set of
even permutations of 𝑆𝑛 and the odd
permutations of 𝑆𝑛 .
ο‚—
β—¦ Thus, the two sets are of the same size.
13
11/12/2014
Example: The Bijection in 𝑆3
ο‚—
Let 𝜏 = 1 2 ∈ 𝑆3 .
Even
1 2 3
123
321
Odd
12 3
1 23
13 2
12 13 = 123
The End: The First Math Theorem
Proved in a TV Script?
ο‚—
ο‚—
ο‚—
The 10th episode of 6th season of the TV show
Futurama is about people switching bodies.
This is a permutation of people, and a property
of the permutations is used as a plot twist!
You can also see a complete mathematical
proof for a second.
14