ma/cs 6a2015-16/1term/ma006a/17. more...11/5/2015 3 the 15 puzzle and permutations how a...
TRANSCRIPT
![Page 1: Ma/CS 6a2015-16/1term/ma006a/17. More...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](https://reader035.vdocuments.us/reader035/viewer/2022080718/5f786dba34730a0ba42384ca/html5/thumbnails/1.jpg)
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
![Page 2: Ma/CS 6a2015-16/1term/ma006a/17. More...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](https://reader035.vdocuments.us/reader035/viewer/2022080718/5f786dba34730a0ba42384ca/html5/thumbnails/2.jpg)
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 โฆ .
![Page 3: Ma/CS 6a2015-16/1term/ma006a/17. More...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](https://reader035.vdocuments.us/reader035/viewer/2022080718/5f786dba34730a0ba42384ca/html5/thumbnails/3.jpg)
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.
![Page 4: Ma/CS 6a2015-16/1term/ma006a/17. More...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](https://reader035.vdocuments.us/reader035/viewer/2022080718/5f786dba34730a0ba42384ca/html5/thumbnails/4.jpg)
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
![Page 5: Ma/CS 6a2015-16/1term/ma006a/17. More...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](https://reader035.vdocuments.us/reader035/viewer/2022080718/5f786dba34730a0ba42384ca/html5/thumbnails/5.jpg)
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
![Page 6: Ma/CS 6a2015-16/1term/ma006a/17. More...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](https://reader035.vdocuments.us/reader035/viewer/2022080718/5f786dba34730a0ba42384ca/html5/thumbnails/6.jpg)
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 ๐ผ๐?
![Page 7: Ma/CS 6a2015-16/1term/ma006a/17. More...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](https://reader035.vdocuments.us/reader035/viewer/2022080718/5f786dba34730a0ba42384ca/html5/thumbnails/7.jpg)
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
๐ฆ๐
โฆ
๐
![Page 8: Ma/CS 6a2015-16/1term/ma006a/17. More...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](https://reader035.vdocuments.us/reader035/viewer/2022080718/5f786dba34730a0ba42384ca/html5/thumbnails/8.jpg)
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.
![Page 9: Ma/CS 6a2015-16/1term/ma006a/17. More...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](https://reader035.vdocuments.us/reader035/viewer/2022080718/5f786dba34730a0ba42384ca/html5/thumbnails/9.jpg)
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 ๐.
![Page 10: Ma/CS 6a2015-16/1term/ma006a/17. More...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](https://reader035.vdocuments.us/reader035/viewer/2022080718/5f786dba34730a0ba42384ca/html5/thumbnails/10.jpg)
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
![Page 11: Ma/CS 6a2015-16/1term/ma006a/17. More...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](https://reader035.vdocuments.us/reader035/viewer/2022080718/5f786dba34730a0ba42384ca/html5/thumbnails/11.jpg)
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.
![Page 12: Ma/CS 6a2015-16/1term/ma006a/17. More...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](https://reader035.vdocuments.us/reader035/viewer/2022080718/5f786dba34730a0ba42384ca/html5/thumbnails/12.jpg)
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
![Page 13: Ma/CS 6a2015-16/1term/ma006a/17. More...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](https://reader035.vdocuments.us/reader035/viewer/2022080718/5f786dba34730a0ba42384ca/html5/thumbnails/13.jpg)
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.
![Page 14: Ma/CS 6a2015-16/1term/ma006a/17. More...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](https://reader035.vdocuments.us/reader035/viewer/2022080718/5f786dba34730a0ba42384ca/html5/thumbnails/14.jpg)
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
![Page 15: Ma/CS 6a2015-16/1term/ma006a/17. More...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](https://reader035.vdocuments.us/reader035/viewer/2022080718/5f786dba34730a0ba42384ca/html5/thumbnails/15.jpg)
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.