230 likes | 638 Views
Permutations and Combinations. Agenda. Permutations Combinations Some derivation of Permutations and Combinations Eliminating Duplicates r-Combinations with Repetitions. Permutations. Sample questions
E N D
Agenda • Permutations • Combinations • Some derivation of Permutations and Combinations • Eliminating Duplicates • r-Combinations with Repetitions
Permutations Sample questions Five athletes (Amazon, Bobby, Corn, Dick and Ebay) compete in an Olympic event. Gold, silver and bronze medals are awarded: in how many ways can the awards be made?
Permutation (cont.) • Order matters !!! • The case that Amazon wins gold and Ebay wins silver is different from the case Ebay wins gold and Amazon wins silver. • If the order is of significance, the multiplication rules are often used when several choices are made from one and the same set of objects.
Permutations--Definition • In general, if r objects are selected from a set of n objects, any particular arrangement of these r objects(say, in a list) is called a permutation. • In other words, a permutation is an ordered arrangement of objects. • By multiple principle, the total number of permutations of r objects selected from a set of n objects is n(n-1)(n-2)·…·(n-r+1)
Permutations –More examples • Examples • How many permutations of 3 of the first 5 positive integers are there? • How may permutations of the characters in COMPUTER are there? How many of these end in a vowel? • How many batting orders are possible for a nine-man baseball team?
Permutations - Calculation • Background-Factorial notation: • 1!=1, 2!=(2)(1)=2, 3!=(3)(2)(1)=6 • In general, n!= n(n-1)(n-2) ·…·3·2·1 for any positive integer n. • It is customary to let 0!=1 by definition. • Calculation of Permutation
Permutations -- Special Cases • P(n,0) There’s only one ordered arrangement of zero objects, the empty set. • P(n,1) There are n ordered arrangements of one object. • P(n,n) There are n! ordered arrangements of n distinct objects (multiplication principle)
Combinations • An NBA team has 12 players, in how ways we can choose 5 from 12? • Can we use permutations? • Are we interested in the order of the players?
Combinations (cont.) • A combination is the same as a subset. • When we ask for the number of combinations of r objects chosen from a set of n objects, we are simply asking “How many different subsets of r objects can be chosen from a set of n objects?” • The order does not matter.
Combinations (cont.) • Any r objects can be arranged among themselves in r! permutations, which only count as one combination. • So the n(n-1)(n-2)…(n-r+1) different permutations of r objects chosen from a set of n objects contain each combination r! times.
Combinations -- Definition The number of combinations of r objects chosen from a set of n objects is: for r=0,1,2,…,n Or Other notations for C(n,r) are:
(Number of ways to choose the objects) (Number of ways to arrange the objects chosen) * Combinations (cont.) • For each combination, there are r! ways to permute the r chosen objects. • Using the multiplication principle: C(n,r)r!=P(n,r) are refer as binomial coefficients
Combinations –More examples In how many ways a committee of five can be selected from among the 80 employees of a company? In how many ways a research worker can choose eight of the 12 largest cities in the United States to be included in a survey?
Combinations (cont.) Lets introduce a simplification: When we choose r objects from a set of n objects we leave (n-r) of the n objects, so there are as many ways of leaving (or choosing) (n-r) objects as there are of choosing r objects. So for the solution of the previous problem, we have:
Combinations -- Special Cases • C(n,0): • C(n,1): • C(n,n): there is only one way to chose 0 objects from the n objects there are n ways to select 1 object from n objects there is only one way to select n objects from n objects, and that is to choose all the objects
Permutations or Combinations ? • There are fewer ways in a combinations problem than a permutations problem. • The distinction between permutations and combinations lies in whether the objects are to be merely selected or both selected and ordered. If ordering is important, the problem involves permutations; if ordering is not important the problem involves combinations. • C(n,r) can be used in conjunction with the multiplication principle or the addition principle. • Thinking of a sequence of subtasks may seem to imply ordering bit it just sets up the levels of the decision tree, the basis of the multiplication principle. • Check the Fig 3. 9 to get an idea about the difference between permutation and combination.
Eliminating duplicate • A committee of 8 students is to be selected from a class consisting of 19 freshmen and 34 sophomores. In how many ways can a committee with at least 1 freshman be selected? • How many distinct permutations are there of the characters in the word Mongooses? • How many distinct permutations are there of the characters in the word APALACHICOLA?
Eliminating duplicate (cont.) In general, suppose there are n objects of which a set of n1 are indistinguishable for each other, another set of n2 are indistinguishable from each other, and so on, down to nk objects that are indistinguishable from each other. The number of distinct permutations of the n objects is
r- Combinations with Repetitions • A jeweler designing a pin has decided to use two stones chosen from diamonds, rubies and emeralds. In how many ways can the stones be selected? • Answer-- {D,R}, {D,D}, {D,E}, {E,R},{E,E}, {R,R}. • Any other way to solve this problem? What if he needs five stones?
r-Combinations with Repetitions(cont.) • Some hints? • 1 diamond, 3 rubies and 1 emerald === * | * * * | * • 5 diamond, 0 rubies and 0 emerald === * * * * * | | • 0 diamond, 5 rubies and 0 emerald === | * * * * * | • 0 diamond, 0 rubies and 5 emerald === | | * * * * * What is it? Choose 5 stars from 7 elements, i.e., C(7,5)
r-Combinations with Repetitions (cont.) • In general, there must be n-1 markers to indicate the number of copies of each of the n objects. • We will have r + (n-1) slots to fill (objects + markers). • We want the number of ways to select r out of the previous slots to fill. • Therefore we want: • Six children use one lollipop each from a selection of red, yellow, and green lollipops. In how many ways can this be done?