Beruflich Dokumente
Kultur Dokumente
Midterm
Antoine Vigneron
April 28, 2016
1. Let p be the proposition I will do every exercise in this book and q be the proposition I
will get an A in this course. Express each of these as a combination of p and q using logical
operators.
(a) I will get an A in this course only if I do every exercise in this book.
(b) I will get an A in this course and I will do every exercise in this book.
(c) Either I will not get an A in this course or I will not do every exercise in this book.
(d) For me to get an A in this course it is necessary and sufficient that I do every exercise in
this book.
Answer.
(a) q p
(b) p q
(c) p q. Other possible answers: p q, p q
(d) p q
2. Are (p q) r and (p q) r logically equivalent? Prove your answer using a truth
table.
Answer.
p
T
T
T
T
F
F
F
F
q
T
T
F
F
T
T
F
F
r p q (p q) r p q (p q) r
T
T
T
T
T
F
T
F
T
F
T
F
T
F
T
F
F
T
F
T
T
T
T
F
T
F
T
F
F
T
T
T
T
F
T
F
T
F
F
T
As the 5th and the 7th column are not identical, these two compound propositions are not
logically equivalent.
1
3. Express the negations of each of these statements so that all negation symbols immediately
precede predicates.
(a) yxP (x, y)
(b) y(Q(y) xR(x, y))
(c) y(xzT (x, y, z) xzU (x, y, z))
Answer.
yxP (x, y) yxP (x, y)
(a)
yxP (x, y)
(b) y(Q(y) xR(x, y)) y(Q(y) xR(x, y))
y(Q(y) xR(x, y))
y(Q(y) xR(x, y))
(c) y(xzT (x, y, z) xzU (x, y, z)) y(xzT (x, y, z) xzU (x, y, z))
y(xzT (x, y, z) xzU (x, y, z))
y(xzT (x, y, z) xzU (x, y, z))
4.
Answer.
U
B
C
5.
(a) (A B) (B A) = A.
(b) A (B C) = (A B) (A C).
(c) A (B C) = (A B) C.
x is irrational.
Answer. Assume that x is irrational and x > 0. For sake of contradiction, suppose that x
is rational. Then there exist integers p, q such that q 6= 0 and x = p/q. Therefore, x = p2 /q 2 .
Since p2 Z, q 2 Z, and q 2 6= 0, the number x is rational, contradicting our assumption that
it is irrational.
8.
Answer.
If n is even, then n = 2k for some integer k, so the left-hand side is bn/2c dn/2e =
bkc dke = k 2 and the right-hand side is bn2 /4c = b4k 2 /4c = k 2 .
If n is odd, then n = 2k + 1 for some integer k, so the left-hand side is bn/2c dn/2e =
bk + 21 c dk + 12 e = k(k + 1) and the right-hand side is
1
4k 2 + 4k + 1
= k(k + 1) +
= k(k + 1).
bn /4c =
4
4
9. Find a P
closed form of Un =
the symbol
does not appear.)
Answer.
Un =
n
X
k=1
10.
n
X
k=1
Pn
k=1 k
(k 1) =
n
X
k=1
n1
X
k =
k=0
n
X
k=1
n1
X
k 2 = n2
k=1
Find gcd(1104, 816) using the Euclidean algorithm. Show the details of your calculations.