书签 分享 收藏 举报 版权申诉 / 33
上传文档赚钱

类型ChCounting离散数学英文版课件.ppt

  • 上传人(卖家):晟晟文业
  • 文档编号:3711022
  • 上传时间:2022-10-06
  • 格式:PPT
  • 页数:33
  • 大小:822.33KB
  • 【下载声明】
    1. 本站全部试题类文档,若标题没写含答案,则无答案;标题注明含答案的文档,主观题也可能无答案。请谨慎下单,一旦售出,不予退换。
    2. 本站全部PPT文档均不含视频和音频,PPT中出现的音频或视频标识(或文字)仅表示流程,实际无音频或视频文件。请谨慎下单,一旦售出,不予退换。
    3. 本页资料《ChCounting离散数学英文版课件.ppt》由用户(晟晟文业)主动上传,其收益全归该用户。163文库仅提供信息存储空间,仅对该用户上传内容的表现方式做保护处理,对上传内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知163文库(点击联系客服),我们立即给予删除!
    4. 请根据预览情况,自愿下载本文。本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
    5. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007及以上版本和PDF阅读器,压缩文件请下载最新的WinRAR软件解压。
    配套讲稿:

    如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。

    特殊限制:

    部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。

    关 键  词:
    ChCounting 离散数学 英文 课件
    资源描述:

    1、Elements of Discrete StructuresChapter 6:Counting(Part 2)1The Pigeonhole Principle2 Pigeonhole 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 BoxesGeneralized Pigeonhole Principle Theorem:If we have n k balls,k

    2、and n are positive integers,and we divide them among k boxes,then at least one box contains n/k balls Assume 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 balls Example:In a group of 1,0

    3、00 people there are at least 3 people who have their birthday on the same day.Why?This is because 1000/365=33Generalized Pigeonhole Principle Proof 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

    4、/k 1).We know n/k n/k+1(from the property:x x+1).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&0s6Pigeonhole Principle Example Consider the case n=3.Construct m from n+1=4 integers as follows:1,11,111,1111 Divide each of them by n(3)to get:

    5、1=30+1,11=33+2,111=337+0,1111=3370+1.In this 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 37Pigeonhole Principle Example At a party of 6 people,every two people are either enemies or friends.Sho

    6、w that there are at least 3 mutual friends or 3 mutual enemies at the party8friendsfriendsfriendsenemiesenemiesenemiesORPigeonhole Principle Example Proof: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

    7、are friends of A.If the three 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 enemies9Workstation-Server Example We connect 15 workstations

    8、 to 10 servers.One server 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 time10ServersWorkstationsWorkstation-Server Example Claim:The minimal number of cables required to connect between workstations and servers is 60 P

    9、roof:By contradiction.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!11Permutations r-permutation:An ordere

    10、d arrangement of r elements of a set of n distinct elements,r n Example:S=1,2,3,4:2134 is a permutation of S321 is a 3-permutation of S 32 is a 2-permutation of S Permutation 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 i

    11、n(n 1)ways,.,r-th object in n r+1 ways.Use product rule to get the above result When r=n,P(n,n)=n(n 1)(n 2).1=n!12)!(!rnnPermutation Examples A 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

    12、 6,4th among 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!13Combinations r-combination C(n,r):An unordered selection of r elements(or subset of size r)from a set of n elemen

    13、ts.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-combination Combination Theorem:The total number of r-combinations of a set of size n,0 r n,is given by 14)!(!),(rnrnrnCCombinations Proof of combination theorem:P(n,r)counts the total number of ordered arrangem

    14、ents.However,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

    15、 thus need to divide P(n,r)by r!15)!(!),(),(rnrnrrnPrnCCombinations Note that C(n,r)=C(n,n r).Its symmetricThis is because Also,16),(!)!(!)!()!(!),(rnCrrnnrnnrnnrnnC(i)if,!)1).(2)(1()!(!),(rnrrrnnnnrnrnrnC(ii)if,)!()1).(2)(1()!(!),(rnrrnrnnnrnrnrnCCombination Example How many poker hands of five car

    16、ds 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:Since the order in which the cards are dealt does not matter,the number of five card hands is:The different ways to select 47 cards from 52 is Combination Examples1.How m

    17、any bit-strings of length 8 contain four 1s2.We need to form a committee of 7 people,3 from math and 4 from computer science to develop a discrete math course.There are 9 math candidates and 11 CS candidates T Two separate problems that need to be combined using the product rule.C(9,3)possibilities

    18、for math and C(11,4)possibilities for CS:Total=C(9,3)C(11,4)=27,72018Combination ExampleHow many paths are there from(0,0)to(m,n)with right and up moves as the only allowed moves?We need exactly n up moves and m right moves to get to(m,n).Let“up”be a“1”and right be a“0”.Thus we need to count the tot

    19、al number of bit-strings with exactly m 1s and n 0s.19One possible path(m,n)(0,0)This is equivalent to select n(or m)elements from a set of n+m elements:C(n+m,n)011100001010(7,5)Binomial Coefficients Binomial Theorem(n,j 0 and j n)(Note that )When(x+y)n is in its expanded form,the coefficient of ter

    20、m xn-jyj is 20nnnnjjnnjnynnyxnnyxnxnyxjnyx111101.10)(),(jnCjnjnBinomial Coefficient Examples What is the coefficient of x12 y13 in the expansion of(x+y)25?We need to pick 12 xs from 25 terms:C(25,12)=C(25,13)=25!/(12!13!)What is the coefficient of x12y13 in(2x 3y)25?First replace a=2x and b=-3y.The

    21、coefficient of a12b13 in(a+b)25 is C(25,13).thus it follows that:C(25,13)a12b13=C(25,13)212x12(-3)13 y13.So the coefficient of x12y13 is C(25,13)212(-3)13=-(25!/(12!13!)21231321Binomial Coefficient Example What are coefficients for xk in the expansion of(x+1/x)100 in terms of k,where k is an integer

    22、?A typical term for j is (i)Let k=100 2j.Then j=(100 k)/2 As j runs from 0 to 100,k runs from 100 to-100 in decrements of 2(100,98,0,-2,-100)So,(i)is equivalent to 22jjjxjxxj2100100100)1(100kxk2/)100(100Binomial Coefficient Corollaries Let n be nonnegative integer.Then Let x=1 and y=1 in the Binomia

    23、l Theorem Let n be nonnegative integer.ThenLet x=1 and y=2 in(i)and let x=1 and y=-1 in(ii)in the Binomial Theorem230(1)0njjnj (i)and(ii)nnjjn20nnjjjn32024Pascals Triangle/IdentityPascals IdentityPascals Identity,where n,k 0 and k n:Proof:Denote T=a1,a2,ak+1,and S=T aj where aj is some arbitrary ele

    24、ment in T.The number of subsets of k elements of T is C(n+1,k).This must be equal to the number of ways to pick k elements from T that do not contain aj(=picking k elements from S,or C(n,k),plus the number of ways to pick k elements that always contain aj(=picking k 1 elements from S,or C(n,k 1).Hen

    25、ce C(n+1,k)=C(n,k)+C(n,k 1)25 knknkn11Pascals Identity Pascals Identity,where n,k 0 and k n:An algebraic proof 26 knknkn11 knkknnnnkkknknnnkkknnnknknnnkknnnkknknnnknkn1!)2).(1()1(!)1)(2).(1(!)2).(1()1)(2).(1()!1()2).(1(!)1)(2).(1(1Permutation with RepetitionThe number of r-permutations of a set of n

    26、 objects with repetition allowed is nrExample:How many 3-permutations can be formed from S=1,2,3,4 with repetition?First object can be chosen in 4 ways.The second object can be chosen also in 4 ways because the elements can be used repeatedly.So,444=43Example:How many strings of length r can be form

    27、ed from the English alphabet?This is 262626 26(r of them multiplied together)=26r,because each position can repeatedly select any of the 26 English lettersCombination with Repetition The number of r-combinations of a set of n objects with repetition allowed is Example:How many 2-combinations with re

    28、petition from 1,2,3,4?They are 1,1,1,2,1,3,1,4,2,2,2,3,2,4,3,3,3,4,4,4.There are C(4+21,2)=C(5,2)=10)!1(!)!1()1,1(),1(nrrnnrnCrrnCCombination with Repetition Example:How many ways are there to select five bills from a cash box containing$1,$2,$5,$10,$20,$50 and$100(seven different)bills?The number o

    29、f bills for each dollar value is greater than or equal to 5(enough for the case that all five bills are from one value)Order is not important.This is to select five(r=5)elements from seven(n=7)that are repeatable:Prove:The total number of ways is C(7+51,5)Combination with Repetition Consider the div

    30、iders as movable bars.Examples:1.when you select two 5-dollar bills,you put two stars between the two bars for the 5-dollar box2.When you dont pick any 10-dollar bills then the two bars for the 10-dollar box stay together Stars=dollar bills,always 5,bars=dividers,always 66 dividersCombination with R

    31、epetition Example31 The number of ways to select five bills is corresponding to the number of ways to arrange the bars and stars in 11 positions,or to select the five stars out of 11 positions:So this is C(71+5,5)=C(n+r1,r)=C(11,5)=46232SummaryExercises#10 6.3,P413:5d,5e,6c,6e,8,13,19,20 6.4,P421:7,8,933

    展开阅读全文
    提示  163文库所有资源均是用户自行上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作他用。
    关于本文
    本文标题:ChCounting离散数学英文版课件.ppt
    链接地址:https://www.163wenku.com/p-3711022.html

    Copyright@ 2017-2037 Www.163WenKu.Com  网站版权所有  |  资源地图   
    IPC备案号:蜀ICP备2021032737号  | 川公网安备 51099002000191号


    侵权投诉QQ:3464097650  资料上传QQ:3464097650
       


    【声明】本站为“文档C2C交易模式”,即用户上传的文档直接卖给(下载)用户,本站只是网络空间服务平台,本站所有原创文档下载所得归上传人所有,如您发现上传作品侵犯了您的版权,请立刻联系我们并提供证据,我们将在3个工作日内予以改正。

    163文库