Download The University of Sydney MATH 1004 Second Semester Discrete

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Rook polynomial wikipedia , lookup

System of linear equations wikipedia , lookup

Laws of Form wikipedia , lookup

Transcript
The University of Sydney
MATH 1004
Second Semester
Discrete Mathematics
2012
Tutorial 2 Week 3
1.
Use the notation of set theory to describe:
(i )
The set of all odd integers between 2 and 10.
(ii ) The set of all odd integers between 2 and 200.
(iii ) The set of all odd integers.
(iv ) The set of integers divisible by 4.
For this exercise, do not use the dots notation (like . . . ).
Solution.
Let Z be the set of all integers.
(i )
The set of all odd integers between 2 and 10 is {3, 5, 7, 9}
(ii ) The set of all odd integers between 2 and 200 is
{x | x = 2y + 1, y ∈ Z, 1 ≤ y ≤ 99}.
(iii ) The set of all odd integers is {x | x = 2y + 1, y ∈ Z}
(iv ) The set of integers divisible by 4 is {x | x = 4y, y ∈ Z}
2.
Which of the following statements are true?
(i )
{2, 4} ⊆ {1, 2, 3, 4, 5, 6}.
(iii ) 2 ⊆ {1, 2, 3, 4, 5, 6}.
(v )
(ii ) {2} ⊆ {1, 2, 3, 4, 5, 6}.
(iv ) 2 ∈ {1, 2, 3, 4, 5, 6}.
{2} ∈ {1, 2, 3, 4, 5, 6}.
Give reasons for your answers.
Solution.
(i )
The statement is true since the elements 2 and 4 in the set {2, 4} are also
in the set {1, 2, 3, 4, 5, 6}.
(ii ) The statement is again true.
(iii ) The statement is false; since 2 is an element, but not a subset.
(iv ) The statement is true since 2 is an element in the set {1, 2, 3, 4, 5, 6}.
(v )
The statement is false; since {2} is a subset, but is not an element in the
given set.
2
3.
Let A = {1, 2, 3, {2}, {2, 3}, 4}. Which of the following statements are true?
(i )
{2} ∈ A.
(ii ) {{2}} ⊆ A
(iii ) {2, {2}} ⊆ A.
(iv ) {2, {3}} ⊆ A.
(v )
(vi ) {3, {2, 3}} ⊆ A.
{2, 3} ∈ A.
Solution.
(i )
True, by definition.
(ii ) True, since {2} is in A.
(iii ) True, since both 2 and {2} are in A.
(iv ) False, since {3} is not in A.
(v )
True, by definition.
(vi ) True, since both 3 and {2, 3} are in A.
4.
Write out the following sets, where A = {a, b, c, {a, d}}:
(i )
A ∪ {b, d, e}.
(ii ) A ∩ {b, d, e}.
(iii ) A \ {a, b}.
(iv ) A \ {c, d}.
(v )
(vi ) A \ {a, {a, d}}.
A \ {{a, d}}.
Then write down the sizes of each of the sets.
Solution.
(i )
A1 = A ∪ {b, d, e} = {a, b, c, d, e, {a, d}} and |A1 | = 6.
(ii ) A2 = A ∩ {b, d, e} = {b} and |A2 | = 1.
(iii ) A3 = A \ {a, b} = {c, {a, d}} and |A3 | = 2.
(iv ) A4 = A \ {c, d} = {a, b, {a, d}} and |A4 | = 3.
(v )
A5 = A \ {{a, d}} = {a, b, c} and |A5 | = 3.
(vi ) A6 = A \ {a, {a, d}} = {b, c} and |A6 | = 2.
5.
List the elements in each of the six sets P , Q, P ∪ Q, P ∩ Q, P \ Q and Q \ P ,
where
P = {x | x ∈ Z and 4 ≤ x ≤ 10},
y
Q = {y | y ∈ Z and ∈ Z and 0 ≤ y 2 ≤ 50}.
2
Solution.
The answers are:
P = {4, 5, 6, 7, 8, 9, 10},
Q = {−6, −4, −2, 0, 2, 4, 6},
P ∪ Q = {−6, −4, −2, 0, 2, 4, 5, 6, 7, 8, 9, 10},
P \ Q = {5, 7, 8, 9, 10},
P ∩ Q = {4, 6},
Q \ P = {−6, −4, −2, 0, 2}.
3
6.
Let A = {a, b, c, d}. Write down all the subsets of A. How many are there?
Solution.
The subsets of A are
∅, {a}, {b}, {c}, {d},
{a, b}, {a, c}, {a, d}, {b, c}, {b, d}, {c, d},
{a, b, c}, {a, b, d}, {a, c, d}, {b, c, d}, {a, b, c, d}.
There are 16 subsets of A.
7.
If A and B are subsets of a set X, prove that
X \ (A ∩ B) = (X \ A) ∪ (X \ B).
Solution.
Before we start this proof we need to know a couple of things.
• We need to know that if x ∈
/ A ∩ B, then either x ∈
/ A or x ∈
/ B (or both). We
can take this as obvious, because if both x ∈ A and x ∈ B, then x ∈ A ∩ B.
• We also need to know that if x ∈
/ A then x ∈
/ A ∩ B. Again, we can take this
as obvious; since x ∈ A ∩ B means both x ∈ A and x ∈ B, so if x ∈
/ A then
certainly x ∈
/ A ∩ B.
These two things that we are taking as obvious rest on laws of logic, which will
be discussed later (in Chapter 11 of Choo and Taylor).
Proof, Part 1. Suppose that x ∈ X \ (A ∩ B).
Then x ∈ X and x ∈
/ A ∩ B. Since x ∈
/ A ∩ B, x ∈
/ A or x ∈
/ B.
Suppose that x ∈
/ A. Since we know x ∈ X, then x ∈ X \ A.
Similarly, if x ∈
/ B then x ∈ X \ B.
Since x ∈
/ A or x ∈
/ B, at least one of x ∈ X \ A, x ∈ X \ B is true.
Thus x ∈ (X \ A) ∪ (X \ B).
This first part of the proof shows that X \ (A ∩ B) ⊆ (X \ A) ∪ (X \ B).
Proof, Part 2. Suppose that x ∈ (X \ A) ∪ (X \ B).
Then x ∈ X \ A or x ∈ X \ B.
If x ∈ X \ A then x ∈ X and x ∈
/ A.
Since x ∈
/ A, certainly x ∈
/ A ∩ B, and so x ∈ X \ (A ∩ B).
Similarly if x ∈ X \ B then x ∈ X \ (A ∩ B).
So in either case x ∈ X \ (A ∩ B).
This second part of the proof shows that (X \ A) ∪ (X \ B) ⊆ X \ (A ∩ B).
The two parts of the proof together show that X \(A∩B) = (X \A)∪(X \B).
This proof is written out with a lot of English words. In advanced work, proofs
do tend to be written out with quite a lot of English words; symbols like ∴ are
not used. However, the more advanced the work, the bigger the jumps that the
reader has to fill in for himself/herself.
The University of Sydney
MATH 1004
Second Semester
Discrete Mathematics
2012
Problem Set 2
1.
Let A = {a, b, c, {b}}. Determine which of the following statements are true?
(i) {b} ∈ A;
(ii) {b} ⊆ A;
(iii) {{b}} ⊆ A;
(iv) {a} ∈ A.
Solution.
(i ) True, by definition.
(ii ) True, since b ∈ A.
(iii ) True, since {b} ∈ A.
(iv ) False, since {a} is not an element in A.
2.
Let A = {x | x ∈ Z, −3 < x ≤ 2} and B = {x2 + 1 | x ∈ Z, −3 < x ≤ 2}.
(i )
Write down the elements of A and B.
(ii ) Find A ∪ B, A ∩ B and A \ B. (iii ) Find |A ∪ B|, |A ∩ B| and |A \ B|.
Solution.
(i ) A = {−2, −1, 0, 1, 2} and B = {1, 2, 5}
(ii ) A ∪ B = {−2, −1, 0, 1, 2, 5}, A ∩ B = {1, 2}, A \ B = {−2, −1, 0}.
(iii ) |A ∪ B| = 6, |A ∩ B| = 2, and |A \ B| = 3.
3.
Let A = {x ∈ N | 1 ≤ x2 ≤ 30}
and B = {x ∈ Z | x = 2y for some y ∈ Z and x2 < 50} .
(i )
List the elements of A and B.
(ii ) Find A ∪ B, A ∩ B, A \ B, B \ A.
(iii ) Find |A ∪ B|, |A ∩ B|, |A \ B|, |B \ A|.
Solution.
(i ) A = {1, 2, 3, 4, 5} and B = {−6, −4, −2, 0, 2, 4, 6} .
(ii ) A ∪ B = {−6, −4, −2, 0, 1, 2, 3, 4, 5, 6}, A ∩ B = {2, 4}, A \ B = {1, 3, 5},
B \ A = {−6, −4, −2, 0, 6}
(iii ) |A ∪ B| = 10, |A ∩ B| = 2, |A \ B| = 3, |B \ A| = 5.
5
4.
(i )
Write the following using set notation:
The set G is the set of all odd integers which are greater than 22 and are
not divisible by 5.
(ii ) With G as described in part (i), classify each of the following statements
as true or false, giving reasons.
(a) G ⊆ Z,
(b) Z ⊆ G,
(c) G ∩ Z 6= ∅
(d) Z\G is the set of all even integers less than 22 which are divisible by 5.
Solution.
(i )
Here is one way of writing G in set notation:
G = {x | x ∈ Z, (x − 1)/2 ∈ Z, x > 22, x/5 ∈
/ Z}.
There are various other ways.
(ii ) (a)
5.
By definition of G, G ⊆ Z is true.
(b)
However, Z ⊆ G is false, because, for example, 4 ∈ Z and 4 ∈
/ G.
(c)
True; the set G∩Z is not the empty set since, for example, 23 ∈ G∩Z.
(d)
The statement is false, since 25 ∈ Z \ G, and 25 is not even.
Let A = {a, b, c}, B = {a, {a}, {b, c}} and C = {{a, b}, b, c}.
(i )
What are |A|, |B| and |C|?
(ii ) Write down A ∪ B, A ∪ B ∪ C, A ∩ B, A ∩ C and B ∩ C.
(iii ) Write down A \ B, B \ A, A \ C, C \ A, B \ C and C \ B.
(iv ) Which of the following statements are true? Give reasons!
(a)
A⊆B
(b)
B=C
(c)
{a} ∈ A
(d)
{a} ∈ B
(e)
{{a}} ⊆ B
(f)
A⊆C
(g)
{a, b} ⊆ A
(h)
{a, b} ⊆ C
(i)
{a, b} ∈ C
(j)
{{a, b}} ⊆ C
Solution.
(i )
|A| = |B| = |C| = 3
(ii ) We see that
A ∪ B = {a, b, c, {a}, {b, c}},
A ∪ B ∪ C = {a, b, c, {a}, {b, c}, {a, b}},
A ∩ B = {a},
A ∩ C = {b, c},
B ∩ C = ∅.
6
(iii ) We have
A \ B = {b, c},
B \ A = {{a}, {b, c}},
A \ C = {a},
C \ A = {{a, b}},
B \ C = B,
C \ B = C.
(iv ) (a)
6.
False: b is an element of A, but not of B.
(b)
(d)
False: a ∈ B, but a ∈
/ C.
True: since a ∈ B.
(c)
(e)
(f)
(g)
False: a ∈ A, but a ∈
/ C.
True: since both a and b are in A.
(h)
(j)
False: since a ∈
/ C.
True: since {a, b} ∈ C.
(i)
Clearly it is false.
True: since {a} ∈ B.
True: by definition.
Let A, B and C be any three sets. Prove that
(A ∪ B) \ C = (A \ C) ∪ (B \ C) .
Solution.
Proof, Part 1. Suppose that x ∈ (A ∪ B) \ C.
Then (x ∈ A or x ∈ B) and x ∈
/ C.
If x ∈ A then, since x ∈
/ C, we have x ∈ A \ C.
Similarly, if x ∈ B then x ∈ B \ C.
So in either case, x ∈ (A \ C) ∪ (B \ C).
Proof, Part 2. Suppose that x ∈ (A \ C) ∪ (B \ C).
Then x ∈ A \ C or x ∈ B \ C.
Suppose that x ∈ A \ C. Then x ∈ A and x ∈
/ C.
Since x ∈ A, certainly x ∈ A ∪ B; since also x ∈
/ C, x ∈ (A ∪ B) \ C.
Similarly, if x ∈ B \ C it follows that x ∈ (A ∪ B) \ C.
So in either case x ∈ (A ∪ B) \ C.
Here is a more compressed way of writing more or less the same proof.
We have
x ∈ (A ∪ B) \ C ⇔ (x ∈ A) or (x ∈ B)
and (x ∈
/ C)
⇔ (x ∈ A) and (x ∈
/ C) or (x ∈ B) and (x ∈
/ C)
⇔ x ∈ (A \ C) or (x ∈ (B \ C)
⇔ x ∈ (A \ C) ∪ (B \ C)
and so
(A ∪ B) \ C = (A \ C) ∪ (B \ C) .
Either proof is acceptable; for the second one you have to be sure that all the
steps really are reversible.
7
7.
Prove that if A and B are subsets of X, then
X \ (A ∪ B) = (X \ A) ∩ (X \ B).
Solution.
Proof, Part 1. Suppose that x ∈ X \ (A ∪ B).
Then x ∈ X and x ∈
/ A ∪ B, so x ∈ X and x ∈
/ A and x ∈
/ B.
Since x ∈ X and x ∈
/ A, x ∈ X \ A.
Since x ∈ X and x ∈
/ B, x ∈ X \ B.
Therefore x ∈ (A \ A) ∩ (X \ B).
Proof, Part 2. Suppose that x ∈ (X \ A) ∩ (X \ B).
Then x ∈ X \ A,so x ∈ X and x ∈
/ A.
Also x ∈ X \ B, so x ∈ X (which we already knew) and x ∈
/ B.
Since x ∈
/ A and x ∈
/ B, x ∈
/ A ∪ B.
Since x ∈ X and x ∈
/ A ∪ B, x ∈ X \ (A ∪ B).
Here is a more compressed way of writing this proof.
Take any x. Then
x ∈ X \ (A ∪ B) ⇔ x ∈ X and x ∈
/ (A ∪ B)
⇔ x ∈ X and x ∈
/ A and x ∈
/B
⇔ x ∈ (X \ A) and x ∈ (X \ B)
⇔ x ∈ (X \ A) ∩ (X \ B).
Again either proof is acceptable; again for the second one you have to be sure
that all the steps really are reversible.
The University of Sydney
MATH 1004
Second Semester
Discrete Mathematics
2012
Tutorial 3 Week 4
1.
Define f : N → N by f (x) = x + 1. Determine whether or not f is
(a)
one-to-one;
(b)
onto.
Solution.
2.
(a)
If x 6= y, then clearly x + 1 6= y + 1 so that f (x) 6= f (y). Hence f is
one-to-one.
(b)
Since x + 1 ≥ 1 for all x ∈ N, we see that there is no x ∈ N such that
f (x) = x + 1 = 0 and hence f is not onto.
Each of the following sets of pairs may or may not represent a function from
{1, 2, 3} to {a, b, c, d}.
{(1, d), (2, b), (3, d)},
{(1, c), (2, a), (3, b)},
{(1, a), (1, c), (3, d)},
(i )
{(1, a), (3, b)}
{(2, b), (3, c), (1, d)}
Identify the sets which represent functions and determine which of these
are one-to-one.
(ii ) Explain clearly why each of the sets does or does not represent a function.
(iii ) Explain clearly why each of the sets does or does not represent a one-toone function.
Solution.
(a)
The set {(1, d), (2, b), (3, d)} represents a function since each of the elements 1,2,3 appears exactly once as the first term of an ordered pair. It
is not one-to-one since d appears more than once as the second term of
an ordered pair.
(b)
The set {(1, c), (2, a), (3, b)} represents a function since each of the elements 1,2,3 appears exactly once as the first term of an ordered pair. It
is one-to-one since none of the elements a,b,c,d appear more than once as
second terms of ordered pairs.
(c)
The set {(1, a), (3, b)} does not represent a function on the set 1,2,3 since
2 does not appear as the first term of an ordered pair.
(d)
The set {(1, a), (1, c), (3, d)} does not represent a function since 1 appears
more than once as the first term of an ordered pair. (Also, 2 does not
appear as the first term of an ordered pair).
2
3.
(e)
The set {(2, b), (3, c), (1, d)} represents a function since each of 1,2,3 appears exactly once as the first term of an ordered pair. It is one-to-one
since none of a,b,c,d appear more than once as the second term of an
ordered pair.
(i )
Let A = {−1, 2, 3, 5, 7, 11} and let B = {1, 2, . . . , 200}. Is the function
f : A → B given by f (x) = x2 one-to-one?
(ii ) Now suppose that A = {−2, −1, 2, 3, 5, 7, 11} and B = {1, 2, . . . , 200}. Is
the function f : A → B given by f (x) = x2 one-to-one?
Solution.
(i )
It is easy to see that different elements in A are mapped to different
elements in B, so the given function f is one-to-one.
(ii ) Since f (−2) = f (2) = 4, it follows that the given function f is not oneto-one.
4.
Use arrow diagrams to write down all the functions from the set {1, 2} to the
set {a, b, c}. How many are there? How many one-to-one functions and how
many onto functions?
Solution.
The 32 = 9 functions are
1
a
1
a
1
a
2
b
c
2
b
c
2
b
c
1
a
1
a
1
a
2
b
c
2
b
c
2
b
c
1
a
1
a
1
a
2
b
c
2
b
c
2
b
c
There are 6 one-to-one functions. Since there are more elements in the second
set, there are no onto functions.
3
5.
Let A = {1, 2, 3} and B = {a, b, c}. Write down all the one-to-one correspondences between A and B.
Solution.
The six one-to-one correspondences between A and B are
a
1
2
3
b
c
A
1
2
3
A
6.
B
a
1
2
3
b
c
A
a
b
c
B
1
2
3
A
B
1
2
3
A
a
b
c
B
1
2
3
A
a
b
c
B
a
b
c
B
For each of the following functions, determine whether it is one-to-one and/or
onto.
(i )
f : Z → Z given by f (x) = x2 .
(ii ) f : N → Z given by f (x) = x2 .
(iii ) f : N → N given by f (x) = x2 .
(iv ) f : R → R given by f (x) = x2 .
(v )
f : R+ → R given by f (x) = x2 .
(vi ) f : R+ → R+ given by f (x) = x2 .
In this question R+ = {x ∈ R | x > 0}.
Solution.
(i )
f is not one-to-one since f (1) = f (−1) = 1. f is not onto since f (x) = x2
is always positive and so for −1 ∈ Z, there is no x ∈ Z with f (x) = −1.
(ii ) If f (x) = f (y) for x, y ∈ N, then x2 = y 2 and so x = y since both
x, y ∈ N. Hence f is one-to-one. f is not onto since f (x) = x2 is always
positive and so for −1 ∈ Z, there is no x ∈ N with f (x) = −1.
(iii ) Again f is one-to-one. But f is not onto, since for 2 ∈ N, there is no
x ∈ N such that f (x) = x2 = 2.
(iv ) f is not one-to-one since f (1) = f (−1) = 1. f is not onto since f (x) = x2
is always positive and so for −1 ∈ R, there is no x ∈ R with f (x) = −1.
(v )
If f (x) = f (y) for x, y ∈ R+ , then x2 = y 2 and so x = y since both
x, y are positive. Hence f is one-to-one. f is not onto since f (x) = x2 is
always positive and so for −1 ∈ R, there is no x ∈ R+ with f (x) = −1.
4
(vi ) Again f is one-to-one. For any y ∈ R+ , we see that x =
√
that f (x) = ( y)2 = y. Hence f is onto.
√
y is in R+ and
The University of Sydney
MATH 1004
Second Semester
Discrete Mathematics
2012
Problem Set 3
1.
Let A = {a, b, c} and B = {1, 2, 3, 4}. Which of the following arrow diagrams
determine functions from A to B? Which of them determine a one-to-one
functions?
1
2
3
4
a
b
c
1
2
3
4
a
b
c
(i)
(ii)
1
2
3
4
a
b
c
(iii)
1
2
3
4
a
b
c
(iv)
Solution.
(i )
The arrow diagram does not determine a function, since the element a in
A is not assigned (or sent) to a unique element in B, (i.e., there are two
arrows coming out of a, one pointing to 1 and the other to 3).
(ii ) The arrow diagram determine a function from A to B and since distinct
elements in A are mapped to distinct elements in B, the function is oneto-one.
(iii ) The arrow diagram determine a function from A to B. Since both b and
c are mapped to the same element 3, (i.e., the arrows coming out of b and
c have the same end points 3), the function is not one-to-one.
(iv ) The arrow diagram does not determine a function, since there is an element c in A which is not assigned (or sent) to any element in B, (i.e.,
there is no arrow coming out of c).
2.
(i )
Use arrow diagrams to write down all the functions from the set {1, 2}
to {a, b}.
(ii ) Let A = {1, 2, 3, 4} and B = {a, b, c}. Let f : A → B be the function
given by the 4-tuple (b, a, c, a). Draw the arrow diagram of f . Is f
injective? Is f surjective?
(iii ) Let A = {a, b, c} and B = {1, 2, 3}. Does the following set of pairs
F = {(a, 2), (b, 1), (c, 2)}
represent a function g from A to B.
If so, is g injective? Is g surjective?
Solution.
(i ) The functions are:
6
(ii ) The arrow diagram is as shown:
1
2
3
4
a
b
c
Since 2 and 4 are assigned to the same element a in B, f is not injective.
Since each element in B is assigned to some element in A, f is surjective.
(iii ) Since each element in A appears once in F , F represents a function g
from A to B. Since 2 appears twice in F , g is not injective. Since 3 does
not appear in F , g is not surjective.
OR: The arrow diagram is as shown:
a
1
2
3
b
c
Since a and c are mapped to the same element 2 in B, g is not injective.
Since there is no arrow ending at 3, g is not surjective.
3.
Let A = {0, 1, 2, 3} and B = {0, 1, 2, 3, 4, 5}, and consider the function f : A →
B with rule f (x) = x2 − 4x + 4 for all x ∈ A.
(i )
Draw an arrow diagram to represent f . Write f as a set of ordered pairs
of integers.
(ii ) Is f injective? Give reasons.
(iii ) Find the image of f . Is f surjective? Give reasons.
(iv ) Find a set C such that with the same domain A,
f : A → C, f (x) = x2 − 4x + 4
is surjective.
A
Solution.
(i )
We see that f (0) = 4, f (1) = 1,
f (2) = 0, f (3) = 1.
The arrow diagram is as shown:
0
1
2
3
B
0
1
2
3
4
5
7
f as a set of ordered paired of integers:
f = {(0, 4), (1, 1), (2, 0), (3, 1)}.
(ii ) The function is not injective since f (1) = f (3); that is, distinct elements
of A do not map to distinct elements of B.
(iii ) The image of f is {0, 1, 4}. The function is not surjective since there is
no element of A which maps to 2 (or 3 or 5).
(iv ) If C = {0, 1, 4} then f : A → C with the rule f (x) = x2 − 4x + 4 will be
surjective, since 0 = f (2), 1 = f (1), 4 = f (0).
4.
Use arrow diagrams to write down all the functions from the set {1, 2, 3, 4} to
the set {a, b}. How many are there? How many one-to-one functions and how
many onto functions?
Solution.
The 24 = 16 functions are:
1
2
3
4
a
1
2
3
4
a
1
2
3
4
a
1
2
3
4
a
b
b
b
b
1
2
3
4
a
1
2
3
4
a
1
2
3
4
a
1
2
3
4
a
b
b
b
b
1
2
3
4
a
1
2
3
4
a
1
2
3
4
a
1
2
3
4
a
b
b
b
b
1
2
3
4
a
1
2
3
4
a
1
2
3
4
a
1
2
3
4
a
b
b
b
b
There are 14 onto functions. Since there are more elements in the first set,
there is no one-to-one function.
The University of Sydney
MATH 1004
Second Semester
Discrete Mathematics
2012
Tutorial 4 Week 5
1.
(i )
If A = {1, 2} and B = {a, b, c}, write down the set A × B.
(ii ) For A = {1, 2, 3, 4}, write down the subset of A × A consisting of all those
ordered pairs (x, y) such that x ≤ y.
(iii ) For A as above, let D be the subset of A×A consisting of all ordered pairs
(x, y) such that x = y. What is |D|? Find a one-to-one correspondence
between D and A.
Solution.
(i )
We have A × B = {(1, a), (1, b), (1, c), (2, a), (2, b), (2, c)}
(ii ) The subset of A × A consisting of all ordered pairs (x, y) such that x ≤ y
is {(1, 1), (1, 2), (1, 3), (1, 4), (2, 2), (2, 3), (2, 4), (3, 3), (3, 4), (4, 4)}.
(iii ) We have D = {(1, 1), (2, 2), (3, 3), (4, 4)} and |D| = 4. One of the one-toone correspondences between D and A is given by
(1, 1) ←→ 1, (2, 2) ←→ 2, (3, 3) ←→ 3, (4, 4) ←→ 4.
Note that there are 23 other one-to-one correspondences between D and
A.
2.
(i )
How many strings of three upper case letters are there?
(ii ) How many strings of three upper case letters and digits are there?
(iii ) How many strings of three upper case letters and digits are there in which
the first character is a letter?
Solution.
(i )
Since there are 26 upper case letters, the number of strings of three upper
case letters is 26 × 26 × 26 = 17576.
(ii ) There are altogether 36 upper case letters and digits. Thus the number
of strings of three upper case letters and digits is 36 × 36 × 36 = 46656.
(iii ) Since the first character of the strings is a letter, there are 26 ways of
choosing the first character. There are 36 ways of choosing the second
character and 36 ways of choosing the third character. Hence the number
of strings of three upper case letters and digits, in which the first character
is a letter, is 26 × 36 × 36 = 33696.
2
3.
Given an alphabet of 20 consonants and 6 vowels.
(i )
In how many ways can we select a consonant and then a vowel?
(ii ) In how many ways can we make a two-letter string consisting of one
consonant and one vowel?
Solution.
(i ) The number of ways of choosing a consonant from 20 consonants is 20
and the number of ways of choosing a vowel from 6 vowels is 6. Hence the
number of ways of selecting a consonant and then a vowel is 20 × 6 = 120.
(ii ) The number of ways of making a two-letter word consisting of one consonant and one vowel is 20 × 6 + 6 × 20 = 240.
4.
In a town of 18,000 people everyone has three initials. Must there be two people
with the same initials?
Solution.
The number of ways of getting three initials is 26 × 26 × 26 = 17576. Since
there are 18,000 people, there must be two people with the same initials.
5.
(i )
How many strings of four digits are there if 0 is never used?
(ii ) How many six digit numbers are there which do not repeat a digit and
do not begin with 0?
(iii ) How many strings of length 3 start with 2 digits and end with one of the
26 capital letters of the alphabet?
Solution.
(i )
Since 0 is never used, we see that there are 9 ways to choose each digit.
Hence the number of strings of four digits, if 0 is never used, is 94 = 6561.
(ii ) Since the digits do not begin with 0, there are 9 ways of choosing the first
digit of the six digit numbers. Since the numbers do not repeat a digit,
there are 9 ways of choosing the second digit and then 8 ways of choosing
the third, 7 ways the fourth, 6 ways the fifth and 5 ways the last digit.
Hence the total number of six digit numbers, which do not repeat a digit
and do not begin with 0, is 9 × 9 × 8 × 7 × 6 × 5 = 136080.
(iii ) There are 10 ways to choose the first digit and second digit, and there
are 26 ways of choosing the capital letter. Hence the number of strings of
length 3 start with 2 digits and one capital letter is 10 × 10 × 26 = 2600.
3
6.
(i )
How many four digit numbers greater than 1000 can be formed using the
digits 0, 1, 2, 3 and 4?
(ii ) How many four digit numbers greater than 1000, with no repeated digit,
can be formed using the digits 0, 1, 2, 3 and 4?
Solution.
(i ) Since the number is greater than 1000, there are 4 ways to choose the first
digit. Since the digits can be repeated, there are 5 ways to choose the
second digit, the third digit and the fourth digit. Thus the number of four
digit numbers greater than or equal to 1000 is 4 × 5 × 5 × 5 = 500. Hence
the number of four digit numbers greater than 1000 is 500 − 1 = 499.
(ii ) Since the number is greater than 1000, there are 4 ways to choose the
first digit. Since the digits cannot be repeated, there are 4 ways to choose
for the second digit, then 3 ways for the third digit and 2 ways for the
fourth digit. Hence the number of four digit numbers greater than 1000,
with no repeated digit, is 4 × 4 × 3 × 2 = 96.
7.
Four people are about to have a snack and there are eleven types of cake
available. Each person chooses just one cake.
(i ) How many possibilities are there?
(ii ) How many possibilities are there if everyone has a different type of cake?
Solution.
(i ) Each person has 11 choices so that the number of possible ways is 114 .
(ii ) If everyone has a different type of cake, then the number of possible ways
is 11(4) = 11 × 10 × 9 × 8 = 7920.
The University of Sydney
MATH 1004
Second Semester
Discrete Mathematics
2012
Problem Set 4
1.
Suppose that there are 8 different kinds of doughnuts in a coffee shop.
(i )
In how many ways for 5 students, to each buy 1 doughnut?
(ii ) In how many ways for 5 students, to each buy 1 doughnut so that no two
students buy the same kind?
Solution.
(i )
Each student has 8 ways to buy a doughnut and so the number of ways
for 5 students, to each buy 1 doughnut is 85 = 32768 .
(ii ) The first student has 8 ways to buy a doughnut. Since no two students
buy the same doughnut, the second student has only 7 ways to buy a
doughnut and so on. Thus the number of ways for 5 students, to each
buy 1 doughnut so that no two students buy the same kind, is
8(5) = 8 × 7 × 6 × 5 × 4 = 6720 .
2.
(i )
How many 5-digit numbers, greater than 60000, can be formed from the
digits 2, 3, 4, 5, 6, 7, 8, 9?
(ii ) How many 5-digit numbers, greater than 60000, can be formed from the
digits 3, 4, 5, 6, 7, 8, 9, 0?
Solution.
(i ) There are 4 ways to choose for the first digit and 8 ways to choose for
each of the remainding digit and so the number of ways of forming such
5-digit numbers is 4 × 84 .
(ii ) There are 4 ways to choose for the first digit and 8 ways to choose for
each of the remainding digit and so the number of ways of forming such
5-digit numbers (including the number 60000) is 4 × 84 . Hence there are
4 × 84 − 1 5-digit numbers, greater than 60000, can be formed from the
given digits.
5
3.
(i )
In how many ways can we list 4 novels followed by 3 biographies if there
are 8 novels and 6 biographies from which to choose?
(ii ) How many 4-digit numbers greater than 7000 can be formed from the
digits 1 to 9?
Solution.
(i ) There are 8(4) ways to list the four novels and 6(3) ways to list the six
biographies. Hence the number of ways of listing four novels followed by
six biographies is 8(4) × 6(3) or 8 × 7 × 6 × 5 × 6 × 5 × 4 = 201600.
(ii ) Since the number is greater than 7000, there are 3 ways to choose for the
first digit. There are 9 ways to choose for the second, the third and the
fourth digit. Hence there are 3 × 93 4-digit numbers greater than 7000.
4.
(i )
How many strings of four digits are there (with repetition) if the first
digit is not 0?
(ii ) How many strings of four digits are there without repetition if the first
digit is not 0?
(iii ) In how many ways can 8 children be seated on a bench?
(iv ) In how many ways can 8 children be seated on a bench if three particular
children must sit together?
(v )
In how many ways can 8 children be seated on a bench if three particular
children must not sit together?
Solution.
(i )
Since the first digit is not 0, there are 9 ways to choose the first digit.
There are 10 ways to choose for the second, third and fourth digit. Hence
the number of strings of four digits, if the first digit is not 0, is
9 × 10 × 10 × 10 = 9000.
(ii ) Again there are 9 ways to choose the first digit. since the strings do not
repeat a digit, there are 9 ways to choose the second digit and then 8 ways
to choose the thid and 7 ways to choose the fourth. Hence the number
of strings of four digits without repetition, if the first digit is not 0, is
9 × 9(3) = 9 × 9 × 8 × 7 = 4536.
(iii ) Since there are 8 children, there are 8! = 40320 ways the children can be
seated on a bench.
(iv ) Think of the three particular children as one unit, and then there are 6
units to be seated. This can be done in 6! ways. But the three children
can be arranged in 3! ways in each of these 6! ways. Hence the answer is
3! × 6! = 4320.
(v )
There are 8! ways of arranging the children without restriction, and there
are 3! × 6! arrangements in which the three children are together (see (iv)
and (v)). Thus the required number is 8! − 3! × 6! = 50 × 6! = 36000.
6
5.
(i )
A restaurant has five entrées, seven main courses and ten desserts. In how
many ways can you select two dishes on the condition that they must not
both be from the same part of the menu?
(ii ) A dictionary consists of an alphabetical arrangement of all possible “words”
of 3 or fewer letters, using the 26 letters of the alphabet. (For example,
b,bz, cat, dog, xta ) The dictionary is in two volumes, A-M and N-Z. How
many words are there in the A-M volume?
(iii ) In how many ways can 8 children be seated on a bench if two particular
children must sit together?
(iv ) In how many ways can 8 children be seated on a bench if two particular
children must not sit together?
Solution.
(i )
The two dishes can be selected as follows: entrée, main course; entrée,
dessert; or main course, dessert.
There are 5 ways of choosing entrées, 7 ways of choosing main courses
and 10 ways of choosing desserts. Then there are 5 × 7 ways of choosing
an entrée and main course; 5 × 10 ways of choosing an entrée and dessert;
and 7 × 10 ways of choosing the a main course and dessert.
Hence the number of ways of selecting two dishes, on the condition that
they must not both be from the same part of the menu, is 35 + 50 + 70 =
155.
(ii ) There are 13 words of one letter in the A-M volume. Words of two letters
in this volume can be formed in 13 × 26 ways and words of three letters
can be formed in 13 × 262 ways. The total number of words is therefore
13(1 + 26 + 262 ) = 9139.
(iii ) Think of the two particular children as one unit, and then there are 7
units to be seated. This can be done in 7! ways. The two children can be
arranged in 2 ways in each of these 7! ways, so the answer is 2×7! = 10080.
(iv ) There are 8! ways of arranging the children without restriction, and there
are 2 × 7! arrangements in which the two children are together (see (iii)).
Therefore the required number is 8! − 2 × 7! = 6 × 7! = 30240.
The University of Sydney
MATH 1004
Second Semester
Discrete Mathematics
2012
Tutorial 5 Week 6
1.
You have a deck of fifty-two cards.
(i )
How many ways are there of choosing a hand of five cards?
(ii ) How many of them contain the queen of hearts?
(iii ) In how many ways can four hands of five cards each be given to four
players, if we care which hand goes to which player?
(iv ) In how many ways can four hands of five cards be selected from the deck?
(This time we don’t care which hand goes to which player.)
[Note that, as with all word problems, there is some chance of differing interpretations here. See the note on page ix of the text].
Solution.
52!
52
.
=
(i ) The number of ways of choosing a hand of five cards is
47! 5!
5
(ii ) If one of the five cards is the queen of hearts, then the problem is the
same as choosing 4 cards from 51. The answer is thus
51!
51
=
= 249900.
4
47! 4!
52
ways of giving the first hand of five cards to the first
(iii ) There are
5
47
ways of
player. Then there are 47 cards left so that there are
5
42
giving the second hand to the second player. Similarly, there are
5
37
ways of giving
ways of giving the third hand to the third player and
5
the fourth hand to the fourth player. Hence the number of ways that four
hands of five cards can be given to four players is
52!
52 47 42 37
=
.
32! 5! 5! 5! 5!
5
5
5
5
Alternatively, this can be written as a multinomial coefficient, where the
left-over cards (32 of
considered as belonging to a fifth hand.
them) are 52
.
The answer is then
5, 5, 5, 5, 32
2
(iv ) The difference between this and the previous part is that now we don’t
care which hand goes to which player. So what counts as 4! different ways
of distributing hands in part (iii ) only counts as one way here. Thus the
answer is that for part (iii ) divided by 4!, i.e.
52!
.
32! 5! 5! 5! 5! 4!
2.
Consider the set {a, b, c, d, e, f }. How many ways are there of choosing four
letters from this set
(i )
if no letter is chosen twice?
(ii ) if repetitions are allowed?
Solution.
(i ) If no letter is chosen twice,
the number of ways of choosing four letters
6
= 15.
from the given set is
4
(ii ) If repetitions are allowed,
number
of ways of choosing four letters
then the
9
4+6−1
= 126.
=
from the given set is
4
4
3.
(i )
How many different outcomes are possible if seven identical dice are
thrown? (An outcome is the collection of numbers, with repetition, visible
on the top faces of the dice.)
(ii ) Given a large supply of jelly beans of 10 different colours, how many ways
are there to make up a bag of 5 jelly beans?
Solution.
(i ) Since each die has six faces, we see that the number of possible outcomes
if seven identical dice are thrown, is
12!
12
7+6−1
=
=
= 792.
7
7
7! 5!
(ii ) The number of ways is
14!
14
5 + 10 − 1
= 2002.
=
=
5! 9!
5
5
4.
How many distinguishable arrangements are there of the letters in the words
(i )
imperseverant,
(iii ) indistinguishable,
(ii ) myristicivorous,
(iv ) sociological?
Solution.
(i )
Since there are 3 e’s, 2 r’s and 1 of each of the other 8 letters, the number
of distinguishable arrangements of the letters in the word imperseverant
13!
.
is
3! 2!
3
(ii ) Since there are 2 r’s, 3 i’s, 2 s’s, 2 o’s and 1 of each of the other 6 letters,
the number of distinguishable arrangements of the letters in the word
15!
.
myristicivorous is
2! 3! 2! 2!
(iii ) There are 4 i’s, 2 n’s, 2 s’s and 1 of each of the other 9 letters and so
the number of distinguishable arrangements of the letters in the word
17!
.
indistinguishable is
4! 2! 2!
(iv ) There are 1 s, 3 o’s, 2 c’s 2 i’s, 2 l’s, 1 g and 1 a so that the number
of distinguishable arrangements of the letters in the word sociological is
12!
.
3! 2! 2! 2!
Note: All of these answers can be
coefficients. For
written as multinomial
13
.
example, the answer to part (i ) is
3, 2, 1, 1, 1, 1, 1, 1, 1, 1
Note: “Imperseverant” does mean “not persevering”. It is in the big Oxford
dictionary (available online through the Uni Library), but there is only one
recorded mention of the word.
“Myristicivorous” is only doubtfully a word; very likely no-one has used it
seriously; it is supposed to mean “nutmeg-eating”. It is not in the big Oxford
dictionary. Search Google for myristicivorous Chambers for a comment on
this word.
5.
Suppose 20 people are divided into 6 different committees (labelled C1 to C6 ).
Suppose that committee C1 is to have 3 people, committee C2 is to have 4
people, committee C3 is to have 4 people, committee C4 is to have 2 people,
committee C5 is to have 3 people and committee C6 is to have 4 people. How
many arrangements are there?
Solution.
20!
The total number of arrangements is
=
3! 4! 4! 2! 3! 4!
6.
20
.
3, 4, 4, 2, 3, 4
In how many ways can 15 distinct balls be placed in 4 boxes so that the first
box contains 5 balls, the second box contains 3 balls, the third box contains 4
balls and the fourth box contains 3 balls?
Solution.
The total number of ways is
15
15!
3
7
10
15
.
=
=
5! 3! 4! 3!
5, 3, 4, 3
3
4
3
5
7.
Determine the coefficient of
(i )
x1 2 x2 x3 in (x1 + x2 + x3 )4
(ii ) x1 2 x2 3 x3 2 in (x1 + x2 + x3 )7 .
4
Solution.
(i )
The coefficient of x1 2 x2 x3 in the expansion of (x1 +x2 +x3 )4 is
4!
4
= 12.
=
2! 1! 1!
2, 1, 1
(ii ) The coefficient of x1 2 x2 3 x3 2 in the expansion of (x1 + x2 + x3 )7 is
7!
7
=
= 210.
2, 3, 2
2! 3! 2!
The University of Sydney
MATH 1004
Second Semester
Discrete Mathematics
2012
Problem Set 5
1.
(i )
How many words can be formed using all the letters of the word
ANTIDISESTABLISHMENTARIANISM ?
(ii ) How many of the words in (i) have all the I’s together?
(iii ) Find the coefficient of x1 2 x2 4 x3 3 x4 2 in the expansion of (x1+x2+x3+x4 )11 .
Solution.
(i )
There are 28 letters: 4 As, 3 Ns, 3 Ts, 5 Is, 4 Ss, 2 Es, 2 Ms and 1 of each
of D, B, L, H and R. The number of words is therefore
28!
.
4!3!3!5!4!2!2!
(ii ) If the I’s are together, we can treat them as one big letter, and so the
number of words is
24!
.
4!3!3!4!2!2!
(iii ) The coefficient is
11!
.
2!4!3!2!
Note: The answers can
coefficients. For example, the
be given as multinomial 28
.
answer for part (i ) is
4, 3, 3, 5, 4, 2, 2, 1, 1, 1, 1, 1
Note: “Antidisestablishmentarianism” was for a long time considered to be
the longest word actually used in English. It means a movement in England
against those who wished to disestablish the “Established Church” (the Church
of England). For other long words, see
http://www.askoxford.com/asktheexperts/faq/aboutwords/longestword
2.
Suppose that there are 8 different kinds of doughnuts in a coffee shop.
(i )
How many ways can you buy 5 doughnuts of different kinds?
(ii ) How many ways can you buy 5 doughnuts?
Solution.
(i ) Since there are 8 different kinds of doughnuts,
the number of ways you
8
= 56.
can buy 5 doughnuts of different kinds is
5
(ii ) This is choosing
5 things
8 types with repetition, and so the number
from
12
5+8−1
= 792.
=
of ways is
5
5
6
3.
(i )
In how many ways can we choose 4 novels and 3 biographies if there are
8 novels and 6 biographies from which to choose?
(ii ) How many ways are there to choose 12 coins from a large supply of 10
cents, 20 cents, 50 cents and 1 dollar coins?
(iii ) Find the coefficient of x1 2 x2 3 x3 x4 4 in the expansion of (x1+x2+x3+x4 )10
Solution.
6
8
ways of choosing
ways of choosing the 4 novels and
(i ) There are
3
4
the 3 biographies
andsothe number of ways of choosing 4 novels and 3
6
8
= 1400.
×
biographies is
3
4
(ii ) I am choosing 12 things from 4 types, with repetition. Hence the number
of ways is
15!
15
12 + 4 − 1
= 455.
=
=
12!3!
12
12
(iii ) The coefficient is
4.
(i )
10!
10
=
= 12600.
2, 3, 1, 4
2! 3! 1! 4!
How many ways can the letters of the word HULLABALOO be arranged?
(ii ) How many arrangements of the letters of HULLABALOO begin with U
and end with L?
(iii ) How many arrangements of the letters of HULLABALOO contain the two
letters HU next to each other in order?
(iv ) How many arrangements of the letters of HULLABALOO contain the two
letters HU next to each other (in either order)?
Solution.
(i )
Since there are 1 H, 1 U, 3 Ls, 2 As, 1 B and 2 Os, the number of ways is
10!
= 151200.
1! 1! 3! 2! 1! 2!
(ii ) Since the arrangements begin with U and end with L, there are 1 H,
2 Ls, 2 As, 1 B and 2 Os to be rearranged and so the number of such
arrangements is
8!
= 5040.
1! 2! 2! 1! 2!
(iii ) Since HU must be next to each other in order, we treat HU as 1 letter,
and so the number of such arrangements is
9!
= 15120.
1! 3! 2! 1! 2!
(iv ) Since HU must be next to each other, we treat HU or UH as 1 letter, and
so the number of such arrangements is
9!
= 30240.
2×
1! 3! 2! 1! 2!
7
5.
(i )
How many ways of arranging six a’s and ten b’s with no consecutive a’s?
(ii ) In how many ways can 8 identical pens be distributed among 4 students?
(iii ) In how many ways can 8 identical pens be distributed among 4 students
so that each student receives at least one pen?
(iv ) In how many ways can 8 identical pens and 10 identical pencils be distributed among 4 students?
(v ) In how many ways can 8 identical pens and 10 identical pencils be distributed among 4 students if each student receives at least 1 pen and 1
pencil?
(vi ) Twelve students are awaiting enrolment in some courses (each student
is to enrolled in just one course). If 3 of them are to be enrolled in
Mathematics, 4 in Computer Science and 5 in Physics, in how many ways
can the enrolment be made?
Solution.
(i ) We must separate a by b. Since there are 10 b’s, there are 11 positions
one can choose for the six a’s. Hence the number of possible ways is
11
= 462.
6
(ii ) This is equivalent to selecting among the students 8 times. So we are
selecting 8 times from 4 things with repetition. The answer is
11
11
8+4−1
= 165.
=
=
3
8
8
(iii ) Since each student receives at least one pen, let us begin by giving one
pen to each student. We then distribute the 4 remaining pens arbitrarily.
The answer is
7
4+4−1
= 35.
=
4
4
(iv ) Let us distribute the pens first and the pencils second. As above, we
8+4−1
=
see that the number of ways of distributing the pens is
8
11
and similarly the number of ways of distributing the pencils is
8
13
10 + 4 − 1
. Hence the number of ways that 8 pens and 10
=
10
10
pencils can be distributed among 4 students is
13
11
= 165 × 286 = 47190.
×
10
8
(v )
If each student receives at least 1 pen and 1 pencil, then the possible ways
is
9
7
6+4−1
4+4−1
= 35 × 84 = 2940.
×
=
×
6
4
6
4
8
12
ways of choosing 3 students for Mathematics. Then
(vi ) There are
3
9
ways of choosing 4 from the remaining 9 students for
there are
4
5
ways to choose the remaining
Computer Science and finally there is
5
5 for Physics. Hence the possible ways the enrolment can be made is
12!
5
9
12
= 27720.
=
×
×
3!4!5!
5
4
3
This is equal to the multinomial coefficient
12
.
3, 4, 5
The University of Sydney
MATH 1004
Second Semester
Discrete Mathematics
2012
Tutorial 6 Week 7
1.
If possible, compute |A∪B ∪C| from the given information. If it is not possible,
explain why.
(i )
|A| = 12, |B| = 13, |C| = 7, |A ∩ B| = 5, |A ∩ C| = 4, |B ∩ C| = 3 and
|A ∩ B ∩ C| = 2.
(ii ) |A| = 12, |B| = 13, |C| = 7, |A ∩ B| = 10, |A ∩ C| = 7, |B ∩ C| = 13 and
|A ∩ B ∩ C| = 2.
(iii ) |A| = 12, |B| = 13, |C| = 7, |A ∩ B| = 10, |A ∩ C| = 4, |B ∩ C| = 6 and
|A ∩ B ∩ C| = 2.
Solution.
(i )
A complete Venn diagram is as shown:
A
B
5
3
2
2
7
1
2
C
In this case, we see that it is possible to compute |A ∪ B ∪ C| and it is
given by
|A ∪ B ∪ C|
=|A| + |B| + |C| − |A ∩ B| − |A ∩ C| − |B ∩ C| + |A ∩ B ∩ C|
=12 + 13 + 7 − 5 − 4 − 3 + 2 = 22.
(ii ) Since |C| = 7, |B ∩ C| is at most equal to 7. But |B ∩ C| is given to be 13.
This contradiction shows that sets A, B, C as described in the question
do not exist. Thus it does not make sense to try to compute |A ∪ B ∪ C|.
2
(iii ) If you start to draw a Venn diagram you will eventually run into an
impossibibility. One approach gives the result shown.
A
B
0
8
2
2
?
4
?
C
The two question marks show impossibilities emerging. From the diagram
we can see that |B| ≥ 14, but |B| is given to be 13, which is a contradiction. (Similarly we can see that |C| ≥ 8, but |C| is given to be 7.) Thus
sets A, B, C as described in the question do not exist: it does not make
sense to try to compute |A ∪ B ∪ C|.
2.
You have 6 different apples and 3 different boxes. In how many ways can you
arrange the apples in the boxes so that each box contains at least one apple?
Hint: Let X be the set of all possible arrangements of the apples in the boxes
and let Ai be the set of arrangements for which the i-th box is empty. Use one
of the forms of the Inclusion-Exclusion Principle.
Solution.
Let X be the set of all possible arrangements of the apples in the boxes and
let Ai be the set of arrangements for which the i-th box is empty. Then
|X| = 36 = 729,
|A1 | = |A2 | = |A3 | = 26 = 64,
|A1 ∩ A2 | = |A1 ∩ A3 | = |A2 ∩ A3 | = 16 = 1,
|A1 ∩ A2 ∩ A3 | = 0.
Thus the total number of arrangements with at least one box empty is
|A1 ∪ A2 ∪ A3 | which is equal to
|A1 | + |A2 | + |A3 | − |A1 ∩ A2 | − |A1 ∩ A3 | − |A2 ∩ A3 | + |A1 ∩ A2 ∩ A3 |
=64 + 64 + 64 − 1 − 1 − 1 + 0 = 189.
Hence the number of ways to arrange the apples in the boxes so that each box
contains at least one apple is 729 − 189 = 540.
3
3.
In a group of 400 students, 300 are doing mathematics, 250 are doing physics
and 200 are doing chemistry. Furthermore, 210 are doing mathematics and
physics, 120 are doing mathematics and chemistry and 80 are doing physics
and chemistry. Only 40 are doing all three subjects. How many students are
not doing any of these subjects?
Solution.
Let M be the set of students doing mathematics, P the set of students doing physics and C the set of students doing chemistry. Then from the given
information, we see that |M | = 300, |P | = 250, |C| = 200, |M ∩ P | = 210,
|M ∩ C| = 120, |P ∩ C| = 80 and |M ∩ P ∩ C| = 40. Thus the number of students doing at least one of mathematics, physics and chemistry is |M ∪ P ∪ C|
which is equal to
|M | + |P | + |C| − |M ∩ P | − |M ∩ C| − |P ∩ C| + |M ∩ P ∩ C|
= 300 + 250 + 200 − 210 − 120 − 80 + 40 = 380.
Hence the number of students not doing any of these subjects is 400−380 = 20.
4.
In a group of 50 participants at a recent international meeting, 30 speak English,
18 speak German, 26 speak French, 9 speak both English and German, 16 speak
both English and French, 8 speak both French and German, and 47 speak at
least one of English, French or German.
(i )
How many people in the group cannot speak English, French or German?
(ii ) How many people in the group can speak all three languages?
Solution.
(i )
Since there are 50 participants and 47 can speak at least one of English,
French or German, we see that the number of people who cannot speak
English, French or German is 50 − 47 = 3.
(ii ) Let E be the set of the participants who speak English, G the set of those
who speak German and F the set of those who speak French. Then from
the information, we see that |E| = 30, |G| = 18, |F | = 26, |E ∩ G| = 9,
|E ∩F | = 16, |F ∩G| = 8 and |E ∪G∪F | = 47. We want to find |E ∩G∩F |.
Now
|E ∪ G ∪ F | = |E| + |G| + |F | − |E ∩ G| − |E ∩ F | − |G ∩ F | + |E ∩ G ∩ F |,
so that
47 = 30 + 18 + 26 − 9 − 16 − 8 + |E ∩ G ∩ F |.
Thus |E ∩ G ∩ F | = 6. Hence the number of people who can speak all
three languages is 6.
4
5.
How many numbers between 1 and 100 (inclusive) are divisible by at least one
of the numbers 3, 5 or 7?
Solution.
Let A be the set of all numbers between 1 and 100 that are divisible by 3, B
be the set of all numbers between 1 and 100 that are divisible by 5, and C be
the set of all numbers between 1 and 100 that are divisible by 7. Then
100
100
100
= 33, |B| =
= 20 and |C| =
= 14
|A| =
3
5
7
(where ⌊x⌋ is the greatest integer not exceeding x).
Now |A ∩ B| is the set of all numbers between 1 and 100 that are divisible by
3 and 5, i.e. by 15, and so
100
= 6.
|A ∩ B| =
15
Similarly, |A ∩ C| is the set of all numbers between 1 and 100 that are divisible
by 3 and 7, i.e. by 21, and so
100
|A ∩ C| =
= 4.
21
Also, |B ∩ C| is the set of all numbers between 1 and 100 that are divisible by
5 and 7, i.e. by 35, and so
100
= 2.
|B ∩ C| =
35
Moreover, |A ∩ B ∩ C| is the set of all numbers between 1 and 100 that are
divisible by 3, 5 and 7, i.e. by 105, and so
100
= 0.
|A ∩ B ∩ C| =
105
Hence the total number of numbers between 1 and 100 that are divisible by at
least one of the numbers 3, 5 or 7 is |A ∪ B ∪ C| which is equal to
|A| + |B| + |C| − |A ∩ B| − |A ∩ C| − |B ∩ C| + |A ∩ B ∩ C| = 55.
6.
Given A = {1, 2, 3, 4}. How many permutations f : A → A have the property
that f (i) = i for at least one value of i?
Solution.
For i = 1, 2, 3, 4, let Ai be the set of permutations f : A → A such that f (i) = i.
Then |Ai | = 3!, (i = 1, 2, 3, 4) |Ai ∩ Aj | = 2! for i < j, |Ai ∩ Aj ∩ Ak | = 1 for
i < j < k and |A1 ∩ A2 ∩ A3 ∩ A4 | = 1. Hence the number of permutations
f : A → A having the property that f (i) = i for at least one value of i is
|A1 ∪ A2 ∪ A3 ∪ A4 | which is equal to
4
X
i=1
|Ai | −
X
i<j
|Ai ∩ Aj | +
X
|Ai ∩ Aj ∩ Ak | − |A1 ∩ A2 ∩ A3 ∩ A4 |
i<j<k
= 4 × 3! − 6 × 2! + 4 × 1 − 1 = 15.
The University of Sydney
MATH 1004
Second Semester
Discrete Mathematics
2012
Problem Set 6
1.
(i )
In how many ways can three married couples be seated in a row of six
chairs?
(ii ) In how many ways can three married couples be seated in a row of six
chairs with at least one couple seated together?
(iii ) In how many ways can three married couples be seated in a row of six
chairs with no couple seated together?
Solution.
(i ) Let X be the set of all such arrangements. Then the number of ways is
|X| = 6! = 720.
(ii ) Let A1 be the subset of X consisting of those possible arrangements with
the first couple seated together, A2 the subsets of X consisting of those
possible arrangements with the second couple couple seated together and
A3 the subsets of X consisting of those possible arrangements with the
third couple seated together. Then A1 ∪ A2 ∪ A3 is the set of all the
arrangements with at least one couple seated together and so the number
of ways is |A1 ∪ A2 ∪ A3 |. Now
|A1 | = |A2 | = |A3 | = 5! × 2 = 240,
|A1 ∩ A2 | = |A1 ∩ A3 | = |A2 ∩ A3 | = 4! × 2 × 2 = 96,
|A1 ∩ A2 ∩ A3 | = 3! × 2 × 2 × 2 = 48.
Hence,
|A1 ∪ A2 ∪ A3 |
= |A1 | + |A2 | + |A3 | − |A1 ∩ A2 | − |A1 ∩ A3 | − |A2 ∩ A3 | + |A1 ∩ A2 ∩ A3 |
= 3 × 240 − 3 × 96 + 48 = 480.
Thus the number of ways is 480.
(iii ) The number of ways for three married couples be seated in a row of six
chairs with no couple seated together is
|X| − |A1 ∪ A2 ∪ A3 | = 720 − 480 = 240.
6
2.
Consider the letters in the word KANGAROON.
(i )
How many ways to rearrange the letters?
(ii ) How many ways to rearrange the letters so that the 2 A’s are together?
(iii ) How many ways to rearrange the letters so that at least one of the pairs
AA, NN and OO is together?
(iv ) How many ways to rearrange the letters so that none of the pairs AA,
NN and OO is together?
Solution.
(i ) There are 9 letters with 2 A’s, 2 N’s and 2 O’s. Hence the number of
ways of rearrangement of the letters is
9!
= 45360.
2!2!2!
NB: “Kangaroon” is not an English word; it appears to have been made
up by Dr Choo.
(ii ) If the two As are together, we treat them as one letter and so the number
of ways is
8!
= 10080.
2!2!
(iii ) Let A1 be the set of all the rearrangements with the As together, A2 be
the set of all the rearrangements with the Ns together, and A3 be the
set of all the rearrangements with the Os together. Then A1 ∩ A2 is the
set of all the rearrangements with the As together and the Ns together,
A1 ∩A3 is the set of all the rearrangements with the As together and the Os
together, A2 ∩A3 is the set of all the rearrangements with the Ns together
and the Os together, and A1 ∩ A2 ∩ A3 is the set of all the rearrangements
with the As together, the Ns together and the Os together. We see that
|A1 | = |A2 | = |A3 | = 10080,
|A1 ∩ A2 | = |A1 ∩ A3 | = |A2 ∩ A3 | =
7!
= 2520,
2!
|A1 ∩ A2 ∩ A3 | = 6! = 720.
Thus the number of ways with at least one of the pairs AA, NN and OO
together is |A1 ∪ A2 ∪ A3 | which is equal to
|A1 | + |A2 | + |A3 | − |A1 ∩ A2 | − |A1 ∩ A3 | − |A2 ∩ A3 | + |A1 ∩ A2 ∩ A3 |
=3 × 10080 − 3 × 2520 + 720 = 23400.
(iv ) It follows from above that the number of ways with none of the pairs AA,
NN and OO together is
45360 − 23400 = 21960.
7
3.
(i )
Among a group of 1500 students, 350 study Discrete Mathematics, 620
study Statistics and 870 study Calculus. If 120 study both Discrete Mathematics and Statistics, 200 study Discrete Mathematics and Calculus, 350
study Statistics and Calculus, and 50 study Discrete Mathematics, Statistics and Calculus, how many of these students are not studying Discrete
Mathematics, Statistics or Calculus?
(ii ) While taking a 6-week summer mathematics class, Alison frequently had
dinner with seven friends from her hometown. She ate dinner with each
friend (exactly) 15 times, every pair of friends 8 times, every set of three
friends 6 times, every set of four 5 times, every set of five 4 times, and
every set of six 3 times, but she never ate with all seven at once. On how
many days did Alison have dinner with none of these friends? (Count a
week as 7 days.)
Solution.
(i ) Let X be the set of all 1500 students. Let D, S and C be the subsets
of X consisting of the students who are studying Discrete Mathematics,
Statistics and Calculus respectively. Then the number of students who
are not studying Discrete Mathematics, Statistics or Calculus is
|X| − |D ∪ S ∪ C|.
Now, by the Principle of Inclusion and Exclusion,
|D ∪ S ∪ C| = |D| + |S| + |C| − |D ∩ S| − |D ∩ C| − |S ∩ C| + |D ∩ S ∩ C|
= 350 + 620 + 870 − 120 − 200 − 350 + 50
= 1220.
Hence 1500-1220=280 students are not studying Discrete Mathematics,
Statistics or Calculus.
(ii ) Alison spent 42 days with the summer mathematics class. The number
of days in which Alison had dinner with at least one of her friends is
7
7
7
7
7
7
×3
×4−
×5+
×6−
×8+
× 15 −
6
5
4
3
2
1
= 7 × 15 − 21 × 8 + 35 × 6 − 35 × 5 + 21 × 4 − 7 × 3 = 35.
Hence the number of days in which Alison had dinner with none of these
friends is 42 − 35 = 7.
8
4.
(i )
In a class of 800 students, 450 are doing Integral Calculus, 250 are doing
Discrete Mathematics and 143 are doing both subjects. How many are
not doing either subject?
(ii ) How many numbers between 1 and 250 are divisible by at least one of 3,
7 or 11?
Solution.
(i )
The number of students doing at least one of the two subjects is 450 +
250 − 143 = 557. Hence there are 800 − 557 = 243 students who are not
doing either of these subjects.
(ii ) Let A be the set of all numbers between 1 and 250 that are divisible by
3, B be the set of all numbers between 1 and 250 that are divisible by 7,
and C be the set of all numbers between 1 and 250 that are divisible by
11. Then
|A| = 83, |B| = 35 and |C| = 22.
Now |A ∩ B| is the set of all numbers between 1 and 250 that are divisible
by 3 and 7, i.e. by 21, and so |A ∩ B| = 11. Next, |A ∩ C| is the set of
all numbers between 1 and 250 that are divisible by 3 and 11, i.e. by 33,
and so |A ∩ C| = 7. Also, |B ∩ C| is the set of all numbers between 1
and 250 that are divisible by 7 and 11, i.e. by 77, and so |B ∩ C| = 3.
Moreover, |A ∩ B ∩ C| is the set of all numbers between 1 and 250 that
are divisible by 3, 7 and 11, i.e. by 231, and so |A ∩ B ∩ C| = 1. Hence
the total number of numbers between 1 and 250 that are divisible by at
least one of the numbers 3, 7 or 11 is |A ∪ B ∪ C| which is equal to
|A| + |B| + |C| − |A ∩ B| − |A ∩ C| − |B ∩ C| + |A ∩ B ∩ C| = 120.