Ch. 6: Permutations!.

Slides:



Advertisements
Similar presentations
PERMUTATIONS AND COMBINATIONS
Advertisements

1 Counting Techniques: Possibility Trees, Multiplication Rule, Permutations.
Chapter 7: Sorting Insertion Sort Shell Sort CS 340 Page 112 Heap Sort Merge Sort Quick Sort Best Case Sorting Algorithm Analysis.
6.830 Lecture 10 Query Optimization 10/6/2014. Selinger Optimizer Algorithm algorithm: compute optimal way to generate every sub-join: size 1, size 2,...
6.830 Lecture 11 Query Optimization & Automatic Database Design 10/8/2014.
Even and Odd Permutations (10/2) Theorem. Every cycle, and hence every permutation, can be written as product of (usually non-disjoint) 2-cycles. Example.
Multiplication Rule. A tree structure is a useful tool for keeping systematic track of all possibilities in situations in which events happen in order.
Ch8(1)1 Within Subjects (Participants) Designs All participants serve in each condition of the study. Advantage: Individual Differences are not a Confound.
Basics of Experimentation (1) Experimental Design: Which to Choose and Why?
Single-Factor Experiments What is a true experiment? Between-subjects designs Within-subjects designs.
Experimental Design: Between and Within factors Psych 231: Research Methods in Psychology.
ENM 207 Lecture 5. FACTORIAL NOTATION The product of positive integers from 1 to n is denoted by the special symbol n! and read “n factorial”. n!=1.2.3….(n-2).(n-1).n.
Single-Factor Experiments What is a true experiment? Between-subjects designs Within-subjects designs Designs to avoid (not true experiments)
Experimental Designs Psych 231: Research Methods in Psychology.
Experimental Design: Between and within factors Psych 231: Research Methods in Psychology.
Experimental Design: Between and Within factors Psych 231: Research Methods in Psychology.
1 More Counting Techniques Possibility trees Multiplication rule Permutations Combinations.
Lecture 07 Prof. Dr. M. Junaid Mughal
Experimental Design: Between and within factors Psych 231: Research Methods in Psychology.
Permutation A permutation is an arrangement in which order matters. A B C differs from B C A.
Matched Group, Natural Group, Repeated Measures. Matched Groups Design Different subjects serve at the different levels of the IV however the subjects.
Elementary Counting Techniques & Combinatorics
Research Methods in Psychology
Traveling Salesperson Problem Steven Janke Colorado College.
Ch. 5: Subgroups & Product Groups!. DEFINITION: A group is a set (denoted G) with an algebraic operation (denoted ) that satisfies the following properties:
S /1/2015 Math 2 Honors - Santowski 1.  Use the Fundamental Counting Principle to determine the number of outcomes in a problem.  Use the idea.
Methods of Counting Outcomes BUSA 2100, Section 4.1.
© The McGraw-Hill Companies, Inc., Chapter 4 Counting Techniques.
0 0 Correction: Problem 18 Alice and Bob have 2n+1 FAIR coins, each with probability of a head equal to 1/2.
Great Theoretical Ideas in Computer Science for Some.
Permutations S /4/ Math 2 Honors - Santowski.
Gene tree discordance and multi-species coalescent models Noah Rosenberg December 21, 2007 James Degnan Randa Tao David Bryant Mike DeGiorgio.
Arrangements, Permutations & Combinations
Experiment Basics: Designs Psych 231: Research Methods in Psychology.
Chapter 8 Characters and Strings Associate Prof. Yuh-Shyan Chen Dept. of Computer Science and Information Engineering National Chung-Cheng University.
PERMUTATIONS AND COMBINATIONS BOTH PERMUTATIONS AND COMBINATIONS USE A COUNTING METHOD CALLED FACTORIAL.
PERMUTATIONS and COMBINATIONS
Suppose I have two fair dice.
Imposing Constraints from the Source Tree on ITG Constraints for SMT Hirofumi Yamamoto, Hideo Okuma, Eiichiro Sumita National Institute of Information.
1 Press Ctrl-A ©G Dear 2010 – Not to be sold/Free to use Counting Outcomes Stage 6 - Year 11 Applied Mathematic (Preliminary General 1)
The Cosmic Ray Observatory Project High Energy Physics Group The University of Nebraska-Lincoln Counting Random Events Permutations 4 CDs fit the CD wallet.
Algebra 1 Predicting Patterns & Examining Experiments Unit 7: You Should Probably Change Section 4: Making Choices.
What is a permutation? A permutation is when you take a group of objects or symbols and rearrange them into different orders Examples: Four friends get.
SECTION 9 Orbits, Cycles, and the Alternating Groups Given a set A, a relation in A is defined by : For a, b  A, let a  b if and only if b =  n (a)
13.2 – Find Probabilities Using Permutations A permutation is an arrangement of objects in which order is important. For instance, the 6 possible permutations.
Combinations & Permutations Permutation => Order is important Combination => Order doesn’t matter Examples: Your Locker “Combination” The lunch line (might.
Algebra 1 Predicting Patterns & Examining Experiments Unit 7: You Should Probably Change Section 2: Making Arrangements.
SECTION 8 Groups of Permutations Definition A permutation of a set A is a function  ϕ : A  A that is both one to one and onto. If  and  are both permutations.
Experiment Basics: Designs Psych 231: Research Methods in Psychology.
March 11, 2005 Recursion (Implementation) Satish Dethe
Lesson 2.1 Lesson 2.1 Congruent polygons. Lesson 6.5 Congruent Polygons 2 March 21, 2016 Lesson 2.1 Objectives Identify Congruent Figures. Name Corresponding.
Library of Congress Practice Test Welcome to the Rutgers University Libraries practice test for the Library of Congress Classification system. This test.
POINT An exact location in space, marked by a dot and named using a letter..C.C.A.A.B.B.
1 Chapter 8 Two-level Fractional Factorial Designs.
1 MAT137 Business Statistics Week 2 Probability DePaul University Bill Qualls.
Permutations and Combinations
Organic Molecule Building Block
Traveling Salesperson Problem
combinaTorial Analysis
选答环节 R E A D Y ?.
DABC DBAC DCBA ADBC DACB CABD
Traveling Salesperson Problem
Counting 3-Dec-18.
Binomial Expansion 2 L.O. All pupils can follow where the binomial expansion comes from All pupils understand binomial notation All pupils can use the.
Permutations and Combinations
Welcome to the World of Algebra
Within Subjects (Participants) Designs
Repeated Measures Balancing Practice Effects with an Incomplete Design
6.1 Counting Principles and Permutations
The Shapley-Shubik Power Index
Presentation transcript:

Ch. 6: Permutations!

Q: In how many orders can you arrange these 3 letters? A, B, C

Q: In how many orders can you arrange these 3 letters? A, B, C DABC DACB DBAC DBCA DCAB DCBA A: There are 6 permutations of these letters:

Q: In how many orders can you arrange these 3 letters? A, B, C DABC DACB DBAC DBCA DCAB DCBA A: There are 6 permutations of these letters: DEFINITION: The collection of all permutations of n ordered things is denoted Pn and is called the nth permutation group. Example: P3 = { ABC, ACB, BAC, BCA, CAB, CBA } so the size of P3 equals 6. Soon, we’ll discuss why it is a group!

Q: How many permutations are there of these 4 letters? A, B, C , D DABC DACB DBAC DBCA DCAB DCBA

Q: How many permutations are there of these 4 letters? A, B, C , D DABC DACB DBAC DBCA DCAB DCBA A: There are 6 that begin with D:

Q: How many permutations are there of these 4 letters? A, B, C , D DABC DACB DBAC DBCA DCAB DCBA A: There are 6 that begin with D: (and also 6 that begin with A, B and C) So there are 4×6 = 24 total permutations.

Q: How many permutations are there of these 4 letters? A, B, C , D DABC DACB DBAC DBCA DCAB DCBA A: There are 6 that begin with D: (and also 6 that begin with A, B and C) So there are 4×6 = 24 total permutations. P4 = { ABCD, ABDC, ACBD, ACDB, ADBC, ADCB, BACD, BADC, BCAD, BCDA, BDAC, BDCA, CABD, CADB, CBAD, CBDA, CDAB, CDBA, DABC, DACB, DBAC, DBCA, DCAB, DCBA } The size of P4 equals 24.

(size of P4) = 4×(size of P3) = 4×6 = 24. P4 = { ABCD, ABDC, ACBD, ACDB, ADBC, ADCB, BACD, BADC, BCAD, BCDA, BDAC, BDCA, CABD, CADB, CBAD, CBDA, CDAB, CDBA, DABC, DACB, DBAC, DBCA, DCAB, DCBA } The size of P4 equals 24.

(size of P4) = 4×(size of P3) = 4×6 = 24. P4 = { ABCD, ABDC, ACBD, ACDB, ADBC, ADCB, BACD, BADC, BCAD, BCDA, BDAC, BDCA, CABD, CADB, CBAD, CBDA, CDAB, CDBA, DABC, DACB, DBAC, DBCA, DCAB, DCBA } The size of P4 equals 24.

(size of P4) = 4×(size of P3) = 4×6 = 24. P4 = { ABCD, ABDC, ACBD, ACDB, ADBC, ADCB, BACD, BADC, BCAD, BCDA, BDAC, BDCA, CABD, CADB, CBAD, CBDA, CDAB, CDBA, DABC, DACB, DBAC, DBCA, DCAB, DCBA } The size of P4 equals 24.

(size of P4) = 4×(size of P3) = 4×6 = 24. P4 = { ABCD, ABDC, ACBD, ACDB, ADBC, ADCB, BACD, BADC, BCAD, BCDA, BDAC, BDCA, CABD, CADB, CBAD, CBDA, CDAB, CDBA, DABC, DACB, DBAC, DBCA, DCAB, DCBA } The size of P4 equals 24.

(size of P4) = 4×(size of P3) = 4×6 = 24. THEOREM: the size of Pn equals n! The symbol “n!” means the product of all of the integers between 1 and n. It is pronounced “n factorial”. Here are the first few: 2! = 1×2 = 2 3! = 1×2×3 = 6 4! = 1×2×3×4 = 24 5! = 1×2×3×4×5 = 120 6! = 1×2×3×4×5×6 = 720 Factorials grow large very quickly.

Why is Pn a group? The key is to regard each permutation, not only as a word, but also as the action (exchanging/moving/cycling of letters) that occurred to build that word on the magnet board from the (alphabetical) starting position.

Why is Pn a group? ABC → ACB The key is to regard each permutation, not only as a word, but also as the action (exchanging/moving/cycling of letters) that occurred to build that word on the magnet board from the (alphabetical) starting position. P3 = { ABC, ACB, BAC, BCA, CAB, CBA } ABC → ACB Example: In P3, ACB is obtained from the alphabetical starting position by exchanging the 2nd and 3rd letters. The shorthand “cycle notation” is (23).

Why is Pn a group? ABC → BCA The key is to regard each permutation, not only as a word, but also as the action (exchanging/moving/cycling of letters) that occurred to build that word on the magnet board from the (alphabetical) starting position. P3 = { ABC, ACB, BAC, BCA, CAB, CBA } ABC → BCA Example: In P3, BCA is obtained from the alphabetical starting position by cycling the letters 1st → 3rd → 2nd → 1st. The shorthand “cycle notation” is (132). A better notation would be: (but that is difficult to typeset)

Why is Pn a group? The key is to regard each permutation, not only as a word, but also as the action (exchanging/moving/cycling of letters) that occurred to build that word on the magnet board from the (alphabetical) starting position. P3 = { ABC, ACB, BAC, BCA, CAB, CBA } Permutation Action Cycle Notation ABC Starting Position I BCA cycle 1st → 3rd → 2nd → 1st (132) CAB cycle 1st → 2nd → 3rd → 1st (123) BAC Exchange 1st and 2nd (12) ACB Exchange 2nd and 3rd (23) CBA Exchange 1st and 3rd (13) ABC Starting position

Why is Pn a group? DEFINITION: If W1 and W2 are permutations (words), then their composition, W1*W2, is the permutation (word) obtained from the starting position by first performing the action for W2 and then performing the action for W1. EXAMPLE: ACB * CBA = ??? (in P3)

Why is Pn a group? DEFINITION: If W1 and W2 are permutations (words), then their composition, W1*W2, is the permutation (word) obtained from the starting position by first performing the action for W2 and then performing the action for W1. EXAMPLE: ACB * CBA = ??? (in P3) (23) (13)

Why is Pn a group? DEFINITION: If W1 and W2 are permutations (words), then their composition, W1*W2, is the permutation (word) obtained from the starting position by first performing the action for W2 and then performing the action for W1. EXAMPLE: ACB * CBA = CAB (in P3) (23) (13) Start alphabetical The answer

Why is Pn a group? DEFINITION: If W1 and W2 are permutations (words), then their composition, W1*W2, is the permutation (word) obtained from the starting position by first performing the action for W2 and then performing the action for W1. EXAMPLE: ACB * CBA = CAB (in P3) (23) Simpler method: Start with CBA. Perform ACB’s action (23) to it.

Why is Pn a group? Start with this word Do this action to it. * ABC BCA CAB BAC ACB CBA ABC (I) BCA (132) CAB (123) BAC (12) ACB (23) CBA (13)   Do this action to it. Fill in the Cayley table for P3

What patterns do you see? What familiar group does this remind you of? Why is Pn a group? Start with this word * ABC BCA CAB BAC ACB CBA ABC (I) BCA  CAB   BAC ACB   CBA BCA (132) ABC  CBA  BAC  CAB (123)  ACB BAC (12) ACB (23) CBA (13) Do this action to it. What patterns do you see? What familiar group does this remind you of?

Why is Pn a group? THEOREM: P3 is isomorphic to D3. * ABC (I) BCA (R120) CAB (R240) BAC (F1) ACB (F2) CBA (F3) BCA (R120) CAB (R240)  BAC (F1) ACB (F2)  CBA (F3) ABC (I)  CBA (F3) BAC (F1) ABC (I) BCA (R120)   ACB (F2) ACB (F2)  THEOREM: P3 is isomorphic to D3. Here is the isomorphism (dictionary): ABC ↔ I BCA ↔ R120 CAB ↔ R240 BAC ↔ F1 ACB ↔ F2 CBA ↔ F3 It matches each symmetry with the way it permutes the vertices.

Q: Is P4 is isomorphic to D4? Why is Pn a group? Q: Is P4 is isomorphic to D4? THEOREM: P3 is isomorphic to D3. Here is the isomorphism (dictionary): ABC ↔ I BCA ↔ R120 CAB ↔ R240 BAC ↔ F1 ACB ↔ F2 CBA ↔ F3 It matches each symmetry with the way it permutes the vertices.

Q: Is P4 is isomorphic to D4? Why is Pn a group? Q: Is P4 is isomorphic to D4? A: No, they have different sizes. (Only 8 of the 24 permutations can be achieved by symmetries.) THEOREM: P3 is isomorphic to D3. Here is the isomorphism (dictionary): ABC ↔ I BCA ↔ R120 CAB ↔ R240 BAC ↔ F1 ACB ↔ F2 CBA ↔ F3 It matches each symmetry with the way it permutes the vertices.

Q: Find the cycle notation for BADEFC in P6. Why is Pn a group? DEFINITION: If W1 and W2 are permutations (words), then their composition, W1*W2, is the permutation (word) obtained from the starting position by first performing the action for W2 and then performing the action for W1. Q: Find the cycle notation for BADEFC in P6.

Q: Find the cycle notation for BADEFC in P6. A: (12)(3654) Why is Pn a group? DEFINITION: If W1 and W2 are permutations (words), then their composition, W1*W2, is the permutation (word) obtained from the starting position by first performing the action for W2 and then performing the action for W1. Q: Find the cycle notation for BADEFC in P6. A: (12)(3654)

Q: Find the cycle notation for BADEFC in P6. A: (12)(3654) Why is Pn a group? DEFINITION: If W1 and W2 are permutations (words), then their composition, W1*W2, is the permutation (word) obtained from the starting position by first performing the action for W2 and then performing the action for W1. Q: Find the cycle notation for BADEFC in P6. A: (12)(3654) Q: Find the composition BADEFC*EFABCD in P6.

Q: Find the cycle notation for BADEFC in P6. A: (12)(3654) Why is Pn a group? DEFINITION: If W1 and W2 are permutations (words), then their composition, W1*W2, is the permutation (word) obtained from the starting position by first performing the action for W2 and then performing the action for W1. Q: Find the cycle notation for BADEFC in P6. A: (12)(3654) Q: Find the composition BADEFC*EFABCD in P6. A: FEBCDA

EVEN AND ODD PERMUTATIONS Q: Find the cycle notation for ABEDCF in P6.

EVEN AND ODD PERMUTATIONS Q: Find the cycle notation for ABEDCF in P6. A: (35)

EVEN AND ODD PERMUTATIONS Q: Find the cycle notation for ABEDCF in P6. A: (35) (This permutation is a “swap”) DEFINITION: A swap means an exchange of two letters.

EVEN AND ODD PERMUTATIONS Q: Find the cycle notation for ABEDCF in P6. A: (35) (This permutation is a “swap”) DEFINITION: A swap means an exchange of two letters. Q: Express EADCFB in P6 as a composition of swaps. Give a set of letters to all students, and have them try this on their own.

EVEN AND ODD PERMUTATIONS Q: Find the cycle notation for ABEDCF in P6. A: (35) (This permutation is a “swap”) DEFINITION: A swap means an exchange of two letters. Q: Express EADCFB in P6 as a composition of swaps. ABCDEF → EBCDAF EBCDAF → EACDBF EACDBF → EADCBF EADCBF → EADCFB. Thus: EADCFB = (56)*(34)*(25)*(15) (4 swaps were required)

EVEN AND ODD PERMUTATIONS Q: Find the cycle notation for ABEDCF in P6. A: (35) (This permutation is a “swap”) DEFINITION: A swap means an exchange of two letters. Q: Express EADCFB in P6 as a composition of swaps. ABCDEF → EBCDAF EBCDAF → EACDBF EACDBF → EADCBF EADCBF → EADCFB. Thus: EADCFB = (56)*(34)*(25)*(15) (4 swaps were required) THEOREM: The swaps generate Pn. In other words, every permutation in Pn can be expressed as a composition of swaps.

EVEN AND ODD PERMUTATIONS Q: Find the cycle notation for ABEDCF in P6. A: (35) (This permutation is a “swap”) DEFINITION: A swap means an exchange of two letters. Q: Express EADCFB in P6 as a composition of swaps. ABCDEF → EBCDAF EBCDAF → EACDBF EACDBF → EADCBF EADCBF → EADCFB. Thus: EADCFB = (56)*(34)*(25)*(15) (4 swaps were required) Q: How many swaps are required using other strategies, like right-to-left, or using only adjacent swaps only, or working haphazardly?

EVEN AND ODD PERMUTATIONS Q: Find the cycle notation for ABEDCF in P6. A: (35) (This permutation is a “swap”) DEFINITION: A swap means an exchange of two letters. Q: Express EADCFB in P6 as a composition of swaps. ABCDEF → EBCDAF EBCDAF → EACDBF EACDBF → EADCBF EADCBF → EADCFB. Thus: EADCFB = (56)*(34)*(25)*(15) (4 swaps were required) Q: How many swaps are required using other strategies, like right-to-left, or using only adjacent swaps only, or working haphazardly? Q: How many swaps are required for BEFCDA in P6?

EVEN AND ODD PERMUTATIONS DEFINITION: A permutation that can be obtained by composing an even number of swaps is called an even permutation. A permutation that can be obtained by composing an odd number of swaps is called an odd permutation. Example: EADCFB is even and BEFCDA is odd in P6.

EVEN AND ODD PERMUTATIONS DEFINITION: A permutation that can be obtained by composing an even number of swaps is called an even permutation. A permutation that can be obtained by composing an odd number of swaps is called an odd permutation. Example: EADCFB is even and BEFCDA is odd in P6. THEOREM: A permutation cannot be both even and odd. We will not discuss the proof, which is difficult.

EVEN AND ODD PERMUTATIONS DEFINITION: A permutation that can be obtained by composing an even number of swaps is called an even permutation. A permutation that can be obtained by composing an odd number of swaps is called an odd permutation. Example: EADCFB is even and BEFCDA is odd in P6. THEOREM: A permutation cannot be both even and odd. THEOREM: Exactly half of the permutations in Pn are even. Furthermore, the even permutations form a subgroup of Pn. How do you prove this?

EVEN AND ODD PERMUTATIONS DEFINITION: A permutation that can be obtained by composing an even number of swaps is called an even permutation. A permutation that can be obtained by composing an odd number of swaps is called an odd permutation. Example: EADCFB is even and BEFCDA is odd in P6. THEOREM: A permutation cannot be both even and odd. THEOREM: Exactly half of the permutations in Pn are even. Furthermore, the even permutations form a subgroup of Pn. DEFINITION: The subgroup of all even permutations in Pn is denoted An and is called the nth alternating group.

EVEN AND ODD PERMUTATIONS DEFINITION: A permutation that can be obtained by composing an even number of swaps is called an even permutation. A permutation that can be obtained by composing an odd number of swaps is called an odd permutation. Example: EADCFB is even and BEFCDA is odd in P6. THEOREM: A permutation cannot be both even and odd. THEOREM: Exactly half of the permutations in Pn are even. Furthermore, the even permutations form a subgroup of Pn. DEFINITION: The subgroup of all even permutations in Pn is denoted An and is called the nth alternating group. Size of P2 = 2 Size of A2 = 1 Size of P3 = 6 Size of A3 = 3 Size of P4 = 24 Size of A4 = 12 Size of P5 = 120 Size of A5 = 60 The red ones will be important in the next chapter.

EVEN AND ODD PERMUTATIONS GOAL: Find a method to quickly decide if a permutation is even or odd based on its cycle notation.

EVEN AND ODD PERMUTATIONS GOAL: Find a method to quickly decide if a permutation is even or odd based on its cycle notation. Q: Is BCDEFA = (165432) in P6 even or odd? (It’s a cycle of length 6.)

EVEN AND ODD PERMUTATIONS GOAL: Find a method to quickly decide if a permutation is even or odd based on its cycle notation. Q: Is BCDEFA = (165432) in P6 even or odd? (It’s a cycle of length 6.) A: BCDEFA = (56)*(45)*(34)*(23)*(12) (5 swaps means odd.) THEOREM: A cycle of length m can be obtained by composing m–1 swaps. Thus, the cycle is even if m is odd, and vice-versa.

EVEN AND ODD PERMUTATIONS GOAL: Find a method to quickly decide if a permutation is even or odd based on its cycle notation. Q: Is BCDEFA = (165432) in P6 even or odd? (It’s a cycle of length 6.) A: BCDEFA = (56)*(45)*(34)*(23)*(12) (5 swaps means odd.) THEOREM: A cycle of length m can be obtained by composing m–1 swaps. Thus, the cycle is even if m is odd, and vice-versa. Q: Is BADEFC = (12)(3654) in P6 even or odd?

EVEN AND ODD PERMUTATIONS GOAL: Find a method to quickly decide if a permutation is even or odd based on its cycle notation. Q: Is BCDEFA = (165432) in P6 even or odd? (It’s a cycle of length 6.) A: BCDEFA = (56)*(45)*(34)*(23)*(12) (5 swaps means odd.) THEOREM: A cycle of length m can be obtained by composing m–1 swaps. Thus, the cycle is even if m is odd, and vice-versa. Q: Is BADEFC = (12)(3654) in P6 even or odd? 1 swap 3 swaps 4 swaps A: EVEN

Vocabulary Review Theorem Review permutation permutation group Pn composition of permutations cycle notation swap even/odd permutation alternating group An length of a cycle Theorem Review The size of Pn equals n! Pn is a group. P3 is isomorphic to D3. The swaps generate Pn. A perm. can’t be both even and odd. Half of them are even. The even perms. form a subgroup. A length m cycle needs m-1 swaps.