Solutions to Exercises 1

advertisement
Discrete Mathematics
Lent 2009
MA210
Solutions to Exercises 1
(1) (a) There are 5 seats in a row and 12 people to choose from. How many different
seatings are possible if every seat must be occupied by a person?
Solution. We have 12 choices for the first seat. After we made this choice,
there are 12 − 1 = 11 possibilities for the second seat in the row. In
general, having made choices for the first i − 1 seats, i = 2, 3, 4, 5, we have
12 − (i − 1) possibilities for the i-th seat. By the Multiplication Rule, there
are 12 · 11 · 10 · 9 · 8 = (12)5 possible seatings.
(b) Now there are 12 seats in a row and 5 people to be seated. If every person
must sit in a seat, how many different seatings are possible?
Solution. We have 12 choices of a seat for the first person to sit. After
we made this choice, there are 12 − 1 = 11 possible seats for the second
person to sit on. In general, having made choices for the first i − 1 persons,
i = 2, 3, 4, 5, we have 12 − (i − 1) possibilities for the seat of the i-th person.
By the Multiplication Rule, there are 12 · 11 · 10 · 9 · 8 = (12)5 possible
seatings.
(2) How many numbers between 2000 and 5000 can be formed from the digits
1,2,3,4,5,6 if repetition of digits is
(a) allowed;
Solution. The first digit must be 2, 3, or 4; there are no restrictions on the
remaining three digits, so for each of them we have 6 possibilities. Hence,
there are 3 · 63 such numbers.
(b) not allowed?
Solution. Again, the first digit must be 2, 3, or 4. Having chosen digits
at the first i positions, i = 1, 2, 3 , for the (i + 1)-st digit, we have 6 − i
possibilities. Hence, there are 3 · 6 · 5 · 4 such numbers.
(3) (a) How many 10-digit numbers can be formed by using each of the digits 0,
1, 2, 3, 4, 5, 6, 7, 8, 9 exactly once?
Solution. The first cannot be 0. Having chosen digits at the first i positions, i = 1, 2, 3 , for the (i + 1)-st digit, we have 10 − i possibilities. Hence,
there are 9 · 9 · 8 · . . . · 1 = 9 · 9! such numbers.
(b) And how many of these numbers are larger than 4,000,000,000?
Solution. The first digit cannot be 0, 1, 2 or 3. The rest is as above, hence
there are 6 · 9! such numbers.
2
(4) A car registration is to consist of 3 letters followed by a number between 1 and
999. How many car registration numbers are possible?
Solution. There are 26 letters and we can choose them with repetition. So,
there are 263 choices of 3 letters. There are also 999 choices for one of the
numbers. Hence, we have 999 · 263 possible registration numbers.
(5) You have an apple, a banana, a peach, a pear, and an apricot.
(a) In how many ways can you distribute these pieces of fruit among 8 children
if no child can receive more than one piece?
Solution. (8)5 as here are 8 choices for a child getting the apple, 7 choices
for a child getting the banana, 6 choices for a child getting the peach, 5
choices for a child getting the pear, and 4 choices for a child getting the
apricot.
(b) How many ways are there if any child can receive any number of pieces?
Solution. 85 as there are 8 possible choices for a child getting each of the
five fruits.
(6) Suppose there are m girls and n boys in a class. What is the number of ways
of arranging them in a line so that all the girls are together?
Solution. We treat m girls as one boy B. We can order n + 1 boys in (n + 1)!
ways. Then we replace B by one of m! possible orderings of girls and obtain an
ordering in which all the girls are together. Thus, there are (n + 1)!m! possible
orderings.
(7) The names of the 12 months of the year are listed in a certain order. Given that
June and July are not next to each other, how many such lists are possible?
Solution. There are 12! ways to order 12 months. If we treat June and July
as one month, there are 11! orderings in which June, July appear in this order,
and there are 11! orderings in which July, June appear in this order. Hence,
12! − 2 · 11! = 10 · 11!
orderings do not have June and July together.
(8) Six people are to be seated around a circular table.
(a) How many ways are there to achieve this?
Solution. Although 1−2−3−4−5−6, 2−3−4−5−6−1, 3−4−5−6−1−2,
4 − 5 − 6 − 1 − 2 − 3, 5 − 6 − 1 − 2 − 3 − 4, 6 − 1 − 2 − 3 − 4 − 5 are
different orderings of six people to a line, they are the same ordering if
people are seated around a circular table. To avoid this, we can imagine
that person 1 always sits at the head of the table, i.e., we only count the
3
orders that starts with 1. And so there are 5! such orders since we need to
order persons 2, 3, 4, 5, 6 in every possible way.
(b) And in how many ways can it be done if there are two people who refuse
to sit next to each other?
Solution. We first find the number of ways how to sit two fixed persons
together. We treat them as one person and, similarly to (a), we obtain
that there are 4! ways to sit 5 people around a circular table. Now, the two
fixed persons can be ordered in two ways, so the total number of ways to
sit them together is 2 · 4!.
To get the number of seating where they are not together, we subtract 2 · 4!
from the total number of seatings: 5! − 2 · 4! = 3 · 4!.
(9) An eight-person committee is to be formed from a group of 10 persons from
London and 15 persons from outside the city.
(a) In how many ways can the committee be chosen if the committee must
contain 4 persons from each of the 2 groups?
Solution.
There are 10
ways to select 4 members out of 10 ‘outsiders’ and
4
15
ways
4
to choose 4 Londoners. By the Multiplication Principle, there are
10 15
ways to choose the committee.
4
4
(b) In how many ways can the committee be chosen if the committee must
contain more persons from outside London than from the city?
Solution. We must choose j ‘outsiders’ and 8 − j Londoners, where 5 ≤
j ≤ 8. Using our approach from (a), the number of ways to do this is
10 15
10 15
10 15
10 15
+
+
+
5
3
6
2
7
1
8
0
(c) In how many ways can the committee be chosen if the committee must
contain at least 2 Londoners?
Solution. In this case, we must choose 8 − j ‘outsiders’ and j Londoners,
where 2 ≤ j ≤ 8. Hence, the total number of ways is
8 X
10
15
8−j
j
j=2
(10) A certain game is played by 13 persons using a (standard) deck of 52 cards: there
are four suits (Spades, Diamonds, Hearts, and Clubs) and 13 distinguishable
cards (Ace, Two, . . . , Ten, Jack, Queen, King) in each of the suits. A k-hand
is a set of k different cards from this deck.
(a) How many 4-hands are there?
Solution. We are choosing4 cards out of 4 · 13 = 52, their order does not
matter, hence there are 52
.
4
4
A player looks at her 4 cards and sees that she has only cards from one suit.
(b) How many 4-hands that contain only cards from one suit are there?
Solution. We first select one suit out of 4. Then we choose 4 cards out of
13 possible in the
selected suit. Their order does not matter, hence
this can
13
13
be done in 4 ways. By the Multiplication rule, there are 4 4 4-hands
with all cards from one suit.
Another player looks at his 4 cards and sees that he has one cards from each
suit.
(c) How many 4-hands that contain one card from each suit exist?
Solution. We choose 1 card out of 13 possible in each suit to form the
4
4-hand, so this is possible in 13
ways.
1
The player from (b) peeps at her left neighbour’s cards and sees that this neighbour has only cards of one suit, but different from the one she has. Then she
looks at her right neighbour’s cards and, to her surprise, again sees only cards
of one suit, and different from the suit she or the left neighbour has.
(d) How many ways are there to divide 52 cards into thirteen 4-hands such
that player 1 has cards of exactly one suit; player 2 has cards of exactly one
suit, but not the same suit as player 1; player 3 has cards of exactly one
suit, but not the same suit as player 1 or 2; and there are no restrictions
for the hands of the other players?
Solution. For players 1,2,3, we use approach from part(b): we have 4 13
4
ways to assign a 4-hand in one suit to player 1, 3 13
ways
to
assign
a
4
13
4-hand in one suit to player 2 (one suit is used for player 1), 2 4 ways to
assign a 4-hand in one suit to player 3 (two suits are used for players 1 and
2).
After this, we have 52 − 12 = 40 cards to dealt to the
remaining 10 players
with no restrictions. So, for player 4, we have 40
possible 4-hands;
for
4
36
32
player 5, we have 4 possible 4-hands; for player 6, we have 4 possible
4-hands, etc.
The total number of ways is (by the Multiplication Rule)
13
13
13
40 36 32
8 4
4
·3
·2
·
...
.
4
4
4
4
4
4
4 4
Download