Midterm1 Sample Sol
Midterm1 Sample Sol
Midterm1 Sample Sol
Question 1 The symbol ⊕ denotes exclusive or, meaning that for any two statements p and q,
p ⊕ q is true if and only if exactly one of p and q is true.
Question 2 Given a statement p: “If compound X is boiling, then its temperature must be at
least 150o ”
b) Assuming p is true, is “If compound X is not boiling, then its temperature is less than 150o ”
true?
Solution: No (this is the inverse of p)
c) Assuming p is true, is “compound X’s temperature is at least 150o ” a sufficient condition for
compound X to boil?
Solution: No (this is the converse of p)
Question 3
Prove that the following argument is valid:
(1) ∼p∨q →r
(2) s∨ ∼ q
(3) ∼t
(4) p→t
(5) ∼ p ∧ r →∼ s
∴ ∼q
At each step of reasoning you need to provide the rule and line numbers that you use.
1
Solution:
Question 4
Write a negation of the following statement:
Question 5 Simplify the following statements as much as you can using the logical equivalences
studied in class.
a) ∼ [(∼ p →∼ (q →∼ r)) → (p ∨ r)]
Solution:
b) [(p → q) ∧ (q → r)] → (p → r)
2
Solution:
Question 6 Suppose that P and Q are predicates with the same domain. For each statement
below, indicate whether it is true or false. Justify your answers.
a) ∃xP (x) ∧ ∃x ∼ P (x) ≡ ∃x(P (x)∧ ∼ P (x))
Solution: This is false. For example, let domain of x be set of all integers and P (x) be x is even.
Then clearly the LHS is true (as there are both even and odd integers) but no integer is both even
and odd.
b) ∃x(P (x) →∼ Q(x)) ≡∼ ∀x(P (x) ∧ Q(x))
Solution: This is true:
∃x(P (x) →∼ Q(x)) ≡ ∃x(∼ P (x)∨ ∼ Q(x)) ≡ ∃x ∼ (P (x) ∧ Q(x)) ≡∼ ∀x(P (x) ∧ Q(x))
Question 7 Below are some English statements and some statements in formal logical notation.
The domain is the set of natural numbers, N = {0, 1, 2, . . .}. The predicates are defined as follows:
G(x, y) means x > y.
B(x, y, z) means x is between y and z, that is, either y < x < z or z < x < y.
Match each English statement with the statement in formal logic that most closely translates it.
E2 There are three (not necessarily distinct) natural numbers such that one is between the other
two.
E3 Every natural number other than zero is between two natural numbers.
E6 There is a natural number such that every other natural number is greater than it.
E7 There is a natural number that is greater than any natural number except itself.
3
E8 For every natural number, there is a natural number that is greater than it.
L1 ∀x ∃y G(y, x)
L2 ∀x ∃y G(x, y)
L3 ∃y ∀x G(y, x)
L4 ∃y ∀x (y 6= x → G(y, x))
L5 ∃x ∀y (y 6= x → G(y, x))
L6 ∀x ∃y ∃z B(x, y, z)
Solution:
E1 E2 E3 E4 E5 E6 E7 E8
L3 L8 L7 L2 L6 L5 L4 L1
Question 8 For each statement below, state whether it is true or false. Prove the statement
directly from the definitions if it is true, and give a counterexample if it is false.
c) For all integers a, b, and c, if a|b and a|c then a|(2b − 3c).
Solution: T, use the definition of divides to prove it (similar to part (a))