计算机代考程序代写 ECS 20 Discrete Math: Discussion 9, Counting

ECS 20 Discrete Math: Discussion 9, Counting
Mon 12/2/2013
()()()()
Product rule if and are independent events, | | Sum rule if and are events that cannot occur together, |
Inclusion/exclusion counting
|
| | |
| for finite .
| | | for disjoint .
| |||||| |
| |||||||| || || || |
1. A bookshelf has 5 History texts, 3 Sociology texts, 6 Anthropology texts, and 4 Psychology texts. How many ways can a student choose
a. one of the texts? Sum rule,
b. one of each type of text? Product rule,
2. How many ways are there to give three balls – one red, one blue, and one green – to 10 people, if a person can get
a. more than one ball?
b. at most one ball?
()
3. Social Security Numbers contain 9 digits.
a. Assuming no limitations, how many different SSNs can be assigned?
b. Prior to June 2011, a valid SSN could not begin with an area code between 734 and 749, inclusive, or above 772. How many different SSNs could be assigned? Area codes between 734 and 749 = 16
Area codes between 773 and 999 = 227
Each 3-digit area code is followed by 6 digits, so there were ( invalid codes. Hence
could be assigned.
4. How many 7-letter words can you form using the letters
a. TUMBLER?
b. BENZENE?
3 E’s and 2 N’s,
)
different SSNs
5. Find the number of students taking at least one of the languages French, German, and Russian, given that:
|
65 study French 45 study German 42 study Russian
20 study French and German
25 study French and Russian 8 study all languages 15 study German and Russian
1

ECS 20 Discrete Math: Discussion 9, Counting Mon 12/2/2013
| |||||||| || || || |
100 students study at least one of the three languages.
6. A box contains 8 blue and 6 red socks. How many ways are there to draw two socks,
regardless of order, if
a. they can be any color?
()
b. they must be the same color?
()()
7. Canada’s LOTTO 6/49 lets players choose 6 from 49 possible numbers.
a. How many unique lottery tickets can be sold?
()
b. If a ticket costs $1, should you play if the jackpot is over $20 million, assuming no taxes? Do we need to consider other factors?
The value of a ticket would be dollars, while costing $1. While this
seems like a good deal, it would be only worth it if the jackpot won’t be split
between multiple winners.
8. Consider an ECS 20 version of Blackjack. Cards of rank K, Q, J, and 10 are worth 10
points each, cards of rank 9 to 2 are worth their respective ranks, and A is worth 11 or 1 as you like. You are dealt two cards from a standard 52-card deck: 10♠ and 6♥. You bust if the total value of your hand exceeds 21.
If you hit – be dealt one more card – how many of the remaining 50 cards will bust you? What is this probability of busting?
You are at 16 points. Cards that are 6 points or more will bust you, which are cards of rank 6 to K, in total 8 ranks. However you’ve been already dealt a 6 and 10, so of the
remaining cards cards will bust you. This probability is .
From a fresh deck, what is the expected number of points of one card, assuming A is 11 points?
ranks 2-9, points: respective values, number: 4 per rank rank 10-K, points: 10, number: 16
rank A, points: 11, number: 4
Say it’s your move against an opponent who has K 10 and you have Q 8. You can hit as many times as you want. What is the probability you will win against your opponent?
2

ECS 20 Discrete Math: Discussion 9, Counting Mon 12/2/2013
There are four ways to win: drawing a 3, drawing a 2 then an Ace, drawing an Ace then a 2 (order matters), or drawing three Aces.
P(drawing a 3) is because there are four 3’s in the remaining 48 cards.
P(drawing 2 then A) is because there are four 2’s in the remaining 48 cards, then four Aces in the remaining 47 cards.
P(drawing A then 2) is because there are first Aces in the remaining 48 cards, then four 2’s in the remaining 47 cards.
P(drawing a 3) is because there are first four Aces in the remaining 48 cards, then three Aces in the remaining 47 cards, then two Aces in the remaining 46 cards.
P(winning)
3