You are on page 1of 2

MH1301 Discrete Mathematics

Solutions to Teasers

1. How many integers in the interval [1, 21] are divisible by both 2 and 3?
Ans: First list the integers that are multiples of both 2 and 3. Multiples of 2 are
{2, 4, 6, 8, . . . 18, 20} which is of size 10. Similarly, multiples of 3 are {3, 6, 9, 12, 15, 18, 21}
which are of size 7. In order to be multiple of both 2 and 3, we need to take the
intersection of the above sets which is {6, 12, 18}. Therefore, the answer is 3.
2. Suppose that there are 3 ways from city A to city B, and 2 ways from city B to city
C. How many ways are there from city A to city C via city B?
Ans: From A to B, there are 3 ways. For each path taken from A to B, the traveller
can choose one of the 2 paths to reach C. Hence, the total number of ways is 6.
3. Find the number of ways a group of 6 people can arrange themselves in a line for a
photograph.
Ans: The answer is 6 5 4 3 2 1 = 720 ways. First, person 1 can stand in
6 possible positions. Once the position of person 1 is fixed, person 2 can stand in
one of the remaining 5 possible positions. Once the positions of persons 1 and 2 are
fixed, person 3 can stand in 4 possible positions. Similarly person k for 1 k 6
can stand in 6 k + 1 different positions.
4. How many ways are there to distribute 2 books to 2 students?
Ans: Let us represent the books by the set {B1 , B2 } and students by the set {S1 , S2 }.
One way is to give both books to S1 , represented as {(B1 , S1 ), (B2 , S1 )}. Another
way is to give both to S2 as {(B1 , S2 ), (B2 , S2 )}. Similarly, other possible methods
are {(B1 , S1 ), (B2 , S2 )} and {(B1 , S2 ), (B2 , S1 )}. Thus, totally 4 ways.
5. How many 0-1 bit strings are there of length 3? How many of them have even number
of ones in it?
Ans: The bit strings are {000, 001, 010, 011, 100, 101, 110, 111} of size 8. Out of them
only 4 have even number of ones.

6. How many solutions does the equation x1 + x2 + x3 = 2 have where x1 , x2 , x3 are


non-negative integers?
Ans: Since x1 , x2 , x3 are non-negative, their minimum and maximum values are 0
and 2, respectively. The solutions are
(x1 , x2 , x3 ) = {(0, 0, 2), (0, 1, 1), (1, 0, 1), (1, 1, 0), (2, 0, 0), (0, 2, 0)}.
There are 6 solutions.
7. Would you believe a report which states that, of 1000 people, 816 like candy, 723 like
ice cream, while 500 like both candy and ice cream? Assume that every people like
at least one kind of these food. State your reasons!
Ans: If 500 like both candy and ice cream, then 316 like only candy and 223 like only
ice cream. Thus, the total number of people should be 500 + 316 + 223 = 1039. This
cannot happen since there are only 1000 people to start with.