ChCounting离散数学英文实用.pptx
《ChCounting离散数学英文实用.pptx》由会员分享,可在线阅读,更多相关《ChCounting离散数学英文实用.pptx(33页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、The Pigeonhole Principle1Pigeonhole Principle:Let k and n be positive integers(n k),and we divide n balls among k boxes,then at least one box contains 2 balls13 Pigeons,12 Boxes第1页/共33页Generalized Pigeonhole PrincipleTheorem:If we have n k balls,k and n are positive integers,and we divide them among
2、 k boxes,then at least one box contains n/k ballsAssume 10 boxes(k=10).Number of balls n=11 20,at least a box has 2 ballsNumber of balls n=21 30,at least a box has 3 ballsNumber of balls n=31 40,at least a box has 4 ballsExample:In a group of 1,000 people there are at least 3 people who have their b
3、irthday on the same day.Why?This is because 1000/365=32第2页/共33页Generalized Pigeonhole PrincipleProof of the Generalized Pigeonhole Theorem:By contradiction:Assume none of the k boxes contains n/k balls.Then,each box contains at most n/k 1 balls.So,n k(n/k 1).We know n/k n/k+1(from the property:x x+1
4、).So,n k(n/k 1)k(n/k+1 1)=n.Or,n b).Definition of congruence.Let m=a b.m is a multiple of n and has only 1s&0s5第5页/共33页Pigeonhole Principle ExampleConsider the case n=3.Construct m from n+1=4 integers as follows:1,11,111,1111Divide each of them by n(3)to get:1=30+1,11=33+2,111=337+0,1111=3370+1.In t
5、his case:1 mod 3=1,1111 mod 3=1.If we subtract these two integers we get a new integer that is divisible by n:m=1111 1=1110(=3 370),which is a multiple of 36第6页/共33页Pigeonhole Principle ExampleAt a party of 6 people,every two people are either enemies or friends.Show that there are at least 3 mutual
6、 friends or 3 mutual enemies at the party7friendsfriendsfriendsenemiesenemiesenemiesOR第7页/共33页Pigeonhole Principle ExampleProof:Consider person A:A certainly has either 3 friends or 3 enemies at the party(Pigeonhole Principle:5 people in 2 categories).Assume three of them are friends of A.If the thr
7、ee are mutual enemies then we have 3 mutual enemies and we are done.If not,then at least 2 are friends,but they are also As friends,which makes a group of three mutual friends.Similar proof for the case of three enemies8第8页/共33页Workstation-Server ExampleWe connect 15 workstations to 10 servers.One s
8、erver can only let one workstation use it to communicate at a time.We require that any 10 workstations can use the 10 servers at any time9ServersWorkstations第9页/共33页Workstation-Server ExampleClaim:The minimal number of cables required to connect between workstations and servers is 60Proof:By contrad
9、iction.Assume it is 59.Then one server S must connect to at most 5 workstations(59/10=5).This means that the remaining 10 workstations are not connected to S.So these 10 workstations can only communicate to at most 9 servers.It is a contradiction!10第10页/共33页Permutationsr-permutation:An ordered arran
10、gement of r elements of a set of n distinct elements,r nExample:S=1,2,3,4:2134 is a permutation of S321 is a 3-permutation of S 32 is a 2-permutation of SPermutation Theorem:The number of r-permutations of n objects is:P(n,r)=n(n 1)(n 2).(n r+1)=First object can be chosen in n ways,second in(n 1)way
11、s,.,r-th object in n r+1 ways.Use product rule to get the above resultWhen r=n,P(n,n)=n(n 1)(n 2).1=n!11第11页/共33页Permutation ExamplesA mailman needs to bring 8 packages to 8 cities.He starts at city 1.How many ways are there to visit the remaining 7 cities?Pick second city among 7,3rd among 6,4th am
12、ong 5,.Answer:7!How many permutations of the letters“a,b,c,d,e,f,g,h”contain“abc”as a block.Rename“abc”to B.Now we have:how many permutations of B,d,e,f,g,h are there?Answer:6!12第12页/共33页Combinationsr-combination C(n,r):An unordered selection of r elements(or subset of size r)from a set of n element
13、s.Example:S=1,2,3,4.Then 3,2,1=1,2,3 is a 3-combination.1,3,4 is another and 1,4 is a 2-combinationCombination Theorem:The total number of r-combinations of a set of size n,0 r n,is given by 13第13页/共33页CombinationsProof of combination theorem:P(n,r)counts the total number of ordered arrangements.How
14、ever,the difference of C(n,r)is that it is only interested in unordered arrangements here.For every subset of r elements one can exactly construct r!ordered arrangements in the permutation,everyone of which is included in P(n,r).These r!arrangements should be considered the same in C(n,r).We thus ne
15、ed to divide P(n,r)by r!14第14页/共33页CombinationsNote that C(n,r)=C(n,n r).Its symmetricThis is because Also,15第15页/共33页Combination ExampleHow many poker hands of five cards can be dealt from a standard deck of 52 cards?Also,how many ways are there to select 47 cards from a deck of 52 cards?Solution:S
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- ChCounting 离散数学 英文 实用
限制150内