Permutations.

Slides:



Advertisements
Similar presentations
Combinations A combination is a grouping of things ORDER DOES NOT MATTER.
Advertisements

Quantitative Methods Session – Permutation & Combination Pranjoy Arup Das.
How many possible outcomes can you make with the accessories?
Multiplication Rule. A tree structure is a useful tool for keeping systematic track of all possibilities in situations in which events happen in order.
1 Counting Rules. 2 The probability of a specific event or outcome is a fraction. In the numerator we have the number of ways the specific event can occur.
Discrete Structures Chapter 4 Counting and Probability Nurul Amelina Nasharuddin Multimedia Department.
1 Counting Rules. 2 The probability of a specific event or outcome is a fraction. In the numerator we have the number of ways the specific event can occur.
4/5/05Tucker, Sec Applied Combinatorics, 4rth Ed. Alan Tucker Section 5.4 Distributions Prepared by Jo Ellis-Monaghan.
Chapter 5 Section 5 Permutations and Combinations.
Copyright © Ed2Net Learning Inc.1. 2 Warm Up 1.List all combinations of Roshanda, Shelli, Toshi, and Hector, taken three at a time 2. In how many ways.
Tucker, Section 5.41 Section 5.4 Distributions By Colleen Raimondi.
Permutations and Combinations AII Objectives:  apply fundamental counting principle  compute permutations  compute combinations  distinguish.
Unit 7: Probability Lesson 2 Tree Diagrams, fundamental counting principle, sample space lists and tables, permutation, combination, factorials.
Elementary Counting Techniques & Combinatorics Martina Litschmannová K210.
Elementary Counting Techniques & Combinatorics
Math 2 Honors - Santowski
Jessie Zhao Course page: 1.
Lesson 1.9 Probability Objective: Solve probability problems.
Topics to be covered: Produce all combinations and permutations of sets. Calculate the number of combinations and permutations of sets of m items taken.
Number of Elements in a Finite Set. Notation : The number of the elements of the set A will be denoted by n(A) Examples (1): Let: Let: A = {a,b,c,d} B.
Chapter 6 With Question/Answer Animations 1. Chapter Summary The Basics of Counting The Pigeonhole Principle Permutations and Combinations Binomial Coefficients.
Permutations and Combinations. Objectives:  apply fundamental counting principle  compute permutations  compute combinations  distinguish permutations.
Mathematics. Permutation & Combination - 2 Session.
Elementary Combinatorics Combinatorics  Deals with enumeration (counting) techniques and related algebra.  Basis of counting XSet |X|No. of elements.
CSE 221: Algorithms and Data Structures Lecture #10 Counting: Easy as 1, 2, C(3,1) Steve Wolfman 2009W1 1.
© The McGraw-Hill Companies, Inc., Chapter 4 Counting Techniques.
1 Fundamental Principles of Counting OBJECTIVES: At the end of this chapter, students should be able to: 1. describe the concepts of permutation (arrangement)
Counting CSC-2259 Discrete Structures Konstantin Busch - LSU1.
Permutations and Combinations
Discrete Mathematics Lecture # 25 Permutation & Combination.
Lesson 0.4 (Counting Techniques)
Counting Techniques Tree Diagram Multiplication Rule Permutations Combinations.
37. Permutations and Combinations. Fundamental Counting Principle Fundamental Counting Principle states that if an event has m possible outcomes and another.
2/24/20161 One, two, three, we’re… Counting. 2/24/20162 Basic Counting Principles Counting problems are of the following kind: “How many different 8-letter.
Permutations and Combinations
13 Lesson 1 Let Me Count the Ways Fundamental Counting Principle, Permutations & Combinations CP Probability and Statistics FA 2014 S-ID.1S-CP.3S-CP.5.
Permutations. Permutation: The number of ways in which a subset of objects can be selected from a given set of objects, where order is important. Given.
Section 6.3. Section Summary Permutations Combinations.
Example A standard deck of 52 cards has 13 kinds of cards, with four cards of each of kind, one in each of the four suits, hearts, diamonds, spades, and.
The Multiplication Rule
Permutations and Combinations
Permutations and Combinations
The Pigeonhole Principle
11.3 Notes Combinations.
CSE15 Discrete Mathematics 04/19/17
Elementary Counting Techniques & Combinatorics
CSNB 143 Discrete Mathematical Structures
CSC-2259 Discrete Structures
COCS DISCRETE STRUCTURES
Counting Principals, Permutations, and Combinations
Counting, Permutations, & Combinations
Permutations and Combinations
CS100: Discrete structures
COUNTING AND PROBABILITY
Permutations and Combinations
Basic Counting.
Permutations and Combinations
Lesson 11-1 Permutations and Combinations
Permutations and Combinations
Permutations and Combinations
Counting techniques Basic Counting Principles, Pigeonhole Principle, Permutations and Combinations.
Permutations and Combinations
How many possible outcomes can you make with the accessories?
Section 6.2 Permutations with Repeated Objects and Combinations
Bellwork Practice Packet 10.3 B side #3.
Permutations and Combinations
Standard DA-5.2 Objective: Apply permutations and combinations to find the number of possibilities of an outcome.
Permutations and Combinations
Permutations and Combinations
Presentation transcript:

Permutations

Permutations Permutation: The number of ways in which a subset of objects can be selected from a given set of objects, where order is important. Given the set of three letters, {A, B, C}, how many possibilities are there for selecting any two letters where order is important? (AB, AC, BC, BA, CA, CB)

Definition: A permutation of a set of set of objects is an ordering of the objects in a row. A permutation of n objects taken r at a time (also called r-permutation of n objects) in an ordered selection or arrangement of r of the objects. P(n,r) = n! / (n-r)! Ex: set of elements a,b,c Has 6 permutations a,b,c a,c,b b,c,a b,a,c c,a,b c,b,a

2- permutations of { a, b } with unlimited repetitions are : aa ,ab, ba, bb

Ex: set of elements a,a,a,b,c. Has 3- permutations : aaa, aab ,aba, baa, aac,aca, caa,abc, acb,bac, bca,cab, cba.

Suppose selection are to be made from the four objects {a,b,c,d} then the 2- permutations without repetitions ? ab,ba ac,ca, ad,da bc,cb, bd,db, cd,dc. Total : 12

Suppose selection are to be made from the four objects {a,b,c,d} then the 3- permutations without repetitions ? abc, acb, bac, bca, cab, cba, abd, adb, bad, bda, dab, dba, acd, adc, cad, cda, dac, dca, bcd, bdc, cbd, cdb, dbc, dcb Total : 24

Enumerating r-permutations without repetitions P(n , r)=n(n-1)(n-2).........(n-r+1)=n!/(n-r)! Since there are n distinct objects, the first position of r-permutation can be filled in n ways, the second position of r-permutation can be filled in n-1ways, so on and rth position can be filled in n-r+1 ways. From the definition of factorials P(n , r)= n!/(n-r)!

P(n , n) = n!/0! = n! When r = n Corollary: There are n ! permutations of n distinct objects. There are 3! Permutations of {a,b,c} There are 4! Permutations of {a,b,c,d}

The number of 2-permutations of {a, b, c, d, e} is Solution: n=5 r=2 C(5,2) = n! 5! (n-r)! (5-2)!

Examples: How many ways can the letters in the word C O M P U T E R be arranged in a row? COMPUTER = 8 letters 8 letters can be arranged in 8! ways

How many ways can the letters in the word C O M P U T E R be arranged if the letters CO must remain next to each other as a unit. Sol: COMPUTER = CO is treated as 1 unit Then, number of characters= 7 7 letters can be arranged in 7! Ways Note: don’t consider OC. Because CO is consider as a unit.

Evaluate p(5,2) n! n=5, r=2 (n-r)! 5! (5-2)!

How many 4-permutations are there of a set of seven objects. n! N=7, r=4 (n-r)! 7! (7-4)!

How many 5-permutations are there of a set of five objects. n=5, r=5 n! 5! (n-r)! (5-5)!

How many different ways can the letters of the word BYTES be chosen and written in a row? Sol: BYTES - 5 letters 5 letters can be chosen in 5! ways

How many different ways this can be done if the first letter must be B. Sol: BYTES - 1st letter B is fixed, remaining 4 letters left to choose. So, 4 letters can be chosen in 4! ways

r-permutations example How many ways are there for 5 people in this class to give presentations? (Assume that there are 80 students in class) There are 80 students in the class P(80,5) = 80!/(80-5)! =80*79*78*77*76 = 2,884,801,920 Note that the order they go in does matter in this example!

In how many ways can 7 women and 3 men be arranged in a row if the 3 men must always stand next to each other? Sol: W W W W W W W MMM (7women+3men) 7 women can be arranged in 7! Ways. 3 men can be arranged in 3! Ways. But 3 men must always together so consider as a unit. Number of elements to arrange 8 in 8!ways Finally 8! * 3!

Number of ways to arrange 7 letters word is Finally 2 * 20! * P(24,5) In how many ways can the letters of the English language be arranged so that there are exactly 5 letters between the letters a and b? Sol: a _ _ _ _ _ b Number of alphabets =26 Already starting ending characters are given. Number of characters left are= 26-2=24. Number of ways to choose 5 letters is P(24,5). There are 2 ways to place a and b. and then 20! ways to arrange any 7-letter word treated as one unit along with the remaining 19 letters Number of ways to arrange 7 letters word is Finally 2 * 20! * P(24,5)

There are (n-1)! Permutations of n distinct objects in a circle. Example: In how many ways can 5 children arrnage themselevs in a ring. in (n-1)! Ways. n=5 So finally 4! ways

Combinations

Combinations Let n and r be non negative integers with r<=n. An r-combination of a set of n elements is a subset of r of the n elements. The symbol C(n , r) Which is read as “n choose r” denotes No. of subsets of size r that can be chosen from a set of n elements.

Enumerating r-combinations without repetitions C(n , r) = P(n , r)/r! = n!/(n-r)! r!

Let S={Andhra, Bangalore,chennai,Delhi} 3-combination of S is C(4,3) = 4 {Bangalore,chennai,Delhi} {Andhra, chennai, Delhi} {Andhra, Bangalore,Delhi} {Andhra, Bangalore,chennai}

In an ordered selection it is not only what elements are chosen but which the order in which they are chosen matters. In an unordered selection it is only the identity of chosen elements that matters.

In how many ways can a hand of 5 cards be selected from a deck of 52 cards Sol: n=52, r=5 C(n,r) = n! 52! (n-r)! r! (52-5)! 5!

How many 5-card consists only of hearts? Sol: n=13, r=5 There are only 13 hearts Selecting 5 cards from 13 cards C(n,r) = n! 13! (n-r)! r! (13-5)! 5!

How many 5-card hands consists of cards from a single suit. Sol: there are 4 suits( diamonds, clubs, spades, hearts) Each suit consists of 13 cards. 1 Suit selection out 4 suits in 4 ways Selecting 5 cards from 13 n=13, r=5 Selecting 5 cards from 13 cards C(n,r) = n! 4* (13!) (n-r)! r! (13-5)! 5!

How many 5-card hands have 2 clubs and 3 hearts? Sol: there are 4 suits( diamonds, clubs, spades, hearts) Each suit consists of 13 cards. 2 cards from clubs(13) C(13,2) ways 3 cards from hearts(13) C(13,3) ways Selecting 5 cards n=13, r=5 C(n,r) = C(13,2) * C(13,3)

How many 5-card hands have 2 aces and 3 kings? Sol: there are 4 aces and 4 kings 2 cards from aces (4) C(4,2) ways 3 cards from kings(4) C(4,3) ways Selecting 5 cards n=5, in C(4,2) * C(4,3)

In how many ways can a committee of 5 be chosen from 9 people? Sol: selecting 5 people from 9 people n=9 r=5 Chosen in C(9,5) ways

Sol: selecting 5 and more How many committees of 5 or more can be chosen from 9 people? Sol: selecting 5 and more i.e. 5 or 6 or 7 or 8 or 9 people can be chosen in C(9,5)+C(9,6)+C(9,7)+C(9,8)+C(9,9)

In how many ways an eight letter word with 3 different vowels and 5 different consonants can be framed? There are 21 consonants and 5 vowels in the English alphabet. _ _ _ _ _ _ _ _ 8 letter word, 3 vowels can be chosen from 5 is C(5,3) 5 consonants can be chosen from 21 is C(21,5) 8 letters can be arranged in 8! ways Answer= 8! *C(5,3) * C(21,5)

A)how many such words can be formed? C(5,3) * C(21,5) B)contain a ‘a’ fixed. only 2 vowels need to choose from 4 vowels in C(4,2) ways. 5 consonants can be chosen from 21 is C(21,5) 8 letters can be arranged in 8! ways Answer: 8 * C(4,2) * C(21,5)

C)contain letters a and b ‘a’ fixed out of 5 vowels and b is fixed out of 21 consonants only 2 vowels need to choose from 4 vowels in C(4,2) ways. Only 4 consonants can be chosen from 20 is C(20,4) 8 letters can be arranged in 8! ways Answer: 8 * C(4,2) * C(20,4)

D)contain letters b and c b and c 2 letters are fixed out of 21 consonants 3 vowels choose from 5 vowels in C(5,3) ways. Only 3 consonants can be chosen from 19 is C(19,3) 8 letters can be arranged in 8! ways Answer: 8 * C(5,3) * C(19,3)

E)contain letter a ,b, and c a is fixed out of 5 vowels b and c 2 letters are fixed out of 21 consonants Choose only 2 vowels from 4 vowels in C(4,2) ways. Only 3 consonants can be chosen from 19 is C(19,3) 8 letters can be arranged in 8! ways Answer: 8 * C(4,2) * C(19,3)

F)begin with a and end with b a’ fixed out of 5 vowels and b is fixed out of 21 consonants only 2 vowels need to choose from 4 vowels in C(4,2) ways. Only 4 consonants can be chosen from 20 is C(20,4) 6 letters can be arranged in 6! Ways (first & last letters already given) Answer: 6 * C(4,2) * C(20,4)

G)begin with b and end with c b is fixed out of 21 consonants Only 3vowels need to choose from 4 vowels in C(5,3) ways. Only 3 consonants can be chosen from 19 is C(19,3) 6 letters can be arranged in 6! Ways (first & last letters already given) Answer: 6 * C(5,3) * C(19,3)

There are 30females and 35 males in junior class while there are 25 females 20 males in senior class. In how many ways can a committee of 10 be chosen so that there are exactly 5 females and 3 juniors on the committee? Sol: juniors seniors Female male female male 0 3 5 2 C(30,0)*C(35,3)*C(25,5)*C(20,2) 1 2 4 3 C(30,1)*C(35,2)*C(25,4)*C(20,3) 2 1 3 4 C(30,2)*C(35,1)*C(25,3)*C(20,4) 3 0 2 5 C(30,3)*C(35,0)*C(25,2)*C(20,5) FINALLY C(30,0)*C(35,3)*C(25,5)*C(20,2) + C(30,1)*C(35,2)*C(25,4)*C(20,3) + C(30,2)*C(35,1)*C(25,3)*C(20,4) + C(30,3)*C(35,0)*C(25,2)*C(20,5)

PERMUTATIONS AND COMBINATIONS WITH REPETITIONS

PERMUTATIONS WITH REPETITIONS Let U(n,r) denote the number of r permutations of n objects with unlimited repetitions is U(n,r) = nr Each of the r positions can be filled in ‘n’ ways. Object 1 is repeated in n times Object 2 is repeated in n times Object 3 is repeated in n times : Object r is repeated in n times Then number of ways = nr

There are 25 true or false questions on an examination There are 25 true or false questions on an examination .How many different ways can a student do the examination if he or she can also choose to leave the answer blank? Sol: each question have 3 options( T / F / blank) 1st question answer - in 3 ways (T / F / blank) – 3 2nd question answer - in 3 ways (T / F / blank) – 3 3rd question answer - in 3 ways (T / F / blank) – 3 : rth question answer – in 3 ways (T / F / blank) – 3 Number of different ways = 3 * 3* 3* ….. *3 = 325

The results of 50 foot ball games(win ,lose, tie) are to be predicted The results of 50 foot ball games(win ,lose, tie) are to be predicted .How many different forecasts can contain exactly 28 correct results? Sol: Number of games got the correct result= C(50,28) Remaining games left= 50-28=22 22 games got the wrong result. Each game has 2 options to get the wrong results 1st game has 2 options 2nd game has 2 options : 22nd game has 2 options Wrong results= 222 Finally different forecasts= C(50,28) * 222

Enumerating r-combinations with unlimited repetitions Let the distinct objects be a1, a2,……. an so that the selections are made from {∞. a1, ∞. a1,… ∞. an }. Any r-combination will be of the form {x1. a1, x2. a2, .... ,xn. an }.where x1…….. xn are the repetition numbers and x1+ x2+ x3........+ xn=r

V(n,r)=the number of r-combinations of n distinct objects with unlimited repetitions = the number of non negative integral solutions to x1+ x2+ x3........+ xn=r =the number of distributing r similar balls into n numbered boxes. =the number of binary numbers with n-1 ones and r zeros =C(n-1+r,r)=C(n-1+r,n-1) =C(n+r-1)!/[r!(n-1)!]

The number of 4-combinations of {∞. a1, ∞. a2,… ∞. a5 } Sol: n=5 r=4 C(n-1+r,r) = C(5-1+4,4) = C(8,4) The number of 3-combinations of 5 objects with unlimited repetitions is n=5 r=3 C(n-1+r,r) = C(5-1+3,3) = C(7,3) The number of ways of placing 10 similar balls into six numbered boxes is n=6 r=10 C(n-1+r,r) = C(6-1+10,10) = C(15,10) The number of non integral solutions to x1+x2+x3+x4+x5=30 is n=5 r=30 C(n-1+r,r) = C(5-1+30,30) = C(34,30)

The number of binary numbers with ten 1’s and five 0’s is n-1 = 10 r=5 C(n-1+r,r) = C(10+5,5) = C(15,5) How many different outcomes are possible by tossing 10 similar coins? each coin has two options (heads/ tails) n=2 r=10 C(n-1+r,r) = C(2-1+10,10) = C(11,10) Tossing 20 similar dice? each dice has six options (1,2,3,4,5,6) n=6 r=20 C(n-1+r,r) = C(6-1+20,20) = C(25,20)

20 similar books placed on 5 different shelves n = 5 r=20 C(n-1+r,r) = C(5-1+20,20) = C(24,20) Out of large supply of pennies, nickles, dimes, and quarters in how many ways can 10 coins be selected? n= 4(different types of coins) r=10 C(n-1+r,r) = C(4-1+10,10) = C(13,10) How many ways are there to fill a box with a dozen doughnuts chosen from 8 varieties of doughnuts? n= 8 r= 12 C(n-1+r,r) = C(8-1+12,12) = C(19,12)

Enumerate the number of ways of placing 20 indistinguishable balls into 5 boxes where each box is nonempty. Sol: each box must have 1 ball minimum. ( non empty) 1 + 1 + 1 + 1 + 1 = 5 balls remaining balls left = 20-5= 15 balls n= 5 boxes r=15 balls C(n-1+r,r) = C(5-1+15,15) = C(19,15)

Sol: each box must have 2 balls minimum. How many integral solutions are there to x1+x2+x3+x4+x5=20 where xi> = 2 Sol: each box must have 2 balls minimum. 2 + 2 + 2 + 2 + 2 = 10 balls remaining balls left = 20-10= 10 balls n= 5 boxes r=10 balls C(n-1+r,r) = C(5-1+10,10) = C(14,10)

How many integral solutions are there to X1+x2+x3+x4+x5=20 where each box must have minimum number of balls X1(3) + X2(2) + X3(4) + X4(6) + X5(0) = 15 balls remaining balls left = 20-15= 5 balls n= 5 boxes r=5 balls C(n-1+r,r) = C(5-1+5,5) = C(9,5)

How many integral solutions are there to X1+x2+x3+x4+x5=20 where each box must have minimum number of balls X1(-3) + X2(0) + X3(4) + X4(2) + X5(2) = 8 balls -3 means additionally 3 balls are added to total number of balls. Hence n= 20+3=23 remaining balls left = 23-8= 15 balls n= 5 boxes r=15 balls C(n-1+r,r) = C(5-1+15,15) = C(19,15)

Enumerating Permutations with Constrained repetitions Enumerating n-permutations with constrained repetitions is P(n;q1,q2,q3……qt) = n!/q1!q2!.....qt! = C(n,q1)C(n-q1,q2)(n-q1q2,q3)……C(n-q1- q2……..- qt-1, qt)

How many different arrangements are there of the letters a, a, a, b, and c? Sol: {3.a,1.b,1.c} n=3+1+1=5 q1=3, q2=1, q3=1 P(5;3,1,1) = 5! / 3!1!1! How many 10-Permutations are there of {3.a,4.b,2.c,1.d} ? sol: n= 3+4+2+1= 10 q1=3, q2=4, q3=2, q4= 1 P(10;3,4,2,) = 10! / 2!3!4!1! =C(10,3)C(7,4)C(3,2)C(1,1)

The number of arrangements of letters in the word T A L L A H A S S E E is Sol: Number of characters= n= 11 T – 1 A – 3 times L – 2 times H – 1 time S – 2 times E – 2 times P(11;3,2,2,2,1,1)= 11!/3!2!2!2!1!1! Means {3.A, 2.E, 2.L, 2.S, 1.H, 1.T}

In how many ways can 23 different books be given to 5 students so that 2 of the students will have 4 books each and the other 3 will have 5 books each? Sol: Choose 2 students to receive 4 books each in C(5,2) ways. Then there are P(23;4,4,5,5,5)=23!/4!4!5!5!5! Distributions Finally C(5,2) * 23!/4!4!5!5!5!

Enumerating Ordered partition of a set The number of ordered partitions of a set S of type (q1,q2,q3……qt) where |S|= n is P(n; q1,q2,q3……qt) = n!/q1!q2!.....qt!

In the game of bridge, four players(North , East, West, South) seated in a specified order are each dealt a hand of 13 cards How many ways 52 cards be dealt to the four players? n= 52 q1= q2= q3= q4= 13 52!/13!13!13!13! ii) In how many ways will one player be dealt all four kings? n= 52-4 kings = 48 for q1= 4 kings already have + 9 = 13 q2= q3= q4= 13 48! / 9!13!13!13!

c)In how many deals will north be dealt 7 hearts and south the other 6 hearts? n= 52-13 hearts = 39 q1 q2 q3 q4 7H 13 6H 13 6 7 hearts distributed already in C(13,7) 48! / 6!13!7!13! C(13,7) * 39! / 6!7!13!13! hands

THE PRINCIPLE OF INCLUSION-EXCLUSION We can Count the number of elements in the union of disjoint sets using sum rule. If the sets are not disjoint we must refine the statement of the sum rule to a rule commonly called the Principle of inclusion exclusion(called sieve method)

If A and B are subsets of some universe set U, then |AUB|=|A|+|B|-|AnB| If A,B, and C are finite sets ,then |AUBUC|=|A|+|B|+|C|-|AnB|-|AnC|-|BnC|+|AnBnC|