ma/cs 6a - 2015-16/1term/ma006a/17. more permutations.pdfΒ Β· 11/5/2015 3 the 15 puzzle and...
TRANSCRIPT
11/5/2015
1
Ma/CS 6aClass 17: More Permutations
By Adam Sheffer
π
π₯1
π₯2
π₯ππ
π¦1
π¦π
β¦
π
π
π₯1
π₯2
π₯ππ
π¦1
π¦π
β¦
π
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 3β β β2 1 3
1 2 3β β β2 3 1
1 2 3β β β3 1 2
1 2 3β β β3 2 1
11/5/2015
2
Reminder: Cycle Notation
We can consider a permutation as a set of cycles.
1 2 3β β β5 6 3
4 5 6β β β2 1 4
1 β 5 2 β 6 β 4 3
We write this permutation as1 5 2 6 4 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πΌ12πΌ23πΌ34πΌ4 β¦ .
11/5/2015
3
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.
11/5/2015
4
Transpositions
Transposition: a permutation that interchanges two elements and leaves the rest unchanged.
β¦ 1 3 5 2 4
1 2 3 4 5
1 4 3 2 5
Decomposing a Cycle
Problem. Write the cycle (1 2 3) as a composition of transpositions.
1 2 3
2 1 3
2 3 1
(1 2)(3)
(1 3)(2)
1 2 3 = 1 3 1 2
11/5/2015
5
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)
π₯2 π₯3 π₯1 β¦ π₯π
π₯2 π₯3 π₯4 β¦ π₯1
π₯1 π₯2 β¦ π₯π =π₯1 π₯π π₯1 π₯πβ1 β― π₯1 π₯2
Decomposing a Permutation
Problem. Can every permutation be written as a composition of transpositions?
Yes! Write the permutation in its cycle notation and decompose each cycle.
1 3 6 2 4 5 7= 1 6 1 3 2 7 2 5 2 4
11/5/2015
6
Unique Representation?
Problem. Does every permutation have a unique decomposition into transpositions (up to their order)?
1 2 3 4 5 6 :
β¦ 1 3 1 2 4 6 4 5 .
β¦ 1 4 1 6 1 5 3 4 2 4 1 4 .
β¦ No. But the different 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 πΌπ?
11/5/2015
7
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
π₯2
π₯ππ
π¦1
π¦π
β¦
π
π
π₯1
π₯2
π₯ππ
π¦1
π¦π
β¦
π
11/5/2015
8
Solution: Case 2
Write π = π π .
Assume that π and π 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.
11/5/2015
9
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.
1 2 3 4 5 6 :
β¦ 1 3 1 2 4 6 4 5 .
β¦ 1 4 1 6 1 5 3 4 2 4 1 4 .
Proof
π β the number of cycles in πΌ.
(WLOG) Assume that π is even.
Consider a decomposition πΌ = π1π2β―ππ.
β¦ The number of cycles in the cycle structure of ππ 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 π.
11/5/2015
10
Even and Odd Permutations
We say that a permutation is even or oddaccording to the parity of the number of transpositions in its decompositions.
Finding the Parity
What is the parity of
Cycle notation: 1 2 3 4 5 6 7 8 9 .
We saw that a cycle of length π can be expressed as composition of π β 1transpositions.
β¦ 8 transpositions = even.
1 2 3β β β2 3 4
4 5 6β β β5 6 7
7 8 9β β β8 9 1
11/5/2015
11
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.
The 15 Puzzle
Problem. Start with the configuration on the left and move the tiles to obtain the configuration on the right.
11/5/2015
12
Solution (Finally!)
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.
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
Solution (Finally!)
The number of moves/ transpositions is even.
To move from an even transposition to an oddone, there must be an odd number of transpositions.
Even permutationOdd permutation
11/5/2015
13
Even and Odd Permutations of π5
Type Example Number
15 id 1
132 1 2 (3)(4)(5) 10
123 (1 2 3)(4)(5) 20
122 1 2 (3 4)(5) 15
14 1 2 3 4 5 30
23 1 2 3 4 5 20
5 1 2 3 4 5 24
Even
OddEven
Even
Odd
OddEven
Even: 60 Odd: 60
Even and Odd Permutations of ππ
Theorem. For any integer π β₯ 2, half of the permutations of ππ are even and halfare odd.
11/5/2015
14
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 set of odd permutations of ππ.
β¦ Thus, the two sets are of the same size.
Example: The Bijection in π3
Let π = 1 2 β π3.
1 2 3 1 2 31 2 3 1 2 33 2 1 1 3 2
Even Odd
1 2 1 3 = 1 2 3
11/5/2015
15
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.