Math 2200 Exercises on Counting 9 April, 2014

advertisement
Math 2200
Exercises on Counting
9 April, 2014
1. How many integers between 1 and 100 are divisible by at least one of four and six?
There are 100
= 25 integers between 1 and 100 are divisible by 4. Similarly, since
4
100
16 < 6 < 17, there are 16 integers between 1 and 100 divisible by 6. Since the integers
divisible by both 4 and 6 are exactly the integers divisible by 12, we have double counted
the 8 multiples of 12 between 1 and 100. So there are a total of
25 + 16 − 8 = 33
integers between 1 and 100 divisible by at least one of 4 and 6.
2. How many license plates can be produced which contain either three letters followed by
three digits or three digits followed by three numbers?
Since there are two possible formats for license plates the total number possible is the
sum of the possible plates in the two formats. There are 26 · 26 · 26 · 10 · 10 · 10 license
plates consisting of three letters followed by three digits and 10 · 10 · 10 · 26 · 26 · 26 license
plates consisting of three digits followed by three letters.
Thus the total number of possible license plates is
263 · 103 + 103 · 263 = 35, 152, 000
3. A computer security system requires passwords to consist of uppercase letters, lowercase
letters, and digits; to contain at least one character of each of these three types; and to
be between 7 and 10 characters long. How many possible passwords are there?
We will consider in detail the case where the password has length 7; the other cases are
parallel.
The total number of characters available for a password is 62: 26 uppercase letters, 26
lowercase letters, and 10 digits. Therefore the total number of strings of length 7 is
627 . From this number we must subtract the strings that do not contain all the required
characters.
There are two categories of illegal strings to consider: those containing only one type of
character and those containing two types of characters.
There are a total of 107 strings containing all digits, 267 containing only uppercase letters,
and 267 containing only lowercase letters. Thus the total number of strings containing
only one kind of character is 107 + 2 · 267 .
There are 527 strings containing only uppercase and lowercase letters; of these, however,
267 contain only uppercase letters and 267 contain only lowercase letters. Therefore
the number of strings containing both uppercase and lowercase letters but no digits is
527 − 2 · 267 .
A parallel argument shows that the number of strings containing lowercase letters and
digits with no uppercase letters and the number of strings containing uppercase letters
and digits with no lowercase letters are both 367 − 267 − 107
Therefore the total number of legal 7-character passwords is
627 − (107 + 2 · 267 ) − (527 − 2 · 267 ) − 2 · (367 − 267 − 107 )
Or, more concisely
627 − (527 + 2 · 367 ) + (107 + 2 · 267 )
The cases for 8, 9, and 10 character passwords are exactly parallel, yielding the final
total
10
X
62i − (52i + 2 · 36i ) + (10i + 2 · 26i ) = 698441216786676480
i=7
4. How many ways are there to paint the six faces of a cube in six different colors? Two
ways of painting the cube should be considered the same if one can be rotated into the
other.
Since there are six choices for the color of the first face, five for the second, and so forth,
the total number of ways to paint the cube ignoring symmetry is 6! = 720. Since any of
the six faces of the cube can be chosen as the top and then the cube rotated any of four
directions, there are 24 ways to obtain equivalent colorings. Therefore the total number
of distinguishable colorings is
6!
= 30
24
5. How many strings of eight letters are there if no letter may be repeated?
There are 26 choices for the first letter, 25 for the second, 24 for the third, and so forth.
The total number of allowed strings is
26 · 25 · 24 · 23 · 22 · 21 · 20 · 19 = 62990928000
6. (extra fun!) How many ways are there to paint the faces of a cube two different colors?
(Assume the same sort of equivalence as above.)
Suppose we paint the cube in color A and color B. We will divide the colorings into
classes according to how many faces are painted with color A.
There is one way to paint the cube so that all six faces have color A.
There is also one way to paint the cube so that five faces have color A. Whichever face
is color B can be rotated into any position.
There are two ways to paint the cube so that four faces have color A. In particular, the
two faces with color B may be either adjacent or opposite.
There are two ways to paint the cube so that three faces have color A. The faces may
either all have one corner in common, or two faces may be opposite.
The cases for two, one, and zero faces of color A are identical to the cases for four, five,
and six, respectively— consider the faces of color B in place of those with color A. Thus
the total number of possible configurations is
1 + 1 + 2 + 2 + 2 + 1 + 1 = 10
Download