Counting Subsets of a Set: Combinationsr-CombinationsCounting r-CombinationsSome Useful FactsAnother Useful FactSlide 6Slide 7Slide 8Slide 9Slide 10Example: Counting r-CombinationsSlide 12Slide 13Slide 14Slide 15Lotto SouthSlide 17Slide 18Slide 19Slide 20Slide 21Slide 22Slide 23Slide 24Slide 25ExampleAnother LotterySlide 28Slide 29Slide 30Permutations of Sets with Repeated ElementsProof of TheoremSlide 33Proof, continuedSlide 35Slide 36Counting Subsets of a Set: CombinationsLecture 28Section 6.4Thu, Mar 30, 2006r-CombinationsAn r-combination of a set of n elements is a subset of r of the n elements.The order of the elements does not matter.The 3-combinations of the set {a, b, c, d, e} are {a, b, c}, {a, b, d}, {a, b, e}, {a, c, d}, {a, c, e}, {a, d, e}, {b, c, d}, {b, c, e}, {b, d, e}, {c, d, e}.Counting r-CombinationsTheorem: The number of r-combinations of a set of n elements isExamples:C(4, 2) = (4 3)/(2 1) = 6.C(10, 3) = (10 9 8)/(3 2 1) = 120.C(1000, 2) = (1000 999)/(2 1) = 499500.)!(!!),(rnrnrnCSome Useful FactsC(n, 0) = 1 for all n 0.C(n, 1) = n for all n 1.Notice that C(n, r) = C(n, n – r).For example,C(100, 99) = C(100, 1) = 100/1 = 100.Therefore,C(n, n) = 1 for all n 0.C(n, n – 1) = n for all n 1.Another Useful FactThe TI-83 will calculate C(n, r).Enter n.Select MATH > PRB > nCr.Enter r.Press ENTER.The value of C(n, r) appears.Counting r-CombinationsProof (by induction on n).Base case:Let n = 0. Then r = 0 and there is only one 0-combination, the null set.Also, 0!/(0!0!) = 1.So the statement is true when n = 0.Counting r-CombinationsGeneral case:Suppose that the statement is true when n = k, for some integer k 0.Consider a set of k + 1 elements.If r = 0, then there is only one 0-combination, the null set, and (k + 1)!/(0!(k + 1)!) = 1.If r = k + 1, then there is only one k-combination, the entire set, and (k + 1)!/((k + 1)!0!) = 1.Counting r-CombinationsSo let r be any number between 0 and k + 1 (0 < r < k + 1).Select an arbitrary element a from the set.For each r-combination of the k + 1 elements, a is either a member or not a member.We will count the r-combinations for which a is a member and then count the r-combinations for which a is not a member.Counting r-Combinationsr-combinations for which a is not a member:•The r elements come from the remaining k elements.•Therefore, by the inductive hypothesis, there are k!/(r!(k – r)!) such sets.r-combinations for which a is a member:•The other r – 1 elements in the subset come from the k remaining elements in the set.•By the inductive hypothesis, there are k!/((r – 1)!(k – (r – 1))!) such sets.Counting r-CombinationsTherefore, the number of r-combinations of k + 1 elements isA little algebra shows that this equalsThus, the statement is true when n = k + 1, etc.))!1(()!1(!)!(!! rnrnrnrn)!)1((!)!1(rnrnExample: Counting r-CombinationsIn Math 121, I used to collect 48 daily homework assignments.Some assignments count more than others.I drop the “lowest” 4 homework grades.Which should be dropped: 0 out of 30 or 15 out of 40?I drop the 4 grades that hurt the student’s average the most.Example: Counting r-CombinationsHow can that be determined?Can a computer program make the determination by brute force (exhaustive checking) within a reasonable amount of time?There are C(48, 4) = 194,580 possible choices.A computer can do the math really fast, in say one second.Example: Counting r-CombinationsWhat if I dropped 6 grades?There would be C(48, 6) = 12,271,512 possible choices.Over 60 times as many.This would require about 60 secs = 1 min.Example: Counting r-CombinationsWhat if I dropped 12 grades?There would be C(48, 12) = over 69 billion choices!More than 350,000 as many!This would require almost 350,000 sec = over 4 days.Example: Counting r-CombinationsWhat if I dropped 44 grades!!!???This must involve unimaginably many possibilities!How many would it be?Lotto SouthIn Lotto South, a player chooses 6 numbers from 1 to 49.Then the state chooses at random 6 numbers from 1 to 49.The player wins according to how many of his numbers match the ones the state chooses.See the Lotto South web page.Lotto SouthThere are C(49, 6) = 13,983,816 possible choices.Match all 6 numbersThere is only 1 winning combination.Probability of winning is 1/13983816 = 0.00000007151.Lotto SouthMatch 5 of 6 numbersThere are 6 winning numbers and 43 losing numbers.Player chooses 5 winning numbers and 1 losing numbers.Number of ways is C(6, 5) C(43, 1) = 258.Probability is 0.00001845.Lotto SouthMatch 4 of 6 numbersPlayer chooses 4 winning numbers and 2 losing numbers.Number of ways is C(6, 4) C(43, 2) = 13545.Probability is 0.0009686.Lotto SouthMatch 3 of 6 numbersPlayer chooses 3 winning numbers and 3 losing numbers.Number of ways is C(6, 3) C(43, 3) = 246820.Probability is 0.01765.Lotto SouthMatch 2 of 6 numbersPlayer chooses 2 winning numbers and 4 losing numbers.Number of ways is C(6, 2) C(43, 4) = 1851150.Probability is 0.1324.Lotto SouthMatch 1 of 6 numbersPlayer chooses 1 winning numbers and 5 losing numbers.Number of ways is C(6, 1) C(43, 5) = 3011652.Probability is 0.4130.Lotto SouthMatch 0 of 6 numbersPlayer chooses 6 losing numbers.Number of ways is C(43, 6) = 2760681.Probability is 0.4360.Lotto SouthNote also that the sum of these integers is 13983816.Note also that the lottery pays out a prize only if the player matches 3 or more numbers.Match 3 – win $5.Match 4 – win $75.Match 5 – win $1000.Match 6 – win millions.Lotto SouthGiven that a lottery player wins a prize, what is the probability that he won the $5 prize?P(he won $5, given that he won)= P(match 3)/P(match 3, 4, 5, or 6)= 0.01765/0.01864= 0.9469.ExampleTheorem (The Vandermonde convolution): For all integers n 0 and for all integers r with 0 r n,Proof: See p. 362, Sec. 6.6, Ex. 18.rkrnkrrnkr0Another LotteryIn the previous lottery, the probability of winning a cash prize is 0.018637545.Suppose that the prize for matching 2 numbers
View Full Document