You are on page 1of 9

EECS 203: Discrete Mathematics

Fall 2019
Discussion 1 Notes
1 Definitions
• Proposition:

• Converse:

• Contrapositive:

• Inverse:

• Tautology:

• Contradiction:

• Satisfiable:

• Consistent System:

• Logically equivalent (≡):

Solution:

• Proposition: declarative statement (a sentence that declares a fact) that is either


true or false, but not both.

• Converse: The converse of p → q is the proposition q → p.


An implication and its converse can have different truth values.

• Contrapositive: The contrapositive of p → q is the proposition ¬q → ¬p.


An implication and its contrapositive are logically equivalent; they always have the
same truth value.

• Inverse: The proposition ¬p → ¬q is called the inverse of p → q.


An implication and its inverse can have different truth values.

• Tautology: A compound proposition that is always true, no matter what the truth
values of the propositional variables that occur in it.

1
• Contradiction: A compound proposition that is always false.

• Satisfiable: A compound proposition is satisfiable if there exists an assignment of


truth values that make it true.

• Consistent System: System specifications do not contain conflicting require-


ments that could be used to derive a contradiction.

• Logically equivalent (≡): Compound propositions that have the same truth
values in all possible cases (i.e. they have the same truth table) are logically
equivalent.

2 Exercises
1. Exercise 1.1.2
Which of these are propositions? What are the truth values of those that are propositions?

a) Do not pass go.

b) What time is it?

c) There are no black flies in Maine.

d) 4 + x = 5

e) The moon is made of green cheese.

f) 2n ≥ 100

Solution:

a) This is not a proposition; its a command.

b) This is not a proposition; its a question.

c) This is a proposition that is false, as anyone who has been to Maine knows.

d) This is not a proposition; its truth value depends on the value of x.

e) This is a proposition that is false.

f) This is not a proposition; its truth value depends on the value of n.

2
2. Conditional statement and English statement
Express the conditional statement p → q in the following form:

a) If , then .

b) only if .

c) unless .

d) whenever .

Solution:

a) If p, then q.

b) p only if q.

c) q unless ¬p.

d) q whenever p.

3. Exercise 1.1.17
Let p, q, and r be the propositions defined as follows.

• p: Grizzly bears have been seen in the area.

• q: Hiking is safe on the trail.

• r: Berries are ripe along the trail.

Write these propositions using p, q, and r and logical connectives (including negations).

a) Berries are ripe along the trail, but grizzly bears have not been seen in the area.

b) Grizzly bears have not been seen in the area and hiking on the trail is safe, but berries
are ripe along the trail.

c) If berries are ripe along the trail, hiking is safe if and only if grizzly bears have not been
seen in the area.

d) It is not safe to hike on the trail, but grizzly bears have not been seen in the area and
the berries along the trail are ripe

3
Solution:

a) r ∧ ¬p

b) ¬p ∧ q ∧ r

c) r → (q ↔ ¬p)

d) ¬q ∧ ¬p ∧ r

4. Exercise 1.1.29
State the converse, contrapositive, and inverse of each of these conditional statements.
a) If it snows today, I will ski tomorrow.
b) I come to class whenever there is going to be a quiz.
c) A positive integer is a prime only if it has no divisors other than 1 and itself.

Solution:

a) Converse: “If I ski tomorrow, it snows today.”


Contrapositive: “If I do not ski tomorrow, it will not have snowed today.”
Inverse: “If it does not snow today, I will not ski tomorrow.”

b) Converse: “There will be a quiz whenever I come to class.”


Contrapositive: “There will not be a quiz whenever I does not come to class.”
Inverse: “I do not come to class whenever there is not going to be a quiz.”

c) Converse: “A positive integer has no divisors other than 1 and itself only if it is a
prime.”
Contrapositive: “A positive integer has a divisor other than 1 and itself only if it is
not prime.”
Inverse: “A positive integer is not prime only if it has a divisor other than 1 and
itself.”

5. Exercise 1.1.32 modified


For each compound proposition, find its truth value when p = T , q = F , r = F , s = F ,
t = T , u = F , and v = F

4
a) (q → ¬p) ∨ (¬p → ¬q)

b) (p ∨ ¬t) ∧ (p ∨ ¬s)

c) (p → r) ∨ (¬s → ¬t) ∨ (¬u → v)

d) (p ∧ r ∧ s) ∨ (q ∧ t) ∨ (r ∧ ¬t)

Solution:

a) (q → ¬p) ∨ (¬p → ¬q)


≡ (F → ¬T ) ∨ (¬T → ¬F )
≡ (F → F ) ∨ (F → T )
≡T ∨T
≡T

b) (p ∨ ¬t) ∧ (p ∨ ¬s)
≡ (T ∨ ¬T ) ∧ (T ∨ ¬F )
≡ (T ∨ F ) ∧ (T ∨ T )
≡T ∧T
≡T

c) (p → r) ∨ (¬s → ¬t) ∨ (¬u → v)


≡ (T → F ) ∨ (¬F → ¬T ) ∨ (¬F → F )
≡ (T → F ) ∨ (T → F ) ∨ (T → F )
≡F ∨F ∨F
≡F

d) (p ∧ r ∧ s) ∨ (q ∧ t) ∨ (r ∧ ¬t)
≡ (T ∧ F ∧ F ) ∨ (F ∧ T ) ∨ (F ∧ ¬T )
≡ (T ∧ F ∧ F ) ∨ (F ∧ T ) ∨ (F ∧ F )
≡F ∨F ∨F
≡F

6. Exercise 1.1.34
Construct a truth table for each of these compound propositions.

a) p → ¬p

c) p ⊕ (p ∨ q)

d) (p ∧ q) → (p ∨ q)

5
Solution:

p ¬p p → ¬p
a) T F F
F T T

p q (p ∨ q) p ⊕ (p ∨ q)
T T T F
c) T F T F
F T T T
F F F F

p q (p ∧ q) (p ∨ q) ((p ∧ q) → (p ∨ q)
T T T T T
d) T F F T T
F T F T T
F F F F T

7. Exercise 1.2.3
Translate the following statement into propositional logic: You can graduate only if you have
completed the requirements of your major and you do not owe money to the university and
you do not have an overdue library book. Express your answer in terms of:
g: you can graduate,
m: you owe money to the university,
r: you have completed the requirements of your major, and
b: you have an overdue library book.

Solution: g → (r ∧ ¬m ∧ ¬b)

8. Exercise 1.2.12
Are these system specifications consistent? If the file system is not locked, then new messages
will be queued. If the file system is not locked, then the system is functioning normally, and
conversely. If new messages are not queued, then they will be sent to the message buffer.
If the file system is not locked, then new messages will be sent to the message buffer. New
messages will not be sent to the message buffer.

6
Solution: According to the textbook a system specification is consistent if it does not
contain conflicting requirements that could be used to derive a contradiction. Consider
a system has 5 requirements V , W , X, Y , Z and has 4 simple propositions (in this case
we will call them L, Q, B, F ). If the system has a contradiction then V ∧ W ∧ X ∧ Y ∧ Z
will always be false, thus to show that the system is consistent it is sufficient to find a
truth value assignment such that V ∧ W ∧ X ∧ Y ∧ Z is TRUE. There can be more than
one set of assignments that make it true; to be consistent, there needs to be at least one
set of assignments that makes it true.

Let the requirements for this system be as follows:


L: File system is locked
Q: New messages will be queued
B: New messages will be sent to the message buffer
N : System is functioning normally
Now we can list the specifications using logic:

a) ¬L → Q

b) ¬L ↔ N

c) ¬Q → B

d) ¬L → B

e) ¬B

In order for these statements to all be true on some assignment, we notice that B must
be false because of (e). If B is false, then Q and L must both be true due to (c), (d), and
the fact that p → F is only true when p is false (you can also examine the contrapositives
of (c) and (d) to see that ¬B → and ¬B → L, and thus conclude Q and L are both true.
If L is true, then N must be false from (b). From (a) with our current assignments,
we have ¬L → Q ≡ F → T, which is true. Therefore, we have found a set of values that
make all the specifications true (L = T, Q = T, B = F, N = F), and therefore we have
a consistent system.

9. Exercise 1.3.7
Use DeMorgan’s laws to find the negations of each of the following statements.
a) Jan is rich and happy.
b) Carlos will bicycle or run tomorrow.

7
Solution: a) Jan is not rich, or Jan is not happy.
b) Carlos will not bicycle tomorrow, and Carlos will not run tomorrow.

10. Exercise 1.3.12 (a) modified


Prove that each of these conditional statements is a tautology by using truth tables and by
using logical equivalencies.
a) [¬p ∧ (p ∨ q)] → q

Solution: a)
p q ¬p p ∨ q ¬p ∧ (p ∨ q) [¬p ∧ (p ∨ q)] → q
T T F T F T
T F F T F T
F T T T T T
F F T F F T
As seen in the truth table, all combinations of boolean assignments of p and q result
in the statement being true. Therefore, it is a tautology.

**Todo: include which logical equivalence law is used for each step below. An array
could be nice for formatting purposes.
[¬p ∧ (p ∨ q)] → q
≡ [(¬p ∧ p) ∨ (¬p ∧ q)] → q
≡ [F ∨ (¬p ∧ q)] → q
≡ (¬p ∧ q) → q
≡ ¬(¬p ∧ q) ∨ q
≡ (p ∨ ¬q) ∨ q
≡ p ∨ (¬q ∨ q)
≡p∨T
≡T

11. Exercise 1.3.64


Show that the negation of an unsatisfiable compound proposition is a tautology and the
negation of a compound proposition that is a tautology is unsatisfiable.

Solution: These follow directly from the definitions. An unsatisfiable compound propo-
sition is one that is true for no assignment of truth values to its variables, which is the

8
same as saying that it is false for every assignment of truth values. If a statement is false
for every assignment of truth values, its negation is true for every assignment of truth
values. This is the definition of a tautology.

Conversely, the negation of a tautology (i.e., a proposition that is true for every
assignment of truth values to its variables) will be false for every assignment of truth
values, and therefore will be unsatisfiable.

12. Exercise 1.3.65


Determine whether each of these compound propositions is satisfiable.
a) (p ∨ ¬q) ∧ (¬p ∨ q) ∧ (¬p ∨ ¬q)
b) (p → q) ∧ (p → ¬q) ∧ (¬p → q) ∧ (¬p → ¬q)

Solution:
a) Satisfiable. The expression is satisfied when p is False and q is False. You could draw
up a truth table to help you think through the possible combinations of truth values for
p and q.

b)
p q p→q p → ¬q ¬p → q ¬p → ¬q (p → q) ∧ (p → ¬q) ∧ (¬p → q) ∧ (¬p → ¬q)
T T T F T F F
T F F T T T F
F T T T T F F
F F T T F T F

Since all boolean assignments of p and q result in the expression being False, this is
compound proposition is unsatisfiable.

You might also like