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.

Slides:



Advertisements
Similar presentations
4.4 Permutations and Combinations of multisets
Advertisements

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.
Counting Chapter 6 With Question/Answer Animations.
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.
THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph , N.V. Bilous.
Discrete Structures Chapter 4 Counting and Probability Nurul Amelina Nasharuddin Multimedia Department.
CSE115/ENGR160 Discrete Mathematics 04/17/12
Permutations r-permutation (AKA “ordered r-selection”) An ordered arrangement of r elements of a set of n distinct elements. permutation of a set of n.
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}:
Recursive Definitions Rosen, 3.4 Recursive (or inductive) Definitions Sometimes easier to define an object in terms of itself. This process is called.
Combinations We should use permutation where order matters
Counting Techniques: r-combinations with
Counting II: Pascal, Binomials, and Other Tricks Great Theoretical Ideas In Computer Science A. Gupta D. Sleator CS Fall 2010 Lecture 8Sept. 16,
Recursive Definitions Rosen, 3.4 Recursive (or inductive) Definitions Sometimes easier to define an object in terms of itself. This process is called.
4.4.2 Combinations of multisets
1 Permutations and Combinations CS/APMA 202 Epp section 6.4 Aaron Bloomfield.
Permutations and Combinations
Chapter 1 Fundamental principles of counting 陳彥良 中央大學資管系.
4. Counting 4.1 The Basic of Counting Basic Counting Principles Example 1 suppose that either a member of the faculty or a student in the department is.
Combinatorics 3/15 and 3/ Counting A restaurant offers the following menu: Main CourseVegetablesBeverage BeefPotatoesMilk HamGreen BeansCoffee.
Counting Chapter 6 With Question/Answer Animations.
Counting. Why counting  Determine the complexity of algorithms To sort n numbers, how many instructions are executed ?  Count the number of objects.
The Basics of Counting Section 6.1.
Basic Counting. This Lecture We will study some basic rules for counting. Sum rule, product rule, generalized product rule Permutations, combinations.
Chapter The Basics of Counting 5.2 The Pigeonhole Principle
Generalized Permutations and Combinations
Binomial Coefficients, Inclusion-exclusion principle
Chapter 6 With Question/Answer Animations 1. Chapter Summary The Basics of Counting The Pigeonhole Principle Permutations and Combinations Binomial Coefficients.
Permutations and Combinations
Fall 2002CMSC Discrete Structures1 One, two, three, we’re… Counting.
Chapter 3 Permutations and combinations
March 10, 2015Applied Discrete Mathematics Week 6: Counting 1 Permutations and Combinations How many different sets of 3 people can we pick from a group.
2 Permutations and Combinations Lesson 8 HAND OUT REFERENCE SHEET AND GO OVER IT.
ICS 253: Discrete Structures I Counting and Applications King Fahd University of Petroleum & Minerals Information & Computer Science Department.
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.
Counting CSC-2259 Discrete Structures Konstantin Busch - LSU1.
R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001 Chapter 4 Counting methods and the pigeonhole principle.
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,
Inclusion and exclusion principle; inversion formulae Thm Let S be an N-set; E i ’s, i=1..r, be subsets of S. For any subset M of [r], define N(M)
Discrete Mathematics Lecture # 25 Permutation & Combination.
Menu Traditional Menu Other Menu Nasi LemakBeef Burger Roti Canai Potatoes Chip Capati French Bread Mee Goreng Drink : Coffee, Tea, Coke and Pepsi.
1 CS 140 Discrete Mathematics Combinatorics And Review Notes.
CS Lecture 8 Developing Your Counting Muscles.
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.
Copyright © Peter Cappello 2011 Simple Arrangements & Selections.
Section 6.4. Powers of Binomial Expressions Definition: A binomial expression is the sum of two terms, such as x + y. (More generally, these terms can.
Binomial Coefficients and Identities
5.4 Binomial Coefficients Theorem 1: The binomial theorem Let x and y be variables, and let n be a nonnegative integer. Then Example 3: What is the coefficient.
CS 104: Discrete Mathematics
Section The Pigeonhole Principle If a flock of 20 pigeons roosts in a set of 19 pigeonholes, one of the pigeonholes must have more than 1 pigeon.
1 DISCRETE STRUCTURES DISCRETE STRUCTURES SSK3003 DR. ALI MAMAT 1.
Operations on Sets Union of Sets Intersection of Sets
Chapter 6 With Question/Answer Animations Copyright © McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written.
ICS 253: Discrete Structures I Counting and Applications King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Chapter 5 Counting 歐亞書局.
COUNTING Discrete Math Team KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS ) 1.
Section 6.3. Section Summary Permutations Combinations.
The Pigeonhole Principle
CSE15 Discrete Mathematics 04/19/17
COCS DISCRETE STRUCTURES
Permutations and Combinations
CS100: Discrete structures
Permutations and Combinations
Permutations and Combinations
Sequences and the Binomial Theorem
Presentation transcript:

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 either the first box contains at least q 1 objects, or the second box contains at least q 2 objects, …, or the nth box contains at least q n objects.  Proof:Suppose that we distribute q 1 +q 2 +…+q n -n+1 objects among n boxes.

 (1)If n(r-1)+1 objects are put into n boxes, then at least one of the boxes contains r or more of the objects. Equivalently,  (2)If the average of n non-negative integers m 1,m 2,…,m n is greater than r-1: (m 1 +m 2 +…+m n )/n>r-1, then at least one of the integers is greater than or equal to r.  Proof:(1)q 1 =q 2 =…=q n =r  q 1 +q 2 +…+q n -n+1=rn-n+1=(r-1)n+1, then at least one of the boxes contains r or more of the objects 。  (2)(m 1 +m 2 +…+m n )>(r-1)n ,  (m 1 +m 2 +…+m n )≥(r-1)n +1

 Example 6:Two disks, one smaller than the other, are each divided into 200 congruent sectors. In the larger disk 100 of the sectors are chosen arbitrarily and painted red; the other 100 of the sectors are painted blue. In the smaller disk each sector is painted either red or blue with no stipulation on the number of red and blue sectors. The small disk is then placed on the larger disk so that their centers coincide. Show that it is possible to align the two disks so that the number of sectors of the small disk whose color matches the corresponding sector of the large disk is at least 100.  if the large disk is fixed in place  there are 200 possible positions for the small disk such that each sector of the small disk is contained in a sector of the large disk.  color matches the corresponding  20000/200=100>100-1  Position with at least 100 color matches

4.2 Permutations of sets  Basic counting principles  Theorem 4.3(Addition principle): If A 1, A 2, …, A n are disjoint sets, then the number of elements in the union of these sets is the sum of the numbers of elements in them.  | A 1 ∪ A 2 ∪ … ∪ A n |=|A 1 |+|A 2 |+…+|A n |

 Example1: A student wishes to take either a mathematics course or biology course, but not both. If there are 4 mathematics course and 2 biology course for which the student has the necessary prerequisites, then the student can choose a course to take in 4+2=6 ways.  Theorem 4.4(Multiplication principle): Let A and B be two finite sets. Let |A|=p and |B|=q, then |A×B|=p×q.

 Example2: A student wishes to take a mathematics course and a biology course. If there are 4 mathematics course and 2 biology course for which the student has the necessary prerequisites, then the student can choose courses to take in 4×2=8 ways.

4.2.2 Permutations of sets  An ordered arrangement of r elements of an n-element set is called a r-permutation.  We denote by p(n,r) the number of r- permutations of an n-element set. If r>n, then p(n,r)=0. An n-permutation of an n-element set S is called a permutation of S. A permutation of a set S is a listing of the elements of S in some order.

 Theorem 4.5: For n and r positive integers with r  n,  p(n,r)=n(n-1)…(n-r+1)  Proof:In constructing an r-permutation of an n- element set, we can choose the first item in n ways, the second item in n-1 ways whatever choice of the first item,…, and the rth item in n-(r-1) ways whatever choice of the first r-1 items. By the multiplication principle the r items can be chosen in n(n-1)…(n-r+1) ways.  We define n! by  n!= n(n-1)…21  with the convention that 0!=1.Thus p(n,r)=n!/(n-r)!.

 Example:What is the number of ways to order the 26 letters of the alphabet so that no two of the vowels a,e,i,o,and u occur consecutively?( 元音字母 中任意两个都不得相继出现 )  Solution:The first task is to decide how to order the consonants among themselves.  21!  Our second task is put the vowels in these places.  p(22,5)=22!/17!  By the multiplication principle, the numble of ordered arrangements of the letters of the alphabet with no two vowels consecutive is 21!  22!/17!.

 Example: What is the number of ways to order the 26 letters of the alphabet so that it contains exactly seven letters between a and b?  a…….b , P(24,7)  b…….a , P(24,7)  between a and b 2P(24,7)  P(18,18)=18!.  2P(24,7)18!  linar permutation  circular permutation

 linar permutation  circular permutation  linar permutation  linar permutation  circular permutation

For example, the circular permutation  arises from each of the linear permutation 

 Theorem 4.6: The number of circular r- permutations of a set of n elements is given by p(n,r)/r=n!/r(n-r)!. In particular,the number of circular permutations of n elements is (n-1)!.  Proof: The set of linear r-permutations can be partitioned into parts in such a way that two linear r-permutations are in the same part if only if they correspond to the same circular r-permutations.  Thus the number of circular r-permutations equals the number of parts.  Since each part contains r linear r- permutations, the number of parts is the number p(n,r) of linear r-permutations divided by r.

 Example: Ten people, including two who do not wish to sit next to one another, are to be seated at a round table. How many circular seating arrangements are there?

4.3 Combinations of sets  Combinations of sets  Definition: Let r be a non-negative integer. An r-combination of an n-element set S is an r-element subset of S. We denote by n C r, or C(n,r), or

 Example: Let S={a,b,c,d}, then {a,b,c}, {a,b,d}, {a,c,d}, {b,c,d} are the 3-combinations of S.  Note that these are subsets, not sequences.  Therefore, {a,b,c}={a,c,b}={b,a,c}={b,c,a}={c,a,b} ={c,b,a}.  If r>n, then C(n,r)=0. Also C(0,r)=0 if r>0. Obviously  C(n,0)=1, C(n,1)=n, C(n,n)=1.

 Theorem 4.7: For 0  r  n, C(n,r)=p(n,r)/r! and hence C(n,r)=n!/r!(n-r)!.  Proof: Let S be an n-element set.  Each r-permutation of S arises in exactly one way as a result of carrying out the following two tasks.  (1)Choose r elements from S. C(n,r)  (2)Arrange the chosen r elements in some order. r!  By the multiplication principle we have p(n,r)=r!C(n,r). Thus C(n,r)=p(n,r)/r!. We now use the formula p(n,r)=n!/(n-r)! and obtain C(n,r)=n!/r!(n-r)!.

 Corollary 4.1: For 0  r  n, C(n,r)=C(n,n-r).  Proof: C(n,r)=n!/(r!(n-r)!)=n!/((n-(n-r))!(n- r)!)=C(n,n-r).  Example: How many different seven-person committees can be formed each containing three women from an available set of 20 women and four men from an available set of 30 men?  Task1: Choose three women from the set of 20 women. C(20,3)  Task2: Choose four men from an the set of 30 men. C(30,4)  By the multiplication principle,there are C(20,3)C(30,4).

 The Binomial Coefficients and Identities  The number C(n,r) have many important and fascinating properties.  C(n,r) is also called a binomial coefficient because these numbers occur as coefficients in the expansion of powers of binomial expressions such as (a+b) n.  Theorem 4.8(Binomial theorem): Let x and y be variables, and let n be a nonnegative integer. Then

 Corollary 4.2: Let n be a nonnegative integer. Then  C(n,0)+C(n,1)+…+C(n,n)=2 n  Proof : Let x=y=1, by the Binomial theorem it follows that

 Corollary 4.3:Let n be a positive integer. Then  C(n,0)-C(n,1)+C(n,2)-…+ (-1) n C(n,n)=0  Proof : Let x=-1, and y=1, by the Binomial theorem it follows that C(n,0)-C(n,1)+C(n,2)- …+ (-1) n C(n,n)=0  Remark: Corollary 4.3 implies that  C(n,0)+C(n,2)+ …=C(n,1)+C(n,3)+ …

 Theorem 4.9: Let m,n,r, and k be nonnegative integer. Then (2)C(n,k)=C(n-1,k)+C(n-1,k-1)( 杨辉公式, Pascal ’ s formula) ; (5)C(n,r)C(r,k)=C(n,k)C(n-k,r-k), where r  k ; (6)C(m,0)C(n,r)+C(m,1)C(n,r-1)+  +C(m,r)C(n,0)=C(m+n,r) , where r  min{m,n} (Vandermonde identity) ; (7)C(m,0)C(n,0)+C(m,1)C(n,1)+  +C(m,m)C(n,m)=C(m+n,m)where m  n 。 When m=n ,

 Exercise P96 17,19; P99 4,5,6,8 (Sixth)  OR P83 17, 19; P86 4,5,6,8 (Fifth)  1.In how many ways can six men and six ladies be seated round table if the men and ladies are to sit in alternate seats?  2.In how many ways can 15 people be seated at a round table if B refuse to sit next to A?What if B only refuses to sit on A’s right?  Next: Permutations and Combinations of multisets