discrete_mathematics_with_a.../chapter_2/exercises.md
2026-05-25 18:03:03 -07:00

2066 lines
77 KiB
Markdown

**Exercise Set 2.1**
Page 74
In each of 1-4 represent the common form of each argument using letters to stand
for component sentences, and fill in the blanks so that the argument in part (b)
has the same logical form as the argument in part (a).
1.
a.
If all integers are rational, then the number $1$ is rational.
All integers are rational.
Therefore, the number $1$ is rational.
If $p$, then $q$.
$p$
Therefore, $q$
b.
If all algebraic expressions can be written in prefix notation ,then
"$(a^2 + 2b)(a^2 - b)$ can be written in prefix notation.".
"All algebraic expressions can be written in prefix notation".
Therefore, $(a + 2b)(a^2 - b)$ can be written in prefix notation.
2.
a.
If all computer programs contain errors, then this program contains an error.
This program does not contain an error.
Therefore, it is not the case that all computer programs contain errors.
If $p$, then $\neg q$.
$\neg q$.
Therefore $\neg p$.
b.
If ______, then ______.
"2 is odd"
"all prime numbers are odd."
2 is not odd.
Therefore, it is not the case that all prime numbers are odd.
3.
a.
This number is even or this number is odd.
This number is not even.
Therefore, this number is odd.
Either $p$ or $q$.
$\neg p$
Therefore $q$
b.
______ or logic is confusing.
"My mind is shot"
My mind is not shot.
Therefore, ______.
"the logic is confusing."
4.
a.
If the program syntax is faulty, then the computer will generate an error
message.
If the computer generates an error message, then the program will not run.
Therefore, if the program syntax is faulty, then the program will not run.
If $p$, then $q$.
If $q$ then $\neg r$.
Therefore, if $p$, then $\neg r$.
b.
If this simple graph ______, then it is complete.
If this graph ______, then any two of its vertices can be joined by a path.
Therefore, if this simple graph has 4 vertices and 6 edges, then ______.
"has 4 vertices"
"has 6 edges"
"any two of its vertices can be joined by a path."
5. Indicate which of the following sentences are statements.
a. 1,024 is the smallest four-digit number that is a perfect square.
This is a statement (a true one).
b. She is a mathematics major.
This is a statement.
c. $128 = 2^6$
This is a statement.
d. $x = 2^6$
This is not a statement.
Write the statements in 6-9 in symbolic form using the symbols $\neg$, $\wedge$,
$\vee$ and the indicated letters to represent component statements.
6. Let $s = $ "stocks are increasing" and $i = $ "interest rates are steady."
a. Stocks are increasing but interest rates are steady.
$$ s \wedge i $$
b. Neither are stocks increasing nor are interest rates steady.
$$ \neg s \wedge \neg i $$
7. Juan is a math major but not a computer science major. ($m = $ "Juan is a
math major," $c = $ "Juan is a computer science major")
$$ m \wedge \neg c $$
8. Let $h = $ "John is healthy," $w = $ "John is wealthy," and $s = $ "John is
wise."
a. John is healthy and wealthy but not wise.
$$ (h \wedge w \wedge) \neg s $$
b. John is not wealthy but he is healthy and wise.
$$ \neg w \wedge (h \wedge s) $$
c. John is neither healthy, wealthy, nor wise.
$$ (\neg h \wedge \neg w) \wedge \neg s $$
d. John is neither wealthy nor wise, but he is healthy.
$$ (\neg w \wedge \neg s) \wedge h $$
e. John is wealthy, but he is not both healthy and wise.
$$ h \wedge (\neg h \neg s) $$
9. Let $p = $ "$x > 5$," $q = $ "$x = 5$," and $r = $ "$10 > x$."
a. $x \geq 5$
$$ p \ vee q $$
b. $10 > x > 5$
$$ r \wedge p $$
c. $10 > x \geq 5$
$$ r \wedge (p \vee q) $$
10. Let $p$ be the statement "DATAENDFLAG is off," $q$ the statement "ERROR
equals 0," and $r$ the statement "SUM is less than 1,000." Express the
following sentences in symbolic notation.
a. DATAENDFLAG is off, ERROR equals 0, and SUM is less than 1,000.
$$ p \wedge q \wedge r $$
b. DATAENDFLAG is off but ERROR is not equal to 0.
$$ p \wedge \neg q $$
c. DATAENDFLAG is off; however, ERROR is not 0 or SUM is greater than or equal
to 1,000.
$$ p \wedge (\neg q \vee \neg r) $$
e. Either DATAENDFLAG is on or it is the case that both ERROR equals 0 and SUM
is less than 1,000.
$$ \neg p \vee (q \wedge r) $$
11. In the following sentence, is the word _or_ used in its inclusive or
exclusive sense? A team wins the playoffs if it wins two games in a row or a
total of three games.
This is an inclusive or, as it is possible for the team to win two games in a
row and a total of three games.
Write truth tables for the statement forms 12-15.
12. $\neg p \wedge q$
| $p$ | $q$ | $\neg p$ | $\neg p \wedge q$ |
| --- | --- | -------- | ----------------- |
| T | T | F | F |
| T | F | F | F |
| F | T | T | T |
| F | F | T | F |
13. $\neg (p \wedge q) \vee (p \vee q)$
| $p$ | $q$ | $(p \wedge q)$ | $\neg (p \wedge q)$ | $(p \vee q)$ | $\neg (p \wedge q) \vee (p \vee q)$ |
| --- | --- | -------------- | ------------------- | ------------ | ----------------------------------- |
| T | T | T | F | T | T |
| T | F | F | T | T | T |
| F | T | F | T | T | T |
| F | F | F | T | F | T |
14. $p \wedge (q \wedge r)$
| $p$ | $q$ | $r$ | $(q \wedge r)$ | $p \wedge (q \wedge r)$ |
| --- | --- | --- | -------------- | ----------------------- |
| T | T | T | T | T |
| T | T | F | F | F |
| T | F | T | F | F |
| T | F | F | F | F |
| F | T | T | T | F |
| F | T | F | F | F |
| F | F | T | F | F |
| F | F | F | F | F |
15. $p \wedge (\neg q \vee r)$
| $p$ | $q$ | $r$ | $(q \vee r)$ | $\neg (q \vee r)$ | $p \wedge (\neg q \vee r)$ |
| --- | --- | --- | ------------ | ----------------- | -------------------------- |
| T | T | T | T | F | F |
| T | T | F | T | F | F |
| T | F | T | T | F | F |
| T | F | F | F | T | T |
| F | T | T | T | F | F |
| F | T | F | T | F | F |
| F | F | T | T | F | F |
| F | F | F | F | T | F |
Determine whether the statement forms in 16-24 are logically equivalent. In each
case, construct a truth table and include a sentence justifying your answer.
Your sentence should show that you understand the meaning of logical
equivalence.
16. $p \vee (p \wedge q) \text{ and } p$
| $p$ | $q$ | $(p \wedge q)$ | $p \vee (p \wedge q)$ |
| --- | --- | -------------- | --------------------- |
| T | T | T | T |
| T | F | F | T |
| F | T | F | F |
| F | F | F | F |
As the columns for both $p$ and $p \vee (p \wedge q)$ have the same truth
values, they can be said to be equivalent. This proves one of the absorption
laws.
17. $\neg (p \wedge q) \text{ and } \neg p \wedge \neg q$
| $p$ | $q$ | $\neg p$ | $\neg q$ | $(p \wedge q)$ | $\neg (p \wedge q)$ | $\neg p \wedge \neg q$ |
| --- | --- | -------- | -------- | -------------- | ------------------- | ---------------------- |
| T | T | F | F | T | F | F |
| T | F | F | T | F | T | F |
| F | T | T | F | F | T | F |
| F | F | T | T | F | T | T |
No $\neg (p \wedge q) \cancel{\equiv} \neg p \wedge \neg q$, as the columns for
both $\neg (p \wedge q)$ and $\neg p \wedge \neg q$ do not have the same truth
values.
18. $p \vee \mathbf{t} \text{ and } \mathbf{t}$
| $p$ | $\mathbf{t}$ | $p \vee \mathbf{t}$ |
| --- | ------------ | ------------------- |
| T | T | T |
| F | T | T |
Yes, $p \vee \mathbf{t} \equiv \mathbf{t}$, proving one of the universal bound
laws.
19. $p \wedge \mathbf{t} \text{ and } p$
| $p$ | $\mathbf{t}$ | $p \wedge \mathbf{t}$ |
| --- | ------------ | --------------------- |
| T | T | T |
| F | T | F |
Yes, $p \wedge \mathbf{t} \equiv p$, proving one of the identity laws.
20. $p \wedge \mathbf{c} \text{ and } p \vee \mathbf{c}$
| $p$ | $\mathbf{c}$ | $p \wedge \mathbf{c}$ | $p \vee \mathbf{c}$ |
| --- | ------------ | --------------------- | ------------------- |
| T | F | F | T |
| F | F | F | F |
No, $p \wedge \mathbf{c} \cancel{\equiv} p \vee \mathbf{c}$, as their two
column's truth values are not equal.
21. $(p \wedge q) \wedge r \text{ and } p \wedge (q \wedge r)$
| $p$ | $q$ | $r$ | $(p \wedge q)$ | $(q \wedge r)$ | $(p \wedge q) \wedge r$ | $p \wedge (q \wedge r)$ |
| --- | --- | --- | -------------- | -------------- | ----------------------- | ----------------------- |
| T | T | T | T | T | T | T |
| T | T | F | T | F | F | F |
| T | F | T | F | F | F | F |
| T | F | F | F | F | F | F |
| F | T | T | F | T | F | F |
| F | T | F | F | F | F | F |
| F | F | T | F | F | F | F |
| F | F | F | F | F | F | F |
Yes, $(p \wedge q) \wedge r \equiv p \wedge (q \wedge r)$, proving one of the
associative laws.
22. $p \wedge (q \vee r) \text{ and } (p \wedge q) \vee (p \wedge r)$
| $p$ | $q$ | $r$ | $(q \vee r)$ | $(p \wedge q)$ | $(p \wedge r)$ | $p \wedge (q \vee r)$ | $(p \wedge q) \vee (p \wedge r)$ |
| --- | --- | --- | ------------ | -------------- | -------------- | --------------------- | -------------------------------- |
| T | T | T | T | T | T | T | T |
| T | T | F | T | T | F | T | T |
| T | F | T | T | F | T | T | T |
| T | F | F | F | F | F | F | F |
| F | T | T | T | F | F | F | F |
| F | T | F | T | F | F | F | F |
| F | F | T | T | F | F | F | F |
| F | F | F | F | F | F | F | F |
Yes, $p \wedge (q \vee r) \equiv (p \wedge q) \vee (p \wedge r)$, proving one of
the distributive laws.
23. $(p \wedge q) \vee r \text{ and } p \wedge (q \vee r)$
| $p$ | $q$ | $r$ | $(p \wedge q)$ | $(q \vee r)$ | $(p \wedge q) \vee r$ | $p \wedge (q \vee r)$ |
| --- | --- | --- | -------------- | ------------ | --------------------- | --------------------- |
| T | T | T | T | T | T | T |
| T | T | F | T | T | T | T |
| T | F | T | F | T | T | T |
| T | F | F | F | F | F | F |
| F | T | T | F | T | T | F |
| F | T | F | F | T | F | F |
| F | F | T | F | T | T | F |
| F | F | F | F | F | F | F |
No, $(p \wedge q) \vee r \cancel{\equiv} p \wedge (q \vee r)$, as their columns
in the truth table do not have the same truth values.
24. $(p \vee q) \vee (p \wedge r) \text{ and } (p \vee q) \wedge r$
| $p$ | $q$ | $r$ | $(p \vee q)$ | $(p \wedge r)$ | $(p \vee q) \vee (p \wedge r)$ | $(p \vee q) \wedge r$ |
| --- | --- | --- | ------------ | -------------- | ------------------------------ | --------------------- |
| T | T | T | T | T | T | T |
| T | T | F | T | F | T | F |
| T | F | T | T | T | T | T |
| T | F | F | T | F | T | F |
| F | T | T | T | F | T | T |
| F | T | F | T | F | T | F |
| F | F | T | F | F | F | F |
| F | F | F | F | F | F | F |
No, $(p \vee q) \vee (p \wedge r) \cancel{\equiv} (p \vee q) \wedge r$, as their
two columns in the truth table do not have the same truth values.
Use De Morgan's laws to write negations for the statements in 25-30.
25. Hal is a math major and Hal's sister is a computer science major.
Hal is not a math major or Hal's sister is not a computer science major.
26. Sam is an orange belt and Kate is a red belt.
Sam is not an orange belt or Kate is not a red belt.
27. The connector is loose or the machine is unplugged.
The connector is not loose and the machine is not unplugged.
28. The train is late or my watch is fast.
The train is not late and my watch is not fast.
29. This computer program has a logical error in the first ten lines or it is
being run with an incomplete data set.
This computer program does not have a logical error in the first ten lines and
it is not being run with an incomplete data set.
30. The dollar is at an all-time high and the stock market is at a record low.
The dollar is not at an all-time high or the stock market is not at a record
low.
31. Let $s$ be a string of length 2 with characters from $\{0, 1, 2\}$, and
define statements $a$, $b$, $c$, and $d$ as follows:
$a = $ "the first character of $s$ is 0"
$b = $ "the first character of $s$ is 1"
$c = $ "the second character of $s$ is 1"
$c = $ "the second character of $s$ is 2".
Describe the set of all strings for which each of the following is true.
a. $(a \vee b) \wedge (c \vee d)$
This is the full given set $\{0, 1, 2\}$ as the first letter could be a 0 or 1
and the second letter could be a 1 or 2.
b. $(\neg(a \vee b)) \wedge (c \vee d)$
This is the set $\{1, 2\}$, as the first character is neither 0 nor 1, but the
second character is either 1 or 2.
c. $((\neg a) \vee b) \wedge (c \vee (\neg d))$
This only has the set $\{1\}$, as the first condition says the first character
can either be not 0 or 1, while the second character can be either 1 or not 2.
Assume $x$ is a particular real number and use De Morgan's laws to write
negations for the statements in 32-37.
32. $-2 < x < 7$
$$ -2 \geq x \text{ or } x \geq 7 $$
33. $-10 < x < 2$
$$ -10 \geq x \text{ or } x \geq 2 $$
34. $x < 2 \text{ or } x > 5$
$$ 2 \leq x \leq 5$$
35. $x \leq -1 \text{ or } x > 1$
$$ -1 < x \leq 1 $$
36. $1 > x \geq -3$
$$ 1 \geq x \text{ or } x < -3 $$
37. $0 > x \geq -7$
$$ 0 \leq x \text{ or } x < -7 $$
In 38 and 39, imagine that _num_orders_ and _num_instock_ are particular values,
such as might occur during execution of a computer program. Write negations for
the following statements.
38. $(\text{num_orders } > 100 \text{ and } \text{num_instock } \leq 500) \text{ or } \text{num_instock } < 200$
$$ (\text{num_orders } \leq 100 \text{ or } \text{num_instock } > 500) \text{ and } \text{num_instock } \geq 200 $$
39. $(\text{num_orders } < 50 \text{ and } \text{num_instock } > 300) \text{ or } (50 \leq \text{ num_orders } < 75 \text{ and } \text{num_instock} > 500)$
$$ (\text{num_orders } \geq 50 \text{ or } \text{num_instock } \leq 300) \text{ and } (50 > \text{ num_orders } \geq 75 \text{ or } \text{num_instock} \leq 500) $$
Use truth tables to establish which of the statement forms in 40-43 are
tautologies and which are contradictions.
40. $(p \wedge q) \vee (\neg p \vee (p \wedge \neg q))$
| $p$ | $q$ | $\neg p$ | $\neg q$ | $(p \wedge q)$ | $(p \wedge \neg q)$ | $(\neg p \vee (p \wedge \neg q))$ | $(p \wedge q) \vee (\neg p \vee (p \wedge \neg q))$ |
| --- | --- | -------- | -------- | -------------- | ------------------- | --------------------------------- | --------------------------------------------------- |
| T | T | F | F | T | F | F | T |
| T | F | F | T | F | T | T | T |
| F | T | T | F | F | F | T | T |
| F | F | T | T | F | F | T | T |
So the statement $(p \wedge q) \vee (\neg p \vee (p \wedge \neg q))$ is a
tautology as all of its truth values are true.
41. $(p \wedge \neg q) \wedge (\neg p \vee q)$
| $p$ | $q$ | $\neg p$ | $\neg q$ | $(p \wedge neg q)$ | $(\neg p \vee q)$ | $(p \wedge \neg q) \wedge (\neg p \vee q)$ |
| --- | --- | -------- | -------- | ------------------ | ----------------- | ------------------------------------------ |
| T | T | F | F | F | T | F |
| T | F | F | T | T | F | F |
| F | T | T | F | F | T | F |
| F | F | T | T | F | T | F |
So the statement $(p \wedge \neg q) \wedge (\neg p \vee q)$ is a contradiction,
as all of its truth values are false.
42. $((\neg p \wedge q) \wedge (q \wedge r)) \wedge \neg q$
| $p$ | $q$ | $r$ | $\neg p$ | $\neg q$ | (\neg p \wedge q) | $(q \wedge r)$ | $((\neg p \wedge q) \wedge (q \wedge r))$ | $((\neg p \wedge q) \wedge (q \wedge r)) \wedge \neg q$ |
| --- | --- | --- | -------- | -------- | ----------------- | -------------- | ----------------------------------------- | ------------------------------------------------------- |
| T | T | T | F | F | F | T | F | F |
| T | T | F | F | F | F | F | F | F |
| T | F | T | F | T | F | F | F | F |
| T | F | F | F | T | F | F | F | F |
| F | T | T | T | F | T | T | T | F |
| F | T | F | T | F | T | F | F | F |
| F | F | T | T | T | F | F | F | F |
| F | F | F | T | T | F | F | F | F |
So the statement $((\neg p \wedge q) \wedge (q \wedge r)) \wedge \neg q$ is a
contradiction as all of its truth values are false.
43. $(\neg p \vee q) \vee (p \wedge \neg q)$
| $p$ | $q$ | $\neg p$ | $\neg q$ | $(\neg p \vee q)$ | $(p \wedge \neg q)$ | $(\neg p \vee q) \vee (p \wedge \neg q)$ |
| --- | --- | -------- | -------- | ----------------- | ------------------- | ---------------------------------------- |
| T | T | F | F | T | F | T |
| T | F | F | T | F | T | T |
| F | T | T | F | T | F | T |
| F | F | T | T | T | F | T |
So the statement $(\neg p \vee q) \vee (p \wedge \neg q)$ is a tautology, as all
of the truth values are true.
44. Recall that $a < x < b$ means that $a < x$ and $x < b$. Also $a \leq b$
means that $a < b$ or $a = b$. Find all real numbers that satisfy the
following inequalities.
a. $2 < x \leq 0$
No real numbers satisfy this inequality ($x$ cannot both be greater than $2$ and
less than or equal to $0$).
b. $1 \leq x < -1$
No real numbers satisfy this inequality ($x$ cannot both be greater than or
equal to $1$ and also less than $-1$).
45. Determine whether the statements in (a) and (b) are logically equivalent.
a. Bob is both a math and computer science major and Ann is a math major, but
Ann is not both a math and computer science major.
$$ (p \wedge q \wedge r) \wedge \neg(r \wedge s) $$
$$ (p \wedge q \wedge r) \wedge (\neg r \vee \neg s) $$
$$ p \wedge q \wedge r \wedge \neg s $$
b. It is not the case that both Bob and Ann are both math and computer science
majors, but it is the case that Ann is a math major and Bob is both a math and
computer science major.
$$ \neg((p \wedge r) \wedge (q \wedge s)) \wedge (r \wedge (p \wedge q)) $$
$$ (\neg(p \wedge r) \vee \neg(q \wedge s)) \wedge (r \wedge (p \wedge q)) $$
$$ (\neg p \vee \neg r) \vee (\neg q \vee \neg s) \wedge (r \wedge p \wedge q) $$
$$ \neg s \wedge r \wedge p \wedge q $$
$$ p \wedge q \wedge r \neg s $$
Both parts (a) and (b) are logically equivalent.
46. Let the symbol $\oplus$ denote _exclusive or_; so
$p \plus q \equiv (p \vee q) \wedge \neg(p \wedge q)$. Hence the truth table
for $p \plus q$ is as follows:
| $p$ | $q$ | $p \plus q$ |
| --- | --- | ----------- |
| T | T | F |
| T | F | T |
| F | T | T |
| F | F | F |
a. Find simpler statement forms that are logically equivalent to $p \oplus p$
and $(p \oplus p) \oplus p$.
| $p$ | $p$ | $p \oplus p$ | $(p \oplus p) \oplus p$ |
| --- | --- | ------------ | ----------------------- |
| T | T | F | T |
| F | F | F | F |
$$ p \oplus p \equiv \mathbf{c} $$
$$ (p \oplus p) \oplus p \equiv p $$
b. Is $(p \oplus q) \oplus r \equiv p \oplus (q \oplus r)$? Justify your answer.
| $p$ | $q$ | $r$ | $(p \oplus q)$ | $(q \oplus r)$ | $(p \oplus q) \oplus r$ | $p \oplus (q \oplus r)$ |
| --- | --- | --- | -------------- | -------------- | ----------------------- | ----------------------- |
| T | T | T | F | F | T | T |
| T | T | F | F | T | F | F |
| T | F | T | T | T | F | F |
| T | F | F | T | F | T | T |
| F | T | T | T | F | F | F |
| F | T | F | T | T | T | T |
| F | F | T | F | T | T | T |
| F | F | F | F | F | F | F |
They are equivalent, $(p \oplus q) \oplus r \equiv p \oplus (q \oplus r)$, as
their columns in the truth table show they have the same truth values.
c. Is $(p \oplus q) \wedge r \equiv (p \wedge r) \oplus (q \wedge r)$? Justify
your answer.
| $p$ | $q$ | $r$ | $(p \oplus q)$ | $(p \wedge r)$ | $(q \wedge r)$ | $(p \oplus q) \wedge r$ | $(p \wedge r) \oplus (q \wedge r)$ |
| --- | --- | --- | -------------- | -------------- | -------------- | ----------------------- | ---------------------------------- |
| T | T | T | F | T | T | F | F |
| T | T | F | F | F | F | F | F |
| T | F | T | T | T | F | T | T |
| T | F | F | T | F | F | F | F |
| F | T | T | T | F | T | T | T |
| F | T | F | T | F | F | F | F |
| F | F | T | F | F | F | F | F |
| F | F | F | F | F | F | F | F |
They are equivalent,
$(p \oplus q) \wedge r \equiv (p \wedge r) \oplus (q \wedge r)$, as their
columns in the truth table show they have the same truth values.
47. In logic and in standard English, a double negative is equivalent to a
positive. There is one fairly common English usage in which a "double
positive" is equivalent to a negative. What is it? Can you think of others?
"Yeah, yeah" (see page 902)
In 48 and 49 below, a logical equivalence is derived from Theorem 2.1.1. Supply
a reason for each step.
48.
$$ p \vee \neg q \vee (p \wedge q) \equiv p \wedge (\neg q \vee q) \text{ by (a)} $$
by distributive law
$$ \quad \equiv p \wedge (q \vee \neg q) \text{ by (b)} $$
by commutative law
$$ \quad \equiv p \wedge \mathbf{t} \text{ by (c)} $$
by universal bound law
$$ \quad \equiv p \text{ by (d)} $$
by identity law
Therefore, $(p \wedge \neg q) \vee (p \wedge q) \equiv p$.
49.
$$ (p \vee \neg q) \wedge (\neg p \vee \neg q) $$
$$ \quad \equiv (\neg q \vee p) \wedge (\neg q \vee \neg p) \text{ by (a)} $$
by commutative law
$$ \quad \equiv \neg q \vee (p \wedge \neg p) \text{ by (b)} $$
by distributive law
$$ \quad \equiv q \vee \mathbf{c} \text{ by (c)} $$
by universal bound law
$$ \quad \equiv \neg q \text{ by (d)} $$
by negation law
Therefore, $(p \vee \neg q) \wedge (\neg p \vee \neg q) \equiv \neg q$.
Use Theorem 2.1.1 to verify the logical equivalences in 50-54. Supply a reason
for each step.
50. $(p \wedge \neg q) \vee p \equiv p$
$$ (p \wedge \neg q) \vee p \equiv p $$
$$ p \vee (p \wedge \neg q) \equiv p \text{ by communative law for } \vee $$
$$ \equiv p \text{ by the absorption law for } \vee \text{ with } \neg q \text{ replacing } q $$
51. $p \wedge (\neg q \vee p) \equiv p$
$$ p \wedge (\neg q \vee p) \equiv p $$
$$ (p \wedge \neg q) \vee (p \wedge p) \equiv p \text{ by distributive law for } \wedge $$
$$ (p \wedge \neg q) \vee p \equiv p \text{ by idempotent law for } \wedge $$
$$ p \vee (p \wedge \neg q) \equiv p \text{ by commutative law for } \vee $$
$$ \equiv p \text{ by absorption law for } \vee \text{ with } \neg q \text{ replacing } q $$
52. $\neg(p \vee \neg q) \vee (\neg p \wedge \neg q) \equiv \neg p$
$$ \neg(p \vee \neg q) \vee (\neg p \wedge \neg q) \equiv \neg p $$
$$ (\neg p \wedge q) \vee (\neg p \wedge \neg q) \equiv \neg p \text{ by De Morgan's law for } \vee $$
$$ \neg p \wedge (q \vee \neg q) \equiv \neg p \text{ by distributive law for } \wedge $$
$$ \neg p \wedge \mathbf{t} \equiv \neg p \text{ by negation law for } \vee $$
$$ \neg p \equiv \neg p \text{ by identity law for } \wedge $$
53. $\neg((\neg p \wedge q) \vee (\neg p \wedge \neg q)) \vee (p \wedge q) \equiv p$
$$ \neg((\neg p \wedge q) \vee (\neg p \wedge \neg q)) \vee (p \wedge q) \equiv p $$
$$ (\neg(\neg p \wedge q) \wedge \neg(\neg p \wedge \neg q)) \vee (p \wedge q) \equiv p \text{ by De Morgan's law for } \vee $$
$$ ((p \vee \neg q) \wedge (p \vee q)) \vee (p \wedge q) \equiv p \text{ by De Morgan's law for } \wedge $$
$$ (p \vee (\neg q \wedge q)) \vee (p \wedge q) \equiv p \text{ by distributive law for } \vee $$
$$ (p \vee \mathbf{c}) \vee (p \wedge q) \equiv p \text{ by negation law for } \wedge $$
$$ p \vee (p \wedge q) \equiv p \text{ by identity law for } \vee $$
$$ p \equiv p \text{ by absorption law for } \vee $$
54. $(p \wedge (\neg(\neg p \vee q))) \vee (p \wedge q) \equiv p$
$$ (p \wedge (\neg(\neg p \vee q))) \vee (p \wedge q) \equiv p $$
$$ (p \wedge (p \wedge \neg q)) \vee (p \wedge q) \equiv p \text{ by De Morgan's law for } \vee $$
$$ ((p \wedge p) \wedge \neg q) \vee (p \wedge q) \equiv p \text{ by associative law for } \wedge $$
$$ (p \wedge \neg q) \vee (p \wedge q) \equiv p \text{ by idempotent law for } \wedge $$
$$ p \wedge (\neg q \vee q) \equiv p \text{ by distributive law for } \wedge $$
$$ p \wedge \mathbf{t} \equiv p \text{ by negation law for } \vee $$
$$ p \equiv p \text{ by identity law for } \wedge $$
---
**Exercise Set 2.2**
Page 86
Rewrite the statements in 1-4 in if-then form.
1. This loop will repeat exactly $n$ times if it does not contain a **stop** or
a **go to**.
"If this lop does not contain a **stop** or a **go to**, then it will repeat
exactly $N$ times."
2. I am on time for work if I catch the 8:05 bus.
"If I catch the 8:05 bus, then I am on time for work."
3. Freeze or I'll shoot.
"If you do not freeze, then I'll shoot."
4. Fix my ceiling or I won't pay my rent.
"If you do not fix my ceiling, then I won't pay my rent."
Construct truth tables for the statements forms in 5-11.
5. $\neg p \vee q \to \neg q$
| $p$ | $q$ | $\neg p$ | $\neg q$ | $\neg p \vee q$ | $\neg p \vee q \to \neg q$ |
| --- | --- | -------- | -------- | --------------- | -------------------------- |
| T | T | F | F | T | F |
| T | F | F | T | F | T |
| F | T | T | F | T | F |
| F | F | T | T | T | T |
6. $(p \vee q) \vee (\neg p \wedge q) \to q$
| $p$ | $q$ | $\neg p$ | $(p \vee q)$ | $(\neg p \wedge q)$ | $(p \vee q) \vee (\neg p \wedge q)$ | $(p \vee q) \vee (\neg p \wedge q) \to q$ |
| --- | --- | -------- | ------------ | ------------------- | ----------------------------------- | ----------------------------------------- |
| T | T | F | T | F | T | T |
| T | F | F | T | F | T | F |
| F | T | T | T | T | T | T |
| F | F | T | F | F | F | T |
7. $p \wedge \neg q \to r$
| $p$ | $q$ | $r$ | $\neg q$ | $p \wedge \neg q$ | $p \wedge \neg q \to r$ |
| --- | --- | --- | -------- | ----------------- | ----------------------- |
| T | T | T | F | F | T |
| T | T | F | F | F | T |
| T | F | T | T | T | T |
| T | F | F | T | T | F |
| F | T | T | F | F | T |
| F | T | F | F | F | T |
| F | F | T | T | F | T |
| F | F | F | T | F | T |
8. $\neg p \vee q \to r$
| $p$ | $q$ | $r$ | $\neg p$ | $\neg p \vee q$ | $\neg p \vee q \to r$ |
| --- | --- | --- | -------- | --------------- | --------------------- |
| T | T | T | F | T | T |
| T | T | F | F | T | F |
| T | F | T | F | F | T |
| T | F | F | F | F | T |
| F | T | T | T | T | T |
| F | T | F | T | T | F |
| F | F | T | T | T | T |
| F | F | F | T | T | F |
9. $p \wedge \neg r \leftrightarrow q \vee r$
| $p$ | $q$ | $r$ | $\neg r$ | $p \wedge \neg r$ | $q \vee r$ | $p \wedge \neg r \leftrightarrow q \vee r$ |
| --- | --- | --- | -------- | ----------------- | ---------- | ------------------------------------------ |
| T | T | T | F | F | T | F |
| T | T | F | T | T | T | T |
| T | F | T | F | F | T | F |
| T | F | F | T | T | F | F |
| F | T | T | F | F | T | F |
| F | T | F | T | F | T | F |
| F | F | T | F | F | T | F |
| F | F | F | T | F | F | T |
10. $(p \to r) \leftrightarrow (q \to r)$
| $p$ | $q$ | $r$ | $(p \to r)$ | $(q \to r)$ | $(p \to r) \leftrightarrow (q \to r)$ |
| --- | --- | --- | ----------- | ----------- | ------------------------------------- |
| T | T | T | T | T | T |
| T | T | F | F | F | T |
| T | F | T | T | T | T |
| T | F | F | F | T | F |
| F | T | T | T | T | T |
| F | T | F | T | F | F |
| F | F | T | T | T | T |
| F | F | F | T | T | T |
11. $(p \to (q \to r)) \leftrightarrow ((p \wedge q) \to r)$
| $p$ | $q$ | $r$ | $(q \to r)$ | $(p \wedge q)$ | $(p \to (q \to r))$ | $((p \wedge q) \to r)$ | $(p \to (q \to r)) \leftrightarrow ((p \wedge q) \to r)$ |
| --- | --- | --- | ----------- | -------------- | ------------------- | ---------------------- | -------------------------------------------------------- |
| T | T | T | T | T | T | T | T |
| T | T | F | F | T | F | F | T |
| T | F | T | T | F | T | T | T |
| T | F | F | T | F | T | T | T |
| F | T | T | T | F | T | T | T |
| F | T | F | F | F | T | T | T |
| F | F | T | T | F | T | T | T |
| F | F | F | T | F | T | T | T |
12. Use the logical equivalence established in Example 2.2.3,
$p \vee q \to r \equiv (p \to r) \wedge (q \to r)$, to rewrite the following
statement. (Assume that $x$ represents a fixed real number.)
If $x > 2 $ or $x < -2$, then $x^2 > 4$.
If $x > 2$, then $x^2 > 4$ and if $x < -2$, then $x^2 > 4$.
13. Use truth tables to verify the following logical equivalences. Include a few
words of explanation with your answers.
a. $p \to q \equiv \neg p \vee q$
| $p$ | $q$ | $\neg p$ | $p \to q$ | $\neg p \vee q$ |
| --- | --- | -------- | --------- | --------------- |
| T | T | F | T | T |
| T | F | F | F | F |
| F | T | T | T | T |
| F | F | T | T | T |
Both columns for $p \to q$ and $\neg p \vee q$ have the same truth values, so
they are logically equivalent.
b. $\neg(p \to q) \equiv p \wedge \neg q$
| $p$ | $q$ | $\neg q$ | $(p \to q)$ | $\neg(p \to q)$ | $p \wedge \neg q$ |
| --- | --- | -------- | ----------- | --------------- | ----------------- |
| T | T | F | T | F | F |
| T | F | T | F | T | T |
| F | T | F | T | F | F |
| F | F | T | T | F | F |
Both columns for $\neg(p \to q)$ and $p \wedge \neg q$ have the same truth
values, so they are logically equivalent.
14.
a. Show that the following statement forms are all logically equivalent:
$p \to (q \vee r)$, $(p \wedge \neg q) \to r$, and $(p \wedge \neg r) \to q$
| $p$ | $q$ | $r$ | $\neg q$ | $\neg r$ | $(q \vee r)$ | $(p \wedge \neg q)$ | $(p \wedge \neg r)$ | $p \to (q \vee r)$ | $(p \wedge \neg q) \to r$ | $(p \wedge \neg r) \to q$ |
| --- | --- | --- | -------- | -------- | ------------ | ------------------- | ------------------- | ------------------ | ------------------------- | ------------------------- |
| T | T | T | F | F | T | F | F | T | T | T |
| T | T | F | F | T | T | F | T | T | T | T |
| T | F | T | T | F | T | T | F | T | T | T |
| T | F | F | T | T | F | T | T | F | F | F |
| F | T | T | F | F | T | F | F | T | T | T |
| F | T | F | F | T | T | F | F | T | T | T |
| F | F | T | T | F | T | F | F | T | T | T |
| F | F | F | T | T | F | F | F | T | T | T |
b. Use the logical equivalences established in part (a) to rewrite the following
sentence in two different ways. (Assume that $n$ represents a fixed integer.)
If $n$ is prime, then $n$ is odd or $n$ is $2$.
"If $n$ is prime and $n$ is not odd then $n$ is $2$"
"If $n$ is prime and $n$ is not $2$, then $n$ is odd."
15. Determine whether the following statement forms are logically equivalent:
$p \to (q \to r)$ and $(p \to q) \to r$
| $p$ | $q$ | $r$ | $(q \to r)$ | $(p \to q)$ | $p \to (q \to r)$ | $(p \to q) \to r$ |
| --- | --- | --- | ----------- | ----------- | ----------------- | ----------------- |
| T | T | T | T | T | T | T |
| T | T | F | F | F | F | T |
| T | F | T | T | T | T | T |
| T | F | F | T | F | T | T |
| F | T | T | T | T | T | T |
| F | T | F | F | T | T | F |
| F | F | T | T | T | T | T |
| F | F | F | T | T | T | F |
No, they are not equivalent, $p \to (q \to r) \cancel{\equiv} (p \to q) \to r$
as their truth values are not the same.
In 16 and 17, write each of the two statements in symbolic form and determine
whether they are logically equivalent. Include a truth table and a few words of
explanation to show that you understand what it means for statements to be
logically equivalent.
16. If you paid full price, you didn't buy it at Crown Books. You didn't buy it
at Crown Books or you paid full price.
$p$ is "You paid full price"
$q$ is "You bought it at Crown Books"
$$ p \to \neg q \text{ and } \neg q \vee p $$
| $p$ | $q$ | $\neg q$ | $p \to \neg q$ | $\neg q \vee p$ |
| --- | --- | -------- | -------------- | --------------- |
| T | T | F | F | T |
| T | F | T | T | T |
| F | T | F | T | F |
| F | F | T | T | T |
No, these two statements are not logically equivalent as their truth tables do
not have the same truth values.
$$ p \to \neg q \cancel{\equiv} \neg q \vee p $$
One could not buy it at Crown Books, and not paid full price, and also one could
have paid full price and have also bought it at Crown books.
17. If $2$ is a factor of $n$ and $3$ is a factor of $n$, then $6$ is a factor
of $n$. $2$ is not a factor of $n$ or $3$ is not a factor of $n$ or $6$ is a
factor of $n$.
$p$ is "$2$ is a factor of $n$"
$q$ is "$3$ is a factor of $n$"
$r$ is "$6$ is a factor of $n$"
$$ p \wedge q \to r\text{ and } \neg p \vee \neg q \vee r $$
| $p$ | $q$ | $r$ | $\neg p$ | $\neg q$ | $p \wedge q$ | $\neg p \vee \neg q$ | $p \wedge q \to r$ | $\neg p \vee \neg q \vee r$ |
| --- | --- | --- | -------- | -------- | ------------ | -------------------- | ------------------ | --------------------------- |
| T | T | T | F | F | T | F | T | T |
| T | T | F | F | F | T | F | F | F |
| T | F | T | F | T | F | T | T | T |
| T | F | F | F | T | F | T | T | T |
| F | T | T | T | F | F | T | T | T |
| F | T | F | T | F | F | T | T | T |
| F | F | T | T | T | F | T | T | T |
| F | F | F | T | T | F | T | T | T |
Yes, they are equivalent, as their truth tables show the same truth values.
$$ p \wedge q \to r \equiv \neg p \vee \neg q \vee r $$
18. Write each of the following three statements in symbolic form and determine
which pairs are logically equivalent. Include truth tables and a few words
of explanation.
$p$ = "It walks like a duck"
$q$ = "It talks like a duck"
$r$ = "It is a duck"
If it walks like a duck and it talks like a duck, then it is a duck.
$$ p \wedge q \to r $$
Either it does not walk like a duck or it does not talk like a duck, or it is a
duck.
$$ p \vee \neg q \vee r $$
If it does not walk like a duck and it does not talk like a duck, then it is not
a duck.
$$ \neg p \wedge \neg q \to \neg r $$
| $p$ | $q$ | $r$ | $\neg p$ | $\neg q$ | $\neg r$ | $p \wedge q$ | $p \vee \neg q$ | $\neg p \wedge \neg q$ | $p \wedge q \to r$ | $p \vee \neg q \vee r$ | $\neg p \wedge \neg q \to \neg r$ |
| --- | --- | --- | -------- | -------- | -------- | ------------ | --------------- | ---------------------- | ------------------ | ---------------------- | --------------------------------- |
| T | T | T | F | F | F | T | T | F | T | T | T |
| T | T | F | F | F | T | T | T | F | F | T | T |
| T | F | T | F | T | F | F | T | F | T | T | T |
| T | F | F | F | T | T | F | T | F | T | T | T |
| F | T | T | T | F | F | F | F | F | T | T | T |
| F | T | F | T | F | T | F | F | F | T | F | T |
| F | F | T | T | T | F | F | T | T | T | T | F |
| F | F | F | T | T | T | F | T | T | T | T | T |
No, none of these statements are equivalent, as you can see in their
corresponding truth table's truth values.
$$ p \wedge q \to r \cancel{\equiv} p \vee \neg q \vee r \cancel{\equiv} \neg p \wedge \neg q \to \neg r $$
19. True or false? The negation of "If Sue is Luiz's mother, then Ali is his
cousin" is "If Sue is Luiz's mother, then Ali is not his cousin."
$p$ = "Sue is Luiz's mother"
$q$ = "Ali is his cousin"
Firs statement is:
$$ p \to q $$
Negation is:
$$ p \wedge \neg q $$
"Sue is Luiz's mother and Ali is not his cousin."
Second statement is:
$$ p \to \neg q $$
Negation is:
$$ p \to q $$
"If Sue is Luiz's mother, then Ali is his cousin."
So no, they are not equivalent:
$$ p \wedge \neg q \cancel{\equiv} p \wedge q $$
20. Write negations for each of the following statements. (Assume that all
variables represent fixed quantities or entities, as appropriate.)
a. If $P$ is a square, then $P$ is a rectangle.
$$ p \to q $$
Negation:
$$ p \wedge \neg q $$
"P is a square and P is not a rectangle."
b. If today is New Year's Eve, then tomorrow is January.
$$ p \to q $$
$$ p \wedge \neg q $$
"Today is New Year's Eve and tomorrow is not January."
c. If the decimal expansion of $r$ is terminating, then $r$ is rational.
"The decimal expansion of $r$ is terminating and $r$ is not rational."
d. If $n$ is prime, then $n$ is odd or $n$ is $2$.
$n$ is prime and $n$ is not odd and $n$ is not $2$.
e. If $x$ is nonnegative, then $x$ is positive or $x$ is $0$.
$x$ is nonnegative and $x$ is both negative and not $0$.
f. If Tom is Ann's father, then Jim is her uncle and Sue is her aunt.
Tom is Ann's father and either Jim is not her uncle or Sue is not her aunt.
g. If $n$ is divisible by $6$, then $n$ is divisible by $2$ and $n$ is divisible
by $3$.
$n$ is divisible by $6$ and either $n$ is not divisible by $2$ or $n$ is not
divisible by $3$.
21. Suppose that $p$ and $q$ are statements so that $p \to q$ is false. Find the
truth values of each of the following.
| $p$ | $q$ | $p \to q$ |
| --- | --- | --------- |
| T | T | T |
| T | F | F |
| F | T | T |
| F | F | T |
This means that $p = T$ and $q = F$.
a. $\neg p \to q$
$$ F \to F = T $$
b. $p \vee q$
$$ T \vee F = T $$
c. $q \to p$
$$ F \to T = T $$
22. Write contrapositives for the statements of exercise 20.
a. $\neg p \to q$
$$ \neg q \to p $$
b. $p \vee q$
$$ \neg q \to p $$
c. $q \to p$
$$ \neg p \to \neg q $$
23. Write the converse and inverse for each statement of exercise 20.
a. $\neg p \to q$
Converse:
$$ q \to \neg p $$
Inverse:
$$ p \to \neg q $$
b. $p \vee q$
Because the contrapositive is equivalent, we can take:
$$ \neg q \to p $$
Converse:
$$ p \to \neg q $$
Inverse:
$$ q \to \neg p $$
c. $q \to p$
Converse:
$$ p \to q $$
Inverse:
$$ \neg q \to \neg p $$
Use truth tables to establish the truth of each statement in 24-27.
24. A conditional statement is not logically equivalent to its converse.
| $p$ | $q$ | $p \to q$ | $q \to p$ |
| --- | --- | --------- | --------- |
| T | T | T | T |
| T | F | F | T |
| F | T | T | F |
| F | F | T | T |
As you can see $p \to q \cancel{\equiv} q \to p$, so a conditional statement is
not equivalent to its converse.
25. A conditional statement is not logically equivalent to its inverse.
| $p$ | $q$ | $\neg p$ | $\neg q$ | $p \to q$ | $\neg p \to \neg q$ |
| --- | --- | -------- | -------- | --------- | ------------------- |
| T | T | F | F | T | T |
| T | F | F | T | F | T |
| F | T | T | F | T | F |
| F | F | T | T | T | T |
As you can see $p \to q \cancel{\equiv} \neg p \to \neg q$, so a conditional
statement is not equivalent to its inverse.
26. A conditional statement and its contrapositive are logically equivalent to
each other.
| $p$ | $q$ | $\neg q$ | $\neg p$ | $p \to q$ | $\neg q \to \neg p$ |
| --- | --- | -------- | -------- | --------- | ------------------- |
| T | T | F | F | T | T |
| T | F | T | F | F | F |
| F | T | F | T | T | T |
| F | F | T | T | T | T |
As you can see $p \to q \equiv \neg q \to \neg p$, so a conditional statement is
logically equivalent to it's contrapositive.
27. The converse and inverse of a conditional statement are logically equivalent
to each other.
| $p$ | $q$ | $p \to q$ | $q \to p$ | $\neg p \to \neg q$ |
| --- | --- | --------- | --------- | ------------------- |
| T | T | T | T | T |
| T | F | F | T | T |
| F | T | T | F | F |
| F | F | T | T | T |
As you can see, $q \to p \equiv \neg p \to \neg q$, so the converse and the
inverse of a conditional statement are logically equivalent to each other.
28. "Do you mean that you think you can find out the answer to it?" said the
March Hare.
"Exactly so," said Alice.
"Then you should say what you mean," the March Hare went on.
"I do," Alice hastily replied; "at least-at least I mean what I say-that's the
same thing, you know."
"Not the same thing a bit!" said the Hatter.
"Why, you might just as well say that 'I see what I eat' is the same thing as 'I
eat what I see'!"
-from "A Mad Tea-Party" in _Alice in Wonderland_, by Lewis Carroll
The Hatter is right. "I say what I mean" is not the same thing as "I mean what I
say." Rewrite each of these two sentences in if-then form and explain the
logical relation between them. (This exercise is referred to in the introduction
to Chapter 4.)
$$ p \to q $$
$$ q \to p $$
| $p$ | $q$ | $p \to q$ | $q \to p$ |
| --- | --- | --------- | --------- |
| T | T | T | T |
| T | F | F | T |
| F | T | T | F |
| F | F | T | T |
You can also rewrite this as "If I say something, I mean it." and "If I mean it,
I say something." Even from a linguistic standpoint these are not the same
statements. One can "mean it" (be sincere) and never say something, for example.
If statement forms $P$ and $Q$ are logically equivalent, then
$P \leftrightarrow Q$ is a tautology. Conversely, if $P \leftrightarrow Q$ is a
tautology, then $P$ and $Q$ are logically equivalent. Use $\leftrightarrow$ to
convert each of the logical equivalences in 29-31 to a tautology. Then use a
truth table to verify each tautology.
29. $p \to (q \vee r) \equiv (p \wedge \neg q) \to r$
$$ (p \to (q \vee r)) \leftrightarrow (p \wedge \neg q \to r) $$
| $p$ | $q$ | $r$ | $\neg q$ | $(q \vee r)$ | $(p \wedge \neg q)$ | $p \to (q \vee r)$ | $(p \wedge \neg q) \to r$ |
| --- | --- | --- | -------- | ------------ | ------------------- | ------------------ | ------------------------- |
| T | T | T | F | T | F | T | T |
| T | T | F | F | T | F | T | T |
| T | F | T | T | T | T | T | T |
| T | F | F | T | F | T | F | F |
| F | T | T | F | T | F | T | T |
| F | T | F | F | T | F | T | T |
| F | F | T | T | T | F | T | T |
| F | F | F | T | F | F | T | T |
30. $p \wedge (q \vee r) \equiv (p \wedge q) \vee (p \wedge r)$
$$ (p \wedge (q \vee r)) \leftrightarrow ((p \wedge q) \vee (p \wedge r)) $$
| $p$ | $q$ | $r$ | $(q \vee r)$ | $(p \wedge q)$ | $(p \wedge r)$ | $(p \wedge (q \vee r))$ | $((p \wedge q) \vee (p \wedge r) \)$ |
| --- | --- | --- | ------------ | -------------- | -------------- | ----------------------- | ------------------------------------ |
| T | T | T | T | T | T | T | T |
| T | T | F | T | T | F | T | T |
| T | F | T | T | F | T | T | T |
| T | F | F | F | F | F | F | F |
| F | T | T | T | F | F | F | F |
| F | T | F | T | F | F | F | F |
| F | F | T | T | F | F | F | F |
| F | F | F | F | F | F | F | F |
31. $p \to (q \to r) \equiv (p \wedge q) \to r$
$$ p \to (q \to r) \leftrightarrow (p \wedge q) \to r $$
| $p$ | $q$ | $r$ | $(q \to r)$ | $(p \wedge q)$ | $p \to (q \to r)$ | $(p \wedge q) \to r$ |
| --- | --- | --- | ----------- | -------------- | ----------------- | -------------------- |
| T | T | T | T | T | T | T |
| T | T | F | F | T | F | F |
| T | F | T | T | F | T | T |
| T | F | F | T | F | T | T |
| F | T | T | T | F | T | T |
| F | T | F | F | F | T | T |
| F | F | T | T | F | T | T |
| F | F | F | T | F | T | T |
Rewrite each of the statements in 32 and 33 as a conjunction of two if-then
statements.
32. This quadratic equation has two distinct real roots if, and only if, its
discriminant is greater than zero.
"If this quadratic equation has two distinct real roots, then it's discriminant
is greater than zero and if this quadratic equation's discriminant is greater
than zero, then it has two distinct real roots."
33. This integer is even if, and only if, it equals twice some integer.
"If this integer is even, then it equals twice some integer and if this integer
is equal to twice some integer, then it is even."
Rewrite the statements in 34 and 35 in if-then form in two ways, one of which is
the contrapositive of the other. Use the formal definition of "only if."
34. The Cubs will win the pennant only if they win tomorrow's game.
Contrapositive:
"If the Cubs have not won tomorrow's game, then they will not win the pennant."
Only-if:
"If the Cub's won the pennant, then they will have won tomorrow's game."
35. Sam will be allowed on Signe's racing boat only if he is an expert sailor.
Contrapositive:
"If Sam is not an expert sailor, then he will not be allowed on Sign'es racing
boat."
Only-if:
"If Sam was allowed on Signe's racing boat, then he was an expert sailor."
36. Taking the long view on your education, you go to the Prestige Corporation
and ask what you should do in college to be hired when you graduate. The
personnel director replies that you will be hired _only if_ you major in
mathematics or computer science, get a B average or better, and take
accounting. You do, in fact, become a math major, get a B+ average, and take
accounting. You return to Prestige Corporation, make a formal application,
and are turned down. Did the personnel director lie to you?
No, because "only if" means that the conditions have already been met, not
conditions that have yet to be met. Because you "become a math major", "get a B+
average", and "take accounting", you have not fulfilled the director's
requirements, which is that "You _have_ majored in mathematics or computer
science, you have a B average or better, and you have taken accounting."
Some programming languages use statements of the form "$r$ unless $s$" to mean
that as long as $s$ does not happen, then $r$ will happen. More formally:
**Definition:**
If $r$ and $s$ are statements,
**$r$ unless $s$** means if $\neg s$ then $r$.
In 37-39 rewrite the statements in if-then form.
37. Payment will be made on fifth unless a new hearing is granted.
"If a new hearing is not granted, then payment will be made on the fifth."
38. Ann will go unless it rains.
"If it does not rain, then Ann will go."
39. This door will not open unless a security code is entered.
"If a security code is not entered, then this door will not open."
Rewrite the statements in 40 and 41 in if-then form.
40. Catching the 8:05 bus is a sufficient condition for my being on time for
work.
"If I catch the 8:05 bus, then I am on time for work."
41. Having two $45\degree$ angles is a sufficient condition for this triangle to
be a right triangle.
"If I have two $45\degree$ angles, then this triangle is a right triangle."
Use the contrapositive to rewrite the statements in 42 and 43 in if-then form in
two ways.
42. Being divisible by $3$ is a necessary condition for this number to be
divisible by $9$.
The statement is:
"If this number is not divisible by $3$, then this number is not divisible by
$9$."
The contrapositive is:
"If this number is divisible by $9$, then this number is divisible by $3$."
43. Doing homework regularly is a necessary condition for Jim to pass the
course.
The statement is:
"If Jim does not do homework regularly, then Jim does not pass the course."
The contrapositive is:
"If Jim passed the course, then Jim did the homework."
Note that "a sufficient condition for $s$ is $r$" means $r$ is a sufficient
condition for $s$ and that "a necessary condition for $s$ is $r$" means $r$ is a
necessary condition for $s$. Rewrite the statements in 44 and 45 in if-then
form.
44. A sufficient condition for Jon's team to win the championship is that it win
the rest of its games.
"If Jon's team wins the rest of its games, then it will win the championship."
45. A necessary condition for this computer program to be correct is that it not
produce error messages during translation.
"If this computer program produces error messages during translation, then this
computer program is not correct."
46. "If compound X is boiling, then its temperature must be at least
$150\degree$C." Assuming that this statement is true, which of the following
must also be true?
$p$ = "Compound X is boiling"
$q$ = "Compound X's temperature is at least $150\degree$C"
a. If the temperature of compound X is at least $150\degree$C, then compound X
is boiling.
$$ q \to p $$
This is not equivalent to $p \to q$, so this is not necessarily true.
b. If the temperature of compound X is less than $150\degree$C, then compound X
is not boiling.
$$ \neg q \to \neg p $$
This is the contrapositive statement, and is logically equivalent to the
original statement. This is therefore true.
c. Compound X will boil only if its temperature is at least $150\degree$C.
"If Compound X is boiling, then its temperature is at least $150\degree$C."
This is the same statement as the original $p \to q$, so this is true.
d. If compound X is not boiling, then its temperature is less than
$150\degree$C.
$$ \neg p \to q $$
This is not related to the original statement be it by contrapositive, converse,
inverse, only-if, etc. So this is not true.
e. A necessary condition for compound X to boil is that its temperature be at
least $150\degree$C.
"If Compound X is not at a boil, then its temperature is not at least
$150\degree$C."
$$ \neg p \to \neg c $$
This is the inverse of the statement, and therefore not equivalent to the
original statement.
f. A sufficient condition for compound X to boil is that its temperature be at
least $150\degree$C.
"If Compound X is at a boil, then its temperature is at least $150\degree$C"
This statement is equivalent to the original, and so therefore is true.
In 47-50(a) use the logical equivalences $p \to q \equiv \neg p \vee q$ and
$p \leftrightarrow q \equiv (\neg p \vee q) \wedge (\neg q \vee p)$ to rewrite
the given statement forms without using the symbol $\to$ or $\leftrightarrow$,
and (b) use the logical equivalence $p \vee q \equiv \neg(\neg p \wedge \neg q)$
to rewrite each statement form using only $\wedge$ and $\neg$.
a.
$$ p \to q \equiv \neg p \vee q $$
$$ p \leftrightarrow q \equiv (\neg p \vee q) \wedge (\neg q \vee p) $$
Avoid $\to$ and $\leftrightarrow$.
b.
$$ p \vee q \equiv \neg(\neg p \wedge \neg q) $$
Only use $\wedge$ and $\neg$.
47. $p \wedge \neg q \to r$
a.
$$ (p \wedge \neg q) \to r \equiv \neg(p \wedge \neg q) \vee r $$
b.
$$ (p \wedge \neg q) \to r \equiv \neg(p \wedge \neg q) \vee r $$
$$ \neg\left[(p \wedge \neg q) \wedge \neg r \right] $$
48. $p \vee \neg q \to r \vee q$
a.
$$ p \vee \neg q \to r \vee q \equiv \neg(p \vee \neg q) \vee (r \vee q) $$
b.
$$ \neg(p \vee \neg q) \vee (r \vee q) $$
$$ \neg\left[\neg\neg(p \vee \neg q) \wedge \neg(r \vee q)\right] $$
$$ \neg\left[(p \vee \neg q) \wedge \neg(r \vee q)\right] $$
$$ \neg\left[(p \vee \neg q) \wedge (\neg r \wedge \neg q)\right] $$
$$ \neg\left[(\neg p \wedge q) \wedge (\neg r \wedge \neg q)\right] $$
49. $(p \to r) \leftrightarrow (q \to r)$
a.
$$ (\neg(p \to r) \vee (q \to r)) \wedge (\neg(q \to r) \vee (p \to r)) $$
b.
$$ \neg(\neg\neg(p \to r) \wedge \neg(q \to r)) \wedge \neg(\neg\neg(q \to r) \wedge \neg(p \to r)) $$
$$ \neg((p \to r) \wedge \neg(q \to r)) \wedge \neg((q \to r) \wedge \neg(p \to r)) $$
50. $(p \to (q \to r)) \leftrightarrow ((p \wedge q) \to r)$
a.
$$ (\neg(p \to (q \to r)) \vee ((p \wedge q) \to r)) \wedge (\neg((p \wedge q) \to r) \vee (p \to (q \to r))) $$
$$ (\neg(\neg p \vee (q \to r)) \vee (\neg(p \wedge q) \vee r)) \wedge (\neg(\neg(p \wedge q) \vee r) \vee (\neg p \vee (q \to r))) $$
$$ (\neg(\neg p \vee (\neg q \vee r)) \vee (\neg(p \wedge q) \vee r)) \wedge (\neg(\neg(p \wedge q) \vee r) \vee (\neg p \vee (\neg q \vee r))) $$
b.
Stolen from Gemini (everything else done by hand so far, lol):
$$ \neg\left(\neg(p \wedge q \wedge \neg r) \wedge (p \wedge q \wedge \neg r)\right) \wedge \neg\left(\neg(p \wedge q \wedge \neg r) \wedge (p \wedge q \wedge \neg r)\right) $$
51. Given any statement form, is it possible to find a logically equivalent form
that uses only $\neg$ and $\wedge$? Justify your answer.
Yes, we can always convert any statement form into a logically equivalent form
using other equivalency identities and De Morgan's laws. Consider:
$$ p \to q \equiv \neg p \vee q $$
Using De Morgan's Law we can then:
$$ p \to q \equiv \neg(\neg(\neg p) \wedge \neg q) $$
$$ p \to q \equiv \neg(p \wedge \neg q) $$
Now let's consider:
$$ p \leftrightarrow q \equiv (p \to q) \wedge (q \to p) $$
$$ p \leftrightarrow q \equiv \neg(p \wedge \neg q) \wedge \neg(q \wedge \neg p) $$
---
**Exercise Set 2.3**
Page 99
Use modus ponens or modus tollens to fill in the blanks in the arguments of 1-5
so as to produce valid inferences.
1.
If $\sqrt{2}$ is rational, then $\sqrt{2} = \dfrac{a}{b}$ for some integers $a$
and $b$.
It is not true that $\sqrt{2} = \dfrac{a}{b}$ for some integers $a$ and $b$.
$\therefore$ ______.
2.
If $1 - 0.99999 \dots$ is less than every positive real number, then it equals
zero.
______.
$\therefore$ The number $1 - 0.99999 \dots$ equals zero.
3.
If logic is easy, then I am a monkey's uncle.
I am not a monkey's uncle.
$\therefore$ ______.
4.
If this graph can be colored with three colors, then it can be colored with four
colors.
This graph cannot be colored with four colors.
$\therefore$ ______.
5.
If they were unsure about the address, then they would have telephoned.
______.
$\therefore$ They were sure of the address.
Use truth tables to determine whether the argument forms in 6-11 are valid.
Indicate which columns represent the premises and which represent the
conclusion, and include a sentence explaining how the truth table supports your
answer. Your explanation should show that you understand what it means for a
form of argument to be valid or invalid.
6.
$$
p \to q \\
q \to p \\
\therefore p \vee q
$$
7.
$$
p \\
p \to q \\
\neg q \vee r \\
\therefore r
$$
8.
$$
p \vee q \\
p \to \neg q \\
p \to r \\
\therefore r
$$
9.
$$
p \wedge q \to \neg r \\
p \vee \neg q \\
\neg q \to p \\
\therefore \neg r
$$
10.
$$
p \vee q \to r \\
\therefore \neg r \to \neg p \wedge \neg q
$$
(This is the form of argument shown on pages 37 and 38.)
11.
$$
p \to q \vee r \\
\neg q \vee \neg r \\
\therefore \neg p \vee \neg r
$$
12. Use truth tables to show that the following forms of argument are invalid.
a.
$$
p \to q \\
q \\
\therefore p \\
\text{converse error}
$$
b.
$$
p \to q \\
\neg p \\
\therefore \neg q \\
\text{inverse error}
$$
Use truth tables to show that the argument forms referred to in 13-21 are valid.
Indicate which columns represent the premises and which represent the
conclusion, and include a sentence explaining how the truth table supports your
answer. Your explanation should show that you understand what it means for a
form of argument to be valid.
13. Modus tollens:
$$
p \to q \\
\neg q
\therefore \neg p
$$
14. Example 2.3.3(a)
15. Example 2.3.3(b)
16. Example 2.3.4(a)
17. Example 2.3.4(b)
18. Example 2.3.5(a)
19. Example 2.3.5(b)
20. Example 2.3.6
21 Example 2.3.7
Use symbols to write the logical form of each argument in 22 and 23, and then
use a truth table to test the argument for validity. Indicate which columns
represent the premises and which represent the conclusion, and include a few
words of explanation showing that you understand the meaning of validity.
22.
If Tom is not on team $A$, then Hua is on team $B$.
If Hua is not on team $B$, then Tom is on team $A$.
$\therefore$ Tom is not on team $a$ or Hua is not on team $B$.
23.
Oleg is a math major or Oleg is an economics major.
If Oleg is a math major, then Oleg is required to take Math 362.
$\therefore$ Oleg is an economics major or Oleg is not required to take
Math 362.
Some of the arguments in 24-32 are valid, whereas others exhibit the converse or
the inverse error. Use symbols to write the logical form of each argument. If
the argument is valid, identify the rule of inference that guarantees its
validity. Otherwise, state whether the converse or the inverse error is made.
24.
If Jules solved this problem correctly, then Jules obtained the answer $2$.
Jules obtained the answer $2$.
$\therefore$ Jules solved this problem correctly.
25.
This real number is rational or it is irrational.
This real number is not rational.
$\therefore$ This real number is irrational.
26.
If I go to the movies, I won't finish my homework.
If i don't finish my homework, I won't do well on the exam tomorrow.
$\therefore$ If I go to the movies, I won't do well on the exam tomorrow.
27.
If this number is larger than $2$, then its square is larger than $4$.
This number is not larger than $2$.
$\therefore$ The square of this number is not larger than $4$.
28.
If there are as many rational numbers as there are irrational numbers, then the
set of all irrational numbers is infinite.
The set of all irrational numbers is infinite.
$\therefore$ There are as many rational numbers as there are irrational numbers.
29.
If at least one of these two numbers is divisible by $6$, then the product of
these two numbers is divisible by $6$.
Neither of these two numbers is divisible by $6$.
$\therefore$ The product of these two numbers is not divisible by $6$.
30.
If this computer program is correct, then it produces the correct output when
run with the test data my teacher gave me.
This computer program produces the correct output when run with the test data my
teacher gave me.
$\therefore$ This computer program is correct.
31.
Sandra knows Java and Sandra knows C++.
$\therefore$ Sandra knows C++.
32.
If I get a Christmas bonus, I'll buy a stereo.
If I sell my motorcycle, I'll buy a stereo.
$\therefore$ If I get a Christmas bonus or I sell my motorcycle, then I'll buy a
stereo.
33. Give an example (other than Example 2.3.11) of a valid argument with a false
conclusion.
34. Give an example (other than Example 2.3.12) of an invalid argument with a
true conclusion.
35. Explain in your own words what distinguishes a valid form of argument from
an invalid one.
36. Given the following information about a computer program, find the mistake
in the program.
a. There is an undeclared variable or there is a syntax error in the first five
lines.
b. If there is a syntax error in the first five lines, then there is a missing
semicolon or a variable name misspelled.
c. There is not a missing semicolon.
d. There is not a misspelled variable name.
37. In the back of an old cupboard you discover a note signed by a pirate famous
for his bizarre sense of humor and love of logical puzzles. In the note he
wrote that he had hidden treasure somewhere on the property. He listed five
true statements (a-e below) and challenged the reader to use them to figure
out the location of the treasure.
a. If this house is next to a lake, then the treasure is not in the kitchen.
b. If the tree in the front yard is an elm, then the treasure is in the kitchen.
c. This house is next to a lake.
d. The tree in the front yard is an elm or the treasure is buried under the
flagpole.
e. If the tree in the back yard is an oak, then the treasure is in the garage.
Where is the treasure hidden?
38. You are visiting the island described in Example 2.3.14 and have the
following encounters with natives.
a. Two natives _A_ and _B_ address you as follows:
_A_ says: Both of us are knights.
_B_ says: _A_ is a knave.
What are _A_ and _B_?
b. Another two natives _C_ and _D_ approach you but only _C_ speaks.
_C_ says: Both of us are knaves.
What are _C_ and _D_?
c. You then encounter natives _E_ and _F_.
_E_ says: _F_ is a knave.
_F_ says: _E_ is a knave.
How many knaves are there?
d. Finally, you meet a group of six natives, _U_, _V_, _W_, _X_, _Y_, and _Z_,
who speak to you as follows:
_U_ says: None of us is a knight.
_V_ says: At least three of us are knights.
_W_ Says: At most three of us are knights.
_X_ says: Exactly five of us are knights.
_Y_ says: Exactly two of us are knights.
_Z_ says: Exactly one of us is a knight.
Which are knights and which are knaves?
39. The famous detective Percule Hoirot was called in to solve a baffling murder
mystery. He determined the following facts:
a. Lord Hazelton, the murdered man, was killed by a blow on the head with a
brass candlestick.
b. Either Lady Hazelton or a maid, Sara, was in the dining room at the time of
the murder.
c. If the cook was in the kitchen at the time of the murder, then the butler
killed Lord Hazelton with a false dose of strychnine.
d. If Lady Hazelton was in the dining room at the time of the murder, then the
chauffeur killed Lord Hazelton.
e. If the cook was not in the kitchen at the time of the murder, then Sara was
not in the dining room when the murder was committed.
f. If Sara was in the dining room at the time the murder was committed, then the
wine steward killed Lord Hazelton.
Is it possible for the detective to deduce the identity of the murderer from
these facts? If so, who did murder Lord Hazelton? (Assume there was only one
cause of death.)
40 Sharky, a leader of the underworld, was killed by one of his own band of four
henchmen. Detective Sharp interviewed the men and determined that all were lying
except for one. He deduced who killed Sharky on the basis of the following
statements:
a. Socko: Lefty killed Sharky.
b. Fats: Muscles didn't kill Sharky.
c. Lefty: Muscles was shooting craps with Socko when Sharky was knocked off.
d. Muscles: Lefty didn't kill Sharky.
Who did kill Sharky?
In 41-44 a set of premises and a conclusion are given. Use the valid argument
forms listed in Table 2.3.1 to deduce the conclusion from the premises, giving a
reason for each step as in Example 2.3.8. Assume all variables are statement
variables.
41.
a. $\neg p \vee q \to r$
b. $s \vee \neg q$
c. $\neg t$
d. $p \to t$
e. $\neg p \wedge r \to \neg s$
f. $\therefore \neg q$
42.
a. $p \vee q$
b. $q \to r$
c. $p \wedge s \to t$
d. $\neg r$
e. $\neg q \to u \wedge s$
f. $\therefore t$
43.
a. $\neg p \to r \wedge \neg s$
b. $t \to s$
c. $u \to \neg p$
d. $\neg w$
e. $u \vee w$
f. $\therefore \neg t$
44.
a. $p \to q$
b. $r \vee s$
c. $\neg s \to \neg t$
d. $\neg q \vee s$
e. $\neg s$
f. $\neg p \wedge r \to u$
g. $w \vee t$
h. $\therefore u \wedge w$