0% found this document useful (0 votes)
249 views

Discrete Mathematics (550.171) Exam I Solutions To Practice Problems

The document provides solutions to practice problems for a Discrete Mathematics exam. It covers topics like logical statements, set operations, partitions, and counting principles. For problem 13, it determines that if a set of size n is to be partitioned into a part of size 4 and the remaining elements, there are n4 ways to do this if n ≥ 4 and n ≠ 8, and 8C4 = 70 ways if n = 8.

Uploaded by

Ajamal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
249 views

Discrete Mathematics (550.171) Exam I Solutions To Practice Problems

The document provides solutions to practice problems for a Discrete Mathematics exam. It covers topics like logical statements, set operations, partitions, and counting principles. For problem 13, it determines that if a set of size n is to be partitioned into a part of size 4 and the remaining elements, there are n4 ways to do this if n ≥ 4 and n ≠ 8, and 8C4 = 70 ways if n = 8.

Uploaded by

Ajamal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Discrete Mathematics (550.

171) Exam I
Solutions to Practice Problems

1. Consider the true statement: If A then B.


(a) What is the contrapositive of this statement?
ANSWER: If not B then not A.
(b) What is the converse of this statement?
ANSWER: If B then A.
(c) Use truth tables to determine if the converse is equivalent to the original statement.
ANSWER: They are not logically equivalent
A
F
F
T
T

B
F
T
F
T

If A then B
Possible
Possible
Impossible
Possible

If B then A
Possible
Impossible
Possible
Possible

2. Let U = {2, 3, 5, 6, 8, 9} be the universe. Let


A = {x U : 3|x},

B = A,

C = {y U : 2|y}.

What is
(a) 2B ?
(b) B M C?
ANSWERS: A = {3, 6, 9}, B = {2, 5, 8}, C = {2, 6, 8}.
(a) 2B = {, {2}, {5}, {8}, {2, 5}, {2, 8}, {5, 8}, {2, 5, 8}}
(b) B M C = (B C) (C B) = {5} {6} = {5, 6}
3. Consider the following fragment of code (italicized text are comments)
a = 0
b = 0
for j = 1 to 50
if 2|j
a = a + 1
if 3|j

b = b + 1
end if (3|j)
end if (2|j)
end for
end
Let A and B be sets such that after the for loop has finished all of its iterations,
|A| = a and |A B| = b.
(a) Use set builder notation to describe A and B.
ANSWER: Let U = {x N : 1 x 50}. Then A = {x U : 2|x}, and
B = {x U : 3|x}.
(b) Use the inclusion-exclusion principle to determine |A B|.
ANSWER: Since half of the numbers U are even, a = |A| = 25. By similar
reasoning, since 3(16) = 48, |B| = 16. Since |A B| = {x U : 6|x}, |A B| = 8.
|A B| = |A| + |B| |A B| = 25 + 16 8 = 33.
4. How many 3-digit numbers can be formed by using the six digits {1, 2, 3, 4, 5, 6} if
(a) repetitions of digits are allowed;
ANSWER: By the multiplication principle since there are 6 choices for each
digit, the answer is 63 .
(b) the number is to be odd and repetitions are NOT allowed;
ANSWER: Again we use the multiplication principle. Can pick the ones digit in
3 ways. Once that number is selected, there are 5 choices for the hundreds digit
and 4 choices for the tens digit (or vice versa). Total is 5 4 3 = 60.
(c) the number must contain the digit 2 and repetitions are allowed?
ANSWER: If 2 first appears (reading left to right) in the hundreds place then
there are 62 ways to complete the number. If 2 first appears (reading left to right)
in the tens place then there are 5 choices for the hundreds digit and 6 choices for
the ones digit. If 2 first appears (reading left to right) in the ones place then there
are 52 choices for the first two digits. Summing we have: 62 + 5(6) + 52 possible
numbers.
5. Let n N. Prove that n4 n2 is divisible by 3. Hint: There are 3 cases to consider;
n = 3k + 1 (where k Z) is one of them.
First observe that
n4 n2 = n2 (n2 1) = n2 (n 1)(n + 1).

Let n be a natural number. Then the remainder when n is divided by 3 is either 0, 1,


or 2. Thus there are three cases to consider.
Remainder is 0. Then k Z such that n = 3k. Thus
n4 n2 = (3k)2 ((3k) 1)((3k) + 1) = 3[3k 2 ((3k) 1)((3k) + 1)] = 3p,
where p Z. Thus 3|(n4 n2 ).
Remainder is 1. Then k Z such that n = 3k + 1. Thus
n4 n2 = (3k + 1)2 (3k)((3k + 1) + 1) = 3q,
where q Z. Thus 3|(n4 n2 ).
Remainder is 2. Then k Z such that n = 3k + 2. Thus
n4 n2 = (3k + 2)2 ((3k + 2) 1)((3k + 2) + 1) = 3(k + 1)(3k + 2)2 (3k + 1) = 3r,
where r Z. Thus 3|(n4 n2 ).
= . (Do NOT use proof
6. Let A and B be sets. Prove that A B if and only if A B
by picture.)
So
ANSWER: Suppose A B and let x A. Then x B which means x 6 B.

A B = .
= . Let y A. Then y 6 B
so y B. Thus A B.
Now suppose A B
7. Let A, B, and C be sets. Prove
A (B C) = (A B) (A C).
ANSWER: Let y = (a, b) A (B C). Then a A and b (B C). Thus b B
and b C so (a, b) A B and (a, b) A C. Thus y (A B) (A C).
Now suppose y = (a, b) (AB)(AC). Then (a, b) (AB) and (a, b) (AC).
So a A and b B C. Thus y = (a, b) A (B C).
8. Let A be a set of nonzero integers and let be the relation on A A defined by
(a, b) (c, d) whenever a + d = b + c.
Prove that is an equivalence relation.
ANSWER: We need to show that is reflexive, symmetric, and transitive.
Reflexive. Let x = (a, b) be an element of A A. Since a + b = b + a, x x.

Symmetric. Let x = (a, b) and y = (c, d) be elements of A A. Suppose x y.


Then a + d = b + c. But this means c + b = d + a. Thus y x.
Transitive. Let x = (a, b), y = (c, d), z = (e, f ) be elements of A A and suppose
x y and y z. Then a + d = b + c so c = a + d b. But c + f = d + e so
a + d b + f = d + e. Thus a + f = b + e, which means x z.
9. Let R = {(x, y) : N N : x y}. Show that R is a partial order relation on N.
ANSWER: We need to show that R is reflexive, antisymmetric, and transitive.
Reflexive. Let x N. Since x x, (x, x) R. Thus R is reflexive.
Antisymmetric. Let x, y N and suppose (x, y) R and (y, x) R. Then x y
and y x. Thus x = y and R is antisymmetric.
Transitive. Let x, y, z N and suppose (x, y) R and (y, z) R. Then x y
and y z. Thus x z and R is transitive.

10. Let A and B be sets. Prove that A = B if and only if A = B.


ANSWER: First suppose A = B.
Then x
and A B.

Let x A.
/ A so x
/ B. Thus x B
Then x
A.

Let x B.
/ B so x
/ A. Thus x A and B

We conclude A = B.

Now suppose A = B.
Thus x B and A B.
Let x A. Then x
/ A so x
/ B.
so x
Thus x A and B A.
Let x B. Then x
/B
/ A.
We conclude A = B.
11. Let A = {1, 2, 3} and let B = {4, 5}. Let R = (A A) (B B).
(a) Prove that R is an equivalence relation on A B.
ANSWER: Since A and B are small we can write out the elements of R:
R = {(1, 1), (1, 2), (1, 3), (2, 1), (2, 2), (2, 3), (3, 1), (3, 2), (3, 3), (4, 4), (4, 5), (5, 4)(5, 5)}
and the elements of A B:
A B = {1, 2, 3, 4, 5}
We need to show R is reflexive, symmetric, and transitive.

Reflexive. Let x A B. If x A then (x, x) A A so (x, x) R. If


x B then (x, x) B B so (x, x) R. Thus R is reflexive.
Symmetric. Let x, y A B and suppose (x, y) R. Since A and B are
disjoint there are only two cases to consider.
Case I: (x, y) A A. This means x, y A so (y, x) A A. Thus
(y, x) R.
Case II: (x, y) B B. This means x, y B so (y, x) B B. Thus
(y, x) R.
Thus, R is symmetric.
Transitive. Let x, y, z A B and suppose (x, y), (y, z) R. There are two
cases to consider:
Case I: (x, y) and (y, z) are both in A A or both in B B. If they are
both in A A then x, y, z A so (x, z) A A which means (x, z) R.
If they are both in B B then x, y, z B so (x, z) B B which means
(x, z) R.
Case II: (x, y) and (y, z) are not both in A A (or not both in B B).
WLOG assume (x, y) A A and (y, z) B B. Then x, y A and
y, z B. This is impossible since A B = . Thus, Case II cannot occur.
We conclude R is transitive.
(b) Find the equivalence classes of R.
ANSWER: We have
[1] = {1, 2, 3} = [2] = [3]
[4] = {4, 5} = [5]
12. Let P be a partition of set S. Let a, b S. Let Pa and Pb be parts of P such that
a Pa and b Pb .
(a) If b Pa , determine Pa Pb .
ANSWER: Since b Pb and b Pa , Pa Pb 6= . Since distinct parts of a
partition must be pairwise disjoint, it must be the case that Pa = Pb . That is
Pa Pb = Pa = Pb .
(b) If b
/ Pa , determine Pa Pb .
ANSWER: Since distinct parts of a partition must be pairwise disjoint, it must
be the case that Pa Pb = .
13. Let n N. In how many ways can we partition an n-element set into two parts if one
of the parts must have exactly 4 elements and the other part contains all the remaining
elements?

ANSWER: We create the partition as follows: first determine the four elements to
put in the first part; next, place all the remaining elements into the second part.
If n < 4, no partitions can be formed to meet the requirements.

If n 4 and n 6= 8, then there are n4 possible partitions.

If n = 8, then there are 21 84 possible partitions. (To see why this is the case,
observe that 84 counts all subsets of size 4. Thus {{1, 2, 3, 4}, {5, 6, 7, 8}} and
{{5, 6, 7, 8}, {1, 2, 3, 4}} would be considered as different partitions when in fact
they are not.)

You might also like