Homework Logic
Homework Logic
Answers will be available soon, but it is very important to first try the exercises
yourself for quite some time!
1. Translate the following reasonings to the language of proposition logic and check using a
truth table whether they are logically correct:
(a) If John is ill, he does not go to class.
John is not ill.
Therefore: John goes to class.
(b) Pete passes the exam, and Quirine or Rick pass (or they both pass).
Therefore: Pete and Quirine pass, or Pete and Rick pass (or they all pass).
2. Check using the truth table of p → q whether the following reasonings are logically correct.
(a) If p and (p → q), then q
(b) If (p → q) and ¬p, then ¬q
(c) If (p → q) and ¬q, then ¬p
4. Give a truth table for p → (p ∨ q) (use 4 columns, of which 1 auxiliary column for p ∨ q)
7. Suppose that we create a new operator “#” with the following truth table
p q p#q
0 0 1
0 1 1
1 0 0
1 1 0
(a) Write this operator in terms of p and q, only using the logical operators ∨, ∧, and ¬.
(List all cases with “ones”)
(b) Can you write it even easier?
(Look carefully at the structure of the zeros and ones.)
1
8. We want to provide a logical formula that yields the following truth table:
p q r ???
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 0
1 1 1 1
(a) Give a formula only using ∨, ∧, and ¬.
(b) Give a formula only using ∧ and →.
9. We have seen in class that we can write every logical operator using only ∨, ∧, and ¬.
Is this also possible using only ¬, →, and ∧ ?
10. Write in conjunctive and disjunctive normal form (CNF and DNF):
(work according to the step-by-step plan)
(a) p ↔ q
(b) (p ∨ q) ∧ (r ∨ s)
(c) ¬((p → q) ∧ (¬r))
(d) p ∨ q ∨ (¬r)
11. Show by means of a truth table that the following propositions are tautologies:
(a) (p ∧ q) ∨ ¬q ↔ (p ∨ ¬q)
(b) (p ∨ q) ∧ ¬q ↔ (p ∧ ¬q)
(c) ((p → p) → p) → p
12. Prove or disprove that the following propositions are tautologies (i.e. hold for all truth
values of p and q)
(a) p → (q → p)
(b) ((p → q) ∧ ¬p) → ¬q
(c) ((p → q) ∧ ¬q) → ¬p
(d) ¬(p ∨ q) ↔ (¬p ∧ ¬q)
(e) ¬(p ∧ q) ↔ (¬p ∨ ¬q)
(f ) ¬(p → q) ↔ (p ∧ ¬q)
2
13. True or false? Show it, or provide a counterexample:
(a) ∀x ∈ R ∃y ∈ R x+y =0
(b) ∀x ∈ N ∃y ∈ N x+y =0
(c) ∀x ∈ N ∃y ∈ R y2 = x
(d) ∀x ∈ N ∃y ∈ Q y 2 = x
(e) ∃x ∈ Z ∀y ∈ Z x · y = y
(f ) ∃x ∈ R ∀y ∈ R x+y =y
14. Refute the following formulas by giving counterexamples, that is, choose suitable properties
and relations such that the interpreted formula is false.
(a) ∃x ∀y ϕ(x, y) ↔ ∀y ∃x ϕ(x, y)
(b) (∃x ϕ(x) ∧ ∃y ψ(y)) → ∃x (ϕ(x) ∧ ψ(x))
(c) ∀x ∃y ϕ(x, y) → ∃z ϕ(z, z)
3
(q) The smallest true divisor of n is 7 (NB: this means a divisor > 1 and < n)
Predicates: a | b, <, =.
18. Translate from Latin, and explain using the truth table of p → q:
“Ex vero nisi verum, ex falso sequitur quodlibet”.
19. If John walks, Pete bikes; and if Pete bikes, John walks. Who arrives home first?