版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
會計學(xué)1ChCounting離散數(shù)學(xué)英文實用ThePigeonholePrinciple2PigeonholePrinciple:Letkandnbepositiveintegers(n>k),andwedividenballsamongkboxes,thenatleastoneboxcontains2balls13Pigeons,12Boxes第1頁/共33頁GeneralizedPigeonholePrincipleTheorem:Ifwehaven>kballs,kandnarepositiveintegers,andwedividethemamongkboxes,thenatleastoneboxcontainsn/kballsAssume10boxes(k=10).
Numberofballsn=11~20,atleastaboxhas2balls
Numberofballsn=21~30,atleastaboxhas3balls
Numberofballsn=31~40,atleastaboxhas4balls
…Example:Inagroupof1,000peoplethereareatleast3peoplewhohavetheirbirthdayonthesameday.Why?Thisisbecause1000/365=33第2頁/共33頁GeneralizedPigeonholePrincipleProofoftheGeneralizedPigeonholeTheorem:Bycontradiction:Assumenoneofthekboxescontainsn/kballs.Then,eachboxcontainsatmost
n/k–1balls.So,nk(n/k–1).Weknown/k<n/k+1(fromtheproperty:x<x+1).So,
nk(n/k–1)<k(n/k+1–1)=n.Or,n<n.Contradiction!
4第3頁/共33頁P(yáng)igeonholePrincipleExampleWehave5possiblegrades:A,B,C,D,andF.Howmanystudentsdoweneedtohavetobesureatleast6studentsgetthesamegrade?Boxes=grades=5.Balls=students=n.
Trytofilltheboxesevenly:Ifwehave25students,thenwecanevenlyhave5A’s,5B’setc.Soifwehave26students,weneedaddastudenttoagradewhichthenhas6studentsFormally,n/5
6.So,n265第4頁/共33頁P(yáng)igeonholePrincipleExampleForeverypositiveintegern,thereisanintegermthatisamultipleofn,andmconsistsofonlythedecimaldigitsof0’sand1’sToshowthis,weconstructmfromn+1numbers:1,11,111,1111,…,11…11(n+11’s)Divideeachbynandfindthetwonumbers(aandb)thatarecongruent(modn)(sameremainders)byPigeonholePrinciple(how?)Thenn|a–b(assumea>b).Definitionofcongruence.Letm=a–b.misamultipleofnandhasonly1s&0s6第5頁/共33頁P(yáng)igeonholePrincipleExampleConsiderthecasen=3.Constructmfromn+1=4integersasfollows:1,11,111,1111Divideeachofthembyn(3)toget:1=30+1,11=33+2,111=337+0,1111=3370+1.Inthiscase:1mod3=1,1111mod3=1.Ifwesubtractthesetwointegerswegetanewintegerthatisdivisiblebyn:m=1111–1=1110(=3370),whichisamultipleof37第6頁/共33頁P(yáng)igeonholePrincipleExampleAtapartyof6people,everytwopeopleareeitherenemiesorfriends.Showthatthereareatleast3mutualfriendsor3mutualenemiesattheparty8friendsfriendsfriendsenemiesenemiesenemiesOR第7頁/共33頁P(yáng)igeonholePrincipleExampleProof:ConsiderpersonA:Acertainlyhaseither3friendsor3enemiesattheparty(PigeonholePrinciple:5peoplein2categories).AssumethreeofthemarefriendsofA.Ifthethreearemutualenemiesthenwehave3mutualenemiesandwearedone.Ifnot,thenatleast2arefriends,buttheyarealsoA’sfriends,whichmakesagroupofthreemutualfriends.Similarproofforthecaseofthreeenemies9第8頁/共33頁Workstation-ServerExampleWeconnect15workstationsto10servers.Oneservercanonlyletoneworkstationuseittocommunicateatatime.Werequirethatany10workstationscanusethe10serversatanytime10ServersWorkstations第9頁/共33頁Workstation-ServerExampleClaim:Theminimalnumberofcablesrequiredtoconnectbetweenworkstationsandserversis60Proof:Bycontradiction.Assumeitis59.ThenoneserverS’mustconnecttoatmost5workstations(59/10=5).Thismeansthattheremaining10workstationsarenotconnectedtoS’.Sothese10workstationscanonlycommunicatetoatmost9servers.Itisacontradiction!11第10頁/共33頁P(yáng)ermutationsr-permutation:Anorderedarrangementofrelementsofasetofndistinctelements,rnExample:S={1,2,3,4}:2134isapermutationofS
321isa3-permutationofS
32isa2-permutationofSPermutationTheorem:Thenumberofr-permutationsofnobjectsis:
P(n,r)=n(n–1)(n–2)...(n–r+1)=
Firstobjectcanbechoseninnways,secondin(n–1)ways,...,r-thobjectinn–r+1ways.UseproductruletogettheaboveresultWhenr=n,P(n,n)=n(n–1)(n–2)...1=n!12第11頁/共33頁P(yáng)ermutationExamplesAmailmanneedstobring8packagesto8cities.Hestartsatcity1.Howmanywaysaretheretovisittheremaining7cities?Picksecondcityamong7,3rdamong6,4thamong5,... Answer:7!Howmanypermutationsoftheletters“a,b,c,d,e,f,g,h”contain“abc”asablock.Rename“abc”toB.Nowwehave:howmanypermutationsofB,d,e,f,g,harethere? Answer:6!13第12頁/共33頁Combinationsr-combinationC(n,r):Anunorderedselectionofrelements(orsubsetofsizer)fromasetofnelements.Example:S={1,2,3,4}.Then{3,2,1}={1,2,3}isa3-combination.{1,3,4}isanotherand{1,4}isa2-combinationCombinationTheorem:Thetotalnumberofr-combinationsofasetofsizen,0rn,isgivenby14第13頁/共33頁CombinationsProofofcombinationtheorem:P(n,r)countsthetotalnumberoforderedarrangements.However,thedifferenceofC(n,r)isthatitisonlyinterestedinunorderedarrangementshere.Foreverysubsetofrelementsonecanexactlyconstructr!orderedarrangementsinthepermutation,everyoneofwhichisincludedinP(n,r).Theser!arrangementsshouldbeconsideredthesameinC(n,r).WethusneedtodivideP(n,r)byr!15第14頁/共33頁CombinationsNotethatC(n,r)=C(n,n–r).It’ssymmetric
ThisisbecauseAlso,
16第15頁/共33頁CombinationExampleHowmanypokerhandsoffivecardscanbedealtfromastandarddeckof52cards?Also,howmanywaysaretheretoselect47cardsfromadeckof52cards?Solution:Sincetheorderinwhichthecardsaredealtdoesnotmatter,thenumberoffivecardhandsis:Thedifferentwaystoselect47cardsfrom52is
第16頁/共33頁CombinationExamplesHowmanybit-stringsoflength8containfour1’sWeneedtoformacommitteeof7people,3frommathand4fromcomputersciencetodevelopadiscretemathcourse.Thereare9mathcandidatesand11CScandidatesTTwoseparateproblemsthatneedtobecombinedusingtheproductrule.C(9,3)possibilitiesformathandC(11,4)possibilitiesforCS:Total=C(9,3)C(11,4)=27,72018第17頁/共33頁CombinationExampleHowmanypathsaretherefrom(0,0)to(m,n)withrightandupmovesastheonlyallowedmoves?Weneedexactlynupmovesandmrightmovestogetto(m,n).Let“up”bea“1”andrightbea“0”.Thusweneedtocountthetotalnumberofbit-stringswithexactlym1’sandn0’s.19Onepossiblepath(m,n)(0,0)Thisisequivalenttoselectn(orm)elementsfromasetofn+melements:C(n+m,n)011100001010(7,5)第18頁/共33頁BinomialCoefficientsBinomialTheorem(n,j0andjn)
(Notethat )When(x+y)nisinitsexpandedform,thecoefficientoftermxn-jyjis20第19頁/共33頁BinomialCoefficientExamplesWhatisthecoefficientofx12y13intheexpansionof(x+y)25?Weneedtopick12x’sfrom25terms:C(25,12)=C(25,13)=25!/(12!13!)Whatisthecoefficientofx12y13in(2x–3y)25? Firstreplacea=2xandb=-3y.Thecoefficientofa12b13in(a+b)25isC(25,13).thusitfollowsthat:C(25,13)a12b13=C(25,13)212x12(-3)13y13.Sothecoefficientofx12y13is
C(25,13)212(-3)13=-(25!/(12!13!))21231321第20頁/共33頁BinomialCoefficientExampleWhatarecoefficientsforxkintheexpansionof(x+1/x)100intermsofk,wherekisaninteger?Atypicaltermforjis (i)Letk=100–2j.Thenj=(100–k)/2Asjrunsfrom0to100,krunsfrom100to-100indecrementsof2(100,98,…,0,-2,…,-100)So,(i)isequivalentto22第21頁/共33頁BinomialCoefficientCorollariesLetnbenonnegativeinteger.ThenLetx=1andy=1intheBinomialTheoremLetnbenonnegativeinteger.Then
Letx=1andy=2in(i)andletx=1andy=-1in(ii)intheBinomialTheorem23(i)and(ii)第22頁/共33頁24Pascal’sTriangle/Identity第23頁/共33頁P(yáng)ascal’sIdentityPascal’sIdentity,wheren,k>0andkn:Proof:DenoteT={a1,a2,…,ak+1},andS=T–{aj}whereajissomearbitraryelementinT.ThenumberofsubsetsofkelementsofTisC(n+1,k).ThismustbeequaltothenumberofwaystopickkelementsfromTthatdonotcontainaj(=pickingkelementsfromS,orC(n,k)),plusthenumberofwaystopickkelementsthatalwayscontainaj(=pickingk–1elementsfromS,orC(n,k–1)).HenceC(n+1,k)=C(n,k)+C(n,k–1)25第24頁/共33頁P(yáng)ascal’sIdentityPascal’sIdentity,wheren,k>0andkn:Analgebraicproof
26第25頁/共33頁P(yáng)ermutationwithRepetitionThenumberofr-permutationsofasetofnobjectswithrepetitionallowedisnrExample:Howmany3-permutationscanbeformedfromS={1,2,3,4}withrepetition?
Firstobjectcanbechosenin4ways.Thesecondobjectcanbechosenalsoin4waysbecausetheelementscanbeusedrepeatedly.So,444=43Example:HowmanystringsoflengthrcanbeformedfromtheEnglishalphabet?
Thisis262626…26(rofthemmultipliedtogether)=26r,becauseeachpositioncanrepeatedlyselectanyofthe26Englishletters第26頁/共33頁CombinationwithRepetitionThenumberofr-combinationsofasetofnobjectswithrepetitionallowedis
Example:Howmany2-combinationswithrepetitionfrom{1,2,3,4}?
Theyare{1,1},{1,2},{1,3},{1,4},{2,2},{2,3},{2,4},{3,3},{3,4},{4,4}.
ThereareC(4+2–1,2)=C(5,2)=10第27頁/共33頁CombinationwithRepetitionExample:Howmanywaysaretheretoselectfivebillsfromacashboxconta
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025屆高考英語讀后續(xù)寫說課稿 追車人
- 2025SRV汽化煙道熱噴涂合金防護(hù)層施工合同
- 2025民間融資合同范本
- 14《母雞》(說課稿)-2023-2024學(xué)年語文四年級下冊統(tǒng)編版
- 2025年駕校培訓(xùn)合同范本
- 2025商品購銷合同(超市類)
- 2024年五年級數(shù)學(xué)下冊 一 圖形的運(yùn)動(二)1.2畫對稱圖形說課稿 冀教版
- 2024-2025學(xué)年高中歷史 第一單元 第一次世界大戰(zhàn) 第2課 慘烈的四年戰(zhàn)事教學(xué)說課稿 岳麓版選修3
- 陶土板幕墻施工方案
- 游樂場植物墻施工方案
- 公務(wù)員2012年國考《申論》真題卷及答案(地市級)
- 新員工三級安全教育考試試題參考答案
- 35kV輸變電工程(變電站、輸配電線路建設(shè))技術(shù)方案
- 數(shù)學(xué)史簡介課件可編輯全文
- 化學(xué)廢水水池清理施工方案
- 離婚協(xié)議書常用范本2024年
- 中學(xué)安全辦2024-2025學(xué)年工作計劃
- 2024年山東省東營市中考數(shù)學(xué)試題 (解析版)
- 2024年陜西西安亮麗電力集團(tuán)有限責(zé)任公司招聘筆試沖刺題(帶答案解析)
- 2024年鄉(xiāng)村振興(產(chǎn)業(yè)、文化、生態(tài))等實施戰(zhàn)略知識考試題庫與答案
- 小學(xué)數(shù)學(xué)試題命制培訓(xùn)
評論
0/150
提交評論