Solutions 9

Math 55 Worksheet
Instructions: Today you’ll be working with TWO different groups. In group 1 you’ll all be working on the same
problem. Then we’ll switch into larger groups with one ambassador from each problem. The ambassador will lead the
group in writing solutions on the board! In group one, first solve your own problem. Once you’re done, let me know,
and then try and solve the Tough Problems at the bottom.
Counting and Pigeon Hole
1. (a) How many different functions are there from a set with n elements to a set with m elements?
(b) How many different injective functions are there from a set with n elements to a set with m elements? You
may assume n ≤ m Solutions are in Section 6.1
2. How many strings of 5 decimal digits
(a) contain at least one 4? Solution: Hint! anytime you see something that is trying to count strings with AT
LEAST something. It’s often easier to count the number of things in the complement and then subtract.
For example: There are 105 strings of 5 decimal digits. And there are 95 which contain only the numbers
1,2,3,5,6,7,8,9,0. Thus the difference counts strings with at least one 4. Answer: 105 − 95 .
(b) do not contain the same digit twice? Solution: 10 · 9 · 8 · 7 · 6
(c) do not have two consecutive symbols that are the same?Solution:The first digit is free to be anything (10
choices) , the second can be anything but the first digit (9 choices) , the third can be anything but the
second (9 choices) etc. so the answer is 10 · 9 · 9 · 9 · 9.
(d) either end in 4, or start with 6? Solution: There are 104 strings which start with a 6, and 104 which end
with a 4. However, there is some overlap between these two sets. So we must subtract off the overlap things which start with 6 AND end with 4. There are 103 of these. so ANSWER: 104 + 104 − 103
3. How many positive integers less than or equal to 100 are divisible by either 3 or 4? Solution: There are
b100/3c = 33, numbers less than 100 divisible by 3. and similarly 25 numbers divisible by 4. So it would seem
like we have 33 + 25 = 58 numbers divisible by 4 or 3. But we have double counted numbers which are multiples
of 3 and 4, that is, numbers divisible by 12. There are b100/12c = 8 of these. So our answer: is 58 − 8 = 50.
4. On the alphabet of decimal digits, how many palindromes of length n are there? Hint: handle n even and
odd differently. Solution: Suppose first that n is even. Then to determine a palindrome, it’s sufficient to just
say what the first n/2 digits are. The remaining digits MUST be the reverse of this. Hence, there are 10n/2
palindromes in this case. Similarly, if n is odd, then we can determine the first (n + 1)/2 numbers, (the first
“half” plus the middle number), so we have 10(n+1)/2 choices.
5. Show that among any set of 56 integers, there is a pair whose difference is divisible by 55. Solution: Consider
the possible remainders that we could get when we divide our number by 55. There are 55 such remainders...
0, 1, ... 54. So now our set of 56 numbers, must have two numbers with the same remainder by the Pigeon-hole
principle. Hence, two of our numbers, say x and y have the same remainder. This must mean that x ≡ y
mod 55 or that 55|(x − y).
6. Show that if you select 28 integers from the first 54 positive integers, there is a pair whose sum is 55. Solution:
Consider the following partition of the integers 1 through 54:
S1 = {1, 54}, S2 = {2, 53}, · · · , Sk = {k, 55 − k}, · · · , S27 = {27, 28}.
There are 27 of these sets. Now our 28 integers must all belong to these sets, and by the Pigeon-hole principle,
2 of them must lie in the same set, say Sj . But by construction, these two numbers add up to 55.
Tough
Problems
1. Show that if 25 boys and 25 girls are
seated around a circular table, there is
always a person both of whose neighbors are boys.
2. Show that if you select 5 points in
the xy-plane with integer coordinates,
there is at least one pair whose midpoint has integer coordinates
with
Larry
King