Math 248 February 3, 2015 QUIZ SOLUTIONS QUIZ 1 (1) Let s be

Math 248
February 3, 2015
QUIZ SOLUTIONS
QUIZ 1
(1) Let s be the statement,
If you are president of the USA, then you are born in the USA.
(a) What is the converse of s?
Answer: If you are born in the USA, then you are
president of the USA.
(b) What is the contrapositive of s? Answer: If you are not born in the USA, then you
are not president of the USA.
(2) Complete the truth table below and explain why it shows that (p → q) ∨ (q → p) is a
tautology.
Answer:
p q p → q q → p (p → q) ∨ (q → p)
T T
T
T
T
T F
F
T
T
F T
T
F
T
F F
T
T
T
Since the last column contains only T, (p → q) ∨ (q → p) is a tautology.
(3) Fill in the reasons in the following proof of the tautology ((¬q) → (¬p)) ⇒ (p → q). Is the
proof reversible? Why or why not?
1.
2.
3.
4.
5.
Statement
Reason
(¬q) → (¬p)
given
¬(¬q) ∨ (¬p)
implication
q ∨ (¬p)
double negation
(¬p) ∨ q
commutivity
p→q
implication
Answer: The proof is reversible because only equivalence rules are used.
QUIZ 2
(1) In the domain of all students, define predicates
M (x) = “x is a math major”
C(x) = “x is a computer science major”
P (x) = “x is required to take Math 248”.
Write the following statements in symbols of predicate logic.
(a) All math majors are required to take Math 248. Answer: (∀x)(M (x) → P (x)).
(b) Only math majors are required to take Math 248. Answer: (∀x)(P (x) → M (x)).
(c) There are no students doing a math/computer science double major.
Answer: ¬(∃x)(M (x) ∧ C(x))
(2) In the domain of all integers, determine whether the following are true or false:
(a) (∀x)(∀y)(x + y is even) Answer: F
(b) (∀x)(∃y)(x + y is even) Answer: T
(c) (∃x)(∀y)(x + y is even) Answer: F
(3) Let a, b and c be integers. Prove that, if a divides b and a divides c, then a divides 7b − 2c.
Answer: Proof: Suppose that a divides b and a divides c. Then am = b and an = c for
some integers m and n. Then 7b − 2c = 7am − 2an = (7m − 2n)a, and, since 7m − 2n is an
integer, a divides 7b − 2c.
1
2
QUIZ 3
(1) Let A = {1, 2, 3, 4, 5}, B = {3, 4, 5, 6} and C = {1, 2, 3} be subsets of the universal set
U = {1, 2, 3, 4, 5, 6, 7, 8, 9}. True or False:
(a) A ∩ C ⊆ B Answer: F
(b) C × B ⊆ A × B Answer: T
(c) C ⊆ P(A) Answer: F
(d) P(B) ⊆ P(A) Answer: F
(e) B ∩ C ⊆ A Answer: T
(f) A ∩ C ⊆ B ∩ C Answer: F
(2) For the universal set U , the set of all students, let M be the set of all math students and let
S be the set of all smart students. Express the following using set notation.
(a) No math student is smart. Answer: M ∩ S = ∅ or M ⊆ S 0 or S ⊆ M 0
(b) Some smart students don’t study math. Answer: S ∩ M 0 6= ∅ or S 6⊆ M
(c) Only smart students study math. Answer: M ⊆ S
(d) Not all smart students study math. Answer: S ∩ M 0 6= ∅ or S 6⊆ M
QUIZ 4
Let f : N → N be defined by f (x) = x2 + 1 for all x ∈ N. Reminder: N = {1, 2, 3, . . . } is the set of
natural numbers.
(1) Is f injective (one-to-one)? Explain.
Answer: Yes, f is injective. Suppose that f (a) =
f (b) for some a, b ∈ N. Then a2 + 1 = b2 + 1, which implies that a2 = b2 . Since a and b are
positive, this implies a = b.
(2) Is f surjective (onto)? Explain.
that f (x) = 1.
Answer: No. Counterexample: There is no x ∈ N such
(3) Is f bijective (a one-to-one correspondence)? Explain.
tive.
Answer: No, since f is not surjec-