4.4 Permutations and Combinations of multisets

Slides:



Advertisements
Similar presentations
Basic Permutations and Combinations
Advertisements

5.3 Permutations and Combinations
DEFINITION Let f : A  B and let X  A and Y  B. The image (set) of X is f(X) = {y  B : y = f(x) for some x  X} and the inverse image of Y is f –1 (Y)
1 Section 4.3 Permutations & Combinations. 2 Permutation Set of distinct objects in an ordered arrangement An ordered arrangement of r members of a set.
Permutations and Combinations Rosen 4.3. Permutations A permutation of a set of distinct objects is an ordered arrangement these objects. An ordered arrangement.
Math 221 Integrated Learning System Week 2, Lecture 1
3.3 The Characteristic function of the set  function from universal set to {0,1}  Definition 3.6: Let U be the universal set, and let A  U. The characteristic.
CSE115/ENGR160 Discrete Mathematics 04/17/12
Lecture 5 Counting 4.3, Permutations r-permutation: An ordered arrangement of r elements of a set of n distinct elements. Example: S={1,2,3}:
1 Section 5.1 Discrete Probability. 2 LaPlace’s definition of probability Number of successful outcomes divided by the number of possible outcomes This.
Combinations We should use permutation where order matters
Chapter 8 Counting Techniques PASCAL’S TRIANGLE AND THE BINOMIAL THEOREM.
Chapter 11 Counting Methods © 2008 Pearson Addison-Wesley. All rights reserved.
Section 4.3: Permutations and Combinations Def: A permutation of a set of distinct objects is an ordered arrangement of these objects. Ex: {a, b, c, d}
Combinatorics 3/15 and 3/ Counting A restaurant offers the following menu: Main CourseVegetablesBeverage BeefPotatoesMilk HamGreen BeansCoffee.
Counting. Why counting  Determine the complexity of algorithms To sort n numbers, how many instructions are executed ?  Count the number of objects.
Notes 9.1 – Basic Combinatorics. I. Types of Data 1.) Discrete Data – “Countable”; how many? 2.) Continuous Data – “uncountable”; measurements; you can.
Chapter 6 The Inclusion-Exclusion Principle and Applications
Generalized Permutations and Combinations
Probability Notes Math 309. Sample spaces, events, axioms Math 309 Chapter 1.
Binomial Coefficients, Inclusion-exclusion principle
Chapter 3 Permutations and combinations
Section 10-3 Using Permutations and Combinations.
3. Counting Permutations Combinations Pigeonhole principle Elements of Probability Recurrence Relations.
4.5.2 Applications of Inclusion-Exclusion principle
Basic Probability Permutations and Combinations: -Combinations: -The number of different packages of data taken r at time from a data set containing n.
Elements of Combinatorics (Continuation) 1. Pigeonhole Principle Theorem. If pigeons are placed into pigeonholes and there are more pigeons than pigeonholes,
Counting Methods Review General Guidelines. Fundamental Counting Principle Each category outcome is independent of any other category outcome OR Items.
Lecture 5 Counting 4.3, Permutations r-permutation: An ordered arrangement of r elements of a set of n distinct elements. Example: S={1,2,3}:
1 Binomial Coefficients CS 202 Epp, section ??? Aaron Bloomfield.
Simple Arrangements & Selections. Combinations & Permutations A permutation of n distinct objects is an arrangement, or ordering, of the n objects. An.
1 Lecture 4 (part 2) Combinatorics Reading: Epp Chp 6.
4.1.2 Pigeonhole principle:Strong Form  Theorem 4.2: Let q 1,q 2,…,q n be positive integers. If q 1 +q 2 +…+q n -n+1 objects are put into n boxes, then.
Sullivan Algebra and Trigonometry: Section 14.2 Objectives of this Section Solve Counting Problems Using the Multiplication Principle Solve Counting Problems.
Learning Objectives for Section 7.4 Permutations and Combinations
Spatial Statistics and Spatial Knowledge Discovery First law of geography [Tobler]: Everything is related to everything, but nearby things are more related.
The Pigeonhole Principle. The pigeonhole principle Suppose a flock of pigeons fly into a set of pigeonholes to roost If there are more pigeons than pigeonholes,
Permutations and Combinations
Discrete Mathematics, 1st Edition Kevin Ferland Chapter 6 Basic Counting 1.
1 CS 140 Discrete Mathematics Combinatorics And Review Notes.
MATH 2311 Section 2.1. Counting Techniques Combinatorics is the study of the number of ways a set of objects can be arranged, combined, or chosen; or.
HAWKES LEARNING Students Count. Success Matters. Copyright © 2015 by Hawkes Learning/Quant Systems, Inc. All rights reserved. Section 7.2 Counting Our.
© 2010 Pearson Prentice Hall. All rights reserved. CHAPTER 11 Counting Methods and Probability Theory.
CS Lecture 8 Developing Your Counting Muscles.
Copyright © Peter Cappello 2011 Simple Arrangements & Selections.
COUNTING Permutations and Combinations. 2Barnett/Ziegler/Byleen College Mathematics 12e Learning Objectives for Permutations and Combinations  The student.
1 Chapter 4 Generating Permutations and Combinations.
Summary of the Last Lecture This is our second lecture. In our first lecture, we discussed The vector spaces briefly and proved some basic inequalities.
Operations on Sets Union of Sets Intersection of Sets
COUNTING Discrete Math Team KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS ) 1.
Section 6-7 Permutations and Combinations. Permutation Permutation – is an arrangement of items in a particular order.
Section 6.3. Section Summary Permutations Combinations.
EXAMPLE 1 Count permutations
Chapter 10 Counting Methods.
CSE15 Discrete Mathematics 04/19/17
Counting Methods and Probability Theory
12.2 Permutations and Combinations
Permutations and Combinations
Permutations and Combinations
Permutations and Combinations
Combinations Color Letter
Introduction to Sets.
Sequences and the Binomial Theorem
Counting Methods and Probability Theory
Probability Notes Math 309.
Combinations & Permutations (4.3.1)
4.4 Permutations and Combinations of multisets
PERMUTATIONS.
Probability Notes Math 309.
Probability Notes Math 309 August 20.
Presentation transcript:

4.4 Permutations and Combinations of multisets Multisets :A multiset is a set in which an item may appear more than once. . Sets and multisets are quite similar: both support the basic set operations of union, intersection, and difference. item ai ni, {n1•a1,n2•a2,…,nk•ak} Example:{a,a,a,a,b,b,c} {4•a,2•b,1•c} {•a1,•a2,…,•ak}

4.4 Permutations and Combinations of multisets 4.4.1 Permutations of multisets If S is a multiset, a r-permutation of S is an ordered arrangement of r of the objects of S. If the total number of objects of S is n,then a n-permutation of S will also be called a permutation of S. For example, if S={2•a,1•b,3•c}, then aacb acbc cacc are 4-permutations of S, “abccac” is a permutation of S. The multiset S has no 7-permutations since 7>2+1+3=6, the number of objects of S.

Theorem 4.10: Let S be a multiset with objects of k different types where each has an infinite repetition number. Then the number of r-permutations of S is kr. Proof: In constructing a r-permutation of S, we can choose the first item can be an object of any one of the k types. Similarly the second item to be an object of any one of the k types, and so on. Since all repetition numbers of S are infinite, the number of different choices for any item is always k and does not depend on the choices of any previous items. By the multiplication principle, the r items can be chose in kr ways.

Corollary 4.4: Let S={n1•a1,n2•a2,…,nk•ak},and ni r for each i=1,2,…,n,then the number of r-permutations of S is kr.

Theorem 4.11: Let multiset S={n1•a1,n2•a2,…,nk•ak}, and n=n1+n2+…+nk=|S|. Then the number of permutations of S equals n!/(n1!n2!…nk!)。 Proof: We can think of it this way. There are n places, and we want to put exactly one of the objects of S in each of the places. Since there are n1 a1’s in S, we must choose a subset of n1 places from the set of n places. C(n,n1) We next decided which places are to be occupied by the a2’.

Example What is the number of permutations of the letters in the word Mississippi?

Let S={n1•a1,n2•a2,…,nk•ak}, and n=n1+n2+…+nk=|S|,then the number N of r-permutations of S equals (2)n!/(n1!n2!…nk!) r=n (3)kr ni r for each i=1,2,…,n (4)If r<n, there is, in general, no simple formula for the number of r-permutations of S. Nonetheless a solution can be obtained by the technique of generating functions, and we discuss this in 4.6 .

4.4.2 Combinations of multisets If S is a multiset, a r-combination of S is an unordered selection of r of the objects of S. Thus an r-combination of S is a submultiset of S. If S has n objects,then there is only one n-combination of S, namely, S itself. If S contains objects of k different types, then there are k 1-combinations of S. Example If S={2•a,1•b,3•c}, then the 3-combinations of S are {2•a,1•b},{2•a,1•c}, {1•a,1•b,1•c}, {1•a,2•c},{1•b,2•c},{3•c}.

Theorem 4. 12: Let S ={·a1,·a2,…, ·ak} Theorem 4.12: Let S ={·a1,·a2,…, ·ak}. Then the number of r-combinations of S equals C(k+r-1,r)。 Proof. (1)The number of r-combinations of S equals the number of solutions of the equation where x1,x2,…,xk are non-negative integers (2)We show that the number of these solutions equals the number of permutations of the multiset T={(k-1)·0,r·1}.

Corollary 4.5: Let S={n1•a1,n2•a2,…,nk•ak},and ni r for each i=1,2,…,n. Then the number of r-combinations of S is C(k+r-1,r). Example Suppose that a cookie shop has seven different kinds of cookies. How many different ways can twelve cookies be chosen?

Example How many integer solutions does the equation x1+x2+x3=11 have, where x1,x2,and x3 are non-negative integers? Solution To count the number of solutions, we note that a solution corresponds to a way of selecting 11 items from a set with three elements.

Example How many solutions are there to the equation x1+x2+x3=11 where x13,x21, and x30? Solution We introduce new variables: y1=x1-3, y2=x2-1, y3=x3, and the equation becomes y1+y2+y3=7 where y1,y2,and y3 are non-negative integers

Corollary 4. 6 Let S={·a1,·a2,…,·ak},and rk Corollary 4.6 Let S={·a1,·a2,…,·ak},and rk . Then the number of r-combinations of S so that each of the k types of objects occurs at least once equals C(r-1,k-1). Proof: r-combinations of S so that each of the k types of objects occurs at least once, a1,a2,…,ak, r-k combinations r-k combinations, +a1,a2,…,ak,r-combinations of S so that each of the k types of objects occurs at least once

Let S={n1•a1,n2•a2,…,nk•ak}, and n=n1+n2+…+nk=|S|,then the number N of r-combinations of S equals (3) N=C(k+r-1,r) ni r for each i=1,2,…,n. (4) If r<n, and there is, in general, no simple formula for the number of r-combinations of S. Nonetheless a solution can be obtained by the inclusion-exclusion principle and technique of generating functions, and we discuss these in 4.5 and 4.6.

4.5 Inclusion-Exclusion principle and Applications Theorem 4.13:Let A and B be finite sets. Then |A∪B|=|A|+|B|-|A∩B|。 Proof:Because A∪B=A∪(B-A),and A∩(B-A)=,by theorem we obtain |A∪B|=|A|+|B-A|. |B-A|=? Theorem 4.14:Let A1,A2,…,An be finite sets. Then

Corollary 4.7: Let S be a finite set, and P1,P2,…,Pn be n properties referring to the objects in S. Let Ai={x|xS and x has property Pi}(i=1,2,…,n) be the subset of S which have property Pi (and possibly other properties). Then the number of objects of S which have none of the properties P1,P2,…,Pn is given by

Example: In a certain school, the pupils have to study France, German, or English. Each pupil must study at least one of the three. Among a group of 100 pupils, 42 are studying France, 45 are studying German, 65 are studying English, 15 are studying France and German, 20 are studying France and English, 25 are studying German and English. Find the number of pupils who are studying all the three subjects. And Find the number of pupil who are studying English only. A, France B, German C, English the number of pupil who are studying English only |C|-|A∩C|-|B∩C|+|A∩B∩C|=28

Example:How many hex strings of length r contain 0,1, and 2? Solution:Let S be the set of length r’s hex strings. Let A be the set of length r’s hex strings which do not contain 0 Let B be the set of length r’s hex strings which do not contain 1 Let C be the set of length r’s hex strings which do not contain 2.

Example:Find the number of integers between 1 to 1000, inclusive, which are divisible by none of 5,6, and 8. Solution: Let S be the set consisting of the first thousand positive integers. Let P1 be the property that an integer is divisible by 5. Let P2 be the property that an integer is divisible by 6. Let P3 be the property that an integer is divisible by 8. For i=1,2,3 let Ai be the set consisting of those integers in S with property Pi.

Integers in the set A1∩A2 are divisible by both 5 and 6(lcm{5,6}=30) Integers in the set A1∩A2 are divisible by both 5 and 6(lcm{5,6}=30). Integers in the set A1∩A3 are divisible by both 5 and 8(lcm{5,8}=40). Integers in the set A2∩A3 are divisible by both 6 and 8(lcm{6,8}=24). Integers in the set A1∩A2∩A3 are divisible by 5 , 6 and 8(lcm{5,6,8}=120). By the inclusion-exclusion principle, the number of integers between 1 to 1000 that are divisible by none of 5,6, and 8 equals

Next: Applications of Inclusion-Exclusion principle, Generating functions, Exercise P96 22,23 (Sixth) OR P83 22,33(Fifth); P99 10,12,14,16, 18,20(Sixth) OR P86 10,12,14,16,18, 20(Fifth) 1.Prove Theorem 4.9 (4)(7). 2.How many solutions are there to the equation x1+x2+x3+x4+x5=25,where x1,x2,x3,x4, and x5 are nonnegative integers? 3. How many strings of 20 decimal digits are there that contain two 0’s,four 1’s,three 2’s,one 3,two 4’s, three 5’s,two 7’s, and three 9’s? 4.How many positive integers less than 1,000,000 have the sum of their digits equal to 19? 5.A football team of 11players is to be selected from a set of 16 players, 5 of whom can only play in the backfield, 9 of whom can only play on the line, and 2 of whom can play either in the backfield or on the line. Assuming a football team has 7 men on the line and 4 in the backfield, determine the number of football teams possible. 6. Find the number of integers between 1 and 10,000 inclusive which are not divisible by 4,5, or 6.