Counting examples

advertisement
Here are some of the examples that will be covered in the discussions this week.
Note: four digit number implies that the first digit cannot be 0
Example 1: How many four digit numbers contain at least one even digit ?
Ans. total number - # with all odd digits = 9000 - 54
Other ways of doing this problem often lead to over or undercounting the possibilities, so the
approach above is the most straightforward way to answer the question.
Example 2: How many four digit numbers contain exactly two even digits, no repetition
allowed?
Answer Let's split this up into two cases: even in first position or odd in first position
even in first position: 4 choices for the even digit in first position (can’t have 0)
3 places for second even digit
4 choices for second even digit
5·4 ways to put in the odd digits
Total: 3·43·5
odd in first position:
5 choices for the odd digit in first position
3 places for second odd digit
4 choices for second odd digit
5·4 ways to put in the even digits
Total: 3·42·52
The answer is the sum of these two values.
(Note: this problem is much more difficult if repetition is allowed since you have to avoid
double counting.)
Example 3: One hundred tickets numbered 1, 2, 3, ..., 100, are sold to 100 different people
for a drawing. Four different prizes are awarded, including a grand prize. How many ways are
there to award the prizes if
a) there are no restrictions? Answer: 100·99·98·97 ways.
b) the person holding ticket 47 wins the grand prize? Answer: 1·99·98·97 ways
c) the person holding ticket 47 wins a prize? Answer: 4·99·98·97 ways
d) the person holding ticket 47 doesn't win a prize? Answer: 99·98·97·96 ways
e) people holding tickets 19 and 47 both win? Answer: 4·3·98·97 ways since 19 may win
any of the four prizes, 47 wins one of the remaining three prizes, and two of the other
98 ticket holders win the other two prizes.
f) people holding tickets 19, 47, and 73 all win? Answer: 4·3·2·97 ways
g) people holding tickets 19, 47, 73 and 97 all win? Answer: 4·3·2·1 ways
h) none of the people holding tickets 19, 47, 73 and 97 wins? Answer: 96·95·94·93 ways
i) the grand prize winner is a person holding ticket 19, 47, 73, or 97? Answer: 4·99·98·97 ways
j) people holding 19 and 47 win prizes and those holding 73 and 97 do not?
Answer: 4·3·96·95 ways
Example 5: There are 10 rooms in a row and a party of 10 people are put into the rooms, one
per room. In how many ways can this be done if A and B must occupy adjacent rooms.
Answer: Treat A and B as one unit (the pair AB) which must be arranged with the other 8
people giving 9! different arrangements. However, there are two ways to arrange A and B—
AB and BA so the final answer is 2•9!
The remainder of the problems need material from section 4.3 and will be discussed in next
week’s discussion.
Example 7: Suppose you have a 10 question multiple choice test with four possible answers
for each question: a, b, c, and d. Assume all questions are answered. Let's count the number
of answer keys under several different conditions:
a) If there are no restrictions, the number of answer keys is 410.
b) If there are exactly three a's and exactly two b's, here's the way to get the answer:
Choose the positions for the a's. There are C(10, 3) was to do this.
Choose the positions for the b's. There are C(7, 2) ways to do this.
Fill the remaining places with c's and d's. This can be done in 25 ways.
Thus, the answer is the product of these: C(10, 3)·C(7, 2)·25.
c) At least two answers are a's. There are two ways to do this:
exactly two a's + exactly 3 a's +  + exactly 10 a's. The better way is to use subtraction:
Total number of answer keys - those with no a's - those with exactly one a
410
- 310
- 10·39
d) The following approach will not work for part c) :
Choose the positions for two a's. Then, fill the remaining 8 spots with any of the 4 possible
answers. The problem with this is that it causes double counting. For example, suppose
you choose to answer questions 1 and 2 with a and then arbitrarily put in the rest of the
answers to get:
a a b c d a b c d d.
Suppose instead you choose to put a's in the 1st and 6th positions and get the following:
a a b c d a b c d d
The two keys are identical and would have been counted twice by this method.
Example 8: A committee is chosen from a group containing 4 men and 6 women.
a) A committee of size three can be found in C(10, 3) = (10·9·8)/ 3! ways.
b) A committee of size three containing 1 man and 2 women can be found in C(4,1)·C(6,2) or
60 ways. The order in which the members are chosen is irrelevant.
c) A committee with two men and three women can be found in C(4, 2)·C(6, 3) = 120 ways.
d) A committee of size 4 with at least as many women as men can be found in
C(4,0)·C(6,4) + C(4, 1)·C(6,3)
+ C(4,2)·C(6,2)
ways.
all women
+ 1 man and 3 women + 2 men and 2 women.
Example 9: A class has 20 male and 25 female students. How many ways can a committee
of 5 students be selected so that a male is designated as the chair and the remaining
members are 2 males and 2 females?
Ans. 20·C(19, 2)·C(25,2)
This answer reflects choosing the male to be the chair and then picking the remaining
members. This value is the same as 3·C(20,3)·C(25,2) which corresponds to choosing three
men and two women and then choosing one of the three men as the chair.
Example 10: How many seven-card poker hands contain
a. three cards of one rank and two each of two other ranks 13·C(4, 3)·C(12, 2)·[C(4, 2)] 2
b. three cards each of two ranks C(13, 2)·[C(4, 3)]2·44
c. two cards each of three ranks C(13, 3)·[C(4, 2)] 3·40
Example 11: Let S = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}. Find the number of subsets of S that
a. contain the number 5 Answer: 29
b. contain only even numbers Answer: 25 - 1 (Don't count empty set)
c. contain exactly three elements, one of which is 3 Answer: C(9, 2)
d. contain exactly five elements, but neither 3 nor 4 Answer: C(8, 5)
Download