Beruflich Dokumente
Kultur Dokumente
Combinatorial Methods
Chapter Outline
2.1Introduction
2.2CountingPrinciple
2.3Permutations
2.4Combinations
2.5Stirlings Formula
Probability
Chien-Chao Tseng
2.1Introduction
Recall Theorem1.3:If
samplespaceis finiteand
samplepointsare allequallylikely,
thenP(A)=N(A)/N(S)
Someprobabilityproblemscanbesolved simplyby
counting.
Westudycombinatorialanalysisinchapter2.
Combinatorialanalysisdealswithmethodsofcounting.
enableustocountsystematically
Probability
Chien-Chao Tseng
2.2CountingPrinciple
Theorem2.1(CountingPrinciple)
IfsetE containsn elementsandsetF containsm elements
therearenm waysinwhichwecanchoose,
First,anelementofE and
thenanelementofF.
Theorem2.2(GeneralizedCountingPrinciple)
Let , ,..., besets with , ,..., elements,
respectively.
Thereare ways inwhichwecan
first,chooseanelementof ,
thenanelementof ,
thenanelement of ,
...,
andfinallyanelementof .
Probability
Chien-Chao Tseng
Examples2.1and2.2
Ex.2.1Howmanyoutcomesarethereifwethrow5dice?
Sol:
5:setofallpossibleoutcomesof th dice
Let ,1
={1,2,3,4,5,6}
Totaloutcomesofthrowing5dice:6x6x6x6x6 6
Ex.2.2Intossing4fairdice,
P(atleastone3amongthese4dice)?
Sol:
LetA betheeventofatleastone3amongthe4dice
Let betheeventofno3intossing4dice
( ) 5x5x5x5
( )
( )/ =5 /6
Probability
Chien-Chao Tseng
Examples2.3and2.4
Ex.2.3Virginiawantstogiveherson,Brian,14different
baseballcardswithina7dayperiod.
IfVirginiagivesBriancardsnomorethanonceaday,in
howmanywaycanthisbedone?(7x7xx7=7 )
Ex.2.4Rosehasinvitednfriendstoherbirthdayparty.
Allattend,andeachoneshakeshandswitheveryoneelse
atthepartyexactlyonce,
Whatisthenumberofhandshakes?
Sol1:
1 Peoples,eachshakeshandswithother peoples
Eachhandshakecountedtwice
(
1) /2
Probability
Chien-Chao Tseng
Examples2.4(cont.)and2.6
Sol2:Supposeguestsarriveoneatatime
Ross will shake hand with all guests
1st guestadds
1 additional handshakes
2nd guestadds
2 additionalhandshakes
1 guestadds1additional handshake
guestsadds0additionalhandshake
1+2+3++(
2)+(
1)+ =
1 2
Ex.2.6(StandardBirthdayProblem)
P(atleasttwoamongn peoplehavethesameBirthday)?
23:0.507
Sol:P(notwostudentshavethesamebirthday)
30:0.706
50:0.970
60:0.995
Desiredprobabilityis1
Probability
Chien-Chao Tseng
NumberofSubsetsofaSet
(A):PowersetofA;set ofallsubsetsofA.
Theorem2.3Asetwithn elementshas 2 subsets.
Proof:
Let
, , ,,
beasetwithn elements.
ExistsaonetoonecorrespondencebetweensubsetsofA
andsequencesof0sand 1soflengthn:
ToasubsetBof A,associateasequence
,
where =0if B,and =1if B.
Ex.n =3,associationforthesubsetsofA:
:000,{ }: 100,{ }:010,,{ , }:011,
ByGeneralizedCountingPrinciple(Thm 2.2),
numberofsequencesof0s and1s oflengthnis
2 2 2 2 .
NumberofsubsetsofAis2 .
Probability
Chien-Chao Tseng
TreeDiagrams
Threediagramssystematicallyidentifyallpossiblecasesofan
experiment
Ex.2.8BillandJohnkeepplayingchessuntil
oneofthemwins2gamesinarowor3gamesaltogether.
Inwhatpercentofallpossiblecasesdoes thegameend
becauseBillwins3gameswithoutwinning2inarow?
Sol:
1/16 1/32
1/4
10casestotal
Billwins3gameswithout
winning2inarow:1case
10%ofcases
Butprobability 0.1
(notequiprobable)
Probability
Chien-Chao Tseng
ExampleofTreeDiagram
Ex.2.9Markhas$4.
Hedecidestobet$1 ontheflipofafaircoin4times.
Whatistheprobabilitythat(a)hebreakseven;(b)hewins
money?
(5/16)
(6/16)
Probability
Chien-Chao Tseng
2.3Permutations
Permutationsand combinationsaretwousefulpatternsfor
counting
Definition(relementpermutation ofasetA)
Anordered arrangementofr objectsfromasetAcontaining
n objects 0
iscalled
anrelementpermutation ofA,or
apermutation oftheelementsofA takenr atatime.
Numberof relementpermutationsofasetcontainingn
objectsisdenotedby
.
= n (n 1)(n 2)(n r 1)
!
!
Probability
Chien-Chao Tseng
10
ExamplesofPermutations(1/2)
Ex.2.103people,Brown,Smith,andJones,mustbe
scheduledforjobinterviews.
Inhowmanydifferentorderscanthisbedone?
Sol:3!
Ex.2.112 anthropology,4 computerscience,3 statistics,3
biology,and5 musicbooksareputonabookshelfwitha
randomarrangement.
P(A):Prob.thatbooksofthesamesubjectaretogether?
Sol:
Totalnumberofpossiblearrangements:17!
Anthropologybooksfirst:2!X4!X3!X3!X5!ways
Subjectscanbeorderedin5! ways
Probability
!
Chien-Chao Tseng
11
Examples(2/2)
Ex.2.12If5boysand5girlssitinarowinarandomorder,
P(notwochildrenofthesamesexsittogether)?
Sol:
10personstositinarow:10!ways
Notwoofthesamesexsittogether:
Boys inpositions1,3,5,7,9, andgirls in2,4,6,8,10,
orviceversa.
5! 5!possibilitiesforeachcase.
Desiredprobabilityis
Probability
Chien-Chao Tseng
12
Distinguishable PermutationsofAlikeObjects
Theorem2.4(Distinguishablepermutationsofalikeobjects)
Thenumber ofdistinguishable permutationsofn objectsof k
differenttypes is
!
!
!
!
where arealike, arealike,...,
n = + ++ ,
Probability
Chien-Chao Tseng
arealike,and
13
ExamplesofPermutationswithAlikeObjects
Ex.2.13Howmanydifferent 10lettercodescanbemade
using3as,4bs,and3cs?
Sol:10!/(3!x4!x3!)
Ex.2.14Inhowmanywayscanwepaint11officessothat
4 ofthemwillbepaintedgreen,3yellow,2white,andthe
remaining2pink?
Sol:11!/(4!x3!x2!x2!)
Ex.2.15Afaircoinisflipped10times.
Sec.2.4Unorderedarrangement
P(exactly3heads)?
(Combination)
Sol: 10! 3! 7! 2
Chien-Chao Tseng
elements
14
2.4Combinations
Order inwhichelementsarearranged isimmaterial
Definition Anunorderedarrangementofr objects fromaset
Acontainingn objects(r n) iscalled
anrelementcombinationofA,or
acombinationoftheelementsofA takenr atatime.
Numberofrelementcombinationsofn objectsisgivenby
!
!
! !
Observation:
+
+
+ +
+
+
=2
Totalno.ofsubsetsofasetwithn elements:2
No.ofsubsetsofsize r ofasetofsizen:
Totalno.ofsubsets:
+
+ +
+
Probability
+ +
Chien-Chao Tseng
=2
15
MoreObservations
,
Forany0 r n,
and
(2.4)
(2.4)canbeprovedalgebraicallyorverifiedcombinatorially
Proof:bycombinatorialargument
Considerasetofn+1 objects{ , , ,
,
}
Number of relementcombinationsofthisset:
Separatecombinationsintotwodisjointclasses:
With
:
(r1)element combinationsof
,,
Without
relement combinationsof
,,
Probability
Chien-Chao Tseng
16
ExamplesofCombinations(1/3)
Ex.2.16Inhowmanywayscan2mathand3biologybooksbe
selectedfrom8mathand6biologybooks?
Sol:
Ex.2.1745instructorswereselectedrandomlytoask
whethertheyarehappy withtheirteachingloads.
Responsesof32 werenegative.
IfDrs.Smith,Brown,andJones were
amongthosequestioned.
P(allthreegavenegative responses)?
Sol:
No.ofpossiblegroupswith32negativeresponses:
3(negative)selectedandother29fromremaining42:
Probability
Chien-Chao Tseng
17
ExamplesofCombinations(2/3)
Ex.2.18Inasmalltown,11 of25schoolteachersareagainst
abortion,8areforabortion,andtherestareindifferent.
Arandomsampleof5schoolteachersisselected.
(a)P(all5areforabortion)?
(b)P(all5havethesameopinion)?
Ex.2.19InMarylandslottery,playerpick6integersbetween
1and49,orderofselectionbeingirrelevant.
P(grandprize)?,P(2nd prize)?,P(3rd prize)?
Sol:
Probability
Chien-Chao Tseng
18
ExamplesofCombinations(3/3)
Ex.2.207cardsaredrawnfrom52 withoutreplacement.
P(atleastoneofthecardsisaking)?
Sol:
No kings
Desiredprobability:1
No kings
1
Ex.2.215cardsaredrawnfrom52.
P(fullhouse)
Sol:
Probability
Chien-Chao Tseng
19
BinomialExpansion(1/2)
Theorem2.5(BinomialExpansion)
n
Foranyinteger n 0,
n n i i
n
( x y)
x y
i
i 0
Proof:
Observations:
Probability
Chien-Chao Tseng
20
BinomialExpansion(2/2)
Expansionof
Resultsinonlytermsoftheform
appears
,0 i n
times
Because
emergesonlywhenever
xs of ni ofthen factorsof(x +y) multipliedby
ys of theremainingi factors of(x +y).
Hence
Probability
Chien-Chao Tseng
21
Examples(BinomialExpansion)(1/4)
Ex.2.25Whatisthecoefficientofx2y3 intheexpansionof
2
3 ?
Sol:
Let
2
2 and
3
Intheexpansionof
:
Coefficientof
= 2 3
Intheexpansionof 2
2 3
Probability
Chien-Chao Tseng
,coefficientof
22
Example(BinomialExpansion)(2/4)
Ex.2.26Evaluatethesum
By binomial expansion,
Let x = y = 1,
1
Probability
1 =2 =
1 =
Chien-Chao Tseng
23
Examples(BinomialExpansion)(3/4)
Ex.2.27Evaluatethesum
Sol:
So
Probability
Chien-Chao Tseng
24
Examples(BinomialExpansion)(4/4)
Sol:
Let
, ,,
and
, ,,
betwo
disjointsets,eachwithn elements.
Number of subsets with n elements of AB:
.
Any subset with n elements of AB is the union of
a subset with i elements of A and
a subset with n i elements of B, for some 0 i n.
subsets,
For each i:
Number of subsets with n elements of AB:
Chien-Chao Tseng
.
25
MultinomialExpansion
Ex.2.30Distributen distinguishable ballsintok
distinguishable cellssothat
n1 ballsaredistributedintothefirst cell,
n2 ballsintothesecond cell,,
nk ballsintothekth cell,wheren1+ n2++ nk =n.
Howmanypossibleways?
n!
Sol:
Sol:
n1 ! n 2 !... n k !
Probability
Chien-Chao Tseng
26
Theorem2.6MultinomialExpansion
Theorem2.6(MultinomialExpansion) Intheexpansionof
( x1 x2 xk )n
nk
n 1 n 2
x
x
x
Thecoefficientoftheterm 1 2
k
where n1 n2 ... nk n
n!
is
n1! n2!... nk !
Therefore,
( x1 x2 xk )n
n1 n2 ...nk n
Probability
n!
nk
n1 n 2
x1 x2 xk
n1! n2!... nk !
Chien-Chao Tseng
27
2.5Stirlings Formula
Stirlingsformulacanbeusedto estimate !
Theorem2.7(Stirlings Formula)
Stirlings formulausuallygivesexcellentapproximationsin
numericalcomputations
Note:
!/ 2
becomes1at,
But,itisstillcloseto1,evenforverysmall valuesofn.
Probability
Chien-Chao Tseng
28