Sie sind auf Seite 1von 9

Homework 5

3/4/2015
SOLUTIONS
In-class Exercise 12. For each of the following, use some combination of the sum and product
rules to find your answer. Give an un-simplified numerical answer, and explain it, saying which
rule(s) youre using when.
(a) A particular kind of shirt comes in two different cuts - male and female, each in three color
choices and five sizes. How many different choices are made available?
Use the product rule to calculate
# shirts = (# genders )(# colors )(# sizes ) = 2 3 5.
(For each choice of cut, there are the same number of colors, and for each cut and color theres
the same number of sizes.)
(b) On a ten-question true-or-false quiz, how many different ways can a student fill out the quiz
if they definitely answer all of the questions? How many ways if they might leave questions
blank?
Use the product rule to calculate
# possible answers = (# anss to 1 )(# anss to 2 ) (# anss to 10 ).
If nothing is left blank, there are 2 possible answers to each question, giving 210 . If you can
leave an answer blank, there are 3 possible answers to each question, giving 310 .
(c) How many 3-letter words (these dont have to be real words, just strings of letters) are there?
Use the product rule to calculate
# words = (# letters )(# letters )(# letters ) = 26 26 26.
(d) How many 3-letter words are there that end in a vowel?
Use the product rule to calculate
# words ending in a vowel = (# letters )(# letters )(# vowels ) = 26 26 5.
(e) How many 3-letter words are there that have no repeated characters?
# words = (# letters )(# letters remaining )(# letters remaining after that)
= (# letters )((# letters ) 1)((# letters ) 2) = 26 25 24.
(f) How many 3-letter words are there that have the property that if they start in a vowel then
they dont end in a vowel? (Youll want to break this into disjoint cases).
Break this into two cases:
(a) Letters that start in a vowel:
If they start in a vowel, they dont end in a vowel, so there are 5 26 21 possibilities
(product rule).
(b) Letters that dont start in a vowel:
If they dont start in a vowel, there are no restrictions, so there are 21 26 26 possibilities
(product rule).
1

Combine these cases using the sum rule:


5 26 21 + 21 26 26.
(g) How many 2-letter passwords are there that are made up of upper and/or lower case letters?
The total number of characters is 2*26. So, using the product rule, there are (2 26) (2 26)
possibilities.
(h) How many 2-letter passwords are there that are made up of upper and/or lower case letters, but
where at least one of the letters is upper-case? (Again, youll want to break this into disjoint
cases).
Either, you can break this into cases:
(a) Passwords that have exactly one upper case letter:
(# places to put the upper case letter )
(# ways to pick the upper case letter )(# ways to pick the lower case letter )
= 2 262 .
(b) Passwords with exactly two upper case letters:
(# upper case letters )(# upper case letters ) = 262 .
Then combine using the sum rule:
2 262 + 262 .
Alternatively, you can use the fact that the number of 2-letter passwords with at least one
upper-case letter is the same as
(# 2-letter passwords ) (# 2-letter passwords with only lower-case letters ) = (2 26)2 262 .
(A quick check that these two answers are the same:
2 262 + 262 = 3(262 ) = (4 1)(262 ) = (2 26)2 262

X)

To check your answers: (a) 30; (b) 1024; 59,049; (c) 17,576; (d) 3380; (e) 15,600; (f) 16,926; (g)
2704; (h) 2028.

In-class Exercise 13. For each of the following, use some combination of the sum, product,
inclusion-exclusion, and division rules to find your answer. Give an un-simplified numerical answer,
and explain it, saying which rule(s) youre using when.
(a) How many stings of three letters are there that satisfy the following:
(i) that contain exactly one vowel?
Product rule:
(# places to put the vowel )(# ways to pick the vowel )
(# ways to pick the two non-vowels in order ) = 3 5 212 .

(ii) that contain exactly 2 vowels?


Product rule:
(# places to put the non-vowel )(# ways to pick the non-vowel )
(# ways to pick the two vowels in order ) = 3 21 52 .
(iii) that have at least 1 vowel?
Sum rule: add up the ways to have exactly 1 vowel, exactly 2 vowels, and exactly 3 vowels:
3 5 212 + 3 21 52 + 53 .
(Alternatively, count all words, and subtract the number of them without vowels: 263
213 .)
(b) How many 3-card hands are there from a 52-card deck, which. . .
(i) have no other restrictions?
Product rule: 52 51 50.
(ii) are all hearts?
There are only 13 hearts, so use product rule to count in order: 13 12 11. Then use
division rule to remove the order: 131211
32 .
(iii) are all the same suit?
Now there are four choices of suits, but for each choice, there are the same number of
results. So there are 4 133 .
(iv) form a straight (like 2,3, and 4 in possibly mixed suits; always count the ace as low)?
First choose where the straight starts, for which there are 11 possibilities (Jack is the
highest; if you start with the queen, you run out of room). This determines the values of
the straight. (If you pick 3, then the straight goes 3,4,5). Now, for each choice of value,
there are four possible cards. So the product rule tells us there are
11 43

possibilities.

(v) are not all the same suit? (use two of your previous answers)
(c) How many ways are there to seat 6 people at a round table with 6 chairs, if youre only paying
attention to who is sitting next to whom (accounting for right and left i.e. A cares if they
have B to their left and C to their right, but they dont care which seat they sit in)?
First, think about lining 6 people up in a row, which product rule tells us has 6 5 4
3 2 1 possibilities. But sitting them in a circle, where rotating the circle leaves the seating
arrangement unchanged, means that 6 of those arrangements will be equivalent (each rotation
to the right by one seat). So the division rule says there are (6 5 4 3 2 1)/6 possibilities
in total.

(d) How many non-negative integers less than 100 are there that are divisible by 2 and/or 3?
There are d100/2e = 50 non-negative integers less than 100 divisible by 2 and d100/3e = 34
non-negative integers less than 100 divisible by 3. However, combining these two values would
double-count non-negative integers less than 100 divisible by 2 and 3, i.e. divisible by 6, of
which there are d100/6e = 17. So inclusion-exclusion tells us there are
50 + 34 17
non-negative integers less than 100 that are divisible by 2 and/or 3.

In-class Exercise 14. Draw the tree-diagram that tells you how many ways to form the following
results, and count the possible outcomes.
(1) Strings of 1s and 0s of length-four with no three consecutive 0s.

0
(0010)

(0011)

(0100)

(0101)

(0110)

(0111)

(1001)

(1010)

(1011)

(1110)

(1100)

(1101)

1
(1111)

(2) Subsets of the set {3, 7, 9, 11, 24} whose elements sum to less than 28.

24 out

3 in

n
7i
3 in

n
7i
3 in

n
7i
3 out

3 out

3 out

3 out

3 out

3 out

3 in

3 in

3 out

ut

7o

ut

ut

7i

9o

7o

ut

9i

ut
7o

7o

3 out

ut

3o

3i

9o
ut

3 in

9i

9 out
7 out

11 o
ut

n
11 i

11 out

3 in

24 in

In-class Exercise 15.


(a) Consider the set {a, b, c}. For each of the following, (A) list the objects described, (B) give a
formula that tells you how many you should have listed, and (C) verify that the formula and
the list agree.
(i) Permutations of {a, b, c}.
(A) abc, acb, bac, bca, cab, cba
(B) 3!
(C) 3! = 6, and there are 6 items in (A).
(ii) Two-permutations of {a, b, c}.
(A) ab, ac, ba, bc, ca, cb
(B) 3 2
(C) 3 2 = 6, and there are 6 items in (A).
(iii) Size-two subsets of {a, b, c}.
(A) {a, b}, {a, c}, {b, c}
(B) 3 2/2!
(C) 3 2/2! = 3, and there are 3 items in (A).
(b) For each of the following, classify the problem as a permutation or a combination problem or
neither, and give an answer using an unsimplified formula. (Answers should look, for example,
like 5 4 instead of P (5, 4) or 20.)
(i) In how many different orders can five runners finish a race if no ties are allowed? (Two
people cant tie for, say, first place.)
Permutation! 5! = 5 4 3 2 1.
(ii) How many strings of 1s and/or 0s of length seven have exactly three 1s?

7!
.
Combination! Choose the places where the 1s go: 73 = 4!3!
(iii) How many strings of 1s and/or 0s of length seven have three or fewer 1s?
Still a combination problem, but now with a sum rule.
       


7
7
7
7
1
1
1
1
+
+
+
= 7!
+
+
+
3
2
1
0
4!3! 5!2! 6!1! 7!0!
(iv) How many three-digit numbers are there with no 1s? (a three-digit number is something
like 144 or 009 or 053)
Neither! This is just a product rule: 93 .
(v) How many three-digit numbers are there with no digits repeated?
Permutation! These are three-permutations from a set of 10 things: 10!/7! = 10 9 8.
(c) For each of the following, provide your answers in an unsimplified form, and justify.
(i) A six-sided dice is rolled 5 times. How many ways could it turn out that a value greater
than 4 (a 5 or 6) is rolled exactly twice?
(Hint: first pick which rolls are high, and then pick values.)

First choose when the high rolls happen: 52 = 54
2 possibilities.
Then choose how the high rolls go: 2 2 possibilities.
Then choose how the low rolls go: 4 4 4 4 possibilities.

(For example, a roll sequence like 5, 2, 2, 6, 1 is in the category of


roll sequence goes HLLHL;
high rolls go 5 then 6;
low rolls go 2 then 2 then 1.)
Now use product rule to com
(ii) If 10 men and 10 women show up for one team of an intramural basketball game, how
many ways can you pick 5 people to play for one team if there must be at least one person
of each gender on the team?
Break this into the cases of how the gender balance works: 4 men and 1 women, 3 men
and 2 women, 2 men and 3 women, or 1 man and 4 women. Then use product rule in
each of those cases to get
           
10 10
10 10
10 10
10 10
+
+
+
4
1
3
2
2
3
1
4
2 
2 
2 


10!
10!
10! 2
10!
+
+
+
=
4!1!
3!2!
3!2!
4!1!
(iii) How many ways are there for 5 women and 2 men to stand in line? Now how many ways
are there for them to stand in line if the two men dont stand next to each other? (The
men and the women are distinct individuals. Hint: first decide the gender order, and then
decide the individuals order.)
Ways are there for 5 women and 2 men to stand in line:
This is just 7 people standing in line, which has 7! possibilities.
If the two men dont stand next to each other:

Pick where then men are standing, of which there are 72 6 possibilities.
Then pick the order of the women
 5! and the order of the men 2.
7
Combine using product rule: ( 2 6)5! 2.
(d) For each of the following identities, (A) explain in words why it makes sense given what it represents, and then (B) verify it algebraically using the formulas for permutation or combination.
(For example, an answer for (A) might start out looking like P(n,1) means. . . , and an answer
for part (B) should look like a calculation that starts out looking like P (n, 1) =.)
(i) P (n, 1) = n
(A) This is the number of ways to pick one thing out of n, of which there are n possibilities.
Order doesnt come in to play, since theres only one thing.
n!
=n
(B) P (n, 1) = (n1)!
(ii) P (n, 0) = 1
(A) This is the number of ways to pick nothing out of n, of which there is only one
possibility.
(B) P (n, 0) = n!
n! = 1
(iii) P (n, k + 1) = P (n, k) (n k)

(A) P (n, k + 1) is the number of ways to choose k + 1 things from n in order. Since
its in order, you can choose the first k things first, and then choose the last thing
separately. After k things, there are n k to choose from.
n!
n!
(B) P (n, k + 1) = (n(k+1))!
= (nk)!/(nk)
P (n, k) (n k)

(iv) n1 = n
(A) This
number of ways to pick one thing out of n, of which there are n possibilities.
 is the
n
n!
(B) 1 = (n1)!1! = n

(v) nn = 1
(A) This is the number of ways to choose everything all at once out of a group of n. There
is one way to do this pick everything.
n!
(B) nn = (nn)!n!
= 1 (since 0! = 1)

(vi) n0 = 1
(A) This is the number of ways to choose nothing from n things. There is one way to do
that
take anything.
 - dont
n!
= 1 (again, since 0! = 1)
(B) n0 = (n0)!0!


n
(vii) nk = nk
(A) This is because choosing k things from n is the same as picking n k things from n
to exclude.

n
n!
n!
(B) nk = (nk)!k!
= k!(nk)!
= nk

In-class Exercise 16. For each of the following, be sure to include how the pigeonhole principle
or its generalized version apply in your justifications, or why neither of them do.
(a) The lights have gone out and youre digging through an unorganized sock drawer filled with
unmatched black socks and brown socks (otherwise roughly identical).
(i) If youre pulling them out at random, how many socks do you need to take out to ensure
you have a matching pair if there are 10 of each kind of sock? How about if there are 20
of each? 100 of each?
It doesnt matter how many socks you have to choose from as long as you have enough
to apply generalized pigeonhole principle. In any case, the colors are the boxes and the
socks youve picked are the items, and so you want to solve dn/2e 2 for the minimal n:
n = 3.
(ii) Again pulling at random, how many socks do you need to take out to ensure you have a
matching brown pair if there are 10 of each kind of sock? How about if there are 20 of
each? 100 of each?
This is not pigeonhole principle since you need brown in particular. This is asking to
guarantee that a specific box has at least 2 object. So you need to take into account that
you might pull out all of the black socks before you get a single brown sock. Therefore
you need to pick 12 if there are 10 of each kind of sock, 22 if there are 20 of each, and 102
if there are 100 of each.
(b) Explain why, out of any set of four integers, at least two have the same remainder when divided
by 3.
Here the elements are the integers and the remainders are the boxes. There are only three
possible remainders when dividing by 3 0, 1, and 2. Since youve picked 4 object,s pigeonhole
principle tells us at least two of them go in the same box, i.e. that two of them have the same
remainder.
(c) A recent estimate showed that the US and Canada together (which share the country code
+1) have approximately 134,000,000 phone lines in use. What is the minimum number of area
codes needed to make that possible?
The boxes are the area codes and the 7-digit phone numbers are the objects. You have to
ensure that there are enough of them so that no more than then number of possible 7-digit
phone numbers are forced into the same area code. Since there are 8106 possible 7-digit phone
numbers, you want to solve for the minimal k such that
(134 106 )/ke 7 106 .
This is k = 20.
(d) Let f : A B be a function between finite sets such that |A| > |B|. Explain why f cannot
possibly be injective. (Consider the sizes of the preimages {f 1 (b) | b B}.)
Here, the elements of B are the boxes and the elements of A are the objects. Pick any
function f it tells you what objects go into what boxes (an object a is in box b if a is in the
preimage of b). Since there are more objects than boxes, pigeonhole principle tells us that some
box has more than one object in it i.e. some element of b has more than one element of a in
its preimage. Therefore the function is not injective.

(e) Explain why, in any sequence of n consecutive integers, at least one of them must be divisible
by n. (Start with, say, n = 4 as an example.)
Like in part (c), the remainders are the boxes and the consecutive integers are the boxes.
Now suppose that you have n consecutive integers, none of which are divisible by 0. Note that
when you increase an integer z by 1, you increase its remainder by 1; unless z + 1 is divisible
by n, in which case you drop it to 0. Since none of the consecutive integers is divisible by n,
not only do none of them have a remainder of 0, but moving up the chain, you never drop the
remainder to 0. So the integers have distinct remainders.
However, if none of the integers are divisible by n, then were only using n 1 out of the n
boxes.So pigeonhole principle tells us that some box has at least 2 elements, i.e. there are two
of these integers that have the same remainder when divided by n. This is a contradiction.
Thus one of any n consecutive integers must be divisible by n.

Das könnte Ihnen auch gefallen