Discrete Mathematics and Its Applications (Ass)
Discrete Mathematics and Its Applications (Ass)
NPM : 2202050009
PRODI : ILMU KOMPUTER
a. ¬p: I did not buy a lottery ticket this week. Write these propositions using p and q and logical connectives
b. p ∨ q: I bought a lottery ticket this week or I won the million (including negations).
dollar jackpot (or both). a) It is below freezing and snowing.
c. p → q: If I bought a lottery ticket this week, then I won the b) It is below freezing but not snowing.
million dollar jackpot. c) It is not below freezing and it is not snowing.
d. p ∧ q: I bought a lottery ticket this week and I won the d) It is either snowing or below freezing (or both).
million dollar jackpot. e) If it is below freezing, it is also snowing.
e. p ↔ q: I bought a lottery ticket this week if and only if I f) Either it is below freezing or it is snowing, but it isnot
won the million dollar jackpot. snowing if it is below freezing.
f. ¬p → ¬q: If I did not buy a lottery ticket this week, then I g) That it is below freezing is necessary and sufficientfor it to
did not win the million dollar jackpot. be snowing.
g. ¬p ∧ ¬q: I did not buy a lottery ticket this week and I did not Answer:
win the million dollar jackpot.
h. ¬p ∨ (p ∧ q): Either I did not buy a lottery ticket this week a) P˄q e) P→ q
or I bought a lottery ticket and won the million dollar b) P ˄¬ q f) P ⊕ q
jackpot (or both). c) ¬p ˄¬ q g) p ↔ q
d) P˅q
9. Let p and q be the propositions “Swimming at the NewJersey
shore is allowed” and “Sharks have been spottednear the 12. Let p, q, and r be the propositions
shore,” respectively. Express each of these compound p :You have the flu.
propositions as an English sentence. q :You miss the final examination.
r :You pass the course.
a) ¬q b) p ∧ q c) ¬p ∨ q Express each of these propositions as an English sentence.
d) p → ¬q e) ¬q → p f ) ¬p → ¬q a) p → q b) ¬q ↔ r
c) q → ¬r d) p ∨ q ∨ r
g) p ↔ ¬q h) ¬p ∧ (p ∨¬q) e) (p → ¬r) ∨ (q →¬r) f ) (p ∧ q) ∨ (¬q ∧ r)
Answer:
Answer:
a) p → q: If you have the flu, you miss the final
a) ¬q: Sharks have not been spotted near the shore.
examination.
b) p ∧ q: Swimming at the New Jersey shore is allowed and
b) ¬q ↔ r: You do not miss the final examination if and
sharks have been spotted near the shore.
only if you pass the course.
c) ¬p ∨ q: Swimming at the New Jersey shore is not allowed or
c) q → ¬r: If you miss the final examination, then you do
sharks have been spotted near the shore (or both).
not pass the course.
d) p → ¬q: If swimming at the New Jersey shore is allowed,
d) p ∨ q ∨ r: You have the flu, or you miss the final
then sharks have not been spotted near the shore.
examination, or you pass the course (or more than one
e) ¬q → p: If sharks have not been spotted near the shore, then
of these).
swimming at the New Jersey shore is allowed.
e) (p → ¬r) ∨ (q → ¬r): Either, if you have the flu, then
f) ¬p → ¬q: If swimming at the New Jersey shore is not
you do not pass the course, or if you miss the final
allowed, then sharks have been spotted near the shore.
examination, then you do not pass the course.
g) p ↔ ¬q: Swimming at the New Jersey shore is allowed if
f) (p ∧ q) ∨ (¬q ∧ r): Either you have the flu and miss the
and only if sharks have not been spotted near the shore.
final examination, or you do not miss the final
h) ¬p ∧ (p ∨ ¬q): Swimming at the New Jersey shore is not
examination and pass the course.
allowed and either swimming at the New Jersey shore is
allowed or sharks have been spotted near the shore (or 13. Let p and q be the propositions
both). p :You drive over 65 miles per hour.
q :You get a speeding ticket.
10. Let p and q be the propositions “The election is decided”
Write these propositions using p and q and logical connectives
and “The votes have been counted,” respectively. Express (including negations).
a) You do not drive over 65 miles per hour.
each of these compound propositions as an English sentence. b) You drive over 65 miles per hour, but you do not geta
a) ¬p b) p ∨ q speeding ticket.
c) ¬p ∧ q d) q → p c) You will get a speeding ticket if you drive over65 miles
e) ¬q → ¬p f ) ¬p → ¬q per hour.
d) If you do not drive over 65 miles per hour, then youwill
g) p ↔ q h) ¬q ∨ (¬p ∧ q)
not get a speeding ticket.
Answer:
e) Driving over 65 miles per hour is sufficient for gettinga
a) The election is not decided speeding ticket.
b) The election is not decided, and the votes have been counted f ) You get a speeding ticket, but you do not drive over65
c) The votes have not been counted miles per hour.
d) If the votes have been counted then the election is decided g) Whenever you get a speeding ticket, you are drivingover
e) If the votes have not been counted then the election is not 65 miles per hour.
decided Answer:
f) If the election is not decided then the votes have been
a) ¬p: You do not drive over 65 miles per hour.
counted
b) p ∧ ¬q: You drive over 65 miles per hour, but you do not get
g) If and only if the election is decided will the votes have
been counted a speeding ticket.
c) p → q: If you drive over 65 miles per hour, then you will get c) If 1 + 1 = 3, then 2 + 2 = 5.
a speeding ticket. d) If monkeys can fly, then 1 + 1 = 3.
d) ¬p → ¬q: If you do not drive over 65 miles per hour, then
you will not get a speeding ticket. Answer:
e) p → q: Driving over 65 miles per hour is sufficient for
getting a speeding ticket. 1. a : False
2. b, c and d : True
f) ∧ ¬p: You get a speeding ticket, but you do not drive over
65 miles per hour. 18. Determine whether each of these conditional statementsis true
g) q → p: Whenever you get a speeding ticket, you are driving or false.
over 65 miles per hour.
a) If 1 + 1 = 3, then unicorns exist.
14. Let p, q, and r be the propositions b) If 1 + 1 = 3, then dogs can fly.
p :You get an A on the final exam. c) If 1 + 1 = 2, then dogs can fly.
q :You do every exercise in this book. d) If 2 + 2 = 4, then 1 + 2 = 3.
r :You get an A in this class. Answer:
Write these propositions using p, q, and r and
logicalconnectives (including negations). 1. a, b and d : True
a) You get an A in this class, but you do not do everyexercise 2. c : false
in this book. 19. For each of these sentences, determine whether an inclusive or,
b) You get an A on the final, you do every exercise in thisbook, or an exclusive or, is intended. Explain youranswer.
and you get an A in this class.
c) To get an A in this class, it is necessary for you to getan A a) Coffee or tea comes with dinner.
on the final. b) A password must have at least three digits or be atleast
d) You get an A on the final, but you don’t do every exercise in eight characters long.
this book; nevertheless, you get an A in thisclass. c) The prerequisite for the course is a course in
e) Getting an A on the final and doing every exercise inthis numbertheory or a course in cryptography.
book is sufficient for getting an A in this class. d) You can pay using U.S. dollars or euros.
f ) You will get an A in this class if and only if you eitherdo Answer:
every exercise in this book or you get an A on thefinal.
Answer: a) In this sentence, it is not clear whether an inclusive or
exclusive or is intended. It could mean that both coffee
a) p ∧ ¬q ∧ r b) p∧ ¬q ∧ r and tea will be served with dinner (inclusive or) or that
b) p∧q∧r c) (p ∧ q) → r only one of them will be served (exclusive or). Context
c) p→r d) r ↔ (q ∨ p) and additional information would be needed to determine
the intended meaning.
15. Let p, q, and r be the propositions b) An inclusive or is intended in this sentence. The password
p : Grizzly bears have been seen in the area. must meet either one of the conditions (having at least
q : Hiking is safe on the trail. three digits or being at least eight characters long), or
r : Berries are ripe along the trail. both.
Write these propositions using p, q, and r and c) An inclusive or is intended in this sentence. The
logicalconnectives (including negations). prerequisite for the course can be met by taking either one
a) Berries are ripe along the trail, but grizzly bears havenot of the courses (number theory or cryptography), or both.
been seen in the area. d) An exclusive or is intended in this sentence. The options
b) Grizzly bears have not been seen in the area and hiking on for payment are mutually exclusive - you can pay using
the trail is safe, but berries are ripe along thetrail. either U.S. dollars or euros, but not both.
c) If berries are ripe along the trail, hiking is safe if andonly if
grizzly bears have not been seen in the area. 20. For each of these sentences, determine whether an inclusive
d) It is not safe to hike on the trail, but grizzly bears havenot or, or an exclusive or, is intended. Explain youranswer.
been seen in the area and the berries along the trailare ripe.
a) Experience with C++ or Java is required.
e) For hiking on the trail to be safe, it is necessary but
b) Lunch includes soup or salad.
notsufficient that berries not be ripe along the trail andfor
c) To enter the country you need a passport or a
grizzly bears not to have been seen in the area.
voterregistrationcard.
f ) Hiking is not safe on the trail whenever grizzly bearshave
d) Publish or perish.
been seen in the area and berries are ripe alongthe trail.
Answer:
Answer:
a) Inclusive or is intended. The sentence implies that having
a. r ∧ ¬p d. ¬q ∧ ¬p ∧ r
experience in both C++ and Java is also acceptable.
b. ¬p ∧ q ∧ r e. (¬r ∧ ¬p) → q
b) Inclusive or is intended. The sentence implies that both soup
c. r → (q ↔ ¬p) f. (p ∧ r) → ¬q
and salad may be included in lunch.
16. Determine whether these biconditionals are true orfalse. c) Inclusive or is intended. The sentence implies that having
both a passport and a voter registration card is also
a) 2 + 2 = 4 if and only if 1 + 1 = 2. acceptable.
b) 1 + 1 = 2 if and only if 2 + 3 = 4. d) Exclusive or is intended. The sentence implies that
c) 1 + 1 = 3 if and only if monkeys can fly. publishing is the only acceptable option, and not publishing
d) 0 > 1 if and only if 2 > 1. will result in perishing (i.e., losing one's job or position).
Answer:
1. a and c : True
2. b and d : False
21. For each of these sentences, state what the sentence meansif
the logical connective or is an inclusive or (that is, a
17. Determine whether each of these conditional statementsis true disjunction) versus an exclusive or. Which of these
or false. meaningsof or do you think is intended?
23. Write each of these statements in the form “if p, then q”in a) If it is hot outside you buy an ice cream cone, and ifyou
English. [Hint: Refer to the list of common ways toexpress buy an ice cream cone it is hot outside.
conditional statements.] b) For you to win the contest it is necessary and
sufficientthat you have the only winning ticket.
a) It snows whenever the wind blows from the northeast. c) You get promoted only if you have connections, andyou
b) The apple trees will bloom if it stays warm for a week. have connections only if you get promoted.
d) If you watch television your mind will decay, and b) I go to the beach whenever it is a sunny summer day.
conversely. c) When I stay up late, it is necessary that I sleep untilnoon.
e) The trains run late on exactly those days when I takeit. Answer:
Answer:
a. Conditional statement: If it snows tonight, then I will stay
a) You buy an ice cream cone if and only if it is hot outside. at home.
b) ou will win the contest if and only if you have the only Converse: If I will stay at home tonight, then it snowed.
winning ticket. Contrapositive: If I will not stay at home tonight, then it
c) You get promoted if and only if you have connections, did not snow.
and you have connections if and only if you get promoted. Inverse: If it does not snow tonight, then I will not stay at
d) Your mind will decay if and only if you watch television. home.
e) I take the train on exactly those days when it runs late, b. Conditional statement: I go to the beach whenever it is a
and the train runs late on exactly those days when I take sunny summer day.
it. Converse: If it is a sunny summer day, then I go to the
beach. Contrapositive: If I do not go to the beach, then it
is not a sunny summer day.
26. Write each of these propositions in the form “p if andonly if q” Inverse: If it is not a sunny summer day, then I do not go
in English. to the beach.
c. Conditional statement: When I stay up late, it is necessary
a) For you to get an A in this course, it is necessary that I sleep until noon.
andsufficient that you learn how to solve discrete Converse: If I sleep until noon, then I stayed up late.
mathematics problems. Contrapositive: If I do not sleep until noon, then I did not
b) If you read the newspaper every day, you will be stay up late.
informed, and conversely. Inverse: If I do not stay up late, then it is not necessary
c) It rains if it is a weekend day, and it is a weekend dayif it that I sleep until noon.
rains.
d) You can see the wizard only if the wizard is not in,and the 29. How many rows appear in a truth table for each of
wizard is not in only if you can see him. thesecompound propositions?
Answer: a) p → ¬p
b) (p ∨¬r) ∧ (q ∨¬s)
a) You will get an A in this course if and only if you learn c) q ∨ p ∨¬s ∨¬r ∨¬t ∨ u
how to solve discrete mathematics problems. d) (p ∧ r ∧ t) ↔ (q ∧ t)
b) You will be informed if and only if you read the Answer:
newspaper every day.
c) It rains if and only if it is a weekend day, and it is a a) The compound proposition has one distinct propositional
weekend day if and only if it rains. variable, p. Therefore, the truth table will have 2 rows.
d) You can see the wizard if and only if the wizard is not in, b) The compound proposition has four distinct propositional
and the wizard is not in if and only if you can see him. variables, p, q, r, and s. Therefore, the truth table will have
24 = 16 rows.
c) The compound proposition has six distinct propositional
27. State the converse, contrapositive, and inverse of each ofthese variables, p, q, r, s, t, and u. Therefore, the truth table will
conditional statements. have 26 = 64 rows.
d) The compound proposition has five distinct propositional
a) If it snows today, I will ski tomorrow. variables, p, q, r, t, and u. Therefore, the truth table will
b) I come to class whenever there is going to be a quiz. have 25 = 32 rows.
c) A positive integer is a prime only if it has no divisorsother
than 1 and itself.
Answer: 30. How many rows appear in a truth table for each of
a. Conditional statement: If it snows today, I will ski thesecompound propositions?
tomorrow. a) (q → ¬p) ∨ (¬p →¬q)
Converse: If I will ski tomorrow, then it snowed today. b) (p ∨¬t) ∧ (p ∨¬s)
Contrapositive: If I will not ski tomorrow, then it did not c) (p → r) ∨ (¬s →¬t) ∨ (¬u → v)
snow today. d) (p ∧ r ∧ s) ∨ (q ∧ t) ∨ (r ∧¬t)
Inverse: If it did not snow today, then I will not ski Answer:
tomorrow.
b. Conditional statement: I come to class whenever there is a) The compound proposition has two distinct propositional
going to be a quiz. variables, p and q. Therefore, the truth table will have 2 2 =
Converse: If there is going to be a quiz, then I come to 4 rows.
class. b) The compound proposition has three distinct propositional
Contrapositive: If I do not come to class, then there is not variables, p, s, and t. Therefore, the truth table will have 2 3
going to be a quiz. Inverse: If there is not going to be a = 8 rows.
quiz, then I do not come to class. c) The compound proposition has six distinct propositional
c. Conditional statement: A positive integer is a prime only variables, p, r, s, t, u, and v. Therefore, the truth table will
if it has no divisors other than 1 and itself. have 26 = 64 rows.
Converse: If a positive integer has no divisors other than 1 d) The compound proposition has five distinct propositional
and itself, then it is a prime. variables, p, q, r, s, and t. Therefore, the truth table will
Contrapositive: If a positive integer is not a prime, then it have 25 = 32 rows.
has a divisor other than 1 and itself.
Inverse: If a positive integer has a divisor other than 1 and
itself, then it is not a prime. 31. Construct a truth table for each of these compound
propositions.
28. State the converse, contrapositive, and inverse of each ofthese
a) p ∧¬p b) p ∨¬p
conditional statements.
a) If it snows tonight, then I will stay at home. c) (p ∨¬q) → q d) (p ∨ q) → (p ∧ q)
e) (p → q) ↔ (¬q → ¬p)
f ) (p → q) → (q → p)
b.
Answer:
a. p ¬p p ∧ ¬p
T F F
F T F
p ¬p p ↔ ¬p
b. T F F
F T F
p ¬p p ∨ ¬p
T F T
F T T c.
p q p∨q p ⊕ (p ∨ q)
T T T F
T F T T
c.
F T T T
F F F F
p q ¬q p ∨ ¬q (p ∨ ¬q) → q
T T F T T
T F T T F
d.
F T F T T
F F T T T p q p∧q p∨q (p ∧ q) → (p ∨ q)
T T T T T
d. T F F T T
p q p∧q p∨q (p ∨ q) → (p ∧ q) F T F T T
T T T T T F F F F T
T F F T F
F T F T F e.
F F F F T
p q p∧q p∨q (p ∧ q) → (p ∨ q)
e. T T T T T
p q ¬p ¬q p→q ¬q → ¬p (p → q) ↔ (¬q → ¬p) T F F T T
T T F F T T T F T F T T
T F F T F F T F F F F T
F T T F T T T
F F T T T T T
f.
p q ¬q p↔q p ↔ ¬q (p ↔ q) ⊕ (p ↔ ¬q)
f.
T T F T F F
p q p→q q→p (p → q) → (q → p) T F T F T T
T T T T T F T F F T T
T F F T T F F T T F F
F T T F F
F F T T T
33. Construct a truth table for each of these compound
propositions.
32. Construct a truth table for each of these compound a) (p ∨ q) → (p ⊕ q) b) (p ⊕ q) → (p ∧ q)
propositions. c) (p ∨ q) ⊕ (p ∧ q) d) (p ↔ q) ⊕ (¬p ↔ q)
a) p → ¬p b) p ↔ ¬p e) (p ↔ q) ⊕ (¬p ↔¬r)
c) p ⊕ (p ∨ q) d) (p ∧ q) → (p ∨ q) f ) (p ⊕ q) → (p ⊕¬q)
e) (q → ¬p) ↔ (p ↔ q) Answer:
f ) (p ↔ q) ⊕ (p ↔¬q) a.
Answer:
p q p∨q p⊕q (p ∨ q) → (p ⊕ q)
a.
T T T F F
p ¬p p → ¬p T F T T T
T F F F T T T T
F T T F F F F T
p ¬p p ⊕ ¬p
b. T F T
F T T
p q p⊕q p∧q (p ⊕ q) → (p ∧ q)
T T F T T
T F T F T c) p ⊕¬q
F T T F T p q ¬q p ⊕ ¬q
F F F F T T T F T
T F T F
c. F T F F
F F T T
p q p∨q p∧q (p ∨ q) ⊕ (p ∧ q)
T T T T F
T F T F T d) ¬p ⊕¬q
F T T F T p q ¬p ¬q ¬p ⊕ ¬q
F F F F F T T F F F
T F F T T
F T T F T
F F T T F
e) (p ⊕ q) ∨ (p ⊕¬q)
d.
p q p⊕q ¬q p ⊕ ¬q (p ⊕ q) ∨ (p ⊕ ¬q)
p q ¬p p↔q ¬p ↔ q (p ↔ q) ⊕ (¬p ↔ q) T T F F T T
T T F T F T T F T T F T
T F F F T T F T T F F T
F T T F T T F F F T T T
F F T T F T
f) (p ⊕ q) ∧ (p ⊕¬q)
e. p q p⊕q ¬q p ⊕ ¬q (p ⊕ q) ∧ (p ⊕ ¬q)
T T F F T F
p q ¬p ¬r p↔q ¬p ↔ ¬r (p ↔ q) ⊕ (¬p ↔ ¬r)
T F T T F T
T T F F T T F
F T T F F F
T F F T F F T
F F F T T F
F T T F F F T
F F T T T T F
35. Construct a truth table for each of these compound
propositions.
d. a) p → ¬q b) ¬p ↔ q
c) (p → q) ∨ (¬p → q) d) (p → q) ∧ (¬p → q)
p q p⊕q p ⊕ ¬q (p ⊕ q) → (p ⊕ ¬q)
e) (p ↔ q) ∨ (¬p ↔ q)
T T F T T f ) (¬p ↔ ¬q) ↔ (p ↔ q)
T F T F T Answer:
F T T F F a) p→¬q
F F F T T
p q ¬q p → ¬q
T T F F
34. Construct a truth table for each of these compound
T F T T
propositions.
F T F T
a) p⊕p b) p ⊕¬p
F F T T
c) p ⊕¬q d) ¬p ⊕¬q
Answer: p q ¬p ¬p ↔ q
a) p ⊕ p T T F T
T F F F
p p⊕p
F T T F
T F
F F T T
F F
c) (p→q)∨(¬p→q)
b) p ⊕¬p
p q (p → q) (¬p → q) (p → q) ∨ (¬p → q)
T T T T T c)(p∧q)∨r
T F F T T
p q r (p ∧ q) (p ∧ q) ∨ r
F T T T T
T T T T T
F F T T T
T T F T T
T F T F T
d)(p→q)∧(¬p→q)
T F F F F
p q (p → q) (¬p → q) (p → q) ∧ (¬p → q) F T T F T
T T T T T F T F F F
T F F T F F F T F T
F T T T T F F F F F
F F T T T
d)(p∧q)∧r
e)(p↔q)∨(¬p↔q)
p q r (p ∧ q) (p ∧ q) ∧ r
p q ¬p (p ↔ q) (¬p ↔ q) (p ↔ q) ∨ (¬p ↔ q) T T T T T
T T F T T T T T F T F
T F F F T T
T F T F F
F T T F T T
T F F F F
F F T T T T
F T T F F
F T F F F
F F T F F
f)(¬p↔¬q)↔(p↔q)
F F F F F
p q ¬p ¬ (¬p ↔ (p ↔ (¬p ↔ ¬q) ↔ (p
q ¬q) q) ↔ q)
e)(p∨q)∧¬r
T T F F T T T
T F F T F F T p q r ¬r (p ∨ q) (p ∨ q) ∧ ¬r
F T T F F F T T T T F T F
F F T T T T T T T F T T T
T F T F T F
a) (p∨q)∨r
f)(p∧q)∨¬r
p q r (p ∨ q) (p ∨ q) ∨ r
p q r ¬r (p ∧ q) (p ∧ q) ∨ ¬r
T T T T T
T T T F T T
T T F T T
T T F T T T
T F T T T
T F T F F F
T F F T T
T F F T F T
F T T T T
F T T F F F
F T F T T
F T F T F T
F F T F T
F F T F F F
F F F F F
F F F T F T
b) (p∨q)∧r
37. Construct a truth table for each of these compound
p q r (p ∨ q) (p ∨ q) ∧ r propositions.
T T T T T a) p → (¬q ∨ r)
b) ¬p → (q → r)
T T F T F
c) (p → q) ∨ (¬p → r)
T F T T T d) (p → q) ∧ (¬p → r)
T F F T F e) (p ↔ q) ∨ (¬q ↔ r)
F T T T T f ) (¬p ↔ ¬q) ↔ (q ↔ r)
Answer:
F T F T F
F F T F F a) p → (¬q ∨ r)
F F F F F p q r ¬q ¬q ∨ r p → (¬q ∨ r)
T T T F T T
T T F F F F T T F F F T F F
T F T T T T T F T F T F F T
T F F T T T T F F F T F T F
F T T F T T F T T T F F T F
F T F F F T F T F T F T F F
F F T T T T F F T T T T F F
F F F T T T F F F T T T T T
c) (p → q) ∨ (¬p → r)
p q r ¬p ¬p → r p→q (p → q) ∨ (¬p → r)
T T T F T T T
T T F F F T T
39. Construct a truth table for (p ↔ q) ↔ (r ↔ s)
T F T F T F T
Answer:
T F F F T F T
F T T T T T T p q r s r↔s p↔q (p ↔ q) ↔ (r ↔ s)
F T F T T T T T T T T T T T
F F T T T T T T T T F F T F
F F F T T T T T T F T F T F
T T F F T T T
d) (p → q) ∧ (¬p → r) T F T T T F F
p q r ¬p p→q ¬p → r (p → q) ∧ (¬p → r) T F T F F F T
T T T F T T T T F F T F F T
T T F F T F F T F F F T F F
T F T F F T F F T T T T F F
T F F F F F F F T T F F F T
F T T T T T T F T F T F F T
F T F T T F F F T F F T F F
F F T T T T T F F T T T T T
F F F T T T T F F T F F T F
F F F T F T F
F F F F T T T
e) (p ↔ q) ∨ (¬q ↔ r)
p q r ¬q p↔q ¬q ↔ r (p ↔ q) ∨ (¬q ↔ r)
T T T F T F T 40. Explain, without using a truth table, why (p ∨¬q) ∧(q ∨¬r) ∧ (r
T T F F T T T ∨¬p) is true when p, q, and r have thesame truth value and it is
false otherwise.
T F T T F T T
T F F T F F F Answer:
1. Assume that at least one of p, q, and r is true and at least one Bitwise OR: 1111 1010
is false. Bitwise AND: 1010 0000
2. Without loss of generality, let us assume that p is true and q
and r are false. Bitwise XOR: 0101 1010
3. In this case, we know that ¬p, ¬q, and ¬r are all true since
they are negations of false values. c) For the bit strings 00 0111 0001 and 10 0100 1000:
4. Therefore, (¬p ∨ ¬q ∨ ¬r) is true since at least one of ¬p, ¬q,
and ¬r is true. Bitwise OR: 10 0111 1001
5. Similarly, (p ∨ q ∨ r) is true since at least one of p, q, and r
is true.
Bitwise AND: 00 0100 0000
6. Thus, we have shown that (p ∨ q ∨ r) ∧ (¬p ∨ ¬q ∨ ¬r) is Bitwise XOR: 10 0011 1001
true when at least one of p, q, and r is true and at least one is
false.
d) For the bit strings 11 1111 1111 and 00 0000 0000:
7. Now, suppose that all three variables have the same truth
value. Without loss of generality, let us assume that they are
all true.
Bitwise OR: 11 1111 1111
8. In this case, we know that ¬p, ¬q, and ¬r are all false since Bitwise AND: 00 0000 0000
they are negations of true values. Bitwise XOR: 11 1111 1111
9. Therefore, (¬p ∨ ¬q ∨ ¬r) is false since none of ¬p, ¬q, and
¬r is true.
10. Similarly, (p ∨ q ∨ r) is true since all three variables are true.
44. Evaluate each of these expressions.
11. Thus, we have shown that (p ∨ q ∨ r) ∧ (¬p ∨ ¬q ∨ ¬r) is
false when all three variables have the same truth value. a) 1 1000 ∧ (0 1011 ∨ 1 1011)
b) (0 1111 ∧ 1 0101) ∨ 0 1000
Therefore, we can conclude that (p ∨ q ∨ r) ∧ (¬p ∨ ¬q ∨ ¬r) is true c) (0 1010 ⊕ 1 1011) ⊕ 0 1000
when at least one of p, q, and r is true and at least one is false, but d) (1 1011 ∨ 0 1010) ∧ (1 0001 ∨ 1 1011)
is false when all three variables have the same truth value. Fuzzy logic is used in artificial intelligence. In fuzzy logic,
aproposition has a truth value that is a number between 0 and
1,inclusive.A proposition with a truth value of 0 is false and
42. What is the value of x after each of these statements onewith a truth value of 1 is true. Truth values that are between
isencountered in a computer program, if x = 1 before 0and 1 indicate varying degrees of truth. For instance, the
thestatement is reached? truthvalue 0.8 can be assigned to the statement “Fred is
a) if x + 2 = 3 then x := x + 1 happy,”because Fred is happy most of the time, and the truth
b) if (x + 1 = 3) OR (2x + 2 = 3) then x := x + 1 value0.4 can be assigned to the statement “John is happy,”
c) if (2x + 3 = 5) AND (3x + 4 = 7) then x := x + 1 becauseJohn is happy slightly less than half the time. Use these
d) if (x + 1 = 2) XOR (x + 2 = 3) then x := x + 1 truth
e) if x < 2 then x := x + 1 values to solve Exercises 45–47.
Answer:
Answer:
a) The condition "x + 2 = 3" is false since x = 1, so the
statement inside the "if" block is not executed. Therefore, x For the expression 1 1000 ∧ (0 1011 ∨ 1 1011):
remains 1. First, evaluate the OR operation: 0 1011 ∨ 1 1011 = 1 1011
b) The first condition "x + 1 = 3" is true since x = 1, so the
Then, evaluate the AND operation: 1 1000 ∧ 1 1011 = 1 1000
statement inside the "if" block is executed and x is updated
Therefore, the result is 1 1000.
to 2.
c) The conditions "2x + 3 = 5" and "3x + 4 = 7" are both false
since they simplify to "x = 1" and "x = 1. 5", respectively, b) For the expression (0 1111 ∧ 1 0101) ∨ 0 1000:
which are not true. Therefore, the statement inside the "if" First, evaluate the AND operation: 0 1111 ∧ 1 0101 = 0 0101
block is not executed and x remains 1. Then, evaluate the OR operation: 0 0101 ∨ 0 1000 = 0 1101
d) The first condition "x + 1 = 2" is true since x = 1, but the Therefore, the result is 0 1101.
second condition "x + 2 = 3" is false. Therefore, the "if"
block is executed and x is updated to 2.
e) The condition "x < 2" is false since x = 1, so the statement c) For the expression (0 1010 ⊕ 1 1011) ⊕ 0 1000:
inside the "if" block is not executed. Therefore, x remains 1. First, evaluate the XOR operation inside the parentheses: 0
1010 ⊕ 1 1011 = 1 0001
Then, evaluate the XOR operation with 0 1000: 1 0001 ⊕ 0
1000 = 1 1001 Therefore, the result is 1 1001.
d) For the expression (1 1011 ∨ 0 1010) ∧ (1 0001 ∨ 1 1011): determine the truth values of the statements "Fred is happy, or
First, evaluate the OR operation on each pair of operands: John is happy" and "Fred is not happy, or John is not happy".
Let's assume that the truth value of "Fred is happy" is 0.8 and the
1 1011 ∨ 0 1010 = 1 1011 truth value of "John is happy" is 0.6. Then, the truth value of "Fred
1 0001 ∨ 1 1011 = 1 1011 is happy, or John is happy" would be the maximum of their truth
Then, evaluate the AND operation: 1 1011 ∧ 1 1011 = 1 1011 values, which is 0.8.
Therefore, the result is 1 1011. Similarly, if the truth value of "Fred is happy" is 0.8, then the truth
value of "Fred is not happy" would be 1 minus the truth value of
"Fred is happy",which is 0.2. Likewise, if the truth value of "John
For the fuzzy logic question, the given truth values do not is happy" is 0.6, then the truth value of "John is not happy" would
correspond to any specific proposition, so a specific answer cannot be 1 minus the truth value of "John is happy", which is 0.4.
be given. However, in fuzzy logic, the truth value of a compound Therefore, the truth value of "Fred is not happy, or John is not
proposition is typically calculated using fuzzy logic operators such happy" would be the maximum of their truth values, which is 0.4.
as AND, OR, and NOT, which take into account the degree of
truth of the individual propositions.
48. Is the assertion “This statement is false” a proposition?
46. The truth value of the conjunction of two propositions infuzzy a) The nth statement, "Exactly n of the statements in this list
logic is the minimum of the truth values of the are false," is a paradoxical statement, as it is self-referential
twopropositions. What are the truth values of the statements and leads to a contradiction. If the statement is true, then it
implies that exactly n statements in the list are false,
“Fred and John are happy” and “Neither Fred nor John including itself, which means that the nth statement is false,
ishappy?” leading to a contradiction. On the other hand, if the
statement is false, then it implies that either more or less
Answer:
than n statements in the list are false, which also leads to a
The truth values of the statements "Fred and John are happy" and contradiction. Therefore, we cannot draw any meaningful
"Neither Fred nor John is happy" cannot be determined without conclusions from this statement.
additional information or context.
In fuzzy logic, the truth value of the conjunction (AND) of two b) Similar to part (a), the statement "At least n of the
propositions is the minimum of the truth values of the two statements in this list are false" is also self-referential and
propositions. For example, if the truth value of "Fred is happy" is leads to a paradox. If the statement is true, then it implies
0.8 and the truth value of "John is happy" is 0.6, then the truth that at least n statements in the list are false, including itself,
value of "Fred and John are happy" would be 0.6, which is the which means that the nth statement is true, leading to a
minimum of 0.8 and 0.6. contradiction. On the other hand, if the statement is false,
However, without knowing the truth values of the original then it implies that less than n statements in the list are false,
propositions "Fred is happy" and "John is happy," we cannot which also leads to a contradiction. Therefore, we cannot
determine the truth values of their conjunction or negation. draw any meaningful conclusions from this statement.
Additionally, the statement "Neither Fred nor John is happy" is a
negation of the statement "Fred or John is happy," and therefore,
we would need to know the truth values of the original statements c) If the list contains 99 statements, then the statement "At
to determine the truth value of their negation. least n of the statements in this list are false" would be true
for all values of n from 1 to 98. This is because there are
only 99 statements in the list, and if n is 99, then all
47. The truth value of the disjunction of two propositions infuzzy statements in the list must be false, which is a contradiction.
logic is the maximum of the truth values of the twopropositions. Therefore, the statement is true for all values of n less than
What are the truth values of the statements 99.
“Fred is happy, or John is happy” and “Fred is not happy,or John is
not happy?” However, if the statement is the 99th statement, then it leads
to a contradiction, as it implies that at least 99 statements in
Answer: the list are false, including itself. But if this were true, then
there would be no statements left in the list that are true,
Using the rule that the truth value of the disjunction (OR) of two
propositions is the maximum of their truth values, we can
leading to a contradiction. Therefore, the statement "At least No, If there was such a barber, who would shave him?
99 of the statements in this list are false" is false. If he shaved himself, he would be one of the people shaven by this
legendary barber, who only shave people that do not shave
themselves: obviously a contradiction.
50. An ancient Sicilian legend says that the barber in a
If he did not shave by himself, he should be shaven by the barber,
remotetown who can be reached only by traveling a
since he shaves all the people that do not shave themselves:
dangerousmountain road shaves those people, and only
another contradiction.
those people, who do not shave themselves. Can there be
Therefore, such a barber cannot exists.
such abarber?
Answer:
3. You can graduate only if you have completed the requirements
of your major and you do not owe money to theuniversity 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 havean overdue library book.”
Section 1.2 Applications of Propositional Logic - Exercises Answer:
In Exercises 1–6, translate the given statement into propositional Using the given propositional variables, we can express the
logic using the propositions provided. statement as follows:
1. You cannot edit a protected Wikipedia entry unless youare an "You can graduate if and only if (iff) you have completed the
administrator. Express your answer in terms of e:“You can edit requirements of your major and you do not owe money to the
a protected Wikipedia entry” and a: “Youare an administrator.” university and you do not have an overdue library book."
Answer:
Symbolically, we can represent this as:
The statement can be translated as: "You can edit a protected
Wikipedia entry if and only if you are an administrator." In
symbols: e ⇔ a This is a biconditional statement, which means r ∧ ¬m ∧ ¬b ↔ g
that it is true if and only if both the forward and backward
directions are true. In other words:
where ∧ represents "and" and ¬ represents "not".
If you are an administrator (a), then you can edit a protected
Wikipedia entry (e). This direction is true by definition. This can be read as "if and only if (iff) you have completed the
If you can edit a protected Wikipedia entry (e), then you are requirements of your major (r), and you do not owe money to the
an administrator (a). This direction is also true, since only university (¬m), and you do not have an overdue library book (¬b),
administrators can edit protected Wikipedia entries. then you can graduate (g)."
Therefore, the statement "You can edit a protected
Wikipedia entry unless you are an administrator" can be
4. To use the wireless network in the airport you must paythe
expressed as: "If you can edit a protected Wikipedia entry
daily fee unless you are a subscriber to the service.Express
(e), then you are an administrator (a)," or equivalently, "If
you are not an administrator (¬a), then you cannot edit a your answer in terms of w: “You can use the wireless network
protected Wikipedia entry (¬e)." in the airport,” d: “You pay the daily fee,”and s: “You are a
subscriber to the service.”
2. You can see the movie only if you are over 18 years oldor you Answer :
have the permission of a parent. Express your answer in terms Using the given propositional variables, we can express the
of m: “You can see the movie,” e: “You areover 18 years old,” statement as follows:
and p: “You have the permission of aparent.” "To use the wireless network in the airport, you must pay the daily
Answer: fee unless you are a subscriber to the service."
The statement can be translated as: "You can see the movie if and Symbolically, we can represent this as:
only if you are over 18 years old or you have the permission of a
parent." In symbols: m ⇔ (e ∨ p) This is a biconditional statement,
s → ¬d, and ¬s → w ↔ d → w
which means that it is true if and only if both the forward and
backward directions are true. In other words:
where → represents "implies" and ↔ represents "if and only if".
If you are over 18 years old (e) or you have the permission
of a parent (p), then you can see the movie (m). This
direction is true by definition. This can be read as "if you are a subscriber to the service (s), then
you do not have to pay the daily fee (¬d), and if you are not a
If you can see the movie (m), then you are either over 18
subscriber to the service (¬s), then you can use the wireless
years old (e) or you have the permission of a parent (p). This network in the airport (w) if and only if you pay the daily fee (d)."
direction is
also true, since these are the only two conditions under
which you can see the movie. Therefore, the statement "You 5. You are eligible to be President of the U.S.A. only if youare at
can see the movie only if you are over 18 years old or you least 35 years old, were born in the U.S.A, or at thetime of
have the permission of a parent" can be expressed as: "If your birth both of your parents were citizens, andyou have
you can see the movie (m), then you are over 18 years old lived at least 14 years in the country. Expressyour answer in
(e) or you have the permission of a parent (p)," or terms of e: “You are eligible to be President of the U.S.A.,”
equivalently, "If you are not over 18 years old (¬e) and you
do not have the permission of a parent (¬p), then you cannot a: “You are at least 35 years old,”
see the movie (¬m)."
b: “You were born in the U.S.A,” p: “At the time of yourbirth,
both of your parents where citizens,” and r: “Youhave lived at
least 14 years in the U.S.A.”
Answer: Answer:
Using the given propositional variables, we can express the a) The statement can be expressed as: if q, then p, using the
statement as follows: conditional connective. Symbolically, it would be
represented as q → p. In English, it means that the message is
scanned for viruses whenever it was sent from an unknown
"You are eligible to be President of the U.S.A. only if you are at system.
least 35 years old, were born in the U.S.A, or at the time of your
birth both of your parents were citizens, and you have lived at least
14 years in the country." b) The statement can be expressed as: q ∧ ¬p, using the
conjunction and negation connectives. Symbolically, it would
be represented as q ∧ ~p. In English, it means that the
Symbolically, we can represent this as: message was sent from an unknown system, but it was not
scanned for viruses.
(a ∧ b) ∨ (p ∧ r) ↔ e
c) The statement can be expressed as: p → q, using the
where ∧ represents "and", ∨ represents "or", and ↔ represents "if conditional connective. Symbolically, it would be
and only if". represented as p → q. In English, it means that it is necessary
to scan the message for viruses whenever it was sent from an
unknown system.
This can be read as "you are eligible to be President of the U.S.A.
(e) if and only if (iff) you are at least 35 years old (a) and were
born in the U.S.A (b), or at the time of your birth both of your d) The statement can be expressed as: ¬q → ¬p, using the
parents were citizens (p) and you have lived at least 14 years in the conditional and negation connectives. Symbolically, it would
country (r)." be represented as ~q → ~p. In English, it means that when a
message is not sent from an unknown system, it is not
scanned for viruses.
6. You can upgrade your operating system only if you havea 32-
bit processor running at 1 GHz or faster, at least1 GB RAM,
8. Express these system specifications using the propositions p
and 16 GB free hard disk space, or a 64-bit processor running
“The user enters a valid password,” q “Access isgranted,”
at 2 GHz or faster, at least 2 GBRAM, and at least 32 GB free
and r “The user has paid the subscription fee”and logical
hard disk space. Expressyou answer in terms of u: “You can
connectives (including negations).
upgrade your operating system,” b32: “You have a 32-bit
processor,” b64:“You have a 64-bit processor,” g1: “Your a) “The user has paid the subscription fee, but does notenter a
processor runsat 1 GHz or faster,” g2: “Your processor runs at valid password.”
2 GHz orfaster,” r1: “Your processor has at least 1 GB RAM,”
r2:“Your processor has at least 2 GB RAM,” h16: “You haveat b) “Access is granted whenever the user has paid
least 16 GB free hard disk space,” and h32: “You haveat least thesubscription fee and enters a valid password.”
32 GB free hard disk space.” c) “Access is denied if the user has not paid the subscription
Answer: fee.”
Using the given propositional variables, we can express the d) “If the user has not entered a valid password but haspaid the
statement as follows: subscription fee, then access is granted.”
"You can upgrade your operating system only if you have a 32-bit Answer:
processor running at 1 GHz or faster, at least 1 GB RAM, and 16
GB free hard disk space, or a 64-bit processor running at 2 GHz or a)The statement can be expressed as: r ∧ ¬p, using the conjunction
faster, at least 2 GB RAM, and at least 32 GB free hard disk and negation connectives. Symbolically, it would be represented as
space." r ∧ ~p. In English, it means that the user has paid the subscription
fee but does not enter a valid password.
Symbolically, we can represent this as:
(b32 ∧ g1 ∧ r1 ∧ h16) ∨ (b64 ∧ g2 ∧ r2 ∧ h32) ↔ u b) The statement can be expressed as: (r ∧ p) → q, using the
conditional connective. Symbolically, it would be represented as (r
where ∧ represents "and", ∨ represents "or", and ↔ represents "if ∧ p) → q. In English, it means that access is granted only if the
and only if". user has paid the subscription fee and enters a valid password.
This can be read as "you can upgrade your operating system (u) if
and only if (iff) you have a 32-bit processor (b32) running at 1 c) The statement can be expressed as: ¬r → ¬q, using the
GHz or faster (g1) and at least 1 GB RAM (r1) and 16 GB free conditional and negation connectives. Symbolically, it would be
hard disk space (h16), or you have a 64-bit processor (b64) represented as ~r → ~q. In English, it means that access is denied
running at 2 GHz or faster (g2) and at least 2 GB RAM (r2) and at if the user has not paid the subscription fee.
least 32 GB free hard disk space (h32)."
17. When three professors are seated in a restaurant, the hostess 20. A says “The two of us are both knights” and B says “Ais a
asks them: “Does everyone want coffee?” The firstprofessor says: knave.”
“I do not know.” The second professorthen says: “I do not know.” Answer:
Finally, the third professor
Person A is a knave, and person B is a knight.
says: “No, not everyone wants coffee.” The hostess comesback and
gives coffee to the professors who want it. Howdid she figure out Person A says "the two of us are both knights" and person B says
who wanted coffee? "A is a knave."If person B is a knight, person A must be a knave. If
person B is a knave, person A must be a knight. Either way,
Answer: persons A and B cannot both be knights. Because person A's
The hostess knows to bring two coffees because both professors 1 statement is untrue, person A is a knave. Thus, person B is not
and 2 consider the option where everyone wants coffee to be lying and must be a knight.
viable, but professor 3 knows there is no way for everyone to want
coffee; hence, she does not want it.
21. A says “I am a knave or B is a knight” and B says nothing.
Answer:
18. When planning a party you want to know whom to invite.
Among the people you would like to invite are Either Person A is a knight and Person B is a knave, or Person A is
threetouchyfriends.You know that if Jasmine attends, she a knave and Person B is a knight.
willbecome unhappy if Samir is there, Samir will attend onlyif
Kanti will be there, and Kanti will not attend unless Jasmine also Person A says "I am a knave or person B is a knight" and person B
does.Which combinations of these threefriendscan you invite so as says nothing. Person B's silence gives no information as to whether
not to make someone unhappy? she is a knight or knave.
Answer: If person A is a knave, the first half of the statement is true so the
second half must be a lie. Thus, person B is a knave as well.
Options:
If person A is a knight, the first half of the statement is untrue so
Jasmine and Kanti attend the second half must be true. Thus, person A can be a knight if
person B is a knave.
only Jasmine attends
the hostess does not invite anyone over
22. Both A and B say “I am a knight.”
Answer:
The question: who to invite? Options are Jasmine, Samir, and
Kanti. We cannot narrow down the situation at all.
JSK If a person says they are a knight, they are either telling the truth as
a knight or lying as a knave. When person A and B both say "I am
T TT - Jasmine is unhappy because Samir is there a knight," both of them could be telling the truth, both could be
T T F - J unhappy because S is there lying, or either one could be telling the truth as the other lies. Thus,
we cannot narrow down the possibilities as to whether persons A
T F T - this scenario works without drama and B are knights or knaves.
C must be the knave. As required, C's claim is false. This is a
solution. Now we will examine whether there are others.
23. A says “We are both knaves” and B says nothing.
If person A is the spy, she is allowed to lie to say she is the knight.
Answer: Person B must be the knave or the knight. She is telling the truth if
A is a knave, and B is a knight. she is a knave, which is impossible, and she is lying if she is the
knight, which is also impossible. Thus, person A cannot be the spy.
A says "we are both knaves" and B says nothing. Because B says
nothing, we cannot initially interpret whether she is a knight or If person A is the knave, she lies to say she is the knight. Person B
whether she is a knave. If both A and B are knaves, then A's can be either spy or knight, and she must be the spy because to say
statement is correct. However, she would then be telling the truth she is the knave is untrue. Person C must then be the knight.
and thus not be a knave. Yet if she is a knight, she would not be However, the statement that B is the knight is false, so she cannot
able to say she was a knave. Therefore, B must be a knave and A be the knight. Person A cannot be the knave.
must be a knight. They are not both knaves.
24. A says “C is the knave,” B says, “A is the knight,” and Csays “I 27. A says “I am the knight,” B says “A is telling the truth,”and C
am the spy.” says “I am the spy.”
Answer: Answer:
Person A is the knight, person B is the spy, and person C is the Person A is the knight, person B is the spy, and person C is the
knave. knave.
A says "C is the knave," B says, "A is the knight," and C says "I Person A says "I am the knight," B says "A is telling the truth," and
am the spy." C says "I am the spy."
One knight, one knave, one spy. Person A can be the knight. In this case, person B's statement is
If A is the knight, C is the knave. In this case, she does indeed lie. true, so B can be the spy. C's statement is thus a lie, so she can be
This would require B to be the spy. Since she says that A is the the knave and the system works.
knight, she is choosing to tell the truth. If person A is the spy, she chooses to lie with her statement. B's
If A is the knave, then C is not the knave. B's statement is untrue. statement is also a lie, so B must be the knave. However, C claims
Because this is a lie and the knave spot is taken, B must be the spy. to be the spy but must be the knight, who doesn't lie. Therefore,
However, C also is lying so none of the three are knights. person A cannot be the spy.
Therefore, this situation is impossible. If person A is the knave, her statement is a lie, as necessary. B is
If A is the spy, then her statement provides no conclusive also lying, so she must be a spy. However, C is also lying to say
information about the identity of person C. However, person B is she is a spy because she must be a knight. Knights don't lie, so
known to be lying and thus must be the knave (because the spy person A cannot be the knave.
position is taken). By elimination, person C must be the knight
who tells the truth. Since this identity contradicts the statement of
person C, she cannot be the knight. 28. A says “I am the knight,” B says, “A is not the knave,”and C
says “B is not the knave.”
Therefore, A must be the knight. Person B is telling the truth, so
she must be the spy making the choice to tell the truth. Therefore, Answer:
person C is the knave.
Person A is the knave, B is the spy, and C is the knight.
A says "I am the knight," B says "A is not the knave," and C says
25. A says “I am the knight,” B says “I am the knave,” andC says "B is not the knave."
“B is the knight.”
A can be the knight. In this case, B is telling the truth and must be
Answer: a spy. Yet C cannot be the knave, because her statement is true. So
A cannot be the knight.
Person A is the knight, person B is the spy, and person C is the
knave. If A is the spy, she is allowed to lie and does so. So B tells the truth
and must be the knight. C's statement is correct, so she can't be the
knave, as required in the scenario. A cannot be the spy either.
Person A says "I am the knight," person B says "I am the knave,"
and person C says "B is the knight."
Can A be the knave? Her statement is a lie, as required for her to
If person A is the knight, she is telling the truth. Person B is either be the knave. B lies, so she must be the spy as knave is already
the knave or the spy. She cannot be the knave or her statement taken. C's statement is true, so she is the knight, as required.
would be true, which is impossible. Thus, she is the spy and person
29. A says “I am the knight,” B says “I am the knight,” andC says out of townthe day Cooper was killed. Williams also states that
“I am the knight.” hesaw both Smith and Jones with Cooper the day of thekilling and
that either Smith or Jones must have killedhim. Can you determine
Answer: who the murderer was if
There are no unique solutions. a) one of the three men is guilty, the two innocent menare telling
Person A says "I am the knight," B says "I am the knight," and C the truth, but the statements of the guiltyman may or may not be
says "I am the knight." true?
One of them must be telling the truth. Without loss of generality, b) innocent men do not lie?
let's say A is the knight. Then either B or C is lying by choice and Answer:
the other is lying because they are the knave. As long as one of
them is a knight, one is a knave, and one is the spy, each of A, B, See step by step for the solution.
and C can be any of the positions.
a) 2 innocent, 1 guilty. 2 innocent men are telling the truth, the
30. A says “I am not the spy,” B says “I am not the spy,” andC says guilty one might be lying
“A is the spy.”
Answer:
Smith states Cooper was a friend of Jones. Jones however states
Either: that he didn't know Cooper.
A is the knight, B is the spy, and C is the knaveorA is the knave, B That means either Smith or Jones is lying.
is the knight, and C is the spy.
Williams states he saw Cooper with Jones the day he was killed.
Person A says, "I am not the spy," B says "I am not the spy," and C Jones however states that he didn't know Cooper. That means
says "A is the spy." either Jones or Smith is lying.
Since we know 2 people are telling the truth, Jones is the one
lying. That means he is the murderer.
If A is the knight, she is not the spy. Person B may or may not be
lying, and person C is definitely lying because A is not the spy. B
can be the knave or spy. B's statement is true if B is the knave, so
B is the spy and C is thus the knave. b) Using the same logic as in a, we can deduce that if anyone is
lying it is Jones. So again, we can deduce he is the killer.
If A is the spy, then she is choosing to lie and both B and C are
telling the truth. Neither of them can be the knave, so A cannot be From the first statement "If Fred is not the highest paid of the
the spy. three, then Janice is", we can deduce Maggie is not the highest
If A is the knave, her statement is true. Therefore, she cannot be the paid.
knave.
Because someone must be the knave, yet this person's statement But, the second statement says "If Janice is not the lowest paid,
evaluates to true under this condition, there are no solutions. Maggie is paid the most". Since we know Maggie is not the
highest paid, we can deduce Janice is the lowest paid.
Lets start from statement 2. There are 2 possibilities for statement All these four statements have to be true. Lets try to see if we can
2 to be true; R true, V false and V true, R false. We will examine conclude whether we can conclude who is telling the truth and who
both of those possibilities. is lying.
First lets assume R is true. Then V is false. Lets start from C. We will first assume C is true, and then that C is
false and check what this tells us about other variables.
For statement 4 to be true K is also false.
For statement 1 to be true H is true.
I) Assume C is true
But now, since H is true, from statement 5 A∧K has to be true, so A
and K both have to be true. But we already know K is not true. We If C is true, H has to be false (in order for statement 4 to be true)
have arrived to a contradiction. There is no solution where R
would be true and V false. If H is false, G has to be true (in order for statement 3 to be true)
If G is true, C cannot be true as well, because then statement 2 will
be false. Therefore C would have to be false. However, since the
So, R is true, V is false is not possible. assumption was C is true, this cannot be the case.
We conclude C cannot be true and all the listed statements valid.
Lets try the other option.
V is true, R is false II) Assume C is false
For statement 3 to be true, if R is false, A has to be false. If C is false, B has to be false in order for statement 1 to be true.
For statement 4 to be true, if V is true, K also has to be true. However, since C is false, statements 2 and 4 will be true whether
H and G are true or false.
If A is false, A∧K is also false. Now, for statement 5 to be true, H
has to be false. Therefore the only thing we can conclude is G and H cannot both
be false (in order for statement 3 to be valid).
To sum up, the possible solutions are
So, V,K are true, and R,A,H have to be false.
1) C false, B false, G true, H true.
2) C false, B false, G true, H false.
35. A detective has interviewed four witnesses to a crime.From the
stories of the witnesses the detective has concluded that if the 3) C false, B false, G false, H true.
butler is telling the truth then so is thecook; the cook and the
Therefore, the detective cannot determine whether G and H are the greenhouse drinks coffee. The Norwegian’s house is next to
telling the truth or lying. theblue one.
36. Four friends have been identified as suspects for an The violinist drinks orange juice. The fox is ina house next to that
unauthorized access into a computer system. They have of the physician. The horse is in ahouse next to that of the
madestatements to the investigating authorities. Alice said“Carlos diplomat. [Hint: Make a tablewhere the rows represent the men
did it.” John said “I did not do it.” Carlos said“Diana did it.” Diana and columns representthe color of their houses, their jobs, their
said “Carlos lied when he said thatI did it.” pets, and theirfavorite drinks and use logical reasoning to
determine thecorrect entries in the table.]
a) If the authorities also know that exactly one of thefour suspects
is telling the truth, who did it? Explainyour reasoning. Answer:
b) If the authorities also know that exactly one is lying,who did it? The Norwegian's favorite drink is the mineral water and the
Explain your reasoning. Japanese man has the pet Zebra.
Answer:
a) Johnb)Carlos. 39. Freedonia has fifty senators. Each senator is either honestor
corrupt. Suppose you know that at least one of the Freedonian
a)Immediately we can see that either Carlos or Diana are lying. senators is honest and that, given any two Freedonian senators, at
If Carlos is telling the truth, so is John. least one is corrupt. Based on thesefacts, can you determine how
many Freedoniansenatorsare honest and how many are corrupt? If
So, Carlos cannot be telling the truth (because then 2 people would so, what is theanswer?
be telling the truth).
Answer:
Therefore, Diana is telling the truth. But then, John cannot be
telling the truth. Therefore, John has to be the one who did it. 1 senator is honest, 49 are corrupt.
We know at least one senator is honest. Lets assume 2 senators are
honest.
b)Again, either Carlos or Diana are lying.
Also, either Carlos or Alice are lying.
If 2 senators are honest, the statement "given any two Freedonian
Therefore, Carlos is the only possible guilty one. That is also senators, at least one is corrupt" is not true for those 2 honest
consistent with John's statement. senators.
37. Suppose there are signs on the doors to two rooms. Thesign on Therefore, 1 senator is honest and 49 are corrupt.
the first door reads “In this room there is a lady,and in the other
one there is a tiger”; and the sign on thesecond door reads “In one
of these rooms, there is a lady,and in one of them there is a tiger.” 40. Find the output of each of these combinatorial circuits.
Suppose that youknow that one of these signs is true and the other
is false.Behind which door is the lady? a) p q
Answer: b) p p q
The lady is behind door #2 Answer:
Door 1) In this room there is a lady,and in the other one there is a a) (¬p∨¬q)
tiger
b) ¬(p∨((¬p)∧q))
Door 2) In one of these rooms, there is a lady, and in one of them
there is a tiger. a) Starting from the left.
First, the output of the top Not gate is : ¬ p
We know 1 sign is true and the other one false. The output of the bottom Not gate is: ¬ q.
If the sign on door 1 is true, then the sign on door 2 is also true. The output of the OR gate is (¬ p ∨¬ q).
On the other hand, if the sign on door 1 is false, the second one is Therefore the output of this circuit is
still true. (¬p∨¬q).
a) ¬(p ∧ ( q ∨¬ r))
b) (( ¬ p) ∧ ( ¬ q)) ∨(p ∧ r)
The output of the AND gate is p ∧( q∨¬ r). 43. Construct a combinatorial circuit using inverters,OR gates, and
AND gates that produces the output((¬p ∨¬r) ∧¬q) ∨ (¬p ∧ (q ∨ r))
Therefore the output of this circuit is
from input bits p,q, and r.
¬(p∧(q∨¬r)).
Answer:
Then ,the output of the top AND gate is ( ¬ p) ∧ ( ¬ q). The output
of the bottom AND gate is p ∧ r.
((¬p)∧(¬q))∨(p∧r).
Note that there are six terms in the expression, two p's, q's, and r's.
Four of these are negated, so we must put inverters after these
42. Construct a combinatorial circuit using inverters,OR gates, and (namely, p, r, q, and p). Now we have two subexpressions ¬p∨¬r
AND gates that produces the output(p ∧¬r) ∨ (¬q ∧ r) from input and q∨r. So we need to add two "or" gates between the
bits p, q, and r. correspondingterms. The next subterms we need are the ¬q and
¬p. Now we use two "and" gates to create the (¬p∨¬r)∧¬q and
Answer: ¬p∧(q∨r). Finally, we add an "or" gate between these two to
create the final expression.
Section 1.3 - Propositional Equivalences – Exercises
1. Use truth tables to verify these equivalences.
a) p ∧ T ≡ p b) p ∨ F ≡ p
c) p ∧ F ≡ F d) p ∨ T ≡ T
e) p ∨ p ≡ p f ) p ∧ p ≡ p
Answer:
b) p ∧ q ≡ q ∧ p.
Answer:
a.
p q p∨q q∨p
T T T T
T F T T
F T T T
F F F F
b.
p q p∧q q∧p
T T T T
T F F F
F T F F
F F F F
In the truth tables for (a) and (b):
Columns 3 and 4 are identical, so the propositions are equivalent
a) (p ∨ q) ∨ r ≡ p ∨ (q ∨ r).
b) (p ∧ q) ∧ r ≡ p ∧ (q ∧ r).
Answer:
a.
T T T T T T T
T T F T T T T
T F T T T T T
T F F T T F T
F T T T T T T
F T F T T T T
F F T F T T T
F F F F F F F
b.
p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r).
Answer:
p q r q ∨r p ∧(q∨r
T T T T T
T T F T T
T F T T T
T F F F F
F T T T F
F T F T F
F F T T F
F F F F F
p q r p ∧q p ∧r (p∧q)∨(p∧r)
T T T T T T
T T F T F T
T F T F T T
T F F F F F
F T T F F F
F T F F F F
F F T F F F
F F F F F F
6. Use a truth table to verify the first De Morgan law¬(p ∧ q) ≡¬p ∨¬q.
Answer:
p q p ∧q ¬(p∧q) ¬p ¬q ¬p∨¬q
T T T F F F F
T F F T F T T
F T F T T F T
F F F T T T T
a) (p ∧ q) → p b) p → (p ∨ q)
c) ¬p → (p → q) d) (p ∧ q) → (p → q)
e) ¬(p → q) → p f ) ¬(p → q) → ¬q
Answer:
a) The conditional statement is a tautology because the last column of the following truth table contains only True values.
p q p ∧q (p∧q)→p
T T T T
T F F T
F T F T
T F F T
b) The conditional statement is a tautology because the last column of the following truth table contains only True values.
p q p ∨q p→(p∨q)
T T T T
T F T T
F T T T
T F F T
c) The conditional statement is a tautology because the last column of the following truth table contains only True values.
d) The conditional statement is a tautology because the last column of the following truth table contains only True values.
p q p ∧q p→q (p∧q)→(p→q)
T T T T T
T F F F T
F T F T T
F F F T T
e) The conditional statement is a tautology because the last column of the following truth table contains only True values.
f) The conditional statement is a tautology because the last column of the following truth table contains only True values.
a) [¬p ∧ (p ∨ q)] → q
b) [(p → q) ∧ (q → r)] → (p → r)
c) [p ∧ (p → q)] → q
d) [(p ∨ q) ∧ (p → r) ∧ (q → r)] → r
Answer:
In all parts I divide each values and mentioned their truth values respectively and where there is logical equivalences used I mentioned their truth
values accordingly as there were used conjunction, disjunction and implication are used.
11. Show that each conditional statement in Exercise 9 is atautology without using truth tables.
Answer:
For each of these, I will give a proof via a chain of logical equivalences (eq), and a standard proof (pf). For the problem you do not need to do
both. Rather, it is here to show you two ways to solve the same problem. This might depend on which class you are taking.
a) (eq) Show (p∧q)⇒q is a tautology (a true statement). Let us first note that for two atomic formula a and b, there is the equivalence a ⇒b≡¬a∨b.
Thus,
(p∧q)⇒q≡¬(p∧q)∨q
Now we can use one of De Morgan's laws, namely ¬(a∧b)≡¬a∨¬b. This yields
¬(p∧q)∨q≡(¬p∨¬q)∨q
Now by associativity of disjunction (∨), the relation a∨(b∨c)≡(a∨b)∨c holds. Using this, we get
(¬p∨¬q)∨q≡¬p∨(¬q∨q)
However, this is the Law of Excluded Middle, i.e. a∨¬a≡T. By this and commutivity of disjunction (∨),
¬p∨(¬q∨q)≡¬p∨T
Yet, by the laws of disjunction (∨), we have that a∨T≡T. So our final logical equivalence is
¬p∨T≡T
Thus, through a chain of equivalences, we have shown that (p∧q)⇒q≡T, so it is a tautology as required.
In order to prove an implication, we assume the hypothesis and try to prove the conclusion. Thus, suppose p∧q is true, then by the definition of
conjunction (∧), both p and q are true. Therefore, q is true. Hence, we have shown the conclusion assuming the hypothesis, so (p∧q)⇒q is true.
b) (eq) Show that p⇒(p∨q) is a tautology. Using the same rule for implication above,
p⇒(p∨q)≡¬p∨(p∨q)
¬p∨(p∨q)≡(¬p∨p)∨q
(¬p∨p)∨q≡T∨q
T∨q≡T
As before, to prove an implication, we assume the hypothesis and show the conclusion. Hence, assume p is true, then since one of p or q is true
(namely p), we have that p∨q holds. Thus, since we have arrived at the conclusion, this proves that p⇒(p∨q).
For the next two problems, unless I use a new logical equivalence, I will simply list the equivalences:
By the Law of Double Negation and the rule for implication, i.e. ¬¬a≡a, we have
¬p⇒(p⇒q)≡p∨(p⇒q)
p∨(p⇒q)≡p∨(¬p∨q)
p∨(¬p∨q)≡(p∨¬p)∨q
(p∨¬p)∨q≡T∨q
T∨q≡T
So ¬p⇒(p⇒q)≡T.
To prove the implication, suppose ¬p is true. Now we wish to prove p⇒q, so assume p is true, then we have that ¬p∧p is true. However, this the
Law of Contradiction, i.e.¬p∧p≡F, but this means that T≡F since we know that ¬p∧p is true. Hence, we can use the Principle of Explosion, which
says that if we have shown T≡F, then everything is true, because truth and falsehood are the same. Thus, q is true. Since we assumed p and
proved q, we know p⇒q is true. However, since we assumed ¬p and proved p⇒q, then we know that ¬p⇒(p⇒q) is true.
(p∧q)⇒(p⇒q)≡¬(p∧q)∨(p⇒q)
¬(p∧q)∨(p⇒q)≡(¬p∨¬q)∨(p⇒q)
(¬p∨¬q)∨(p⇒q)≡(¬p∨¬q)∨(¬p∨q)
(¬p∨¬q)∨(¬p∨q)≡(¬p∨¬q)∨(q∨¬p)
(¬p∨¬q)∨(q∨¬p)≡((¬p∨¬q)∨q)∨¬p
((¬p∨¬q)∨q)∨¬p≡(¬p∨(¬q∨q))∨¬p
(¬p∨(¬q∨q))∨¬p≡(¬p∨T)∨¬p
(¬p∨T)∨¬p≡T∨¬p
T∨¬p≡T
So (p∧q)⇒(p⇒q) is a tautology.
d) (pf) To prove the first implication, suppose p∧q is true, then p is true and q is true. Now, to show the second implication, suppose p is true, then
since q is true, by the last sentence, we have shown p⇒q. However, since we assumed p∧q and proved p⇒q, we have that (p∧q)⇒(p⇒q).
¬(p⇒q)⇒p≡¬(¬p∨q)⇒p
¬(¬p∨q)⇒p≡(¬p∨q)∨p
(¬p∨q)∨p≡(q∨¬p)∨p
(q∨¬p)∨p≡q∨(¬p∨p)
q∨(¬p∨p)≡q∨T
q∨T≡T
e) (pf) To prove the implication, assume ¬(p⇒q) is true. Now note that T always holds, and that T≡p∨¬p. (Here we need to use case analysis
since we do not know which is true, p or ¬p). By case analysis:
1) Suppose p is true.
2) Suppose ¬p is true, then at least one of ¬p or q is true, so ¬p∨q is true. But remember that ¬p∨q≡p⇒q, so the implication p⇒q is true.
However, now we have that ¬(p⇒q) and p⇒q is true. By the Law of Contradiction, we have shown that T≡F. So by the Principle of Explosion,
we can assume whatever we want. In particular, p is true.
Since for all cases we showed that p is true, we have shown that ¬(p⇒q)⇒p is a tautology.
¬(p⇒q)⇒¬q≡(p⇒q)∨¬q
(p⇒q)∨¬q≡(¬p∨q)∨¬q
(¬p∨q)∨¬q≡¬p∨(q∨¬q)
¬p∨(q∨¬q)≡¬p∨T
¬p∨T≡T
f) (pf) To prove the implication, suppose ¬(p⇒q) is true, then since T≡¬q∨q, we can use case analysis:
1) Suppose ¬q is true.
2) Suppose q is true, then at least one of ¬p or q is true, so ¬p∨q is true. However, ¬p∨q≡p⇒q, so the implication p⇒q is true. Now we have
reached a contradiction since ¬(p⇒q) is true as well. By the Principle of Explosion, we can assume ¬q to be true.
Since we have shown that ¬q is true in both cases, then ¬(p⇒q)⇒¬q is true.
12. Show that each conditional statement in Exercise 10 is atautology without using truth tables.
Answer:
a) Assume the hypothesis is true. Then p is false. Since p ∨ q is true, we conclude that q must be true. Here
is a more “algebraic” solution: [¬p ∧ (p ∨ q)] → q ≡¬[¬p ∧ (p ∨ q)] ∨ q ≡¬¬p ∨¬(p ∨ q)] ∨ q ≡ p ∨¬(p ∨ q) ∨ q ≡
(p ∨ q) ∨¬(p ∨ q) ≡ T . The reasons for these logical equivalences are, respectively, Table 7, line 1; De Morgan’s
a) p ∨ (p ∧ q) ≡ p b) p ∧ (p ∨ q) ≡ p
Answer:
a.
p q p∧q p∨(p∧q)
T T T T
T F F T
F T F F
F F F F
b.
p q p∨q p∧(p∨q)
T T T T
T F T T
F T T F
F F F F
Answer:
Answer:
(¬q∧(p→q))→¬p is a tautology.
Each of Exercises 16–28 asks you to show that two compoundpropositions are logically equivalent. To do this, either showthat both sides are
true, or that both sides are false, for exactlythe same combinations of truth values of the propositionalvariables in these expressions (whichever is
easier).
16. Show that p ↔ q and (p ∧ q) ∨ (¬p ∧¬q) are logicallyequivalent.
Answer:
The statement p↔q means "p if and only if q". This statement evaluates to true only when p and q have the same truth value, so it is only true
when both p and q are true or both p and q are false. The second proposition, (p∧q)∨(¬p∧¬q) means "p and q, or not p and not q". This too will
evalueate to true only when both p and q are true or when p and q are both false. Since the two propositions have the same truth value for every
truth assignment of p and q, they are logically equivalent.
According to the truth table for p→q, this statement evaluates to true when p is false or q is true. Therefore, we can rewrite it as ¬p ∨q. Using the
same basic equivalence, we can write ¬q→¬p as ¬¬q∨¬p. We use the double negation principle to reduce ¬¬q to q and end up with q∨¬p. Since
disjunctions are commutative, we can rewrite this as ¬p∨q, which is the same as the simplified version of p→q. Since each proposition can be
simplified to the same expression, the two propositions are equivalent.
Answer:
The columns in the truth table for ¬(p⊕q) and p↔qare identical, so the statements are logically equivalent.
The columns in the truth table for ¬(p↔q) and ¬p↔qare identical, so the statements are logically equivalent.
Answer:
p q r p→q p→r (p→q)∧(p→r)
T T T T T T
T T F T F F
T F T F T F
T F F F F F
F T T T T T
F T F T T T
F F T T T T
F F F T T T
p q r q∧r p→(q∧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 T
F T F F T
F F T F T
F F F F T
The columns in the truth table for (p→q)∧(p→r) and p→(q∧r)are identical, so the statements are logically equivalent.
Answer:
Answer:
Answer:
Answer:
We start with ¬p→(q→r)
Use Logical Equivalence twice: (p→q)≡(¬p∨q)
¬p→(q→r)≡¬(¬p)∨(q→r)≡¬(¬p)∨(¬q∨r)
Use Double Negation:
≡p∨(¬q∨r)
Answer:
LOGICAL EQUIVALENCES
p↔q≡(p∧q)∨(¬p∧¬q).....(1)
p→q≡¬q∨q....(2)
Identity laws:
p∧T≡p
p∨F≡p
Commutative laws:
p∨q≡q∨p
p∧q≡q∧p
Negation Laws:
p∨¬p≡T
p∧¬p≡F
Solution:
Use Logical equivalence (1):
p↔q≡(p∧q)∨(¬p∧¬q)
≡[(p∨¬p)∧(p∨¬q)]∧[(q∨¬p)∧(q∨¬q)]
Answer:
We have (p→q)∧(q→r)→(p→r)
→¬(¬p∨q)∧(¬q∨r)∨(¬p∨r)
→¬(¬p∨q)∨¬(¬q∨r)∨(¬p∨r)
→¬p∨(¬¬p∧¬q)∨(¬¬q∧¬r)∨r
→((¬p∨¬¬p)∧(¬p∨¬q))∨((¬¬q∨r)∧(¬r∨r))
→(⊤∧(¬p∨¬q))∨((¬¬q∨r)∧⊤)
→(¬p∨¬q)∨(¬¬q∨r)
→¬p∨⊤∨r
→⊤
(p→q)∧(q→r)→(p→r) is a tautology.
Answer:
(p∨q)∧(¬p∨r)→(q∨r) is a tautology
We have,
[(p∨q)∧(¬p∨r)]→(q∨r)≡¬[(p∨q)∧(¬p∨r)]
∨(q∨r)≡[¬(p∨q)∨¬(¬p∨r)]∨(q∨r)
≡[(¬p∧¬q)∨(¬(¬p)∧¬r)]∨(q∨r)
≡[(¬p∧¬q)∨(p∧¬r)]∨(q∨r)
≡[((¬p∧¬q)∨p)∧((¬p∧¬q)∨¬r)]∨(q∨r)
≡[((¬p∨p)∧(¬q∨p))∧((¬p∨¬r)∧(¬q∨¬r))]
∨(q∨r)≡[(T∧(¬q∨p))∧((¬p∨¬r)∧(¬q∨¬r))]
∨(q∨r)≡[(¬q∨p)∧((¬p∨¬r)∧(¬q∨¬r))]
∨(q∨r)≡([(¬q∨p)∧((¬p∨¬r)∧(¬q∨¬r))]∨q)
∨r≡[((¬q∨p)∨q)∧(((¬p∨¬r)∨q)∧((¬q∨¬r)∨q))]
∨r≡[((¬q∨q)∨p)∧(((¬p∨¬r)∨q)∧((¬q∨q)∨¬r))]
∨r≡[(T∨p)∧(((¬p∨¬r)∨q)∧(T∨¬r))]∨r≡
[T∧(((¬p∨¬r)∨q)∧T)]∨r≡
[T∧((¬p∨¬r)∨q)]∨r≡((¬p∨¬r)∨q)∨r≡(¬p∨¬r)∨(q∨r)
≡(¬p∨¬r)∨(r∨q)≡((¬p∨¬r)∨r)∨q≡(¬p∨(¬r∨r))∨q≡(¬p∨T)
∨q≡T∨q≡T
(p∨q)∧(¬p∨r)→(q∨r) is a tautology.
Answer:
We just need to find an assignment of truth values that makes one of these propositions true and the other
false. We can let p be true and the other two variables be false. Then the first statement will be F → F,
33. Show that (p → q) → (r → s) and (p → r) →(q → s) are not logically equivalent.The dual of a compound proposition that contains only
thelogical operators ∨, ∧, and ¬ is the compound propositionobtained by replacing each ∨ by ∧, each ∧ by ∨, each Tby F, and each F by T. The
dual of s is denoted by s∗.
Answer:
To show that these are not logically equivalent,
we need only find one assignment of truth values to p, q, r, and s for which the truth values of (p _, q) _, (r _, s) and (p _, r) _, (q _, s) differ
. Let us try to make the first one false.
That means we have to make r _, s false, so we want r to be true and s to be false.
If we let p and q be false, then each of the other three simple conditional statements (p _, q, p _, r, and q _, s) will be true.
Then (p-t q) _, (r _, s) will be T-t F, which is false; but (p-t r) _, (q _, s) will be T-t T, which is true.
a) p ∨¬q b) p ∧ (q ∨ (r ∧ T))
c) (p ∧¬q) ∨ (q ∧ F)
Answer:
Replace ∨ by ∧
p∧¬q
b)given: p∧(q∨(r∧T)
Replace ∨ by ∧, ∧ by ∨ , T by F and F by T
p∨(q∧(r∨F)
c)given: (p∧¬q)∨(q∧F)
Replace ∨ by ∧, ∧ by ∨ , T by F and F by T
(p∨¬q)∧(q∨T)
a) p ∧¬q ∧¬r b) (p ∧ q ∧ r) ∨ s
c) (p ∨ F) ∧ (q ∨ T)
Answer:
a) Given: p∧¬q∧¬r
Replace ∧ by ∨
p∨¬q∨¬r
b) Given : (p∧q∧r)∨s
Replace ∧ by ∨ and ∨ by ∧
(p∨q∨r)∧s
c) Given: (p∨F)∧(q∨T)
Replace ∨ by ∧, ∧ by ∨, T by F and F by T.
(p∧T)∨(q∧F)
Answer:
If s has any occurrences of ∧, ∨, T, or F, then the process of forming the dual will change it. Therefore
s∗ = s if and only if s is simply one propositional variable (like p ). A more difficult question is to determine
when s∗ will be logically equivalent to s. For example, p ∨ F is logically equivalent to its dual p ∧ T, because
Answer:
If we apply the operation for forming the dual twice to a proposition,
38. Show that the logical equivalences in Table 6, except forthe double negation law, come in pairs, where each paircontains compound
propositions that are duals of eachother.
Answer:
The table is in fact displayed so as to exhibit the duality. The two identity laws are duals of each other, the
two domination laws are duals of each other, etc. The only law not listed with another, the double negation
39. Why are the duals of two equivalent compound propositions also equivalent,where these compound propositionscontain only the operators ∧,
∨, and ¬?
Answer:
Let p and q be two compound propositions involving only the operators /\, V, and -
We want to show that if p and q are logically equivalent, then p* and q* are logically equivalent.
Now if p is a conjunction, say r /\ s, then 'P is logically equivalent, by De Morgan's law, to -.r V -.s
If r and/or s are themselves compound propositions, then we apply De Morgan's laws again to "push" the negation symbol -, deeper inside the
formula, changing /\ to V and V to /\.
We repeat this process until all the negation signs have been "pushed in" as far as possible and are now attached to the atomic (i.e., not
compound) propositions in the compound propositions p and q.
Now in this process De Morgan's laws have forced us to change each /\ to V and each V to /\.
Furthermore, if there are any constants T or F in the propositions, then they will be changed to their opposite when the negation operation is
applied: -.T is the same as F, and -.F is the same as T.
In summary, 'P and -.q look just like p* and q*, except that each atomic proposition p, within them is replaced by its negation.
Now we agreed that 'P = -.q; this means that for every possible assignment of truth values to the atomic propositions p1 , P2, etc., the truth values
of 'P and -.q are the same. But assigning T to Pi is the same as assigning F to 'Pi , and assigning F to p, is the same as assigning T to 'Pi .
Thus, for every possible assignment of truth values to the atomic propositions, the truth values of p* and q* are the same. This is precisely what
we wanted to prove.
the truth values of p* and q* are the same.
40. Find a compound proposition involving the propositionalvariables p, q, and r that is true when p and q are trueand r is false, but is false
otherwise. [Hint: Use a conjunction of each propositional variable or its negation.]
Answer:
41. Find a compound proposition involving the propositionalvariables p, q, and r that is true when exactly two of p, q,andr are true and is false
otherwise. [Hint: Form a disjunction of conjunctions. Include a conjunction for eachcombination of values for which the compound proposition is
true. Each conjunction should includeeach of thethree propositional variables or its negations.]
Answer:
There are three ways in which exactly two of p, q, and r can be true.
We write down these three possibilities as conjunctions and join them by V to obtain the answer
43. Show that ¬, ∧, and ∨ form a functionally complete collection of logical operators.
Answer:
Given a compound proposition p, we can construct its truth table
this shows that -, , /\, and V form a functionally complete collection of logical operators.
[Hint: Use the fact that everycompound proposition is logically equivalent to one indisjunctive normal form, as shown in Exercise 42.]
44. Show that ¬ and ∧ form a functionally complete collection of logical operators. [Hint: First use a De Morgan law to show that p ∨ q is
logically equivalent to¬(¬p ∧¬q).]
Answer:
Given a compound proposition p , we can, by Exercise 43, write down a proposition q that is logically equivalentto p and uses only ¬, ∧, and ∨.
Now by De Morgan’s law we can get rid of all the ∨’s by replacing each
45. Show that ¬ and ∨ form a functionally complete collection of logical operators.The following exercises involve the logical operators
NANDand NOR. The proposition p NAND q is true when either por q, or both, are false; and it is false when both p and q aretrue. The
proposition p NOR q is true when both p and q arefalse, and it is false otherwise. The propositions p NAND qand p NOR q are denoted by p | q
and p ↓ q, respectively.
(The operators | and ↓ are called the Sheffer stroke and thePeirce arrow after H. M. Sheffer and C. S. Peirce, respectively.)
Answer:
Given a compound proposition p.
We can write down a proposition q that is logically equivalent to p and uses only ', /\, and V.
Now by De Morgan's law we can get rid of all the /\ 's by replacing each
occurrence of P1 /\ P2 /\ · · · /\ Pn with the equivalent proposition -.(-.pi V 'P2 V · · · V 'Pn).
¬ and ∧ form a functionally complete collection of logical operators.
p q p|q
T T F
T F T
F T T
F F T
Answer:
Two propositions are logically equivalent if they have the same truth value for any combination of truth values of the variables.
Answer:
wo propositions are logically equivalent if they have the same truth value for any combination of truth values of the variables.
Since the last two columns of the truth table contain the same truth value in every row, the last two expressions are logically equivalent.
Hence, p↓q≡¬(p∨q)
50. In this exercise we will show that {↓} is a functionallycomplete collection of logical operators.
a) Show that p ↓ p is logically equivalent to ¬p.
c) Conclude from parts (a) and (b), and Exercise 49, that{↓} is a functionally complete collection of logicaloperators.
Answer:
a) Two propositions are logically equivalent if they have the same truth value for any combination of truth values of the variables.
A conjunction p↓q is true if and only if both p and q are false.
A conjunction ¬p is true if p is false.
p p↓p ¬p
T F F
F T T
Since the last two columns of the truth table contain the same truth value in every row, the last two expressions are logically equivalent.
b)
Since the last two columns of the truth table contain the same truth value in every row, the last two expressions are logically equivalent.
c) The set {¬,∨} if functionally complete and we have proved that both ¬ and ∨ can be represented with ↓ (¬p≡p↓p and p∨q≡(p↓q)↓(p↓q)).
So, we conclude that {↓} is a functionally complete collection.
51. Find a compound proposition logically equivalent top → q using only the logical operator ↓.
Answer:
p→q ≡((p↓q)↓q)↓(p↓q)↓q))
p q p|q q|p
T T F F
T F T T
F T T T
F F T T
Since the last two columns of the truth table contain the same truth value in every row, the last two expressions are logically equivalent.
54. Show that p | (q | r) and (p | q) | r are not equivalent,so that the logical operator | is not associative.
Answer:
p|(q|r) and (p|q)|r are not logically equivalent.
Two propositions are logically equivalent if they have the same truth value for any combination of truth values of the variables.
Since the last two columns of the truth table do not contain the same truth value in every row, the last two expressions are NOT logically
equivalent.
Hence the logical operator | is not associative.
55. How many different truth tables of compound propositions are there that involve the propositional variables pand q?
Answer:
We are given two propositional variables p and q.
A truth table containing 2 propositional variables had 2 X 2=4 rows as each propositional variable has two possible truth values (true T or false
F).
Now, we obtain different truth table if atleast one of the rows for different compound propositions differ in truth table.
Since there are 4 rows and each row has two possible truth values (true T or false F).
Thus there are 2 X 2 X 2 X 2=16 possible truth tables.
56. Show that if p, q, and r are compound propositions suchthat p and q are logically equivalent and q and r are logically equivalent, then p and r
are logically equivalent.
Answer:
To say that p and q are logically equivalent is to say that the truth tables for p and q are identical; similarly,
to say that q and r are logically equivalent is to say that the truth tables for q and r are identical. Clearly
if the truth tables for p and q are identical, and the truth tables for q and r are identical, then the truth
tables for p and r are identical (this is a fundamental axiom of the notion of equality). Therefore p and r are
logically equivalent. (We are assuming—and there is no loss of generality in doing so—that the same atomic
variables appear in all three propositions.)
57. The following sentence is taken from the specification ofa telephone system: “If the directory database is opened,then the monitor is put in a
closed state, if the system isnot in its initial state.” This specification is hard to understand because it involves two conditional statements. Findan
equivalent, easier-to-understand specification that involves disjunctions and negations but not conditionalstatements.
Answer:
Lets do, me, and in stand for the propositions.
Then the given statement reads -iin ___, (do ___, me).
In words, this says that it must always be true that either the system is in its initial state, or the data base is not opened, or
the monitor is put in a closed state.
Another way to render this would be to say that if the database is open,
then either the system is in its initial state or the monitor is put in a closed state.
58. How many of the disjunctions p ∨¬q, ¬p ∨ q, q ∨r,q∨¬r, and ¬q ∨¬r can be made simultaneously trueby an assignment of truth values to p, q,
and r?
Answer:
We can start by considering all possible truth assignments for p, q, and r. There are 2^3 = 8 possible truth assignments:
p q r
---------
T T T
T T F
T F T
T F F
F T T
F T F
F F T
F F F
Next, we can evaluate each disjunction under each truth assignment and see if there exists an assignment that makes all disjunctions true. We can
do this using a truth table:
-----------------------------------
T T T T T T T F
T T F T T T T T
T F T T F T T F
T F F T F F T T
F T T F T T T F
F T F F T F T T
F F T T T T F F
F F F T T T F T
Looking at the table, we can see that there are 2 assignments that make all disjunctions true: (p = T, q = T, r = F) and (p = F, q = F, r = F).
Therefore, only 2 of the disjunctions can be made true simultaneously, and these are p∨¬q and ¬q∨¬r.
59. How many of the disjunctions p ∨¬q ∨ s, ¬p ∨¬r ∨ s, ¬p ∨¬r ∨¬s, ¬p ∨ q ∨¬s, q ∨ r ∨¬s,q∨¬r ∨¬s, ¬p ∨¬q ∨¬s, p ∨ r ∨ s, and p ∨ r ∨¬scan be
made simultaneously true by an assignment oftruth values to p, q, r, and s?
Answer:
To determine which of the disjunctions can be made true simultaneously, we can create a truth table and evaluate each expression for all possible
truth value assignments to p, q, r, and s. The truth table below shows the results for each expression, where T represents true and F represents
false.
60. Show that the negation of an unsatisfiable compoundproposition is a tautology and the negation of a compoundproposition that is a tautology
is unsatisfiable.
Answer:
An unsatisfiable compound proposition is always false and thus is equivalent with F. The negation of the unsatisfiable compound proposition is
then equivalent with t and is thus always true, this means that the negation of the unsatisfiable compound proposition is a tautology.
A tautology is always true and is thus equivalent with T. The negation of the tautology is then equivalent with F and is thus always false, this
means that the negation of a tautology is unsatisfiable.
a)
In the truth table we see that the compound statement is true if p is false and q is false, hence compound statement is satisfiable.
b)
In the truth table we see that the compound statement is always false, hence, compound statement is unsatisfiable.
c)
In the truth table we see that the compound statement is always false, hence, compound statement is unsatisfiable.
b) (¬p ∨¬q ∨ r) ∧ (¬p ∨ q ∨¬s) ∧ (p ∨¬q ∨¬s) ∧ (¬p ∨¬r ∨¬s) ∧ (p ∨ q ∨¬r) ∧ (p ∨¬r ∨¬s)
c) (p ∨ q ∨ r) ∧ (p ∨¬q ∨¬s) ∧ (q ∨¬r ∨ s) ∧(¬p ∨ r ∨ s) ∧ (¬p ∨ q ∨¬s) ∧ (p ∨¬q ∨¬r) ∧(¬p ∨¬q ∨ s) ∧ (¬p ∨¬r ∨¬s)
Answer:
a) if p is true and q is false (¬q is true), then the compound proposition is true and thus the compound proposition is satisfiable.
b) if p is true, q is false (¬q is true) and s is false (¬s is true), then the compound proposition is true and thus the compound proposition is
satisfiable.
c) If p is false (¬p is true), q is true, r is false (¬r is true) and s is false (¬s is true), then the compound proposition is true and thus the compound
proposition is satisfiable.
63. Show how the solution of a given 4 × 4 Sudoku puzzlecan be found by solving a satisfiability problem.
Answer:
This is done in exactly the same manner as was described in the text for a 9 x 9 Sudoku puzzle.
With the variables indexed from 1 to 4, instead of from 1 to 9, and with a similar change for the propositions for the
2 X 2 blocks: /\~=O /\~=O /\!=l v;=l V~=l p(2r + i, 2s + j, n).
64. Construct a compound proposition that asserts that every cell of a 9 × 9 Sudoku puzzle contains at least onenumber.
Answer:
Recall that p(i, j, n) asserts that the cell in row i, column j contains the number n . Thus n=1 p(i, j, n)
asserts that this cell contains at least one number. To assert that every cell contains at least one number, we
"9 " 9 ! 9
take the conjunction of these statements over all cells: i=1 j=1 n=1 p(i, j, n).
65. Explain the steps in the construction of the compoundproposition given in the text that asserts that every column of a 9 × 9 Sudoku puzzle
contains every number.
Answer:
We just repeat the discussion in the text, with the roles of the rows and columns interchanged: To assert that column j contains the number n.
We form the conjunction of these disjunctions over all nine possible values of n, giving us /\~=l Vi=l p( i, j, n).
To assert that every column contains every number, we take the conjunction of /\~=l Vi=1 p(i,j,n) over all
nine columns.
66. Explain the steps in the construction of the compoundproposition given in the text that asserts that each of thenine 3 × 3 blocks of a 9 × 9
Sudoku puzzle contains every number.
Answer:
There are nine blocks, in three rows and three columns. Let r and s index the row and column of the block,
respectively, where we start counting at 0, so that 0 ≤ r ≤ 2 and 0 ≤ s ≤ 2. (For example, r = 0, s = 1
corresponds to the block in the first row of blocks and second column of blocks.) The key point is to notice
that the block corresponding to the pair (r, s) contains the cells that are in rows 3r + 1 , 3r + 2, and 3r + 3
and columns 3s + 1, 3s + 2, and 3s + 3 . Therefore p(3r + i, 3s + j, n) asserts that a particular cell in this
block contains the number n , where 1 ≤ i ≤ 3 and 1 ≤ j ≤ 3 . If we take the disjunction over all these values
!3 ! 3
of i and j , then we obtain i=1 j=1 p(3r + i, 3s + j, n), asserting that some cell in this block contains the
number n . Because we want this to be true for every number and for every block, we form the triply-indexed
conjunction given in the text.
Section 1.4 - Predicates and Quantifiers – Exercises
c) P (true) d) P (false) a) 0
Answer: b) 1
a) T c) 1
Answer:
3. Let Q(x, y) denote the statement “x is the capital of y.”What are
these truth values? a) There exists a student who spends more than five hours every
weekday in class.
a) Q(Denver, Colorado)
b) Every student spends more than five hours every weekday in
b) Q(Detroit, Michigan)
class.
c) Q(Massachusetts, Boston)
c) There exists a student who does not spend more than five hours
d) Q(New York, New York) every weekday in class.
Answer: d) Not one student spends more than five hours every weekday in
class.
a) 1
9. Let P (x) be the statement “x can speak Russian” and let
6. Let N(x) be the statement “x has visited North Dakota,”where Q(x) be the statement “x knows the computer language
the domain consists of the students in your school.
C++.” Express each of these sentences in terms of P (x),
Express each of these quantifications in English.
Q(x), quantifiers, and logical connectives. The domain
a) ∃xN(x) b) ∀xN(x) c) ¬∃xN(x)
for quantifiers consists of all students at your school.
d) ∃x¬N(x) e) ¬∀xN(x) f )∀x¬N(x)
a) There is a student at your school who can speak Russian and
Answer: who knows C++.
a) A student in my school has visited North Dakota. b) There is a student at your school who can speak Russian but
who doesn’t know C++.
b) Every student in my school has visited North Dakota.
c) Every student at your school either can speak Russian
c) There does not exist a student in my school who has visited
North Dakota. or knows C++.
d) There is a student in my school who has not visited North d) No student at your school can speak Russian or knows
Dakota.
C++.
e) None of the students in my school have visited North Dakota.
Answer:
f) Every one of the students in my school has not visited North
We replace the quantifiers first, with "there is" going to ∃, "every"
Dakota.
going to ∀, and "no" going to ¬∃. Then, we replace the statements
with P(x) and Q(x) to obtain:
7. Translate these statements into English, where C(x) is “xis a a) ∃x(P(x)∧Q(x))
comedian” and F(x) is “x is funny” and the domainconsists of all
people. b) ∃x(P(x)∧¬Q(x))
Answer:
a) Someone from your school has visited North Dakota. 10. Let C(x) be the statement “x has a cat,” let D(x) be the
b) Everyone from your school has visited North Dakota. statement “x has a dog,” and let F(x) be the statement “x
c) No one from your school has visited north Dakota. has a ferret.” Express each of these statements in terms of
d) Someone from your school has not visited North Dakota. C(x), D(x), F(x), quantifiers, and logical connectives.
e) Not everyone from your school has visited North Dakota. Let the domain consist of all students in your class.
f) No one from your school has visited north Dakota. a) A student in your class has a cat, a dog, and a ferret.
b) All students in your class have a cat, a dog, or a ferret.
8. Translate these statements into English, where R(x) is “x c) Some student in your class has a cat and a ferret, but
is a rabbit” and H(x) is “x hops” and the domain consists not a dog.
of all animals. d) No student in your class has a cat, a dog, and a ferret.
a) ∀x(R(x) → H(x)) b) ∀x(R(x) ∧ H(x)) e) For each of the three animals, cats, dogs, and ferrets,
c) ∃x(R(x) → H(x)) d) ∃x(R(x) ∧ H(x)) there is a student in your class who has this animal asa pet.
Answer: Answer:
a) All rabbits hop. First, we think about whether we want ∀ or ∃, which we decide
based on whether we have a blanket statement, in which case we
b) All animals are hopping rabbits. use ∀, or whether we have a statement about one student's pets.
Then, we plug in the specific values of C(x), D(x), and F(x), which
c) There exists an animal that, if it is a rabbit, then it hops.
represent the possession of a cat, dog, or ferret for a student x.
d) Some rabbits hop.
a) ∃x(C(x)∧D(x)∧F(x))
In predicate logic,
b) ∀x(C(x)∨D(x)∨F(x))
∀ means that the predicate applies to everyone in the domain,
c) ∃x(C(x)∧¬D(x)∧F(x))
∃ means that the predicate applies to at least one person in the
d) ¬∃x(C(x)∧D(x)∧F(x))
domain, and
e) ∃xC(x),∃xD(x),∃xF(x)
¬ means to negate what follows.
Keeping this in mind, we formulate each of the sentences based
upon the given formulas and the order in which the symbols 11. Let P (x) be the statement “x = x2.” If the domain consists of
appear. the integers, what are these truth values?
a) P (0) b) P (1) c) P (2)
d) P (−1) e) ∃xP (x) f )∀xP (x) d) 0
Answer: Before starting the problem, consider the domain, all integers.
Our domain is all integers. a) ∀n(n+1>n) is true because 1=n+1−n>n−n=0 always holds.
a) P(0) is the probability that 0=02, so P(0)=1 b) ∃n(2n=3n) is true because 2(0)=3(0), and 0 is an integer.
b) P(1) is the probability that 1=12, so P(1)=1 c) ∃n(n=−n) is also true when n=0.
c) P(2) is the probability that 2=22=4, so P(2)=0 d) A counterexample to the statement ∀n(3n≤4n) is n=1, so the
statement is not true.
d) P(−1) is the probability −1=(−1)2=1, so P(−1)=0.
g) ∀x¬Q(x)
15. Determine the truth value of each of these statements if
Answer:
the domain for all variables consists of all integers.
Our domain is all integers.
a) ∀n(n2 ≥ 0) b) ∃n(n2 = 2)
a) Q(0) is the probability that 0+1>2(0), so Q(0)=0
c) ∀n(n2 ≥ n) d) ∃n(n2 < 0)
b) Q(−1) is the probability that −1+1>2(−1), so Q(−1)=1
Answer:
c) Q(1) is the probability that 1+1>2(1), so Q(1)=0
a) 1
d) ∃xQ(x) is satisfied by x=−1, so ∃xQ(x)=1
b) 0
e) ∀xQ(x) is contradicted by Q(0), so ∀xQ(x)=0
c) 1
f) ∃x¬Q(x) is satisfied by Q(1), so ∃x¬Q(x)=1
d) 0
g) ∀x¬Q(x) is contradicted by Q(−1), so ∀x¬Q=0
Before starting the problem, consider the domain of all the
a) 0
integers.
b) 1
a) ∀n(n2≥0) is true, because the square of any negative integer m is
c) 0 m2=(−1)2l2=l2, where l is a positive integer.
c)∃ x ¬P(x) means that there exists a value of x for which ¬P(x) is
d) This is false. Take x=1. true, thus ¬P(−2) is true or ¬P(−1) is true or ¬P(0) is true or ¬P(1)
is true or ¬P(2) is true.
12=1.
So, we can rewrite the proposition as:
¬P(−2)∨¬P(−1)∨¬P(0)∨¬P(1)∨¬P(2)
17. Suppose that the domain of the propositional function
P (x) consists of the integers 0, 1, 2, 3, and 4. Write out
each of these propositions using disjunctions, conjunctions, and
negations. d)∀ x ¬P(x) means that there exists a value of x for which P(x) is
true, thus ¬P(−2) is true and ¬P(−1) is true and ¬P(0) is true and
a) ∃xP (x) b) ∀xP (x) c) ∃x¬P (x)
¬P(1) is true and ¬P(2) is true.
d) ∀x¬P (x) e) ¬∃xP (x) f )¬∀xP (x) So, we can rewrite the proposition as:
Answer: ¬P(−2)∧¬P(−1)∧¬P(0)∧¬P(1)∧¬P(2)
Writing each of the given propositions using disjunctions,
conjunctions,and negations.
out each of these propositions using disjunctions, conjunctions, 19. Suppose that the domain of the propositional function
and negations. P (x) consists of the integers 1, 2, 3, 4, and 5. Express
a) ∃xP (x) b) ∀xP (x) c) ∃x¬P (x) these statements without using quantifiers, instead using
d) ∀x¬P (x) e) ¬∃xP (x) f )¬∀xP (x) only negations, disjunctions, and conjunctions.
Answer: a) ∃xP (x) b) ∀xP (x)
INTERPRETATION SYMBOLS c) ¬∃xP (x) d) ¬∀xP (x)
Negation : ¬p e) ∀x((x = 3) → P (x)) ∨∃x¬P (x)
Disjunction :p∨q Answer:
Conjunction :p∧q a) There exists a value between 1 and 5 such that P(x) is true, this
Existential quantification :∃ x P(x) thus equivalent with P(1)∨P(2)∨P(3)∨P(4)∨P(5).
P(−1)∧P(−3)∧P(−5)
e) This statement is equivalent with
(P(1)∧P(2)∧P(4)∧P(5))∨(¬P(1)∨¬P(2)∨¬P(3)∨¬P(4)∨¬P(5)),
because the first statement means that P(x) is true when x is not
equal to 3 and the second statement means that there has to be a
value of x where P(x) is false and thus ¬P(x) is true. The given statement ∃x¬P(x)∧∀x((x<0)→P(x)) is the conjunction
of ∃x¬P(x) and ∀x((x<0)→P(x)), thus the answer is
(¬P(−5)∨¬P(−3)∨¬P(−1)∨¬P(1)∨¬P(3)∨¬P(5))∧(P(−1)∧P(−3)∧P(
20. Suppose that the domain of the propositional function −5))
P (x) consists of −5, −3, −1, 1, 3, and 5. Express these
statements without using quantifiers, instead using only 21. For each of these statements find a domain for which the
negations, disjunctions, and conjunctions. statement is true and a domain for which the statement is
a) ∃xP (x) b) ∀xP (x) false.
c) ∀x((x = 1) → P (x)) a) Everyone is studying discrete mathematics.
d) ∃x((x ≥ 0) ∧ P (x)) b) Everyone is older than 21 years.
e) ∃x(¬P (x)) ∧∀x((x < 0) → P (x)) c) Every two people have the same mother.
a) ∃xP(x) means that there exists a value of x for which P(x) is Answer:
true, thus P(-5) is true or P(-3) is true or P(-1) is true or P(1) is true
a) Domain 1 = "Everyone in the Discrete Math class" Domain 2 =
or P(3) is true or P(5) is true. Using above interpretation of
"Everyone in the school"
symbols, we can rewrite the proposition as :
P(−5)∨P(−3)∨P(−1)∨P(1)∨P(3)∨P(5)
b) Domain 1 = "People who are eligible to be president " Domain 2
= "Students in a kindergarten class"
c) Domain 1 = "Twins in the world" Domain 2 = "Everyone in the
b)∀xP(x) means that for all possible values of x: P(x) is true, thus world"
P(-5) is true and P(-3) is true and P(-1) is true and P(1) is true and
d) Domain 1 = "Hilary Clinton and Bernie Sanders" Domain 2 =
P(3) is true and P(5) is true. Using above interpretation of symbols,
"Everyone in the world"
we can rewrite the proposition as:
P(−5)∧P(−3)∧P(−1)∧P(1)∧P(3)∧P(5)
22. For each of these statements find a domain for which the
statement is true and a domain for which the statement is
false.
c) ∀x((x≠1)→P(x)) means that P(x) is true when x is not equal to
1, thus P(-5) is true and P(-3) is true and P(-1) is true and P(3) is a) Everyone speaks Hindi.
true and P(5) is true. Using above interpretation of symbols, we
can rewrite the proposition as: b) There is someone older than 21 years.
d) ∃x((x≥0)∧P(x)) means that for one of the positive value of x: (a) The following domain makes the statement true, because all
P(x) is true, thus P(1) is true or P(3) is true or P(5) is true. Using Indians speak Hindi (since it is their national language).
above interpretation of symbols, we can rewrite the proposition as: "True" domain = Indian people
P(1)∨P(3)∨P(5) The following domain makes the statement false, because there are
many people in the world that cannot speak Hindi.
“False'' domain = All people in the world
(d) The following domain makes the statement true, because there
will be a person that knows more than two other people (most Let S(x) be "x has been in a movie" and A(x) be "x is in your
likely including yourself). class".
a) 1.∀xC(x)
Let P(x) be "x speaks hindi" and A(x) be " x is in your class".
2.∀x(D(x)→C(x))
∃x(P(x)∧A(x))
∀xQ(x) b) 1. ∃xF(x)
2. ∃x(D(x)∧F(x))
c) There is a person means ∃x and x has to be in your class and c)1. ∃x¬S(x)
cannot be born in california.
2.∃x(D(x)∧¬S(x))
∃x(¬R(x))
D(x) in your class
S(x) cant swim
d) 1.∀xQ(x) f) Let the domain be all people in the world, A(x) means "x is
perfect" and B(x) means " x is your friend".
2. ∀x(D(x)→Q(x))
"Not everyone" means not for every person ¬∃x. "Someone"
D(x) in your class means that there exists a person ∃x.
Q(x) solve equation
(¬∀xB(x))∨(∃x¬A(x))
D(x) in your class by using predicates with one and with two variables.
25. Translate each of these statements into logical expressions c) No one in your school owns both a bicycle and a motorcycle.
using predicates, quantifiers, and logical connectives. d) There is a person in your school who is not happy.
a) No one is perfect. e) Everyone in your school was born in the twentiethcentury.
b) Not everyone is perfect. Answer:
c) All your friends are perfect. a) Let the first domain be the people in your school and the second
d) At least one of your friends is perfect. domain all the people in the world.
e) Everyone is your friend and is perfect. Let A(x) mean ' x is in your school” and P(x) means "x has visited
Uzbekistan" and P(x.y) means "x has visited y".
f ) Not everybody is your friend or someone is not perfect.
∃xP(x)
Answer:
∃x(A(x)∧P(x))
a) Let the domain be all people in the world and A(x) means "x is
perfect". ∃x(A(x)∧P(x,Uzbekistan)).
" No one" means that there does not exist a person ( for which the
statement holds)
b)Let the first domain be the people in your class and the second
¬(∃xA(x)) domain all the people in the world.
Let B(x) mean "x is in your class" and Q(x) means "x has studied
calculus" and R(x) means "x has studied C++". Q(x.y) means "x
b) Let the domain be all the people in the world and A(x) means " has studied y".
x is perfect".
∀x(Q(x)∧R(x))
"Not everyone" means not all people, thus
∀x[B(x)→(Q(x)∧R(x)]
¬∀xA(x)
∀x[B(x)→(Q(x,calculus)∧Q(x,C++)]
c) Let the domain be all people in the world, A(x) means "x is
perfect" and B(x) means "x is your friend". c) Let the first domain be the people in your school and the second
domain all the people in the world.
"All" means everybody and thus
Let A(x) mean "x is in your school" and S(x) means "x owns a
If x is your friend, then x has to be perfect. bicycle" and T(x) means " x owns a motorcycle S(x,y) means "x
∀x(B(x)→A(x)) owns a y“.
¬∃x(S(x)∧T(x))
d)Let the domain be all people in the world, A(x) means "x is ¬∃x(A(x)∧S(x)∧T(x))
perfect" and B(x) means "x is your friend". ¬∃x(A(x)∧S(x,bicycle)∧S(x,motorcycle))
"At least one" means that there exists a person ∃x . This person x d) Let the first domain be the people in your school and the second
also has to be your friend and has to be perfect. domain all the people in the world.
∃x(A(x)∧B(x)) Let A(x) mean is in your school” and U(x) means "x is happy”.
U(x.y) means "x is y".
e)Let the domain be all the people in the world, A(x) means " x is ∃x(¬U(x))
perfect" and B(x) means " x is your friend". ∃x(A(x)∧¬U(x))
"Everyone" means ∀x. These people x have to be your friend and ∃x(A(x)∧¬U(x,happy))
have to be perfect.
∀x(A(x)∧B(x))
e) Lot the first domain be the people in your school and the second
domain all the people in the world.
Using a one-variable predicate and a domain of all students in your
Let A(x) mean x is in your school " and V{x) means ”x was born class: ∀x(EnjoysThaiFood(x))
in the twentieth century", V(x, y) means "x was born in the y
century”. Using a two-variable predicate and a domain of all possible pairs
of students and cuisines: ∀x,y(Student(x) ∧ Cuisine(y) → Likes(x,
∀xV(x) y) → y=ThaiFood)
∀x(A(x)→V(x)) Using a two-variable predicate and a domain of all possible pairs
of students and their food preferences: ∀x,y(Student(x)
∀x(A(x)→V(x,Twentieth))
∧FoodPreference(y) → Prefers(x, y) → y=ThaiFood)
Using a two-variable predicate and a domain of all possible pairs d) Nothing is in the correct place and is in excellent condition.
of students and countries: ∃x,y(Student(x) ∧ Country(y) e) One of your tools is not in the correct place, but it is
∧LivesIn(x, y) ∧ y=Vietnam)
in excellent condition.
Using a two-variable predicate and a domain of all possible pairs
of students and their past residences: ∃x,y(Student(x) ∧ Answer:
Residence(y) ∧HasLivedIn(x, y) ∧ y=Vietnam) a) Let. P(x) mean " x is in the correct place" .
b) There is a student in your school who cannot speak Hindi.
∃x¬P(x)
29. Express each of these statements using logical operators, 31. Suppose that the domain of Q(x, y, z) consists of triples
predicates, and quantifiers. x, y, z, where x = 0, 1, or 2, y = 0 or 1, and z = 0 or 1.
a) Some propositions are tautologies. Write out these propositions using disjunctions and conjunctions.
b) The negation of a contradiction is a tautology. a) ∀yQ(0, y, 0) b) ∃xQ(x, 1, 1)
c) The disjunction of two contingencies can be a tautology. c) ∃z¬Q(0, 0, z) d) ∃x¬Q(x, 0, 1)
d) The conjunction of two tautologies is a tautology. Answer:
Answer: a) y can take on values 0 or 1 and all values are possible.
a) Let the domain be the collection of all propositions. Q(0,0,0)∧Q(0,1,0)
Let P(x) means " x is a tautology".
∃xP(x) b) x can take on values 0,1 or 2 and there has to exists one value
out of the three for the propositional function.
Q(0,1,1)∨Q(1,1,1)∨Q(2,1,1)
b) Let the domain be the collection of all propositions.
Let P(x) means " x is a tautology" and Q(x) means that " x is a
contradiction". c) z can take on values 0 and 1 and there has to exists one value
out of the two for the propositional function.
¬x means the contradiction of proposition x.
¬Q(0,0,0)∨¬Q(0,0,1)
∀x(Q(x)→P(¬x))
P(1,1)∧P(1,2)∧P(1,3) b) Let the domain be horses and Q(x) mean "x can add”. We can
then rewrite the given statement as:
∃xQ(x)
c) y can be 1,2 or 3 and there has to exists 1 value out of the three
for the propositional function. The negation is then by De Morgan’s Law for Qualifiers:
¬P(2,1)∨¬P(2,2)∨¬P(2,3) ¬(∃xQ(x))≡∀x¬Q(x)
∀xR(x) ¬(∀x¬Q(x))≡∃x¬(¬Q(x))≡∃xQ(x)
The negation is then by De Morgan’s Law for Qualifiers: This means: There is a rabbit that knows calculus.
¬(∀xR(x))≡∃x¬R(x)
This means: There is a koala that cannot climb. c) Let the domain be birds and R(x) mean ”x can fly”. We the
given statement as:
∀xR(x)
∃x(T(x)∧U(x))
The negation is then by De Morgan’s Law for Qualifiers and the e) Let the domain be the people in this class and T(x) mean "x
regular De Morgan’s Law: knows French" and U(x) mean "x knows Russian". We can then
rewrite the given statement as:
¬(∃x(T(x)∧U(x)))≡∀x¬(T(x)∧U(x))≡∀x(¬T(x)∨¬U(x))
¬∃x(T(x)∧U(x))
This means: All pigs can not swim or not catch fish.
The negation is then by the double negation law:
¬(¬∃x(T(x)∧U(x)))≡∃x(T(x)∧U(x))
33. Express each of these statements using quantifiers. Then
This means: There is someone in this class who knows French and
form the negation of the statement, so that no negation Russian.
is to the left of a quantifier. Next, express the negation in
simple English. (Do not simply use the phrase “It is not 34. Express the negation of these propositions using quantifiers,
and then express the negation in English.
the case that.”)
a) Some drivers do not obey the speed limit.
a) Some old dogs can learn new tricks.
b) All Swedish movies are serious.
b) No rabbit knows calculus.
c) No one can keep a secret.
c) Every bird can fly.
d) There is someone in this class who does not have a
d) There is no dog that can talk.
good attitude.
e) There is no one in this class who knows French and
Answer:
Russian.
a) Let the domain be drivers and P(x) mean " x obeys the speed
Answer:
limit ". We can rewrite the given statement as :
a) Let the domain be dogs and P(x) mean "x can learn new tricks“.
∃x¬P(x)
We can then rewrite the given statement as:
∃xP(x)
The negation is then by De Morgan's Law for Quantifiers and
The negation is then by De Morgan’s Law for Qualifiers:
double negation law:
¬(∃xP(x))≡∀x¬P(x)
¬(∃x¬P(x))≡∀x¬(¬P(x))≡∀xP(x)
This means: All dogs cannot learn new tricks.
∀xQ(x)
quantified statements, where the domain for all variables
The negation is then by De Morgan's Law for Quantifiers: consists of all real numbers.
c) ∀x(|x| > 0)
This means : There is a Swedish movie that is not serious. Answer:
a) For x=1, we have x2=1=x and thus x=1 is a counterexample.
c)Let the domain be people and R(x) be " x can keep a secret ". We
can rewrite the given statement as :
b) For x=2√, we have 2√2=2 and thus is x=2√ a counterexample
¬(∃xR(x))
c) For x=0, we have |x|=|0|=0 which is not greater than zero, and
The negation is then by De Morgan's Law for Quantifiers and thus x=0 is a counterexample.
double negation law:
¬(¬(∃xR(x)))≡(∃xR(x))
37. Express each of these statements using predicates and
quantifiers.
This means : Somebody can keep a secret.
a) A passenger on an airline qualifies as an elite flyer if
the passenger flies more than 25,000 miles in a year
d)Let the domain be people in this class and S(x) means " x has a
or takes more than 25 flights during that year.
good attitude ".
b) A man qualifies for the marathon if his best previous time is less
We can rewrite the given statement as :
than 3 hours and a woman qualifies
∃x¬S(x)
for the marathon if her best previous time is less than
3.5 hours.
The negation is then by De Morgan's Law for Quantifiers and
c) A student must take at least 60 course hours, or at least
double negation law:
45 course hours and write a master’s thesis, and receive a grade no
¬(∃x¬S(x))≡∀x¬(¬S(x))≡∀xS(x)
lower than a B in all required courses,
to receive a master’s degree.
This means : Everybody in this class has a good attitude.
d) There is a student who has taken more than 21 credit
hours in a semester and received all A’s.
35. Find a counterexample, if possible, to these universally
Exercises 38–42 deal with the translation between system
quantified statements, where the domain for all variables
specification and logical expressions involving quantifiers.
consists of all integers.
Answer:
a) ∀x(x2 ≥ x)
In each case we need to make up predicates. The answers are
b) ∀x(x > 0 ∨ x < 0) certainly not unique and depend on the choice
Answer: a) I::!x((F(x, 25000) V S(x, 25)) --* E(x)), where E(x) is "Person x
qualifies as an elite flyer in a given year,"
a) ∀x(x2≥x)
F(x, y) is "Person x flies more than y miles in a given year," and
No counter example because x^2 (since x is an integer) will always S(x, y) is "Person x takes more than y
be greater x.
flights in a given year"
b)I::!x(((M(x)I\T(x,3))V(,M(x)I\T(x, 3.5))) --* Q(x)), where Q(x)
b)∀x(x>0∨x<0) is "Person x qualifies for the marathon,"
Counter example is x = 0; l'vl(x) is "Person x is a man," and T(x, y) is "Person x has run the
marathon in less than y hours"
0>0 or 0<0 is false
c) M --* ((H(60) V (H(45) 1\ T)) 1\ l::!yG(B,y)) , where M is the
proposition "The student received a masters
c) ∀x(x=1)
degree," H(x) is "The student took at least x course hours," T is the
Counter example is x = 2; proposition "The student wrote a
2=1 is false. thesis," and G(x, y) is "The person got grade x or higher in his
course y"
d) 3x ((T(x, 21) 1\ G(x, 4.0)), where T(x, y) is "Person x took more
36. Find a counterexample, if possible, to these universally than y credit hours" and G(x,p) is
"Person x earned grade point average p" (we assume that we are b) No directories in the file system can be opened and
talking about one given semester)
no files can be closed when system errors have been
detected.
38. Translate these system specifications into English where
c) The file system cannot be backed up if there is a user
the predicate S(x, y) is “x is in state y” and where the
currently logged on.
domain for x and y consists of all systems and all possible
d) Video on demand can be delivered when there are at
states, respectively.
least 8 megabytes of memory available and the connection speed is
a) ∃xS(x, open) at least 56 kilobits per second.
c) ∃xS(x, open) ∨∃xS(x, diagnostic) There are many ways to write these, depending on what we use for
predicates.
d) ∃x¬S(x, available)
a) Let F (x) be “There is less than x megabytes free on the hard
e) ∀x¬S(x, working) disk,” with the domain of discourse being
Answer: positive numbers, and let W (x) be “User x is sent a warning
a) There is a system in open state message.” Then we have F (30) → ∀x W (x).
b) All systems are either in malfunctioning state or diagnostic state b) Let O(x) be “Directory x can be opened,” let C(x) be “File x can
be closed,” and let E be the proposition
c) There is a system in open state or diagnostic state
“System errors have been detected.” Then we have E → ((∀x
d) There is a system which is not in available state ¬O(x)) ∧ (∀x ¬C(x))).
e) All systems are not in working state c) Let B be the proposition “The file system can be backed up,”
and let L(x) be “User x is currently logged
d) (∀pB(p) ∧∀jQ(j)) →∃jL(j) 41. Express each of these system specifications using predicates,
Answer: quantifiers, and logical connectives.
a) → means IF-THEN, ∧ means AND, ∃ means THERE EXISTS. a) At least one mail message, among the nonempty set
If there is a printer that is out of service and is busy, then there is a of messages, can be saved if there is a disk with more
print, job that is lost. than 10 kilobytes of free space.
b) Whenever there is an active alert, all queued messages
b)→ means IF-THEN, ∀ means ALL, ∃ means THERE EXISTS. are transmitted.
If all printers are busy, then there is a print job that is queued. c) The diagnostic monitor tracks the status of all systems
except the main console.
c) → means IF-THEN, ∀ means ALL, ∃ means THERE EXISTS. d) Each participant on the conference call whom the host
If there exists a print job that is lost and queued, then there exists a of the call did not put on a special list was billed.
printer that is out of service.
Answer:
a)
d) → means IF-THEN, ∀ means ALL, ∃ means THERE EXISTS
and ∀ means ALL. P(x) :if there is a disk with more than 10 kilobytes of free space
If all printers are busy and all print jobs are queued, then there Q(x): At least one mail message, among the nonempty set
exists a print job that is lost. of messages, can be saved
so, P(x) ->Q(x)
40. Express each of these system specifications using predicates,
quantifiers, and logical connectives.
b)
a) When there is less than 30 megabytes free on the hard
It work like this , " A whenever B"
disk, a warning message is sent to all users.
can be written as " A if B" There are many ways to write these, depending on what we use for
predicates.
P(x): Whenever (if) there is an active alert
a) Let A(x) be “User x has access to an electronic mailbox.” Then
Q(x): all queued messages are transmitted.
we have ∀x A(x).
"A except when B" must be usually symbolized with A∨B and S(firewall, diagnostic) → S(proxy server, diagnostic).
sometimes with "A or B but not both", i.e. (A∨B)∧¬(A∧B).
Answer:
(ii)
Assume that the domain contain y and z for which P(y) is false,
Q(y) is false, P(z) is true and Q(z) is false.
∀s[(TracStat(DiaMon,s)∨MainCons(s))∧¬(TracStat(DiaMon,s)∧M Then, ∀x(P(x)→Q(x)) is false (since for x=z, P(z) is true but Q(z)
ainCons(s))]. is false) but ∀xP(x)→∀xQ(x) is true (since ∀xP(x) is false).
P(x):the host of the call did not put on a special list was billed. 44. Determine whether ∀x(P (x) ↔ Q(x)) and ∀x P (x) ↔
:Q(x)Each participant on the conference call ∀xQ(x) are logically equivalent. Justify your answer.
a) We can use the analogy of the a if b We want propositional functions P and Q that are sometimes, but
not always, true (so that the second
b) Whenever (if) ........, then ....
biconditional is F ↔ F and hence true), but such that there is an x
c) explanation given in the answer making one true and the other false. For
d) whom (if) ........, then .... example, we can take P (x) to mean that x is an even number (a
multiple of 2) and Q(x) to mean that x is
a multiple of 3. Then an example like x = 4 or x = 9 shows that
42. Express each of these system specifications using predicates,
∀x(P (x) ↔ Q(x)) is false.
quantifiers, and logical connectives.
a) Every user has access to an electronic mailbox.
45. Show that ∃x(P (x) ∨ Q(x)) and ∃xP (x) ∨∃xQ(x) are
b) The system mailbox can be accessed by everyone in
logically equivalent.
the group if the file system is locked.
Exercises 46–49 establish rules for null quantification that
c) The firewall is in a diagnostic state only if the proxy
we can use when a quantified variable does not appear in part
server is in a diagnostic state.
of a statement.
d) At least one router is functioning normally if the
Answer:
throughput is between 100 kbps and 500 kbps and
∃x(P(x)∨Q(x)) is true, then there exists a value y such that
the proxy server is not in diagnostic mode.
P(y)∨Q(y) is true and thus P(y) is true or Q(y) is true. Then,
Answer: ∃xP(x) is true or ∃xQ(x) is true, which means that ∃xP(x)∨∃xQ(x)
is true.
Thus the two expressions always have the same truth value and
thus they are logically equivalent.
∃x(P(x)∨Q(x)) is false, then for all values y we have P(y)∨Q(y)
and thus P(y) is false and Q(y) is false. Then, ∃xP(x) is false and
∃xQ(x) is false, which means that ∃xP(x)∨∃xP(x) is false.
46. Establish these logical equivalences, where x does not If (∃xP(x))∧A is false, then A is false or for all values of y we have
P(y) is false. Then, P(y)∧A is false for all values y, which means
occur as a free variable in A. Assume that the domain is
that ∃x(P(x)∧A) is false.
nonempty.
Answer:
a) If (∀xP(x))∨A is true, then A is true or for all values y we have 48. Establish these logical equivalences, where x does not
P(y) is true. Thus, P(y)∨A is true for all values of y, which means occur as a free variable in A. Assume that the domain is
that ∀x(P(x)∨A) is true.
nonempty.
∀x(¬A∨P(x)
If (∃xP(x))∨A is false, then A is false and for all values of y we
have P(y) is false. Then, P(y)∨A is false for all values y, which
means that ∃x(P(x)∨A) is false. which is again equivalent ,by above stated Logical equivalence, to
∀x(A→P(x)
Thus the two expressions always have the same truth value and
thus they are logically equivalent.
a) (∀xP (x)) ∧ A ≡∀x(P (x) ∧ A) By previous exercise 46, this is logically equivalent to
Answer:
a) If (∀xP(x))∧A is true, then A is true and for all values y we have which is again equivalent ,by above stated Logical equivalence, to
P(y) is true. Thus, P(y)∧A is true for all values of y, which means ∃x(A→P(x)
that ∀x(P(x)∧A) is true.
Use De Morgan's Law for Qualifiers: “There exists a unique x such that P (x) is true.”
≡∃x¬P(x)∨A If the domain consists of all integers, what are the truth
. Answer:
∀x(P(x)∨Q(x)) will always be true, because x will always be a) ∃!xP (x) →∃xP (x)
The statement asserts that if there exists a unique x such that P(x) a) YES
is true, then there exists an x such that P(x) is true. This statement
instructor(chan,math273) is a fact given to Prolog and Prolog then
is true because if there exists a unique x such that P(x) is true, then
returns ?instructor(chan,math273) as yes.
there must be at least one x such that P(x) is true.
b) NO
b) ∀xP(x) →∃!xP(x)
instructor(patel,cs301) is not a fact given to Prolog and Prolog then
The statement asserts that if everything has the property P, then
returns ?instructor(patel,cs301) as no.
there exists a unique thing that has the property P. This statement is
false because there could be multiple things that have the property
P, so the uniqueness condition is not satisfied.
c) Juana and Kiko
Prolog will determine every student that is enrolled in cs301
c) ∃!x¬P(x) →¬∀xP(x)
The statement asserts that if there exists a unique x such that ¬P(x)
is true, then it is not the case that everything has the property P. d) math273 and cs301
This statement is true because if there exists a unique x such that Prolog will determine every course that student Kiko is enrolled in.
¬P(x) is true, then there must be at least one thing that does not
have the property P, which means it is not the case that everything
has the property P.
e) Juana and Kiko
Prolog will determine the students that the teacher Grossman
54. Write out ∃!xP (x), where the domain consists of the integers 1, teaches.
2, and 3, in terms of negations, conjunctions,and disjunctions.
Answer:
56. Given the Prolog facts in Example 28, what would
∃!xP(x) means that there exists exactly one x such that P(x) is true. Prologreturn when given these queries?
2) P(1) is false a) No
P(2) is True. enrolled(kevin,ee222) is not a fact given to Prolog and Prolog then
returns ?enrolled(kevin,ee222) as no.
P(3) is false.
b) Yes
3) P(1) is false
enrolled(kiko,math273) is a fact given to Prolog and Prolog then
P(2) is false. returns ?enrolled(kiko,math273) as yes.
P(3) is True.
c) cd301
This means that no two of P(1), P(2), P(3) can be simultaneously Prolog will determine every class that Grossman teaches
true.
d) Grossman
So, the answer is
Prolog will determine every teacher of class cs301.
(P(1)∨P(2)∨P(3)) ∧¬ (P(1)∧P(2)) ∧¬ (P(2)∧P(3)) ∧¬ (P(1)∧P(3))
e) Chan
55. Given the Prolog facts in Example 28, what would
Prologreturn given these queries? Prolog will determine the teachers of Kevin.
a) ?instructor(chan,math273)
b) ?instructor(patel,cs301) 57. Suppose that Prolog facts are used to define the predicates
This rule specifies that X and Y are siblings if they have the same English text. Express each of these statements using quantifiers,
mother M and the same father F, and X is not equal to Y. The \= logical connectives, and P (x), Q(x), and R(x).
symbol in Prolog means "not equal to". a) All clear explanations are satisfactory.
b) Some excuses are unsatisfactory.
58. Suppose that Prolog facts are used to define the predicates c) Some excuses are not clear explanations.
mother(M, Y ) and father(F, X), which representthat M is the
mother of Y and F is the father of X,respectively. Give a Prolog d) Does (c) follow from (a) and (b)?
rule to define the predicategrandfather(X, Y ), which represents
Answer:
that X is the grandfather of Y . [Hint: You can write a disjunction
in Prologeither by using a semicolon to separate predicates or a) ∀x(P (x) → Q(x))
byputting these predicates on separate lines.]
b) ∃x(R(x) ∧¬Q(x))
Answer:
c) ∃x(R(x) ∧¬P (x))
Following the idea and syntax of Example 28, we have the
following rule: d) Yes. The unsatisfactory excuse guaranteed by part (b) cannot be
a clear explanation by part (a).62. a) ∀x(P (x) →¬S(x))
grandfather(X,Y) :- father(X,Z), father(Z,Y); father(X,Z),
mother(Z,Y).
Note that we used the comma to mean “and” and the semicolon to 61. Let P (x), Q(x), R(x), and S(x) be the statements “x isa baby,”
mean “or.” For X to be the grandfather “x is logical,” “x is able to manage a crocodile,”and “x is
despised,” respectively. Suppose that the domainconsists of all
of Y, X must be either Y ’s father’s father or Y’s mother’s father. people. Express each of these statementsusing quantifiers; logical
connectives; and P (x), Q(x),R(x), and S(x).
a) Babies are illogical.
Exercises 59–62 are based on questions found in the book
b) Nobody is despised who canmanage a crocodile.
Symbolic Logic by Lewis Carroll.
c) Illogical persons are despised.
d) Babies cannot manage crocodiles.
59. Let P (x), Q(x), and R(x) be the statements “x is a
e) Does (d) follow from (a), (b), and (c)? If not, is therea correct
professor,” “x is ignorant,” and “x is vain,” respectively.
conclusion?
Express each of these statements using quantifiers; logical
Answer:
connectives; and P (x), Q(x), and R(x), where the
a) Rewrite the given statement " Babies are illogical" in If-then
domain consists of all people.
form.
a) No professors are ignorant.
If x is a baby, then x is not logical. This statement if true for all x.
b) All ignorant people are vain.
∀x(P(x)→¬ Q(x))
c) No professors are vain.
d) Does (c) follow from (a) and (b)?
b) Rewrite the given statement " Nobody is despised who can
Answer: manage a crocodile" in If-then form.
e) Yes. d)Rewrite the given statement " My poultry are not officers" in If-
then form.
Suppose x is baby.
If x is one of my poultry , then x is not an officer..This statement if
Then from a) x is illogical. true for all x.
Then from c) x is despised. ∀x(Q(x)→¬R(x))
But the second premise says that if x could manage a crocodile,
then x would not be despised. Therefore x cannot manage a
crocodile. Thus we have proved that babies cannot manage e) Suppose x is one of my poultry.
crocodiles.
then from c) x is a duck
then from a) x is not willing to waltz
62. Let P (x), Q(x), R(x), and S(x) be the statements “xis a duck,”
“x is one of my poultry,” “x is an officer,”and “x is willing to
waltz,” respectively. Express each ofthese statements using Assuming x is an officer, then from b) x is willing to waltz.
quantifiers; logical connectives;and P (x), Q(x), R(x), and S(x).
But x is not wiling to waltz, so x is not an officer.
a) No ducks are willing to waltz.
Thus, we are able to conclude d) from a), b) and c).
b) No officers ever decline to waltz.
c) All my poultry are ducks.
d) My poultry are not officers.
e) Does (d) follow from (a), (b), and(c)? If not, is therea correct
conclusion?
Answer:
a) Rewrite the given statement " No ducks are willing to waltz." in
If-then form.
If x is a duck, then x is not willing to waltz. This statement if true
for all x.
∀x(P(x)→¬S(x))
∀x(R(x)→S(x))
a) ∀x∃y(x < y)
2. Translate these statements into English, where the domain
b) ∀x∀y(((x ≥ 0) ∧ (y ≥ 0)) → (xy≥ 0))
for each variable consists of all real numbers.
c) ∀x∀y∃z(xy = z)
a) ∃x∀y(xy = y)
Answer:
b) ∀x∀y(((x ≥ 0) ∧ (y < 0)) → (x − y > 0))
(a) Consider x and y are both real numbers. For every real number
x there must exist a real number y such that x<y. c) ∀x∀y∃z(x = y + z)
Answer:
(b) When both real numbers x and y are both non-negative then (a) Consider x and y are two real numbers. For every real number
there product will also be no-negative. x there must exist a real number y such that the product x⋅y=y.
(b) When real number x is non-negative and real number y is (d) There is a computer science course that every student in your
negative then their difference x−y will be positive. class has taken.
∃y∀xP(x,y)
(c) Consider x and y are two real numbers. For every real numbers
x and y there must exist a real number z such that sum of y+z=x.
(e) Every computer science course has been taken by some student
in your class.
3. Let Q(x, y) be the statement “x has sent an e-mail message to y,” ∀y∃xP(x,y)
where the domain for both x and y consists of
all students in your class. Express each of these quantifications in
English. (f) All students in your class have taken all computer science
courses.
a) ∃x∃yQ(x, y) b) ∃x∀yQ(x, y)
∀x∀yP(x,y)
c) ∀x∃yQ(x, y) d) ∃y∀xQ(x, y)
e) ∀y∃xQ(x, y) f ) ∀x∀yQ(x, y)
5. Let W (x, y) mean that student x has visited website y,
Answer:
where the domain for x consists of all students in your
a) There is a student in your class who has sent a message to some
student in your class school and the domain for y consists of all websites. Express each
of these statements by a simple English sentence.
b) There is a student in your class who has sent a message to every
student in your class a) W(Sarah Smith, www.att.com)
c) Every student in your class has sent a message to at least one b) ∃xW (x, www.imdb.org)
student in your class c) ∃yW (JoséOrez, y)
d) There is a student in your class who has been sent a message by d) ∃y(W (Ashok Puri, y) ∧ W (Cindy Yoon, y))
every student in your class
e) ∃y∀z(y = (David Belcher) ∧ (W(David Belcher, z)
e) Every student in your class has been sent a message from at
least one student in your class → W(y,z)))
f) Every student in the class has sent a message to every student in f )∃x∃y∀z((x = y) ∧ (W (x, z) ↔ W (y, z)))
the class
Answer:
Given:
4. Let P (x, y) be the statement “Student x has taken class
W(x,y) =“ Student x has visited website y"
y,” where te domain for x consists of all student in your
Domain of x=All students in your class Domain of y=All websites
class and for y consists of all computer science courses
INTERPRETATION SYMBOLS
at your school. Express each of these quantifications in
Conjunction p∧q: p and q
English.
Conditional statement p→q: if p, then q
a) ∃x∃yP (x, y) b) ∃x∀yP (x, y)
Biconditional statement p↔q: p if and only if q
c) ∀x∃yP (x, y) d) ∃y∀xP (x, y)
Existential quantification ∃xP(x): There exists an element x in the
e) ∀y∃xP (x, y) f )∀x∀yP (x, y) domain such that P(x).
(c) All students in your class have taken a computer science (f) There are two different students in your class that have visited
course. the same websites.
∀x∃yP(x,y)
6. Let C(x, y) mean that student x is enrolled in class y,
where the domain for x consists of all students in your T (Jay Johnson, y))
school and the domain for y consists of all classes being d) ∀x∀z∃y((x = z) →¬(T (x, y) ∧ T (z, y)))
given at your school. Express each of these statements by e) ∃x∃z∀y(T (x, y) ↔ T (z, y))
a simple English sentence. f )∀x∀z∃y(T (x, y) ↔ T (z, y))
a) C(Randy Goldberg, CS 252) Answer:
b) ∃xC(x, Math 695) a. Student Abdallad Hussein does not like Japanese.
c) ∃yC(Carol Sitea, y) T(x,y) means that student x likes cuisine y
d) ∃x(C(x, Math 222) ∧ C(x, CS 252)) ¬ means NOT
f )∃x∃y∀z((x = y) ∧ (C(x, z) ↔ C(y, z))) b. There exists a student that likes Korean and all students like
Mexican
Answer:
T(x,y) means that student x likes cuisine y
a. Randy Goldberg is enrolled in class CS 252.
∃ means THERE EXISTS, ∧ means AND, ∀ means EVERY
C(x, y) means student, x is enrolled in class y
c. There exists a class y that Carol Sitea is enrolled in. d. For every two students there exists a cuisine such that if the
C(x, y) means student, x is enrolled in class y students arc not the same student, then they do not both like the
same cuisine.
∃ means there exists.
T(x,y) means that student x likes cuisine y
∃ means there exists, ∧ means AND, → means IF-THEN, ∀ means f. For every two students there exists a cuisine such that the
FOR EVERY students both like the cuisine or the students both do not like the
cuisine.
T(x,y) means that student x likes cuisine y
f. There exists a student x and a student y such that for every class
2, student x and student y are not the same student and x is ∃ means THERE EXISTS, ↔ means IF-AND-ONLY-IF, ∀ means
enrolled in class 2 if and only if y is enrolled in class 2. EVERY.
∃ means there exists, ∧ means AND, ↔ means IF-AND-ONLY-IF,
∀ means FOR EVERY
8. Let Q(x, y) be the statement “student x has been a contestant on
quiz show y.” Express each of these sentences
in terms of Q(x, y), quantifiers, and logical connectives,
7. Let T (x, y) mean that student x likes cuisine y, where the where the domain for x consists of all students at your
domain for x consists of all students at your school and school and for y consists of all quiz shows on television.
the domain for y consists of all cuisines. Express each of a) There is a student at your school who has been a contestant on a
television quiz show.
these statements by a simple English sentence.
b) No student at your school has ever been a contestant
a) ¬T (Abdallah Hussein, Japanese)
on a television quiz show.
b) ∃xT (x, Korean) ∧∀xT (x, Mexican)
c) There is a student at your school who has been a contestant on
c) ∃y(T (Monique Arsenault, y) ∨
Jeopardy and on Wheel of Fortune.
d) Every television quiz show has had a student fromyour school ∃y∀xL(x,y)
as a contestant.
e)At least two students from your school have been contestants on
Jeopardy. d. ’’Nobody" means ’’There does not exists a person in the world”.
’’Everybody" means “All people in the world”.
Answer:
¬∃x∀yL(x,y)
a) There is a student at your school who has been a contestant
on a television quiz show
e. We could rewrite the given sentence as "Lydia does not love
∃x∃yQ(x,y) somebody". "Somebody" means “There exists a person in the
world"
∃y¬L(Lydia,y)
b) No student at your school has ever been a contestant
on a television quiz show.
f. We could rewrite the given sentence as ’’There is somebody
∀x∀y¬Q(x,y)
whom everybody does not love". (Note: Lydia refers to x and
somebody refers to y. while the statement of y occurs before the
statement of x)
c) There is a student at your school who has been a contestant
∃y∀x¬L(x,y)
on Jeopardy and on Wheel of Fortune.
∃xQ(x,Jeopardy)∧Q(x,Wheeloffortune)
g. We could rewrite the given sentence as "There is somebody x
whom everyone loves and all people that are loved by everyone,
then this person has to be x".
d) Every television quiz show has had a student from
your school as a contestant. ∃x(∀yL(x,y)∧∀z((∀wL(w,z))→z=x))
∀y∃xQ(x,y)
h. We could rewrite the given sentence as "There are two people y
and z that Lynn loves and these two people are different and for all
e) At least two students from your school have been contestants people that Lynn loves, these people then have to be either y or z".
on Jeopardy. ∃y∃z(L(Lynn,y)∧L(Lynn,z)∀y≠z∧∀w(L(Lynn,w)→(w=y∨w=z))
∃x∃z((x≠y)∧Q(x,Jeopardy)∧Q(z,Jeopardy))
(i) We could rewrite the given sentence as "Every person x loves x
(himself/herself)"
9. Let L(x, y) be the statement “x loves y,” where the domain for
both x and y consists of all people in the world. ∀xL(x,x)
Use quantifiers to express each of these statements.
a) Everybody loves Jerry. (j) We could rewrite the given sentence as "There is a person x
who loves y if and only if y is x (himself/herself)".
b) Everybody loves somebody.
∃x∀y(L(x,y)↔x=y)
c) There is somebody whom everybody loves.
d) Nobody loves everybody.
10. Let F (x, y) be the statement “x can fool y,” where the
e) There is somebody whom Lydia does not love.
domain consists of all people in the world. Use quantifiers
f ) There is somebody whom no one loves.
to express each of these statements.
g) There is exactly one person whom everybody loves.
a) Everybody can fool Fred.
h) There are exactly two people whom Lynn loves.
b) Evelyn can fool everybody.
i) Everyone loves himself or herself.
c) Everybody can fool somebody.
j) There is someone who loves no one besides himselfor herself.
d) There is no one who can fool everybody.
Answer:
e) Everyone can be fooled by somebody.
a. "Everybody” means ”All people in the world”.
f ) No one can fool both Fred and Jerry.
∀xL(x,Jerry)
g) Nancy can fool exactly two people.
h) There is exactly one person whom everybody can fool.
b. ’Everybody” means "All people in the world”. ’’Somebody”
means ’’There exists a person in the world” i) No one can fool himself or herself.
∀x∃yL(x,y) j) There is someone who can fool exactly one personbesides
himself or herself.
Answer:
c. ’’Somebody” means "There exists a person in the world”.
’’Everybody” means " All people in the world”. a)∀xF(x,Fred)
c) Jan and Sharon have never chatted over the Internet.
b)∀yF(Evelyn,y)
d) No one in the class has chatted with Bob.
c)∀x∃yF(x,y) e) Sanjay has chatted with everyone except Joseph.
h)∃y(∀xF(x,y)∧∀z(∀xF(x,z)→z=y)) has chatted over the Internet with at least one other
student in your class.
i)¬∃xF(x,x)
k) Someone in your class has an Internet connection but
11. Let S(x) be the predicate “x is a student,” F (x) the predicate “x has not chatted with anyone else in your class.
is a faculty member,” and A(x, y) the predicate
l) There are two students in your class who have not
“x has asked y a question,” where the domain consists of
chatted with each other over the Internet.
all people associated with your school. Use quantifiers to
m) There is a student in your class who has chatted with
express each of these statements.
everyone in your class over the Internet.
a) Lois has asked Professor Michaels a question.
n) There are at least two students in your class who have
b) Every student has asked Professor Gross a question.
not chatted with the same person in your class.
c) Every faculty member has either asked Professor
o) There are two students in the class who between them
Miller a question or been asked a question by Professor Miller.
have chatted with everyone else in the class.
d) Some student has not asked any faculty member a
Answer:
question. a) (Jerry)
e) There is a faculty member who has never been asked b) (Rachel, Chelsea)
a question by a student.
c) )Jan, Sharon)
f ) Some student has asked every faculty member a question.
d) (x, Bob)
g) There is a faculty member who has asked every other
faculty member a question. e) (x , = Joseph ↔q C(x, Sanjqay))
f) ∃x∀y(S(x)^F(y)->A(x,y)) m) (x, y)
12. Let I (x) be the statement “x has an Internet connection” 13. Let M(x, y) be “x has sent y an e-mail message” and
and C(x, y) be the statement “x and y have chatted over T (x, y) be “x has telephoned y,” where the domain consists of all
students in your class. Use quantifiers to express each of these
the Internet,” where the domain for the variables x and y
statements. (Assume that all e-mail
consists of all students in your class. Use quantifiers to
messages that were sent are received, which is not the
express each of these statements.
way things often work.)
a) Jerry does not have an Internet connection.
a) Chou has never sent an e-mail message to Koko.
b) Rachel has not chatted over the Internet with Chelsea.
b) Arlene has never sent an e-mail message to or telephoned Sarah. a) There is a student in this class who can speak Hindi.
c) José has never received an e-mail message from Deborah. b) Every student in this class plays some sport.
d) Every student in your class has sent an e-mail message to Ken. c) Some student in this class has visited Alaska but has
e) No one in your class has telephoned Nina. not visited Hawaii.
f ) Everyone in your class has either telephoned Avi or d) All students in this class have learned at least one programming
language.
sent him an e-mail message.
e) There is a student in this class who has taken every course
g) There is a student in your class who has sent everyone offered by one of the departments in this
else in your class an e-mail message. school.
h) There is someone in your class who has either sent an f ) Some student in this class grew up in the same town
e-mail message or telephoned everyone else in your as exactly one other student in this class.
class. g) Every student in this class has chatted with at least
i) There are two different students in your class who one other student in at least one chat group.
have sent each other e-mail messages. Answer:
j) There is a student who has sent himself or herself an
a) ∃x Hindi(x)
e-mail message.
where Hindi(x) is the predicate "x can speak Hindi."
k) There is a student in your class who has not received
an e-mail message from anyone else in the class and
b) ∀x ∃y Sport(x, y)
who has not been called by any other student in the
where Sport(x, y) is the predicate "x plays sport y."
class.
l) Every student in the class has either received an email message
c) ∃x (VisitedAlaska(x) ∧¬VisitedHawaii(x))
or received a telephone call from another student in the class.
where VisitedAlaska(x) and VisitedHawaii(x) are predicates that
m) There are at least two students in your class such that
are true if "x has visited Alaska" and "x has visited Hawaii,"
one student has sent the other e-mail and the second respectively.
between them have sent an e-mail message to or telephoned where ProgrammingLanguage(x, y) is the predicate "x has learned
everyone else in the class. programming language y."
Answer:
m) ∃x ∃y (x ≠ y ∧M(x, y) ∧ T(y, x)) 15. Use quantifiers and predicates with more than one variable to
express these statements.
n) ∃x ∃y (x ≠ y ∧∀z (z ≠ x ∧ z ≠ y → (M(x, z) ∨ T(x, z)) ∧ (M(y,
z) ∨ T(y, z)))) a) Every computer science student needs a course in discrete
mathematics.
b) There is a student in this class who owns a personal
14. Use quantifiers and predicates with more than one variable to
express these statements. computer.
c) Every student in this class has taken at least one computer science majors who are juniors, and 1 computer science
science course.
major who is a senior. Express each of these statements in
d) There is a student in this class who has taken at least
terms of quantifiers and then determine its truth value.
one course in computer science.
a) There is a student in the class who is a junior.
e) Every student in this class has been in every building
b) Every student in the class is a computer science major.
on campus.
c) There is a student in the class who is neither a mathematics
f ) There is a student in this class who has been in every major nor a junior.
room of at least one building on campus. d) Every student in the class is either a sophomore or a
g) Every student in this class has been in at least one computer science major.
room of every building on campus. e) There is a major such that there is a student in the class
Answer: in every year of study with that major.
where TakenCourse(x, y) and ComputerScienceCourse(y) are True, there is a computer science major who is a senior.
predicates that are true if "x has taken course y" and "y is a
computer science course," respectively.
d) Let the domain be all students in the discrete mathematics
class
e) ∀x ∀y (Student(x) ∧ Building(y) →BeenIn(x, y))
Let B(x) mean '’student x is a computer science major" and D(x)
where Building(y) and BeenIn(x, y) are predicates that are true if
mean ’’student x is a sophomore"
"y is a building" and "x has been in y," respectively.
∀x[B(x)∨D(x)]
e) Let G(x. y) means "x knows password of user y" and H(x) mean
b) $\exists p \forall e (Error(e) \rightarrow (KernelWorks() \ "x is a system administrator”
rightarrow Continues(p,e)))$, where $Continues(p,e)$ means
process $p$ continues to run during error condition $e$, $Error(e)$ ∀x[H(x)→yG(x,y)]∧¬∃x[¬H(x)∧∀yG(x,y)]
means error condition $e$ occurred, and $KernelWorks()$ means
the kernel is working correctly.
19. Express each of these statements using mathematical and
logical operators, predicates, and quantifiers, where the
c) $\forall u \forall w (User(u) \land Website(w) \land Url(w, edu) \
rightarrow Access(u,w))$, where $User(u)$ means $u$ is a user on domain consists of all integers.
the campus network, $Website(w)$ means $w$ is a website,
a) The sum of two negative integers is negative.
$Url(w,edu)$ means the URL of website $w$ has a ".edu"
extension, and $Access(u,w)$ means user $u$ can access website b) The difference of two positive integers is not necessarily
$w$. positive
c) The sum of the squares of two integers is greater than
d) $\exists s_1 \exists s_2 (\forall r (RemoteServer(r) \rightarrow or equal to the square of their sum.
(Monitor(s_1,r) \lor Monitor(s_2,r))) \land (s_1 \neq s_2) \land (\
forall s \neq s_1,s_2 (\neg (Monitor(s,r))))$, where d) The absolute value of the product of two integers is
$RemoteServer(r)$ means $r$ is a remote server, $Monitor(s,r)$ the product of their absolute values.
means system $s$ monitors server $r$, and $s_1$ and $s_2$ are
the two systems that monitor every remote server. Answer:
a) $\forall x \in \mathbb{Z}, \forall y \in \mathbb{Z}, x < 0 \land y
< 0 \rightarrowx+y< 0$
18. Express each of these system specifications using predicates,
quantifiers, and logical connectives, if necessary. b) $\exists x \in \mathbb{Z}, \exists y \in \mathbb{Z}, x > 0 \land
y > 0 \land x-y \leq 0$
a) At least one console must be accessible during every
c) $\forall x \in \mathbb{Z}, \forall y \in \mathbb{Z}, x^2 + y^2 \
fault condition. geq (\frac{x+y}{2})^2$
b) The e-mail address of every user can be retrieved d) $\forall x \in \mathbb{Z}, \forall y \in \mathbb{Z}, |x y| = |x| |y|
whenever the archive contains at least one message $
a process that has not been compromised. where the domain consists of all integers.
d) There are at least two paths connecting every two distinct a) The product of two negative integers is positive.
endpoints on the network. b) The average of two positive integers is positive.
e) No one knows the password of every user on the system except c) The difference of two negative integers is not necessarily
for the system administrator, who knowsallpasswords.[ negative.
Answer: d) The absolute value of the sum of two integers does
a) Let A(x.y) mean "consule x is accessible during fault condition not exceed the sum of the absolute values of these
y"
integers.
∀y∃xA(x,y)
Answer:
Using predicates, quantifiers, logical connectives, and The difference of every real number
mathematical operators, the statement can be expressed as follows: and itself equals zero.
∀x(x−x=0)
For all positive integers n, there exist integers a, b, c, and d such
that:
c) Rewrite statement:
If a real number is positive then there
n = a^2 + b^2 + c^2 + d^2
exist two (different) square roots.
∀x[x>0→∃y∃z(x=y2∧x=z2∧y≠z)]
where a, b, c, and d are integers.
f) ∀x∃yQ(x, y):
b) For all real numbers x and y, if x is negative and y is negative, We need to determine whether for every integer x, there exists an
then the product of x and y is positive. integer y such that Q(x, y) is true.
Consider any integer x. We can choose y = x/2, then
c) There exist real numbers x and y such that the square of x is x + y = x + x/2 = 3x/2
greater than y and x is less than y.
3x/2 ≠ x/2
26. Let Q(x, y) be the statement “x + y = x − y.” If the domain for We need to determine whether there exists an integer y such that
both variables consists of all integers, what are Q(x, y) is true for all integers x.
a) Q(1, 1) b) Q(2, 0) 2x = 0
e) ∃x∃yQ(x, y) f ) ∀x∃yQ(x, y) Thus, Q(x, y) is true only for y = 0, and thus ∃y∀xQ(x, y) is false.
g) ∃y∀xQ(x, y) h) ∀y∃xQ(x, y)
2y = -1 x+y=x-y
y = -1/2 2y = 0
Since y = -1/2 is not an integer, Q(1, y) is false for all integers y, so y=0
∀yQ(1, y) is false. Thus, Q(x, y) is true only for y = 0, and thus ∀x∀yQ(x, y) is false.
27. Determine the truth value of each of these statements if a) False. For example, there is no real number whose square is
negative.
the domain for all variables consists of all integers.
b) False. For any real number x, x can be negative or 0, in which
a) ∀n∃m(n2 < m) b) ∃n∀m(n < m2) case there is no real number y such that y = x^2.
c) ∀n∃m(n + m = 0) d) ∃n∀m(nm = m) c) True. If xy = 0, then either x = 0 or y = 0. So, for any real
e) ∃n∃m(n2 + m2 = 5) f ) ∃n∃m(n2 + m2 = 6) number x, we can choose y = 0 if x = 0, and y = -x otherwise.
c) The statement is true. For any integer $n$, we can always find i) True. Solving the system of equations gives y = 1 − x and x + y
an integer $m$ such that $m=-n$. Then $n+m=0$. = 2, which are both true for any x.
j) True. For any real numbers x and y, z = (x + y)/2 is a real
number.
d) The statement is false. If we let $n=0$, then $nm=0$ for all
integers $m$, which means $nm=m$ is not true for all integers
$m$.
29. Suppose the domain of the propositional function P (x, y)
consists of pairs x and y, where x is 1, 2, or 3 and y is
e) The statement is true. For example, if we let $n=1$ and $m=2$,
1, 2, or 3. Write out these propositions using disjunctions
then $n^2+m^2=1+4=5$.
and conjunctions.
Answer:
g) The statement is true. If we let $n=2$ and $m=2$, then a) ∀x∀yP (x, y): This proposition states that for all x and y in the
$n+m=4$ and $n-m=0$, which means $n+m=4$ and $n-m=1$ are domain, the propositional function P(x, y) is true. We can write this
both true. using conjunctions as follows:
h) The statement is false. There are no two integers $n$ and $m$ (P(1, 1) ∧ P(1, 2) ∧ P(1, 3)) ∧ (P(2, 1) ∧ P(2, 2) ∧ P(2, 3)) ∧ (P(3,
such that $n+m=4$ and $n-m=2$. 1) ∧ P(3, 2) ∧ P(3, 3))
i) The statement is true. For any integers $n$ and $m$, we can find b) ∃x∃yP (x, y): This proposition states that there exists at least
an integer $p=(n+m)/2$ such that $p$ is also an integer. one pair x and y in the domain such that P(x, y) is true. We can
write this using disjunctions as follows:
c) ∃x∀y(xy = 0) d) ∃x∃y(x + y = y + x)
c) ∃x∀yP (x, y): This proposition states that there exists at least
e) ∀x(x = 0 →∃y(xy = 1)) one x in the domain such that for all y in the domain, P(x, y) is
true. We can write this using disjunctions and conjunctions as
f )∃x∀y(y = 0 →xy = 1) follows:
g) ∀x∃y(x + y = 1)
h) ∃x∃y(x + 2y = 2 ∧ 2x + 4y = 5) (P(1, 1) ∧ P(1, 2) ∧ P(1, 3)) ∨ (P(2, 1) ∧ P(2, 2) ∧ P(2, 3)) ∨ (P(3,
i) ∀x∃y(x + y = 2 ∧ 2x − y = 1) 1) ∧ P(3, 2) ∧ P(3, 3))
j) ∀x∀y∃z(z = (x + y)/2)
Answer:
d) ∀y∃xP (x, y): This proposition states that for all y in the domain,
there exists at least one x in the domain such that P(x, y) is true.
33. Rewrite each of these statements so that negations appear only
We can write this using conjunctions and disjunctions as follows:
within predicates (that is, so that no negation
is outside a quantifier or an expression involving logical
(P(1, 1) ∨ P(2, 1) ∨ P(3, 1)) ∧ (P(1, 2) ∨ P(2, 2) ∨ P(3, 2)) ∧ (P(1,
connectives).
3) ∨ P(2, 3) ∨ P(3, 3))
a) ¬∀x∀yP (x, y) b) ¬∀y∃xP (x, y)
b) ∃x¬∃yP (x, y) 34. Find a common domain for the variables x, y, and z
c) ∀y(Q(y) ∧∃x¬R(x, y)) for which the statement ∀x∀y((x = y) →∀z((z = x) ∨
d) ∀y(∀x¬R(x, y) ∧¬∃xR(x, y)) (z = y))) is true and another domain for which it is false.
e) ∀y(∀x∀z¬T (x, y, z) ∧∀x∀z¬U(x, y, z)) Answer:
a) ∀x∃y∀zT (x, y, z)
To make this statement true, we need to find a domain where this
b) ∀x∃yP (x, y) ∨∀x∃yQ(x, y) property holds. One possible domain for which the statement is
true is {1, 2, 3}. In this domain, if x equals y, then either z equals x
c) ∀x∃y(P (x, y) ∧∃zR(x, y, z)) or z equals y, because there are only three elements and if x and y
are equal, then any z must also be equal to either x or y.
d) ∀x∃y(P (x, y) → Q(x, y))
Answer:
To make this statement false, we need to find a domain where this
a) ¬∀x¬∃y∀zT(x, y, z)
property does not hold. One possible domain for which the
b) ¬(∀x∃yP(x, y) ∨∀x∃yQ(x, y)) ⇔¬∀x∃yP(x, y) ∧¬∀x∃yQ(x, y) statement is false is {1, 2}. In this domain, if x equals y, it is not
⇔∃x∀y¬P(x, y) ∧∃x∀y¬Q(x, y) true that for all z, either z equals x or z equals y because there is a
third element missing from the domain. For example, if x = y = 1,
c) ¬∀x∃y(P(x, y) ∧∃zR(x, y, z)) ⇔∃x∀y¬(P(x, y) ∧∃zR(x, y, z)) there is no element z such that z = 2.
⇔∃x∀y(¬P(x, y) ∨∀z¬R(x, y, z))
32. Express the negations of each of these statements so that (w = y) ∧ (w = z)) is true and another common domain
all negation symbols immediately precede predicates. for these variables for which it is false.
Answer: One common domain for which the statement is true is the set of
all real numbers. In this case, we can simply take w to be equal to
a) ∀z∃y∃x¬T(x, y, z)
any one of x, y, or z.
b) ∀x∀y(¬P(x, y) ∨¬Q(x, y))
form the negation of the statement so that no negation is a) ∀x((Student(x) ∧InClass(x, thisClass)) → (∃y∃z((MathClass(y)
∧MathClass(z) ∧ y ≠ z) ∧ Took(x, y) ∧ Took(x, z))))
to the left of a quantifier. Next, express the negation in
Negation: ∃x(Student(x) ∧InClass(x, thisClass) ∧
simple English. (Do not simply use the phrase “It is not (∀y∀z((MathClass(y) ∧MathClass(z) ∧ y ≠ z) →¬(Took(x, y) ∧
Took(x, z)))))
the case that.”)
Negation in English: There exists a student in this class who did
a) No one has lost more than one thousand dollars playing the
not take exactly two distinct math classes at this school.
lottery.
b) There is a student in this class who has chatted with
b) ∃x∀y(Country(y) → (Visited(x, y) ∨ y = Libya))
exactly one other student.
Negation: ∀x∃y(Country(y) ∧¬(Visited(x, y) ∨ y = Libya)))
c) No student in this class has sent e-mail to exactly two
Negation in English: For every person, there is a country they have
other students in this class.
not visited and that country is not Libya.
d) Some student has solved every exercise in this book.
e) No student has solved at least one exercise in every
c) ¬∀x∀y(Mountain(y) →Climbed(x, y))
section of this book.
Negation: ∃x∀y(Mountain(y) ∧¬Climbed(x, y))
Answer:
Negation in English: There exists a person who did not climb
a) ∼∃x(loss(x) > 1000) every mountain in the Himalayas.
d) ∃x∀y(solve(x, y)) 38. Express the negations of these propositions using quantifiers,
and in English.
Negation: ∀x∃y¬solve(x, y). No student has solved every exercise
in this book. a) Every student in this class likes mathematics.
e) ∀x∃y∃z(exercise(z) ∧ section(z) ∧ student(x) ∧ student(y) ∧ b) There is a student in this class who has never seen a
student(z) ∧solve(x, z) ∧¬solve(y, z))
computer.
Negation: ∃x∀y∃z(exercise(z) ∧ section(z) ∧ student(x) ∧
c) There is a student in this class who has taken every
student(y) ∧ student(z) ∧solve(x, z) ∧ solve(y, z)). There is a
student who has solved at least one exercise in every section of this mathematics course offered at this school.
book.
d) There is a student in this class who has been in at least
one room of every building on campus.
37. Express each of these statements using quantifiers. Then
Answer:
form the negation of the statement so that no negation is
a) $\neg(\forall$ student $s$ in this class, $s$ likes mathematics) $\
to the left of a quantifier. Next, express the negation in equiv$ $\exists$ student $s$ in this class such that $s$ does not
like mathematics.
simple English. (Do not simply use the phrase “It is not
the case that.”)
English: There exists a student in this class who does not like
a) Every student in this class has taken exactly two mathematics
mathematics.
classes at this school.
b) $\neg(\exists$ student $s$ in this class who has seen a
b) Someone has visited every country in the world except
computer) $\equiv$ $\forall$ student $s$ in this class, $s$ has
Libya. never seen a computer.
In simple English, this statement means that for any real numbers
English: Every student in this class has not been in at least one x, y, and z, the product of x with the product of y and z is equal to
room of every building on campus. the product of the product of x and y with z. In other words, the
order in which we perform the multiplication of three real numbers
does not affect the result.
39. Find a counterexample, if possible, to these universally
quantified statements, where the domain for all variables
42. Use quantifiers to express the distributive laws of
consists of all integers. multiplication over addition for real numbers.
a) ∀x∀y(x2 = y2 → x = y) Answer:
b) ∀x∃y(y2 = x) There are two distributive laws of multiplication over addition for
real numbers. We can use quantifiers to express each of them as
c) ∀x∀y(xy≥ x) follows:
Answer:
a) The statement is false. A counterexample is x = 2 and y = −2. 1.Left distributive law: For all real numbers a, b, and c, we have:
We have that 22 = (−2)2 = 4, but 2 ≠ −2.
∀a ∀b ∀c, a * (b + c) = (a * b) + (a * c)
∀a ∀b ∀c, (b + c) * a = (b * a) + (c * a)
40. Find a counterexample, if possible, to these universally
quantified statements, where the domain for all variables
This means that for any real numbers a, b, and c, multiplying the
consists of all integers. sum of b and c by a is the same as multiplying b by a and adding
a) ∀x∃y(x = 1/y) that to the product of c and a.
c) ∀x∀y(x2 = y3) 43. Use quantifiers and logical connectives to express the fact
Answer: that every linear polynomial (that is, polynomial of degree 1) with
real coefficients and where the coefficient ofx is nonzero, has
a) There is a counterexample to this statement. If we let x be 0, exactly one real root.
then there is no y such that x = 1/y, since division by 0 is
undefined. Answer:
Let P(x) be a linear polynomial with real coefficients and nonzero
coefficient of x. Then we can express the fact that P(x) has exactly
b) There is no counterexample to this statement. For any integer x, one real root using quantifiers and logical connectives as follows:
we can choose y = x + 10. Then y2 − x = (x + 10)2 − x = x2 + 20x
+ 100 − x = x2 + 19x + 100, which is always greater than 100 for
any integer x. ∀a∀b∃!x(P(x) = ax + b ∧ a ≠ 0)
c) There is no counterexample to this statement. For any integer x where ∀a means "for all real numbers a," ∀b means "for all real
and y, if x2 = y3, then x and y must both be perfect squares. Let x numbers b," and ∃!x means "there exists a unique real number x."
= a2 and y = b2, where a and b are integers. Then x2 = a4 and y3 =
The statement P(x) = ax + b ∧ a ≠ 0 means that P(x) is a linear
b6, so a4 = b6. Since the left side is a perfect fourth power and the
polynomial with coefficient of x equal to a and constant term equal
right side is a perfect sixth power, we must have a = b = 0 or a = b
to b, and that a is nonzero.
$x \leq y^2$. Thus, we have found an $x$ for which the statement
is true for all $y$.
In simple English, this statement says that for any real numbers a
and b, there is exactly one real number x such that the linear
polynomial with coefficient of x equal to a and constant term equal
to b has a real root. b) Now, let's consider the integers as the domain. In this case, the
statement is false. To see this, suppose there is an $x$ such that $x\
leq y^2$ for all integers $y$. Then, taking $y = |x|+1$ we have $x \
leq |x|^2+2|x|+1$. Since $|x|+1$ is an integer and $|x|+1 > |x|$, we
44. Use quantifiers and logical connectives to express the fact know that $|x|^2+2|x|+1 > |x|$. Thus, we have $x \leq |x|^2+2|x|+1
that a quadratic polynomial with real number coefficients < |x|$, which is a contradiction. Therefore, the statement is false
for the integers.
has at most two real roots.
Answer:
c) Finally, let's consider the nonzero real numbers as the domain.
Let P(x) be a quadratic polynomial with real number coefficients. In this case, the statement is also false. To see this, suppose there is
Then we can express the fact that P(x) has at most two real roots an $x$ such that $x\leq y^2$ for all nonzero real numbers $y$.
using quantifiers and logical connectives as follows: Then, taking $y = \sqrt{|x|+1}$, we have $x \leq |x|+1$. Since $|x|
+1$ is positive and $x$ is negative, this implies $x > |x|+1$, which
is a contradiction. Therefore, the statement is false for the nonzero
∀a∀b∀c∀x ((a ≠ 0) ∧ ((b^2 - 4ac) ≥ 0) ∧ (P(x) = ax^2 + bx + c)) → real numbers.
(((x = (-b + √(b^2 - 4ac)) / (2a)) ∨ (x = (-b - √(b^2 - 4ac)) / (2a))) ∨
(∀y ((y ≠ (-b + √(b^2 - 4ac)) / (2a)) ∧ (y ≠ (-b - √(b^2 - 4ac)) /
(2a))) → (P(y) ≠ 0))) 47. Show that the two statements ¬∃x∀yP (x, y) and
∀x∃y¬P (x, y), where both quantifiers over the first variable in P
(x, y) have the same domain, and both quantifiers over the second
In simpler terms, this can be expressed as: "For any quadratic
variable in P (x, y) have the same
polynomial with real number coefficients, if a is not equal to 0 and
b^2 - 4ac is greater than or equal to 0, then the polynomial has domain, are logically equivalent.
either two real roots, given by the quadratic formula, or it has no
other real roots besides those two." ∗48. Show that ∀xP (x) ∨∀xQ(x) and ∀x∀y(P (x) ∨ Q(y)),
45. Determine the truth value of the statement ∀x∃y(xy = 1) are logically equivalent. (The new variable y is used to
if the domain for the variables consists of combine the quantifications correctly.)
b) the nonzero integers. To show that ¬∃x∀yP (x, y) and ∀x∃y¬P (x, y) are logically
equivalent, we need to show that they have the same truth value
c) the positive real numbers. under any interpretation.
Answer:
a) The statement is true. To show this, we need to show that for Let D be the domain for both x and y.
every nonzero real number x, there exists a real number y such that
xy = 1. We can take y = 1/x. Then xy = x(1/x) = 1, so the statement
is true for the domain of nonzero real numbers. First, assume ¬∃x∀yP(x, y) is true. This means that it is not the
case that there exists an x such that for all y, P(x, y) is true. In other
words, for every x, there exists a y such that ¬P(x, y) is true. This
b) The statement is false. To see this, consider x = 2. Then for any can be expressed as ∀x∃y¬P(x, y), which is the negation of
integer y, xy = 2y is even and hence cannot equal 1, so there is no ∃x∀yP(x, y).
integer y such that xy = 1.
46. Determine the truth value of the statement ∃x∀y(x ≤ y2) Therefore, ¬∃x∀yP(x, y) and ∀x∃y¬P(x, y) are logically
if the domain for the variables consists of equivalent.
49. a) Show that ∀xP (x) ∧∃xQ(x) is logically equivalent a) ∃xP (x) ∨∃xQ(x) ∨ A, where A is a proposition notinvolving any
quantifiers.
to ∀x∃y (P (x) ∧ Q(y)), where all quantifiers have
b) ¬(∀xP (x) ∨∀xQ(x))
the same nonempty domain.
c) ∃xP (x) →∃xQ(x)
b) Show that ∀xP (x) ∨∃xQ(x) is equivalent to ∀x∃y
Answer:
(P (x) ∨ Q(y)), where all quantifiers have the samenonempty
domain. a) ∃x∃y(P (x) ∨ Q(y)) ∨ A
This expression says "there exists an x such that P(x) is true, and
for all y, if P(y) is true, then y must be equal to x." This captures
the idea of there being only one object that satisfies P.
∴ Socrates is mortal.
Answer:
Modus Ponens:
p→qp
−−−
∴q
Ans-
Let us assume:
p="Socrates is human"
q="Socrates is mortal"
∴q
∴q
Note that the conclusion is true according to the rule of Modus Ponens
The Argument is Modus Ponens,
The argument is valid
The conclusion is true because the Hypotheses are true.
2. Find the argument form for the following argument anddetermine whether it is valid. Can we conclude that theconclusion is true if the
premises are true?
If George does not have eight legs, then he is not aspider.George is a spider.
Answer:
Modua tollens:
p→q¬q
−−−
∴¬p
Let us assume :
p="George have eight legs"
q="George is a spider".
∴p
q≡¬(¬q)
This can also be written as:
¬p→¬q¬(¬q)
−−−
∴¬(¬p)
We can write the given argument using above stated interpretation as:
p
−−−
p∨q
b) Let us assume:
p="Jerry is a mathematics major"
q="Jerry is a computer science major"
We can write the given argument using above stated interpretation as:
p∧q
−−−
∴p
c) Let us assume:
p="It is rainy"
q="pool will be closed"
We can write the given argument using above stated interpretation as:
p→q
p
−−−
q
d) Let us assume:
p="It snows today"
q="University is closed"
We can write the given argument using above stated interpretation as:
p→q
¬q
−−−
∴¬p
e) Let us assume:
p="I go swimming"
q="I will stay in the sun too long"
r="I will sunburn"
We can write the given argument using above stated interpretation as:
p→q
q→r
−−−
∴p→r
p∧q
∴p
b) Let us assume:
q="The pollution is dangerous"
p="It is hotter than 100 degrees outside today"
We can write the given argument using above stated interpretation as:
p∨q
¬p
∴¬p
c) Let us assume:
p="If Linda is an excellent swimmer"
q="She can work as a lifeguard"
We can write the given argument using above stated interpretation as:
p∨q
∴q
d) Let us assume:
p="This summer Steve will work at a computer company "
q="He will be a beach bum"
We can write the given argument using above stated interpretation as:
p∨q
e) Let us assume:
p="I work all night on this homework"
q="I answer all the exercises"
r="I will understand the material"
We can write the given argument using above stated interpretation as:
p→q
q→r
∴p→r
5. Use rules of inference to show that the hypotheses “Randyworks hard,” “If Randy works hard, then he is a dull boy,”and “If Randy is a dull
boy, then he will not get the job”imply the conclusion “Randy will not get the job.”
Answer:
Let us assume
p=“Randy works hard”
q="Randy is a full boy"
r="Randy will get the job"
So we have
1) p
2) p→q
3) q→¬r
4) Using Modus ponens to 1) and 3) , we get
q
5) Using Modus ponens to 3) and 4) , we get
¬r
¬r means that Randy will not get the job which is the given conclusion.
6. Use rules of inference to show that the hypotheses “If itdoes not rain or if it is not foggy, then the sailing race willbe held and the lifesaving
demonstration will go on,” “Ifthe sailing race is held, then the trophy will be awarded,”and “The trophy was not awarded” imply the
conclusion“It rained.”
Answer:
Using the rules of inference the given hypothesis implies to conclude that it rains using these rules of inference. The rules of inference that have
helped to make this conclusion are listed below.
Addition
Modus Ponens
Modus Tollens
simplification
De Morgan's Laws
The step by step work is listed below.
7. What rules of inference are used in this famous argument? “All men are mortal. Socrates is a man. Therefore,Socrates is mortal.”
Answer:
The rules of inference used in this famous argument are:
1. Universal Instantiation (UI): It allows us to infer a particular case of a universal statement by replacing the universal quantifier with a
specific value.
Example: "All men are mortal" can be instantiated as "Socrates is mortal".
2. Modus Ponens (MP): It allows us to infer the consequent of a conditional statement if we know that the antecedent is true.
Example: "If Socrates is a man, then he is mortal." "Socrates is a man." Therefore, "Socrates is mortal."
The argument uses Universal Instantiation to instantiate the universal statement "All men are mortal" with the specific case of Socrates, and then
uses Modus Ponens to infer that Socrates is mortal based on the premise "Socrates is a man".
8. What rules of inference are used in this argument? “Noman is an island. Manhattan is an island. Therefore, Manhattan is not a man.”
Answer:
The rule of inference used in this argument is called the "Law of Contraposition".
The Law of Contraposition states that a conditional statement can be replaced with its contrapositive, and the truth value of the statement will
remain unchanged.
In this argument, the conditional statement is "If something is a man, then it is not an island". The contrapositive of this statement is "If
something is an island, then it is not a man".
By using the Law of Contraposition, we can see that the argument is valid. We can rephrase the argument as follows:
9. For each of these collections of premises, what relevantconclusion or conclusions can be drawn? Explain therules of inference used to obtain
each conclusion fromthe premises.
a) “If I take the day off, it either rains or snows.” “I tookTuesday off or I took Thursday off.” “It was sunny onTuesday.” “It did not snow on
Thursday.”
b) “If I eat spicy foods, then I have strange dreams.” “Ihave strange dreams if there is thunder while I sleep.”“I did not have strange dreams.”
c) “I am either clever or lucky.” “I am not lucky.” “If Iam lucky, then I will win the lottery.”
d) “Every computer science major has a personal computer.” “Ralph does not have a personal computer.”“Ann has a personal computer.”
e) “What is good for corporations is good for the UnitedStates.” “What is good for the United States is goodfor you.” “What is good for
corporations is for you tobuy lots of stuff.”
f ) “All rodents gnaw their food.” “Mice are rodents.”“Rabbits do not gnaw their food.” “Bats are not rodents.”
Answer:
a) Conclusion: The day off that was taken was Tuesday. The rule of inference used is disjunctive syllogism.
b) Conclusion: I did not eat spicy foods and there was no thunder while I slept. The rule of inference used is contrapositive.
c) Conclusion: I am clever. The rule of inference used is modus tollens.
d) Conclusion: Ralph is not a computer science major and Ann is a computer science major. The rule of inference used is modus tollens.
e) Conclusion: Buying lots of stuff is good for you. The rule of inference used is hypothetical syllogism.
f) Conclusion: Mice gnaw their food and rabbits are not rodents. No conclusion can be drawn about bats. The rules of inference used are
categorical syllogism and denial of the consequent.
10. For each of these sets of premises, what relevant conclusion or conclusions can be drawn? Explain the rules of inference used to obtain each
conclusion from the premises.
a) “If I play hockey, then I am sore the next day.” “Iuse the whirlpool if I am sore.” “I did not use thewhirlpool.”
b) “If I work, it is either sunny or partly sunny.” “I workedlast Monday or I worked last Friday.” “It was not sunnyon Tuesday.” “It was not partly
sunny on Friday.”
c) “All insects have six legs.” “Dragonflies are insects.”“Spiders do not have six legs.” “Spiders eat dragonflies.”
d) “Every student has an Internet account.” “Homer doesnot have an Internet account.” “Maggie has an Internetaccount.”
e) “All foods that are healthy to eat do not taste good.”“Tofu is healthy to eat.” “You only eat what tastesgood.” “You do not eat tofu.”
“Cheeseburgers are nothealthy to eat.”
f ) “I am either dreaming or hallucinating.” “I am notdreaming.” “If I am hallucinating, I see elephants running down the road.”
Answer:
a) Conclusion: I did not play hockey. Rules of inference used: Modus Tollens.
b) Conclusion: I worked last Monday and it was not sunny on Tuesday. Rules of inference used: Disjunctive Syllogism, Modus Tollens.
c) Conclusion: Dragonflies have six legs and spiders eat dragonflies. Rules of inference used: Conjunction, Simplification.
d) Conclusion: Maggie is a student. Rules of inference used: Disjunctive Syllogism.
e) Conclusion: You do not eat tofu and cheeseburgers are not healthy to eat. Rules of inference used: Modus Tollens, Conjunction.
f) Conclusion: I am hallucinating and I do not see elephants running down the road. Rules of inference used: Modus Tollens, Modus Ponens.
11. Show that the argument form with premisesp1, p2, . . . , pn and conclusion q → r is valid if theargument form with premises p1, p2, . . . , pn,
q, andconclusion r is valid.
Answer:
To show that the argument form with premises p1, p2, . . . , pn and conclusion q → r is valid if the argument form with premises p1, p2, . . . , pn,
q, and conclusion r is valid, we can use a proof by contradiction.
Suppose the argument form with premises p1, p2, . . . , pn and conclusion q → r is invalid. Then there exists a truth assignment to the
propositions p1, p2, . . . , pn, q, and r such that all the premises are true and the conclusion q → r is false. Let's call this truth assignment T.
Since the argument form with premises p1, p2, . . . , pn, q, and conclusion r is valid, the truth assignment T must make all the premises p1, p2, . . .
, pn and q true and the conclusion r true as well. But since T makes q → r false, it must be the case that T makes q true and r false.
Now consider the truth assignment T' that agrees with T on p1, p2, . . . , pn and q, but sets r to false. Since T makes q true and r false, T' makes q
→ r false as well, contradicting the fact that the argument form with premises p1, p2, . . . , pn and conclusion q → r is invalid under T.
Therefore, we have shown by contradiction that if the argument form with premises p1, p2, . . . , pn and conclusion q → r is invalid, then the
argument form with premises p1, p2, . . . , pn, q, and conclusion r is also invalid. Hence, if the argument form with premises p1, p2, . . . , pn, q,
and conclusion r is valid, then the argument form with premises p1, p2, . . . , pn and conclusion q → r must also be valid.
12. Show that the argument form with premises (p ∧ t) →(r ∨ s), q → (u ∧ t), u → p, and ¬s and conclusionq → r is valid by first using Exercise
11 and then using rules of inference from Table 1.
Answer:
Using Exercise 11, we can transform the premises and the conclusion into the following equivalent statements:
Premises:
¬(p ∧ t) ∨ (r ∨ s)
¬q ∨ (u ∧ t)
¬u ∨ p
¬s
Conclusion:
¬q ∨ r
To show that the argument form is valid, we can use the rules of inference from Table 1. We will use the following steps:
1. Assume q is true.
2. From premise 2, if q is true, then (u ∧ t) is true.
3. From (u ∧ t), we can conclude that u is true.
4. From u being true and premise 3, we can conclude that p is true.
5. From premise 1 and ¬s, we can conclude that ¬(p ∧ t) is true, which is equivalent to ¬p ∨¬t.
6. From ¬p being true and premise 3, we can conclude that ¬u is true.
7. From ¬u being true and premise 2, we can conclude that ¬q is true.
8. From premise 1, ¬p ∨¬t, r ∨ s, and ¬q, we can use the rule of inference disjunctive syllogism to conclude that r is true.
9. Since we have shown that q → r is true under the assumption that q is true, the argument form is valid by the rule of inference
conditional proof.
13. For each of these arguments, explain which rules of inference are used for each step.
a) “Doug, a student in this class, knows how to writeprograms in JAVA. Everyone who knows how to writeprograms in JAVA can get a high-
paying job. Therefore, someone in this class can get a high-paying job.”
b) “Somebody in this class enjoys whale watching. Every person who enjoys whale watching cares aboutocean pollution. Therefore, there is a
person in thisclass who cares about ocean pollution.”
c) “Each of the 93 students in this class owns a personalcomputer. Everyone who owns a personal computercan use a word processing program.
Therefore, Zeke,a student in this class, can use a word processing program.”
d) “Everyone in New Jersey lives within 50 miles of theocean. Someone in New Jersey has never seen theocean. Therefore, someone who lives
within 50 milesof the ocean has never seen the ocean.”
Answer:
a) The argument uses the following rules of inference:
Generalization: inferring that a statement about a specific individual (Doug) can be generalized to a statement about a larger group
(people who know how to write programs in JAVA).
Hypothetical Syllogism: inferring a conclusion from two conditional statements.
Existential Instantiation: inferring the existence of a specific individual from a statement that asserts the existence of at least one
member of a group with a certain property.
c) The argument uses the following rule of inference:
Universal Instantiation: inferring that a specific individual (Zeke) has a certain property based on a universal statement about a group
(all 93 students in the class own a personal computer).
d) The argument uses the following rules of inference:
Universal Instantiation: inferring that a specific individual (someone in New Jersey) has a certain property based on a universal
statement about a group (everyone in New Jersey lives within 50 miles of the ocean).
Negation Introduction: inferring the negation of a statement from its affirmation, and vice versa.
Modus Tollens: inferring the negation of the consequent of a conditional statement from the negation of its antecedent.
14. For each of these arguments, explain which rules of inference are used for each step.
a) “Linda, a student in this class, owns a red convertible.Everyone who owns a red convertible has gotten atleast one speeding ticket. Therefore,
someone in thisclass has gotten a speeding ticket.”
b) “Each of five roommates, Melissa, Aaron, Ralph, Veneesha, and Keeshawn, has taken a course in discretemathematics. Every student who has
taken a course indiscrete mathematics can take a course in algorithms.Therefore, all five roommates can take a course inalgorithms next year.”
c) “All movies produced by John Sayles are wonderful. John Sayles produced a movie about coal miners.Therefore, there is a wonderful movie
about coal miners.”
d) “There is someone in this class who has been toFrance. Everyone who goes to France visits theLouvre. Therefore, someone in this class has
visitedthe Louvre.”
Answer:
a) The rule of inference used in this argument is the universal instantiation, which is applied to the statement "Everyone who owns a red
convertible has gotten at least one speeding ticket" to infer that Linda has gotten at least one speeding ticket.
b) The rule of inference used in this argument is universal instantiation, which is applied to the statement "Every student who has taken a course
in discrete mathematics can take a course in algorithms" to infer that each of the five roommates can take a course in algorithms.
c) The rule of inference used in this argument is modus ponens, which is applied to the statement "All movies produced by John Sayles are
wonderful" and "John Sayles produced a movie about coal miners" to infer that there is a wonderful movie about coal miners.
d) The rule of inference used in this argument is modus ponens, which is applied to the statement "Everyone who goes to France visits the
Louvre" and "There is someone in this class who has been to France" to infer that someone in this class has visited the Louvre.
15. For each of these arguments determine whether the argument is correct or incorrect and explain why.
a) All students in this class understand logic. Xavier isa student in this class. Therefore, Xavier understandslogic.
b) Every computer science major takes discrete mathematics. Natasha is taking discrete mathematics.Therefore, Natasha is a computer science
major.
c) All parrots like fruit. My pet bird is not a parrot. Therefore, my pet bird does not like fruit.
d) Everyone who eats granola every day is healthy. Lindais not healthy. Therefore, Linda does not eat granolaevery day.
Answer:
a) This argument is correct. The argument is an example of the rule of inference called universal instantiation, which allows one to infer an
instance of a universal statement. Here, the universal statement is "all students in this class understand logic" and Xavier is an instance of this
class. Therefore, it can be inferred that Xavier understands logic.
b) This argument is incorrect. The argument is an example of the fallacy of the converse, which occurs when one assumes that if the consequent
of a conditional statement is true, then the antecedent must also be true. Here, the conditional statement is "every computer science major takes
discrete mathematics," and the argument assumes that if Natasha is taking discrete mathematics, then she must be a computer science major.
However, there could be other majors or degree programs that require or allow students to take discrete mathematics.
c) This argument is incorrect. The argument is an example of the fallacy of the inverse, which occurs when one assumes that if the antecedent of a
conditional statement is false, then the consequent must also be false. Here, the conditional statement is "all parrots like fruit," and the argument
assumes that if a bird is not a parrot, then it does not like fruit. However, there could be other birds that like fruit besides parrots.
d) This argument is incorrect. The argument is an example of the fallacy of the converse, which occurs when one assumes that if the consequent
of a conditional statement is true, then the antecedent must also be true. Here, the conditional statement is "everyone who eats granola every day
is healthy," and the argument assumes that if Linda is not healthy, then she does not eat granola every day. However, there could be other reasons
why Linda is not healthy besides not eating granola every day.
16. For each of these arguments determine whether the argument is correct or incorrect and explain why.
a) Everyone enrolled in the university has lived in a dormitory. Mia has never lived in a dormitory. Therefore,Mia is not enrolled in the university.
b) A convertible car is fun to drive. Isaac’s car is not aconvertible. Therefore, Isaac’s car is not fun to drive.
c) Quincy likes all action movies. Quincy likes the movieEight Men Out. Therefore, Eight Men Out is an actionmovie.
d) All lobstermen set at least a dozen traps. Hamilton is alobsterman. Therefore, Hamilton sets at least a dozentraps.
Answer:
a) Incorrect. The argument commits the fallacy of denying the consequent. Just because Mia has never lived in a dormitory does not necessarily
mean that she is not enrolled in the university. It is possible that she lives in an apartment or commutes from home, for example.
b) Incorrect. The argument commits the fallacy of affirming the consequent. Just because a convertible car is fun to drive does not mean that a
non-convertible car is not fun to drive. It is possible that Isaac's car is still fun to drive despite not being a convertible.
c) Incorrect. The argument commits the fallacy of undistributed middle. Just because Quincy likes the movie Eight Men Out and likes all action
movies, it does not necessarily mean that Eight Men Out is an action movie. It is possible that Eight Men Out belongs to a different genre that
Quincy likes.
d) Correct. The argument uses the universal affirmative form of the categorical syllogism and is valid. If all lobstermen set at least a dozen traps
and Hamilton is a lobsterman, then it logically follows that Hamilton sets at least a dozen traps.
17. What is wrong with this argument? Let H(x) be “x ishappy.” Given the premise ∃xH(x), we conclude thatH(Lola). Therefore, Lola is happy.
Answer:
The argument makes an incorrect conclusion because it commits the existential fallacy. The statement ∃xH(x) means “there exists an x such that
x is happy,” which does not imply that every individual is happy. Thus, we cannot conclude that Lola is happy solely based on the premise
∃xH(x).
18. What is wrong with this argument? Let S(x, y) be “x isshorter than y.” Given the premise ∃sS(s, Max), it followsthat S(Max, Max). Then by
existential generalization itfollows that ∃xS(x, x), so that someone is shorter thanhimself.
Answer:
The argument is incorrect because the conclusion, “someone is shorter than himself,” is a contradiction and violates the law of identity. If x is
identical to itself, then it cannot be shorter than itself. Therefore, the argument is invalid and the premise that ∃sS(s, Max) does not logically lead
to the conclusion ∃xS(x, x).
19. Determine whether each of these arguments is valid. If anargument is correct, what rule of inference is being used?If it is not, what logical
error occurs?
a) If n is a real number such that n > 1, then n2 >1.Suppose that n2 > 1. Then n > 1.
b) If n is a real number with n > 3, then n2 >9.Suppose that n2 ≤ 9. Then n ≤ 3.
c) If n is a real number with n > 2, then n2 >4.Suppose that n ≤ 2. Then n2 ≤ 4
Answer:
a) Valid argument. Rule of inference used: Modus Tollens.
b) Invalid argument. The contrapositive of the premise is "If n2 ≤ 9, then n ≤ 3", so the argument has the wrong direction. Rule of inference that
would make the argument valid: Modus Tollens.
c) Invalid argument. The contrapositive of the premise is "If n2 ≤ 4, then n ≤ 2", so the argument has the wrong direction. Rule of inference that
would make the argument valid: Modus Tollens.
21. Which rules of inference are used to establish theconclusion of Lewis Carroll’s argument described inExample 26 of Section 1.4?
Answer:
In Lewis Carroll's argument described in Example 26 of Section 1.4, the following rules of inference are used to establish the conclusion:
Universal instantiation: The premise "All animals are carnivores" is used to infer that "Dinah is a carnivore" by instantiating the universally
quantified variable "animals" to the particular variable "Dinah".
Modus ponens: The premise "If Dinah is a carnivore, then Dinah is fierce" and the inference "Dinah is a carnivore" are used to infer the
conclusion "Dinah is fierce" by applying modus ponens.
Therefore, the conclusion "Dinah is fierce" is established using the rules of universal instantiation and modus ponens.
22. Which rules of inference are used to establish theconclusion of Lewis Carroll’s argument described inExample 27 of Section 1.4?
Answer:
Example 27 in Section 1.4 is an argument about the existence of a necessary being. Lewis Carroll's argument is based on the premise that there
are things that exist in the world, and that these things are either caused or uncaused. The argument then proceeds to show that there must be a
necessary being, which is uncaused and exists necessarily.
The argument does not rely on any particular rule of inference, but rather on a logical analysis of the possible ways that things can exist in the
world.
23. Identify the error or errors in this argument that supposedly shows that if ∃xP (x) ∧∃xQ(x) is true then∃x(P (x) ∧ Q(x)) is true.
Answer:
The error in the argument is in line 7, which is an invalid application of the existential generalization rule. The variable "c" used to instantiate
both P(x) and Q(x) in lines 3 and 5 may not be the same. Therefore, the conjunction P(c) ∧ Q(c) does not imply the existence of an x such that
P(x) ∧ Q(x).
For example, suppose P(x) means "x is a prime number," and Q(x) means "x is a multiple of 3." Then, the premise ∃xP(x) ∨∃xQ(x) is true since
there exist prime numbers and multiples of 3. We can instantiate this by choosing c = 2 for P(x) and c = 3 for Q(x), so lines 3 and 5 are valid.
However, there is no integer that is both prime and a multiple of 3, so line 6 is false. Thus, the conclusion ∃x(P(x) ∧ Q(x)) is not true.
24. Identify the error or errors in this argument that supposedly shows that if ∀x(P (x) ∨ Q(x)) is true then∀xP (x) ∨∀xQ(x) is true.
Answer:
The error in this argument is in step 7. Conjunction from (4) and (6) does not yield the desired conclusion of ∀xP(x) ∨∀xQ(x).
Step 4 only allows us to conclude that P(c) is true for a specific object c, but we cannot conclude that P(x) is true for all objects x. Similarly, step
6 only allows us to conclude that Q(c) is true for a specific object c, but we cannot conclude that Q(x) is true for all objects x. Therefore, the
conjunction of these two statements in step 7 is not equivalent to the desired conclusion.
In fact, the desired conclusion is not valid in general. It is possible for ∀x(P(x) ∨ Q(x)) to be true while ¬(∀xP(x) ∨∀xQ(x)) is also true. For
example, suppose there are only two objects in the domain, and P(x) is true for the first object and Q(x) is true for the second object. Then
∀x(P(x) ∨ Q(x)) is true, but neither ∀xP(x) nor ∀xQ(x) is true. Therefore, the argument is invalid.
25. Justify the rule of universal modus tollens by showingthat the premises ∀x(P (x) → Q(x)) and ¬Q(a) for aparticular element a in the domain,
imply ¬P (a).
Answer:
To justify the rule of universal modus tollens, we start with the premise:
1. ∀x(P(x) → Q(x))
2. ¬Q(a) → ¬P(a)
Therefore, we have shown that the premises ∀x(P (x) → Q(x)) and ¬Q(a) imply ¬P(a) by using the rule of conditional proof. This justifies the use
of the rule of universal modus tollens, which is a specific form of the conditional proof.
26. Justify the rule of universal transitivity, which states thatif∀x(P (x) → Q(x)) and ∀x(Q(x) → R(x)) are true,then∀x(P (x) → R(x)) is true,
where the domains of allquantifiers are the same.
Answer:
To justify the rule of universal transitivity, we need to show that if the premises ∀x(P (x) → Q(x)) and ∀x(Q(x) → R(x)) are true, then the
conclusion ∀x(P (x) → R(x)) must also be true.
To do this, we start with an arbitrary element a in the domain, and assume that P(a) is true. Using the premise ∀x(P (x) → Q(x)), we know that
P(a) → Q(a) is true for all elements in the domain, including a. Therefore, we can conclude that Q(a) is also true.
Next, using the premise ∀x(Q(x) → R(x)), we know that Q(a) → R(a) is true for all elements in the domain, including a. Since we already
established that Q(a) is true, we can conclude that R(a) is also true.
Therefore, we have shown that if P(a) is true, then R(a) is also true. Since a was an arbitrary element in the domain, we can generalize this result
to ∀x(P (x) → R(x)). Hence, the rule of universal transitivity is justified.
27. Use rules of inference to show that if ∀x(P (x) →(Q(x) ∧ S(x))) and ∀x(P (x) ∧ R(x)) are true, then∀x(R(x) ∧ S(x)) is true.
Answer:
28. Use rules of inference to show that if ∀x(P (x) ∨Q(x)) and ∀x((¬P (x) ∧ Q(x)) → R(x)) are true, then∀x(¬R(x) → P (x)) is also true, where the
domains ofall quantifiers are the same.
Answer:
29. Use rules of inference to show that if ∀x(P (x) ∨ Q(x)),∀x(¬Q(x) ∨ S(x)), ∀x(R(x) →¬S(x)), and ∃x¬P (x)are true, then ∃x¬R(x) is true.
Answer:
Therefore, we have shown that if ∀x(P(x) ∨ Q(x)), ∀x(¬Q(x) ∨ S(x)), ∀x(R(x) →¬S(x)), and ∃x¬P(x) are true, then ∃x¬R(x) is true.
30. Use resolution to show the hypotheses “Allen is a badboy or Hillary is a good girl” and “Allen is a good boy orDavid is happy” imply the
conclusion “Hillary is a goodgirl or David is happy.”
Answer:
To use resolution to show the hypotheses imply the conclusion, we first convert the hypotheses and negation of the conclusion to clauses in
conjunctive normal form (CNF):
Hypotheses:
(¬P ∨ Q)
(P ∨ R)
Negation of conclusion:
¬Q ∨ R
Next, we apply resolution by assuming the negation of the conclusion and attempting to derive the empty clause. Here is the resolution proof:
1. ¬Q ∨ R (Negation of conclusion)
2. ¬R ∨ P (From 1 by resolution with clause 2)
3. ¬P ∨ Q (From 1 by resolution with clause 1)
4. ¬P ∨ R (From 2 by resolution with clause 1)
5. P ∨ R (From hypotheses)
6. Q (From 3, 5 by resolution)
7. R (From 4, 6 by resolution)
8. ∅ (Empty clause from 2, 7 by resolution)
Since we were able to derive the empty clause, which represents a contradiction, the hypotheses imply the conclusion by resolution. Therefore,
we can conclude that “Hillary is a good girl or David is happy” follows from the hypotheses “Allen is a bad boy or Hillary is a good girl” and
“Allen is a good boy or David is happy.”
31. Use resolution to show that the hypotheses “It is not raining or Yvette has her umbrella,” “Yvette does not haveher umbrella or she does not
get wet,” and “It is rainingor Yvette does not get wet” imply that “Yvette does notget wet.”
Answer:
To apply resolution, we first need to convert the hypotheses to conjunctive normal form (CNF):
Hypothesis 1: ¬R ∨ U
Hypothesis 2: ¬U ∨¬W
Hypothesis 3: R ∨¬W
Negation of Conclusion: W
where R = "It is raining", U = "Yvette has her umbrella", and W = "Yvette gets wet".
We now create a resolution refutation proof by assuming the negation of the conclusion and attempting to derive a contradiction. We will apply
the resolution rule until no further resolutions are possible or we derive the empty clause, which represents a contradiction.
1. ¬W (assumption)
2. ¬R ∨ U (hypothesis 1)
3. ¬U ∨¬W (hypothesis 2)
4. R ∨¬W (hypothesis 3)
5. U ∨¬R (resolution with 1 and 2)
6. W ∨¬U (resolution with 1 and 3)
7. ¬W ∨¬R (resolution with 2 and 4)
8. U ∨¬W ∨¬R (resolution with 5 and 7)
9. ¬U ∨¬W ∨ R (resolution with 6 and 2)
10. ¬W ∨ R ∨¬W ∨¬R (resolution with 4 and 9)
11. ¬W ∨¬R (resolution with 1 and 10)
12. W ∧¬W (resolution with 11 and 2)
We have derived the empty clause, which represents a contradiction. Therefore, our assumption that Yvette gets wet (W) leads to a contradiction,
and we can conclude that Yvette does not get wet (¬W).
32. Show that the equivalence p ∧¬p ≡ F can be derivedusing resolution together with the fact that a conditional statement with a false hypothesis
is true. [Hint: Letq = r = F in resolution.]
Answer:
To prove that the equivalence p ∧¬p ≡ F can be derived using resolution, we will use the following steps:
5. Use the fact that a conditional statement with a false hypothesis is true:
(p ∧¬p) → F
Therefore, we have shown that the equivalence p ∧¬p ≡ F can be derived using resolution.
33. Use resolution to show that the compound proposition (p ∨ q) ∧ (¬p ∨ q) ∧ (p ∨¬q) ∧ (¬p ∨¬q) isnot satisfiable.
Answer:
To show that the compound proposition is not satisfiable, we can attempt to derive a contradiction using resolution. We start by converting the
proposition to conjunctive normal form:
C1: p ∨ q
C2: ¬p ∨ q
C3: p ∨¬q
C4: ¬p ∨ ¬q
C5: ¬p ∧¬q
C6: ¬p ∧ q
C7: p ∧¬q
C8: p ∨¬p
We can now resolve C8 and C9 with respect to q, which results in:
=T
C10: F
Now, REASON:
a + b should be even i.e multiple of 2. As,
So, k is any integer and 2k2 is multiple of 2.
a + b = (2k+1) + (2m+1)
=2k +2m +2 = 2(k+m+1) = even. Hence,
Proved.
REASON:
As, 4. Show that the additive inverse, or negative, of an evennumber is
an even number using a direct proof.
k & m are integers and (k+m+1) is the multiple of 2 which shows
it is even number. Answer:
Hence, Proved. Let's suppose that $n$ is an even number. By definition, this means
that there exists an integer $k$ such that $n = 2k$.
2.Use a direct proof to show that the sum of two even integers is
even. We want to prove that the additive inverse, or negative, of $n$ is
also an even number. That is, we want to prove that $-n$ is even.
Answer:
SOLUTION:
To do so, we need to show that there exists an integer $m$ such
that $-n = 2m$. We can use the definition of negative to rewrite $-
Let, n$ as $-n = -2k$. Then we can factor out a $-2$ from the right-
hand side to get $-n = 2(-k)$.
First even integer (a) = 2k
Secon d even integer (b) = 2a
Since $-k$ is an integer, we have shown that there exists an integer
where, k & a are both any integers. $m=-k$ such that $-n = 2m$. Therefore, we have proven that the
additive inverse of an even number is even.
Now,
5. Prove that if m + n and n + p are even integers, wherem, n, and
a + b = even i.e. multiple of 2
p are integers, then m + p is even. What kindof proof did you use?
So,
Answer:
a + b = 2k + 2a
To prove that if $m + n$ and $n + p$ are even integers, where
2(k+a) = even. $m$, $n$, and $p$ are integers, then $m + p$ is even, we can use a
direct proof.
REASON:
Suppose $m + n$ and $n + p$ are even integers. This means that
As, there exist integers $a$ and $b$ such that $m + n = 2a$ and $n + p
k & a are integers and (k+ a) is multiple of 2. = 2b$. Adding these equations gives:
(m+n)+(n+p)=2a+2b
Since there are $k+1$ squares in this list and $k$ is an integer, the
highest square in this list is $k^2$. We can use this highest square
Simplifying the left-hand side gives: to construct two squares whose difference is $n$.
m+2n+p=2(a+b)
Let $m$ be the integer such that $m^2$ is the largest square that is
Subtracting $2n$ from both sides gives: less than or equal to $n$. In other words, $m$ is the integer such
that $m^2 \leq n < (m+1)^2$. Then we have:
m+p=2(a+b−n)
n=n−m2+m2
We can factor $n - m^2$ as $(n-m^2)$ to get:
Since $a$, $b$, and $n$ are integers, $a + b - n$ is also an integer.
Therefore, we have shown that there exists an integer $c = a + b - n=(n−m2)+m2
n$ such that $m + p = 2c$. This means that $m + p$ is even. The expression $(n-m^2)$ is nonnegative, since $m^2 \leq n$, so
we can write it as the square of some nonnegative integer $a$:
To prove that the product of two odd numbers is odd, we can use a
direct proof. Therefore, we have proven that every odd integer is the difference
of two squares.
n=2b+1 Answer:
We want to prove that the product $mn$ is odd. Substituting the To prove that if $n$ is a perfect square, then $n+2$ is not a perfect
expressions for $m$ and $n$ in terms of $a$ and $b$, we have: square, we can use a proof by contradiction.
mn=(2a+1)(2b+1)
Expanding this expression gives: Suppose that $n$ is a perfect square and that $n+2$ is also a
perfect square. Then there exist integers $a$ and $b$ such that:
mn=4ab+2a+2b+1
n=a2
Factoring out a $2$ from the first three terms gives:
n+2=b2
mn=2(2ab+a+b)+1
Substituting the expression for $n$ in terms of $a^2$ in the second
Since $2ab + a + b$ is an integer, we have shown that there exists equation, we get:
an integer $c = 2ab + a + b$ such that $mn = 2c + 1$. Therefore,
$mn$ is odd. a2+2=b2
Rearranging this equation gives:
Therefore, we have proven that the product of two odd numbers is b2−a2=2
odd. We can factor the left-hand side of this equation as the difference
of two squares:
Suppose we have an odd integer $n$. By definition, this means that Adding these equations gives:
there exists an integer $k$ such that:
2b=3
n=2k+1
This is not possible, since $b$ must be an integer.
We want to show that $n$ can be written as the difference of two
squares. Let's consider the squares of the integers from $0$ to $k$:
02,12 ,22,…,k2 Case 2: $b+a = 1$ and $b-a = 2$
a
x=
Adding these equations gives: b
2b=−1
c
This is also not possible, since $b$ must be an integer. y=
d
We can then multiply these two equations to get:
Since both cases lead to a contradiction, we have shown that the
assumption that $n+2$ is a perfect square leads to a contradiction. a c
Therefore, we can conclude that if $n$ is a perfect square, then xy= .
$n+2$ is not a perfect square.
b d
Simplifying the right-hand side of this equation gives:
Suppose that $x$ and $y$ are irrational numbers, and that $xy$ is a
However, we assumed that $x+y$ is a rational number, which rational number. Then there exist integers $a$ and $b$ such that $b
implies that $x$ is the difference of two rational numbers, namely \neq 0$ and:
$\frac{p}{q}$ and $y$. This contradicts our previous statement
that $x$ is irrational. a
xy=
b
Therefore, we can conclude that the assumption that $x+y$ is We can rearrange this equation to get:
rational leads to a contradiction. Hence, the sum of an irrational
number and a rational number is irrational. a
y=
bx
Therefore, we have proven that the sum of an irrational number Since $x$ is irrational, it cannot be written as the ratio of two
and a rational number is irrational using a proof by contradiction. integers. Therefore, $bx$ is also irrational. Since the product of a
rational number and an irrational number is always irrational, it
follows that $\frac{a}{bx}$ must be irrational.
10. Use a direct proof to show that the product of two
rationalnumbers is rational.
However, we assumed that $y$ is rational, which implies that $\
Answer:
frac{a}{bx}$ is rational. This contradicts our previous statement
To prove that the product of two rational numbers is rational, we that $\frac{a}{bx}$ is irrational.
can use a direct proof.
a
xy= 14. Prove that if x is rational and x = 0, then 1/x is rational.
b
Answer:
We can rearrange this equation to get:
The statement "if $x$ is rational and $x=0$, then $1/x$ is rational"
a is false. This can be seen by a counterexample.
y=
bx
Since $x$ is a nonzero rational number, it can be expressed as the Let $x = 0$. Then $1/x$ is undefined, as division by zero is not
ratio of two integers, say $x = \frac{c}{d}$ where $d\neq0$. defined in mathematics. Therefore, the statement is not well-
Substituting this into the above equation, we get: formed and we cannot apply any proof technique to it.
a a ad
y= = = In general, we can say that if $x$ is a nonzero rational number,
bx c cb
b then $1/x$ is also a rational number. This can be proved as
d follows:
Since $a$, $b$, $c$, and $d$ are all integers and $b\neq0$, $c\
neq0$ and $d\neq0$, it follows that $cb$ and $ad$ are both Suppose $x$ is a nonzero rational number. Then there exist
integers. Therefore, we can write: integers $p$ and $q$ with $q \neq 0$ such that:
ad p
y= x=
cb q
where $ad$ and $cb$ are integers. This shows that $y$ can be Taking the reciprocal of both sides, we get:
expressed as the quotient of two integers, where the denominator is
not equal to zero. Therefore, $y$ is a rational number, which 1 a
contradicts our initial assumption that $y$ is an irrational number. =
x p
Since $p$ and $q$ are both integers and $q\neq 0$, it follows that
Therefore, we can conclude that the assumption that $xy$ is $q/p$ is also a rational number. Therefore, we can conclude that if
rational leads to a contradiction. Hence, the product of a nonzero $x$ is a nonzero rational number, then $1/x$ is also a rational
rational number and an irrational number is irrational. number.
Therefore, we have proven that the product of a nonzero rational Note that this result does not hold for $x=0$, as division by zero is
number and an irrational number is irrational. undefined.
13. Prove that if x is irrational, then 1/x is irrational. 15. Use a proof by contraposition to show that if x + y ≥ 2,where x
Answer: and y are real numbers, then x ≥ 1 or y ≥ 1.
We will prove the statement "if $x$ is irrational, then $1/x$ is Answer:
irrational" using a proof by contradiction. We will prove the statement "if $x+y \geq 2$, then $x \geq 1$ or
$y \geq 1$" by contraposition.
By contraposition, this implies that if $x+y \geq 2$, then $x \geq b) Proof by contradiction:
1$ or $y \geq 1$. Therefore, we have proven the original statement.
a) Proof by contraposition:
\begin{align*}
We want to prove that if $n$ is odd, then $n^3+5$ is even. 3n+2 &= 3(2k+1) + 2 \
&= 6k+5
Suppose $n$ is odd. Then $n=2k+1$ for some integer $k$. \end{align*}
Substituting this expression into $n^3+5$, we get:
\begin{align*} The right-hand side is odd, since it can be written as $2(3k+2)+1$.
n^3+5 &= (2k+1)^3 + 5 \ Therefore, $3n+2$ is odd.
&= 8k^3+12k^2+6k+1+5 \
&= 8k^3+12k^2+6k+6 Hence, the contrapositive of the statement is true. Therefore, if
$3n+2$ is even, then $n$ must be even.
\end{align*}
The right-hand side can be factored as $2(4k^3+6k^2+3k+3)$,
which is an even number. Therefore, $n^3+5$ is even. b) Proof by contradiction:
We want to prove that if $3n+2$ is even, then $n$ is even. P(1) states that if a and b are positive real numbers, then (a + b)^1
≥ a^1 + b^1, which simplifies to a + b ≥ a + b, which is clearly
true.
Suppose, for the sake of contradiction, that $n$ is odd. Then
$n=2k+1$ for some integer $k$. Substituting this expression into
$3n+2$, we get: We used a direct proof to prove P(1), which in turn proves P(n) for
all positive integers since P(n) is true for n = 1.
\begin{align*}
22. Show that if you pick three socks from a drawer containing just
3n+2 &= 3(2k+1) + 2 \ blue socks and black socks, you must get eithera pair of blue socks
&= 6k+5 or a pair of black socks.
\end{align*} Answer:
We can prove the statement by contradiction.
P(2) states that if 2 is a positive integer greater than 1, then 2^2 >
2. This is true since 2^2 = 4 and 4 > 2. 23. Show that at least ten of any 64 days chosen must fall onthe
same day of the week.
Answer:
We used a direct proof to prove P(2), which in turn proves P(0)
since P(n) is true for n = 2, which is the smallest positive integer There are 7 days in a week, so if we choose 64 days, on average,
greater than 1. there should be 64/7 ≈ 9.14 days for each day of the week.
20. Prove the proposition P(1), where P(n) is the proposition “If n Assume that no day of the week has at least ten of the 64 days
is a positiveinteger, then n2 ≥ n.” What kindof proof did you use? chosen. Then, the maximum number of days for each day of the
week is 9. Since there are 7 days in a week, the total number of
Answer: days is at most 7 * 9 = 63, which is less than the 64 days we chose.
To prove P(1), we need to prove the proposition P(n) for n = 1.
We used a direct proof to prove P(1), which in turn proves P(n) for
all positive integers since P(n) is true for n = 1, which is the 24. Show that at least three of any 25 days chosen must fallin the
smallest positive integer. same month of the year.
Answer:
21. Let P(n) be the proposition “If a and b are positive There are 7 days in a week, so if we choose 64 days, on average,
realnumbers, then (a + b)n ≥ an + bn.” Prove that P(1) istrue. What there should be 64/7 ≈ 9.14 days for each day of the week.
kind of proof did you use?
Answer: Assume that no day of the week has at least ten of the 64 days
To prove P(1), we need to prove the proposition P(n) for n = 1. chosen. Then, the maximum number of days for each day of the
week is 9. Since there are 7 days in a week, the total number of
days is at most 7 * 9 = 63, which is less than the 64 days we chose.
This is a contradiction, so our assumption that no day of the week Assume that n is even. Then, n can be written as n = 2k, where k is
has at least ten of the 64 days chosen must be false. Therefore, an integer. Substituting this value of n in the expression 7n + 4, we
there must be at least one day of the week that has at least ten of get:
the 64 days chosen.
Answer:
Assume that there is a rational number r = a/b (in lowest terms) Assume that 7n + 4 is even. Then, there exists an integer m such
such that r3 + r + 1 = 0, where a and b are integers. Then, we can that:
write:
r3 = -r – 1
7n + 4 = 2m
Multiplying both sides by b3, we get:
a^3 = -ab^2 - b^3
Simplifying the above equation, we get:
If a is even and b is odd, then the left-hand side is even, but the
right-hand side is odd, which is again a contradiction. Similarly, if Thus, we have proved both directions, and the original statement is
a is odd and b is even, then the left-hand side is odd, but the right- proved.
hand side is even, which is a contradiction.
(-n)^2 = n^2
Therefore, we have shown both implications and can conclude that
if $n$ is a positive integer, then $n$ is odd if and only if $5n+6$ is
odd. Simplifying the left-hand side of the equation, we get:
1. If m^2 = n^2, then m = n or m = -n. Therefore, we have shown that if m = n or m = -n, then m^2 = n^2.
2. If m = n or m = -n, then m^2 = n^2.
Proof of Implication 1:
Since we have proved both implications, we can conclude that m^2
= n^2 if and only if m = n or m = -n.
Assume that m^2 = n^2. Then, we can write:
We can factor the left-hand side of the equation using the Answer:
difference of squares formula: This statement is true.
If m - n = 0, then m = n. If m + n = 0, then m = -n. Therefore, we Since $m \neq 1$ and $m \neq -1$, we have $|m| > 1$. Therefore,
have shown that if m^2 = n^2, then m = n or m = -n. $|\frac{1}{m}|< 1$, which means that $n$ is not an integer. This
contradicts the assumption that $m$ and $n$ are integers.
Proof of Implication 2:
Therefore, our initial assumption is false, and the only possibilities
are $m = 1$ and $n = 1$, or $m = -1$ and $n = -1$.
Assume that m = n or m = -n. We will prove both cases separately.
30. Show that these three statements are equivalent, where aand b
Case 1: m = n are real numbers: (i) a is less than b, (ii) the averageof a and b is
greater than a, and (iii) the average of aandb is less than b.
Answer:
To show that the three statements are equivalent, we need to prove Let x be the average of a and b. Then we have:
that each statement implies the other two.
x = (a + b)/2
(i) a is less than b implies (ii) the average of a and b is greater than
a:
Assuming that x is greater than a, we can write:
x = (a + b)/2
Multiplying both sides by 2 gives:
b-a>0
Adding 2a to both sides gives:
(b - a)/2 > 0
Dividing both sides by 2 gives:
(b + a)/2 > a
Substituting x = (a + b)/2 gives:
(i) a is less than b implies (iii) the average of a and b is less than b:
Multiplying both sides by 2 gives:
x = (a + b)/2
Subtracting a from both sides gives:
b-a>0
Therefore, a is less than b.
x = (a + b)/2
b - (a + b)/2 > 0
x-a>0
(ii) the average of a and b is greater than a implies (i) a is less than
b:
Multiplying both sides by 2 gives:
2x - 2a > 0 Subtracting a from both sides gives:
2x - 2a - 2b + 2b > 0 Adding x
Simplifying gives: 31. Show that these statements about the integer x are equivalent:
(i) 3x + 2 is even, (ii) x + 5 is odd, (iii) x2 is even.
Answer:
2(x - b) > 0
We will prove that (i), (ii), and (iii) are equivalent statements by
proving that (i) implies (ii) implies (iii) implies (i).
Dividing both sides by 2 gives:
Simplifying gives:
(ii) $x/2$ is rational $\implies$ (i) $x$ is rational: If $x/2$ is
rational, then we can write $x/2$ as $x/2 = p/q$ where $p$ and
2(b - x + a) > 0 $q$ are integers with $q \neq 0nswer:
(iii) Assume that x/2 is irrational. We will show that (i) and (ii) are
(i) Assume that x is irrational. We will show that (ii) and (iii) are true.
true.
Suppose that x is rational. Then x/2 is also rational, which
Since x is irrational, we can write x as an infinite non-repeating contradicts our assumption that x/2 is irrational. Therefore, x must
decimal. Then x/2 is also an infinite non-repeating decimal, and be irrational. Adding 5 to x will not change the irrationality of x, so
thus irrational. Adding 2 to 3x will not change the irrationality of x + 5 is also irrational. Since the sum of a rational and an irrational
x, so 3x + 2 is also irrational. Hence, (ii) and (iii) are true. number is always irrational, we conclude that 3x + 2 is irrational.
Hence, (i) and (ii) are true.
(ii) Assume that 3x + 2 is irrational. We will show that (i) and (iii)
are true. Therefore, we have shown that (i), (ii), and (iii) are equivalent.
Suppose that x is rational. Then we can write x as a ratio of two
integers, say x = p/q, where p and q are integers with no common
factors other than 1 (i.e., p/q is in lowest terms). Then 3x + 2 = (3p 35. Are these steps for finding the solutions of √x + 3 =3 − x
+ 2q)/q is also a ratio of two integers, and hence rational. This correct? (1) √x + 3 = 3 − x is given; (2) x + 3 =x2 − 6x + 9,
contradicts our assumption that 3x + 2 is irrational. Therefore, x obtained by squaring both sides of (1); (3)0 = x2 − 7x + 6,
must be irrational. It follows that x/2 is also irrational, and 3x - 1 is obtained by subtracting x + 3 fromboth sides of (2); (4) 0 = (x − 1)
irrational since it is the sum of an irrational number and a rational (x − 6), obtained byfactoring the right-hand side of (3); (5) x = 1 or
number (namely, 2x/2 and -1, respectively). x = 6,which follows from (4) because ab = 0 implies thata = 0 or b
= 0.
Answer:
(iii) Assume that x/2 is irrational. We will show that (i) and (ii) are
true. Yes, these steps are correct. Here's a brief explanation:
Suppose that x is rational. Then x/2 is also rational, which
contradicts our assumption that x/2 is irrational. Therefore, x must
be irrational. Adding 5 to x will not change the irrationality of x, so (1) √x + 3 = 3 − x is the given equation.
x + 5 is also irrational. Since the sum of a rational and an irrational (2) Squaring both sides of (1) yields (x + 3) = (3 - x)^2 = 9 - 6x +
number is always irrational, we conclude that 3x + 2 is irrational. x^2.
Hence, (i) and (ii) are true.
(3) Simplifying (2), we get 0 = x^2 - 7x + 6.
(4) Factoring the right-hand side of (3) gives us 0 = (x - 1)(x - 6).
Therefore, we have shown that (i), (ii), and (iii) are equivalent.
(5) From (4), we see that x = 1 or x = 6 because the only way for
the product of two real numbers to be 0 is if at least one of them is
34. Is this reasoning for finding the solutions of the equation √2x2 0. Thus, we have found the two solutions to the equation.
− 1 = x correct? (1) √2x2 − 1 = x is given;
(2) 2x2 − 1 = x2, obtained by squaring both sides of (1); Therefore, the steps are valid and lead to the correct solutions.
(3) x2 − 1 = 0, obtained by subtracting x2 from both
sides of (2); (4) (x − 1)(x + 1) = 0, obtained by factoring the left- 36. Show that the propositions p1, p2, p3, and p4 can beshown to
hand side of x2 − 1; (5) x = 1 or x = −1,which follows because ab be equivalent by showing that p1 ↔ p4, p2 ↔p3, and p1 ↔ p3.
= 0 implies that a = 0 orb = 0.
Answer:
Answer:
To show that the propositions p1, p2, p3, and p4 are equivalent, we
We will prove that the statements (i), (ii), and (iii) are equivalent need to show that p1 ↔ p4, p2 ↔ p3, and p1 ↔ p3.
by showing that each statement implies the other two.
p3: If the lights are not off, then the store is not closed.
38. Find a counterexample to the statement that every positive
integer can be written as the sum of the squares ofthree integers.
To see that these are equivalent, note that if the streets are wet,
then the store is not closed (since the lights are on). Conversely, if Answer:
the store is closed (and therefore the lights are off), then it cannot
The statement that every positive integer can be written as the sum
be raining (since p2 tells us that if the store is closed, then the
of the squares of three integers is false.
lights are off). Thus, p1 and p3 are logically equivalent.
37. Show that the propositions p1, p2, p3, p4, and p5 canbe shown
7 = a^2 + b^2 + c^2
to be equivalent by proving that the conditionalstatements p1 →
p4, p3 → p1, p4 → p2, p2 → p5, andp5 → p3 are true.
Answer: where a, b, and c are integers. We can assume that a, b, and c are
non-negative, since squaring a negative integer gives the same
To show that the propositions p1, p2, p3, p4, and p5 are equivalent,
result as squaring its absolute value.
we need to show that any one of them implies the other four.
Here's how we can do it:
Next, we'll show that p2 ↔ p3. That is, we'll show that p2 implies If a = 1, then we have 1 + b^2 + c^2 = 7, which implies that b^2 +
p3 and p3 implies p2. c^2 = 6. But this is impossible, since the sum of two squares can
only be equal to 6 if both squares are equal to 1 (which leads to the
1. p2 → p3: If p2 is true, then every positive integer can same contradiction as the case a = 0), or if one square is equal to 2
be written in the form n = 2k or n = 2k + 1 for some and the other is equal to 2 (which is impossible since 2 is not a
integer k. In particular, every odd integer can be written square).
in the form n = 2k + 1. This means that p3 is true.
2. p3 → p2: If p3 is true, then every odd integer can be
written in the form n = 2k + 1 for some integer k. We If a = 2, then we have 4 + b^2 + c^2 = 7, which implies that b^2 +
can extend this to show that every positive integer can c^2 = 3. But this is impossible, since the sum of two squares can
be written in the form n = 2k or n = 2k + 1, by taking k only be equal to 3 if both squares are equal to 1 (which leads to the
to be the greatest integer less than or equal to n/2. same contradiction as the case a = 0), or if one square is equal to 0
Therefore, p2 is true. and the other is equal to 3 (which is impossible since 0 is not a
square).
Finally, we'll show that p1 ↔ p3. That is, we'll show that p1
implies p3 and p3 implies p1. Therefore, we have shown that it is impossible to write 7 as the
1. p1 → p3: If p1 is true, then every positive integer can sum of the squares of three integers, so the statement that every
be written as the sum of distinct powers of 2. In positive integer can be written in this way is false.
particular, every odd integer can be written as the sum
of an odd number of distinct powers of 2 (since the sum
39. Prove that at least one of the real numbers a1, a2, . . . , anis
greater than or equal to the average of these numbers.What kind of
proof did you use? This is a contradiction, since we have shown that the sum of the si
must be less than 170, but we have also shown that the sum of the
Answer: si must be equal to 165. Therefore, our assumption that there exists
an arrangement of the integers from 1 to 10 around the circle such
We can prove this statement using a proof by contradiction. that no three consecutive integers have a sum greater than or equal
to 17 must be false.
Assume that all of the real numbers a1, a2, . . . ,an are less than the
average of these numbers, which we will denote by A. Then we Hence, there must exist an arrangement of the integers from 1 to
can write: 10 around the circle such that there exist three consecutive integers
with a sum greater than or equal to 17.
a1 < A
a2 < A 41. Prove that if n is an integer, these four statements
areequivalent: (i) n is even, (ii) n + 1 is odd, (iii) 3n + 1 isodd, (iv)
... 3n is even.
an < A Answer:
We will prove the statements are equivalent by showing the
following chain of implications:
Adding these inequalities together, we obtain:
(i) $\Rightarrow$ (ii): Assume that $n$ is even, then we can write
a1 + a2 + · · · + an <nA
$n = 2k$ for some integer $k$. Adding 1 to $n$ gives $n+1 =
2k+1$, which is odd.
But this implies that the average of the ai is less than A, which
contradicts our initial assumption. Therefore, at least one of the (iii) $\Rightarrow$ (iv): Assume that $3n+1$ is odd. Suppose for
real numbers a1, a2, . . . , an must be greater than or equal to the the sake of contradiction that $n$ is odd. Then we can write $n =
average of these numbers. 2k+1$ for some integer $k$. Substituting $n=2k+1$ into $3n+1$
gives $3n+1=3(2k+1)+1=6k+4=2(3k+2)$, which is even. This is a
contradiction since we assumed that $3n+1$ is odd. Therefore, $n$
40. Use Exercise 39 to show that if the first 10 positive integers are must be even, which implies that $3n$ is even.
placed around a circle, in any order, there existthree integers in
consecutive locations around the circlethat have a sum greater than
or equal to 17. (iv) $\Rightarrow$ (i): Assume that $3n$ is even. Suppose for the
Answer: sake of contradiction that $n$ is odd. Then we can write $n =
2k+1$ for some integer $k$. Substituting $n=2k+1$ into $3n$
We will use proof by contradiction. Suppose that there exists an gives $3n=3(2k+1)=6k+3=2(3k+1)+1$, which is odd. This is a
arrangement of the integers from 1 to 10 around the circle such contradiction since we assumed that $3n$ is even. Therefore, $n$
that no three consecutive integers have a sum greater than or equal must be even.
to 17.
Since we have shown that each statement implies the next, and the
Label the numbers around the circle as a1, a2, ..., a10. Then, for last statement implies the first, we have shown that the statements
each i from 1 to 10, we can consider the sum si of ai, ai+1, and are equivalent.
ai+2, where the subscripts are taken modulo 10 (so a11 = a1 and so
on).
42. Prove that these four statements about the integer n
areequivalent: (i) n2 is odd, (ii) 1 − n is even, (iii) n3 is odd,(iv) n2
By assumption, we know that si< 17 for all i from 1 to 10. Then we + 1 is even.
have:
Answer:
We will prove that the four statements (i), (ii), (iii), and (iv) are
s1 + s2 + ... + s10 < 17 + 17 + ... + 17 = 170 equivalent.
However, each number appears in exactly three of the sums si (for Proof:
example, a1 appears in s1, s2, and s10), so we have:
First, we will show that (i) implies (ii), (ii) implies (iii), (iii)
implies (iv), and (iv) implies (i). Then we will show that (ii), (iii),
and (iv) together imply (i).
s1 + s2 + ... + s10 = 3(a1 + a2 + ... + a10) = 3(1 + 2 + ... + 10) =
165
Assume that n is an integer.
(i) n^2 is odd implies (ii) 1 − n is even: Chapter 1 - Section 1.8 - Proof Methods and Strategy – Exercises
If n^2 is odd, then n is odd, since the square of an even integer is 1. Prove that n2 + 1 ≥ 2n when n is a positive integer with 1 ≤ n ≤
even and the square of an odd integer is odd. Thus, n + 1 is even, 4.
which means that n = (n + 1) − 1 is odd and 1 − n is even.
Answer:
This question doesn't have a general solution/proof. We just have
(ii) 1 − n is even implies (iii) n^3 is odd: to check the the given statement by substituting the values of n.
If 1 − n is even, then n is odd, since the sum of an even and an odd For n=1 we have,
integer is odd. Thus, n^3 is odd, since the product of three odd
integers is odd. n2+1=2 and 2n=2, (2=2)
therefore for n=1 the statement holds.
(iii) n^3 is odd implies (iv) n^2 + 1 is even: Similarly for n=2,
If n^3 is odd, then n is odd, since the cube of an even integer is n2+1=5 and 2n=2 (5>2 therefore statement is true for n=2)
even and the cube of an odd integer is odd. Thus, n^2 is even, and For n=3,
n^2 + 1 is odd, which means that n^2 + 1 is even.
n2+1=10 and 2n=8 (10>8 therefore the statement is true for n=3)
For n=4,
(iv) n^2 + 1 is even implies (i) n^2 is odd:
n2+1=17 and 2n=16 (17>16 therefore the statement is true for
If n^2 + 1 is even, then n^2 is odd, since the sum of an even and an n=4)
odd integer is odd.
It can also be observed that the difference between the values is
decreasing on increasing the value of n. Therefore after n=4 i.e,
(ii), (iii), and (iv) together imply (i) n^2 is odd: n=5,6,7,..., the statement will become false.
Therefore, we have shown that the four statements (i), (ii), (iii), Answer:
and (iv) are equivalent. The table shown in the book shows the sums of the cubes of any
two positive integers that are less than 10. Notice there is no
perfect cube that are the sum of the cubes of two positive integers.
Case 1: min(a,min(b,c))=a
a≤min(b,c)
a≤b and a≤c
min(min(a,b),c)=min(a,c)=a
So we got:
min(a,min(b,c))=min(min(a,b),c)=a x + y + |x − y| = x + y + (x − y) = 2x
Case 2: min(a,min(b,c))=b So, again using the formulas for the minimum and maximum, we
get:
min(min(a,b),c)=min(b,c)=b
Thus, we have shown that the formulas for the minimum and
maximum of two real numbers hold for all cases, by considering
So we got: the two cases of x ≤ y and y ≤ x. Therefore, we have proven that
min(x, y) = (x + y − |x − y|)/2 and max(x, y) = (x + y + |x − y|)/2
for all real numbers x and y.
min(a,min(b,c))=min(min(a,b),c)=b
7. Prove the triangle inequality, which states that if x and y are real
min(a,min(b,c))=min(min(a,b),c)=c
numbers, then |x| + |y| ≥ |x + y| (where |x| represents the absolute
value of x, which equals x if x ≥ 0 and equals −x if x < 0).
5. Prove using the notion of without loss of generality that min(x, Answer:
y) = (x + y − |x − y|)/2 and max(x, y) = (x + y + |x − y|)/2
This question has a direct proof.
whenever x and y are real numbers.
To prove: |x|+|y| ≥ |x+y|
Answer;
If we take square of RHS we have,
To prove the formulas for the minimum and maximum of two real
numbers x and y, we can use the notion of "without loss of (|x|+|y|)2 = |x|2 + |y|2 + 2|x||y|......(1)
generality" (WLOG) to simplify the proof.
Considering the RHS of equation 1 we have,
(|x|2 + |y|2 + 2|x||y|) ≥ x2 + y2 + 2xy (Because |x||y| ≥ xy)
First, let's consider the case where x ≤ y. In this case, we have:
Therefore from equation 1 we have,
(|x|+|y|)2 ≥ x2 + y2 + 2xy
|x − y| = y − x
=> (|x|+|y|)2 ≥ (x+y)2
x + y − |x − y| = x + y − (y − x) = 2x
Since both sides are positive,
x + y + |x − y| = x + y + (y − x) = 2y
Therefore,
|x|+|y| ≥ |x+y|
So, using the formulas for the minimum and maximum, we get:
Hence proved.
min(x, y) = x = (x + y − |x − y|)/2
8. Prove that there is a positive integer that equals the sum of the
max(x, y) = y = (x + y + |x − y|)/2 positive integers not exceeding it. Is your proof constructive or
nonconstructive?
Answer:
Now, let's consider the case where y ≤ x. In this case, we have:
1. Assume n is a positive integer that equals the sum of the positive
integers not exceeding it.
|x − y| = x − y
n = n + (n-1) + (n-2) + (n-3) + ... + 2 + 1
x + y − |x − y| = x + y − (x − y) = 2y
2. Summation formula
n = n(n+1)/2 Since the set of consecutive integers from $1$ to $343$ contains
$343$ integers, there must be at least one pair of consecutive
integers such that one is a perfect square and the other is a perfect
3. Simplify cube. Therefore, there exists a pair of consecutive integers such
that one is a perfect square and the other is a perfect cube.
2n = n^2 + n
0 = n^2 - n
12. Show that the product of two of the numbers 651000 −82001 +
0 = n(n - 1) 3177, 791212 − 92399 + 22001, and 244493 −58192 + 71777 is
nonnegative. Is your proof constructiveor nonconstructive? [Hint:
Therefore, n = 0 or n = 1
Do not try to evaluate thesenumbers!]
Answer:
The only positive integer that equals the sum of the integers not
Let us consider the three numbers:
exceeding it is n = 1
First, note that the product of any two of these numbers will be
10. Prove that either 2 · 10500 + 15 or 2 · 10500 + 16 is not nonnegative if they have the same sign (i.e., both positive or both
aperfect square. Is your proof constructive or nonconstructive? negative). This is because the product of two negative numbers is
positive, and the product of a positive and a negative number is
Answer: negative.
The only 2 perfect squares that are sequential are 0 and 1.
Neither are perfect squares and the numbers are sequential. Now, suppose that at least one of these numbers is zero. Without
loss of generality, let us assume that $A=0$. Then we have:
Therefore, the sets of perfect squares and perfect cubes less than or
equal to $343$ have a total of $18+7=25$ elements. Since there Therefore, the product of two of the numbers $A$, $B$, and $C$ is
are only $24$ integers in the set of consecutive integers from $1$ nonnegative, regardless of whether any of the numbers is zero or
to $343$, by the Pigeonhole Principle, there must be at least one not.
integer in this set that is both a perfect square and a perfect cube.
This proof is constructive, as we explicitly showed that the product The statement ∃!xP(x) means "there exists a unique element x such
of two of the given numbers is nonnegative, and we provided the that P(x) is true". We will show that each of the following
values of these products. statements is equivalent to ∃!xP(x).
a) ∃x∀y(P(y) ↔ x = y):
13. Prove or disprove that there is a rational number x and
anirrational number y such that xy is irrational.
Suppose there exists an element $x$ such that $P(x)$ is true, and
Answer: suppose $y$ is any element such that $P(y)$ is also true. Then we
have:
We will prove that there exists a rational number $x$ and an
irrational number $y$ such that $xy$ is irrational.
15. Show that each of these statements can be used to express the
fact that there is a unique element x such thatP (x) is true. [Note
Suppose there exists an element $x$ such that $P(x)$ is true, and
that we can also write this statementas∃!xP (x).]
suppose $y$ is any element such that $P(y)$ is also true. Then we
a) ∃x∀y(P (y) ↔ x = y) have:
Answer:
Since $P(x)$ is true, we have $x = y$, and thus there is a unique Suppose that $n$ is an odd integer. We want to show that there is a
element $x$ such that $P(x)$ is true. unique integer $k$ such that $n=k-2+k+3=2k+1$.
Conversely, suppose there is a unique element $x$ such that $P(x) To see that such a $k$ exists, we can solve for $k$ as follows:
$ is true. Let $y$ be any element such that $P(y)$ is true. Then we
have $x = y$, since there is a unique element $x$ such that $P(x)$ \begin{align*}
is true. Therefore, $\exists x (P(x) \text{ and } \forall y(P(y) \ n&=2k+1\
rightarrow x = y))$, and ∃!xP(x) is equivalent to $\exists x(P(x) \
\frac{n-1}{2}&=k
\end{align*}
16. Show that if a, b, and c are real numbers and a = 0, thenthere is
a unique solution of the equation ax + b = c. Since $n$ is odd, $\frac{n-1}{2}$ is an integer, so $k=\frac{n-1}
{2}$ is also an integer. Therefore, there exists an integer $k$ such
Answer: that $n=2k+1$.
If $a=0$, then the equation $ax + b = c$ becomes $b=c$. Since
this is a linear equation with only one variable, it is clear that there
is a solution, namely $x = \frac{c-b}{a} = \frac{c-b}{0}$ which is To show uniqueness, suppose that $n=k'-2+k'+3=2k'+1$ for some
undefined. However, since $a=0$, this equation is equivalent to integer $k'$. Then we have:
$b=c$, and thus there is a unique solution $x$ such that $ax + b = \begin{align*}
c$ holds, namely $x=\frac{c-b}{0}$, which is undefined.
2k+1&=2k'+1\
2k-2k'&=0\
17. Suppose that a and b are odd integers with a = b. Showthere is
a unique integer c such that |a − c| = |b − c|. k&=k'
Answer: \end{align*}
Since $a$ and $b$ are odd integers with $a=b$, we have $a-b=0$. Therefore, the integer $k$ is unique, and there is only one integer
Thus we want to show that there is a unique integer $c$ such that $k$ such that $n=k-2+k+3=2k+1$.
$|a-c|=|b-c|$, or equivalently, $a-c=\pm(b-c)$. We can simplify this
expression to $a+b=2c$ or $a-b=2c$, respectively.
In either case, we see that $c$ is simply the average of $a$ and 20. Prove that given a real number x there exist unique numbers n
$b$. That is, $c = (a+b)/2$ if $a-c = b-c$, and $c = (a-b)/2$ if $a-c and such that x = n + , n is an integer, and0 ≤ < 1.
= -(b-c)$. In either case, we can see that $c$ is uniquely Answer:
determined by $a$ and $b$. Therefore, there is a unique integer
$c$ such that $|a-c|=|b-c|$. We can prove this using the following theorem:
18. Show that if r is an irrational number, there is a uniqueinteger n Theorem: For any real number $x$, there exists a unique integer
such that the distance between r and n is lessthan 1/2. $n$ and a unique number ${x}$ such that $x = n + {x}$ and $0 \
leq {x} < 1$.
Answer:
Let $r$ be an irrational number. We want to show that there is a
unique integer $n$ such that $|r-n|<1/2$. Proof:
First, we will show that there exists such an integer $n$. Consider Existence: Let $n = \lfloor x \rfloor$ be the greatest integer less
the set of numbers $S={k\in\mathbb{Z} : k\leq r < k+1}$, which is than or equal to $x$, and let ${x} = x - n$ be the fractional part of
the set of integers that are less than or equal to $r$. Since $S$ is $x$. Then we have $0 \leq {x} < 1$, and $x = n + {x}$ by
bounded above by $r+1$, it has a largest element, say $n$. We definition. Therefore, such $n$ and ${x}$ exist.
claim that $n$ is the unique integer satisfying $|r-n|<1/2$.
Therefore, we have shown that for any nonzero real number $x$,
21. Prove that given a real number x there exist unique numbers n $x^2 + \frac{1}{x^2} \geq 2$.
and such that x= n − , n is an integer, and0 ≤ < 1.
Answer:
23. The harmonic mean of two real numbers x and y equals2xy/(x
The statement is not true as written. For example, consider the real + y). By computing the harmonic and geometricmeans of different
number $x = 0$. If we take $n = 0$ and ${x} = 0$, then we have pairs of positive real numbers, formulate a conjecture about their
$x = n - {x}$ and $0 \leq {x} < 1$, but $n$ is not unique (we relative sizes and prove yourconjecture.
could also take $n = 1$ and ${x} = 1$).
Answer:
Conjecture: For any two positive real numbers $x$ and $y$, the
However, if we replace the minus sign with a plus sign, then the harmonic mean of $x$ and $y$ is always less than or equal to the
statement becomes true: geometric mean of $x$ and $y$, i.e., $2xy/(x+y) \leq \sqrt{xy}$.
Theorem: For any real number $x$, there exists a unique integer To prove this conjecture, we can use the AM-GM inequality, which
$n$ and a unique number ${x}$ such that $x = n + {x}$ and $0 \ states that for any two positive real numbers $a$ and $b$, their
leq {x} < 1$. arithmetic mean is always greater than or equal to their geometric
mean, i.e., $(a+b)/2 \geq \sqrt{ab}$.
Proof:
Using this inequality, we can compare the arithmetic mean of $x$
and $y$ with the harmonic mean of $x$ and $y$:
Existence: Let $n = \lfloor x \rfloor$ be the greatest integer less \begin{align*}
than or equal to $x$, and let ${x} = x - n$ be the fractional part of
$x$. Then we have $0 \leq {x} < 1$, and $x = n + {x}$ by \frac{x+y}{2} &\geq \sqrt{xy} \
definition. Therefore, such $n$ and ${x}$ exist.
\frac{2xy}{x+y} &\leq \sqrt{xy}
\end{align*}
Uniqueness: Suppose that there exist integers $n_1$ and $n_2$
and numbers ${x}_1$ and ${x}_2$ such that $x = n_1 + {x}_1$, The last inequality follows by taking the reciprocal of both sides
$0 \leq {x}_1 < 1$, $x = n_2 + {x}_2$, and $0 \leq {x}_2 < 1$. and rearranging.
Then we have:
\begin{align*} Therefore, we have shown that for any two positive real numbers
n_1 + {x}_1 &= n_2 + {x}_2 \ $x$ and $y$, the harmonic mean of $x$ and $y$ is always less
than or equal to the geometric mean of $x$ and $y$, which
{x}_2 - {x}_1 &= n_1 - n_2 confirms our conjecture.
\end{align*}
The left-hand side of the second equation is between $-1$ and $1$, 24. The quadratic mean of two real numbers x and yequals (x2 +
while the right-hand side is an integer, so we must have ${x}_2 - y2)/2. By computing the arithmetic andquadratic means of
{x}_1 = 0$ and $n_1 = n_2$. Therefore, $n$ and ${x}$ are different pairs of positive real numbers, formulate a conjecture
unique. about their relative sizes andprove your conjecture.
Answer:
Therefore, there exists a unique integer $n$ and a unique number $ Conjecture: For any two positive real numbers $x$ and $y$, the
{x}$ such that $x = n + {x}$ and $0 \leq {x} < 1$ for any real quadratic mean of $x$ and $y$ is always greater than or equal to
number $x$. the arithmetic mean of $x$ and $y$, i.e., $\sqrt{(x^2+y^2)/2} \geq
(x+y)/2$.
For each pair (j, k), we write |j - k| on the board and erase j and k. Case 3: The final digit of the integer is 2.
Note that |j - k| is either the difference between two consecutive
integers or 1. Therefore, the difference between any two numbers In this case, the final digit of the square of the integer will be 4,
on the board is either a power of 2 or a power of 2 plus 1. and the final digit of the fourth power of the integer will be the
final digit of the product of two 4's, which is 6.
Now, consider the numbers 2n+1, 2n+2, and 2n+3. Their pairwise
differences are 1, 1, and 2, respectively. Therefore, the numbers Case 4: The final digit of the integer is 3.
2n+1 and 2n+3 cannot both be erased at the same time, since their In this case, the final digit of the square of the integer will be 9,
difference is not a power of 2. Similarly, the number 2n+2 cannot and the final digit of the fourth power of the integer will be the
be erased with any other number, since its difference with any final digit of the product of 9 and 9, which is 1.
other number is a power of 2. Therefore, the odd number that
remains on the board must be either 2n+1, 2n+3, or 2n+5.
Case 5: The final digit of the integer is 4.
Since n is odd, we have 2n+1 < 2(n+2) and 2n+5 < 2(n+2). In this case, the final digit of the square of the integer will be 6,
Therefore, the odd number that remains on the board must be one and the final digit of the fourth power of the integer will be the
of 2n+1, 2n+3, or 2n+5. final digit of the product of two 6's, which is 6.
This completes the inductive step, and the claim is proved for all Case 6: The final digit of the integer is 5.
odd integers n by mathematical induction. Therefore, the integer
that remains on the board after the process is odd. In this case, the final digit of any power of the integer will be 5.
Therefore, the final digit of the fourth power of the integer will be
5.
26. Suppose that five ones and four zeros are arranged arounda
circle. Between any two equal bits you insert a 0 andbetween any
Case 7: The final digit of the integer is 6. The final two decimal digits of n^2 are given by the remainder of
the above expression when divided by 100. Since 10000k^2 and
In this case, the final digit of the square of the integer will be 6, 200k are multiples of 100, they do not contribute to the final two
and the final digit of the fourth power of the integer will be the decimal digits. Thus, we have:
final digit of the product of two 6's, which is 6.
n = (-1 ± √401)/2
If k or m is even, then 2000km is divisible by 4 and the final two
decimal digits of n^2 are 00. Otherwise, 2000km is not divisible by
4 and the final two decimal digits of n^2 are either 25 or 75. Since n is a positive integer, we can ignore the negative solution.
The positive solution is:
Case 2: r ends in 1
n = (-1 + √401)/2 ≈ 6.43
n^2 = (100k + 10m + 1)^2 = 10000k^2 + 2000km + 200k + 20m + 30. Prove that there are no solutions in integers x and y to
1 theequation 2x2 + 5y2 = 14.
Answer:
Suppose, for the sake of contradiction, that there exist integers x Simplifying further, we get:
and y such that 2x^2 + 5y^2 = 14.
Next, assume that $x$ and $y$ are both odd. In this case, $x^4$
and $y^4$ are both odd, so their sum is even. But $5^4$ is odd, so a > √3 n → a2 > 3n
$x^4 + y^4$ cannot be equal to $5^4$.
b > √3 n → b2 > 3n
Therefore, there are no solutions in positive integers $x$ and $y$
to the equation $x^4 + y^4 = 625$.
c > √3 n → c2 > 3n
Answer:
Squaring both sides of the equation, we get: Let x be a rational number and y be an irrational number. We
need to prove that there exists an irrational number z such that
x < z < y.
$3=\frac{p^2}{q^2}$
This means that $p^2$ is a multiple of $3$, and hence $p$ must Now we consider two cases:
also be a multiple of $3$. Let $p=3k$ for some integer $k$.
Substituting this into the equation above, we get:
Case 1: s < y.
$(3k)^2 = 3q^2$
Since s is irrational and lies between x and y, there exists an
irrational number t such that s < t < y (as proved in the
$9k^2 = 3q^2$ previous problem). Since s < t and t < y, it follows that x < s < t
< y, so t is the desired irrational number.
$3k^2 = q^2$
Case 2: s > y.
This means that $q^2$ is a multiple of $3$, and hence $q$ must
also be a multiple of $3$. However, this contradicts our initial Since r/2 > 0, we have s = x + r/2 > x. Since s > y and x < y, it
assumption that $\frac{p}{q}$ is in lowest terms. Therefore, our follows that s > x + r = y, so we have y < s < x + r/2 < s + r/2.
assumption that $\sqrt{3}$ is rational must be false, and hence $\
Note that s + r/2 is also irrational, since s and r/2 are both
sqrt{3}$ is irrational.
irrational. Since s < y and s + r/2 > y, it follows that there
exists an irrational number t such that s <
35. Prove that between every two rational numbers there isan
irrational number.
37. Let S = x1y1 + x2y2 + · · · + xnyn, where x1, x2, . . . ,xn and
Answer: y1, y2, . . . , yn are orderings of two different sequences of positive
real numbers, each containing n elements.
To prove that between every two rational numbers there is an
irrational number, we can use a proof by contradiction. Suppose a) Show that S takes its maximum value over all orderings of the
that there exist two rational numbers a and b such that there is no two sequences when both sequences aresorted (so that the elements
irrational number between them. Then, the set of all numbers in each sequence are innondecreasing order).
between a and b must consist only of rational numbers.
b) Show that S takes its minimum value over all orderings of the
two sequences when one sequence is sortedinto nondecreasing
order and the other is sorted intononincreasing order.
Let r be any irrational number. Then, either r < a or r > b, because
if r were between a and b, we would have a contradiction. Without Answer:
loss of generality, assume that r < a. Let q be any rational number
a) To prove that S takes its maximum value when both sequences
between r and a. Then, q < a and q > r. But since the set of all
are sorted, we can use the Rearrangement Inequality. This
numbers between a and b consists only of rational numbers, q must
inequality states that if x1 ≤ x2 ≤ · · · ≤ xn and y1 ≤ y2 ≤ · · · ≤ yn
also be between b and a, and hence q ≤ b.
are two sequences of real numbers, then their dot product x1yσ(1)
+ x2yσ(2) + · · · + xnynσ(n) is maximized when σ is the identity
permutation (i.e., when both sequences are sorted in nondecreasing
order) and minimized when σ is the reverse permutation (i.e., when
one sequence is sorted in nondecreasing order and the other in
nonincreasing order). 38. Prove or disprove that if you have an 8-gallon jug of water and
two empty jugs with capacities of 5 gallons and 3gallons,
respectively, then you can measure 4 gallons bysuccessively
pouring some of or all of the water in a juginto another jug.
To see why this is true, note that if σ is any permutation of {1, 2, . .
. , n}, then we can write S as the dot product of x1, x2, . . . , xn Answer:
with the rearranged sequence yσ(1), yσ(2), . . . , yσ(n)). By the
Rearrangement Inequality, this dot product is maximized when σ is It is possible to measure 4 gallons using the 8-gallon, 5-gallon, and
the identity permutation (since in that case, the sequences x and y 3-gallon jugs as follows:
are sorted in the same order) and minimized when σ is the reverse
permutation (since in that case, the sequences x and y are sorted in
opposite orders). Therefore, S is maximized when both sequences 1. Fill the 5-gallon jug with water from the 8-gallon jug.
are sorted in nondecreasing order. 2. Pour the water from the 5-gallon jug into the 3-gallon
jug until the 3-gallon jug is full. This leaves 2 gallons in
the 5-gallon jug.
b) To prove that S takes its minimum value when one sequence is 3. Empty the 3-gallon jug, and pour the 2 gallons from the
sorted into nondecreasing order and the other is sorted into 5-gallon jug into the 3-gallon jug.
nonincreasing order, we can again use the Rearrangement 4. Fill the 5-gallon jug with water from the 8-gallon jug.
Inequality. This time, we apply the inequality to the sequences x1 5. Pour water from the 5-gallon jug into the 3-gallon jug
≤ x2 ≤ · · · ≤ xn and y1 ≥ y2 ≥ · · · ≥ yn (i.e., one sequence is until the 3-gallon jug is full. This leaves 4 gallons in the
sorted in nondecreasing order and the other in nonincreasing 5-gallon jug.
order). Again, we can write S as the dot product of x1, x2, . . . ,xn Therefore, it is possible to measure 4 gallons using the
with the rearranged sequence yσ(1), yσ(2), . . . , yσ(n)), where σ is given jugs.
any permutation of {1, 2, . . . , n}. By the Rearrangement
Inequality, this dot product is minimized when σ is the reverse
permutation (since in that case, the sequences x and y are sorted in 39. Verify the 3x + 1 conjecture for these integers.
opposite orders). Therefore, S is minimized when one sequence is
a) 6 b) 7 c) 17 d) 21
sorted into nondecreasing order and the other into nonincreasing
order. Answer:
a) For the integer 6:
6 is even, so we divide by 2 to get 3. Therefore, the 3x + 1 conjecture is verified for the integer 7.
3 is odd, so we multiply by 3 and add 1 to get 10.
10 is even, so we divide by 2 to get 5.
5 is odd, so we multiply by 3 and add 1 to get 16. c) For the integer 17:
16 is even, so we divide by 2 to get 8.
8 is even, so we divide by 2 to get 4. 17 is odd, so we multiply by 3 and add 1 to get 52.
4 is even, so we divide by 2 to get 2.
52 is even, so we divide by 2 to get 26.
2 is even, so we divide by 2 to get 1.
26 is even, so we divide by 2 to get 13.
Therefore, the 3x + 1 conjecture is verified for the integer 6. 13 is odd, so we multiply by 3 and add 1 to get 40.
40 is even, so we divide by 2 to get 20.
b) For the integer 7: 20 is even, so we divide by 2 to get 10.
7 is odd, so we multiply by 3 and add 1 to get 22. 10 is even, so we divide by 2 to get 5.
22 is even, so we divide by 2 to get 11. 5 is odd, so we multiply by 3 and add 1 to get 16.
11 is odd, so we multiply by 3 and add 1 to get 34. 16 is even, so we divide by 2 to get 8.
34 is even, so we divide by 2 to get 17. 8 is even, so we divide by 2 to get 4.
17 is odd, so we multiply by 3 and add 1 to get 52. 4 is even, so we divide by 2 to get 2.
52 is even, so we divide by 2 to get 26. 2 is even, so we divide by 2 to get 1.
26 is even, so we divide by 2 to get 13.
13 is odd, so we multiply by 3 and add 1 to get 40. Therefore, the 3x + 1 conjecture is verified for the integer 17.
40 is even, so we divide by 2 to get 20.
20 is even, so we divide by 2 to get 10. d) For the integer 21:
10 is even, so we divide by 2 to get 5. 21 is odd, so we multiply by 3 and add 1 to get 64.
5 is odd, so we multiply by 3 and add 1 to get 16. 64 is even, so we divide by 2 to get 32.
16 is even, so we divide by 2 to get 8. 32 is even, so we divide by 2 to get 16.
8 is even, so we divide by 2 to get 4. 16 is even, so we divide by 2 to get 8.
4 is even, so we divide by 2 to get 2. 8 is even, so we divide by 2 to get 4.
2 is even, so we divide by 2 to get 1. 4 is even, so we divide by 2 to get 2.
2 is even
41. Prove or disprove that you can use dominoes to tilethe standard checkerboard with two adjacent corners removed (that is, corners that are not
opposite).
Answer:
We can disprove the statement by coloring the two removed squares in the checkerboard, say in red and black, and observing that any domino
must cover one red and one black square. However, after the two corners are removed, we have 30 squares of one color and 32 squares of the
other color. Therefore, it is impossible to tile the checkerboard with dominos.
42. Prove or disprove that you can use dominoes to tile astandard checkerboard with all four corners removed.
Answer:
It is not possible to use dominoes to tile a standard checkerboard with all four corners removed.
A standard checkerboard has 64 squares, 32 of which are white and 32 of which are black. If we remove any two adjacent corners, then we will
have 30 squares of one color and 32 of the other color. Without loss of generality, assume we have removed two black squares, leaving us with 30
white squares and 32 black squares.
Each domino covers exactly one white square and one black square. Therefore, any tiling of the board with dominoes will use the same number
of white and black squares. But since we have an unequal number of white and black squares, it is impossible to tile the board with dominoes.
Hence, it is proved that it is not possible to use dominoes to tile a standard checkerboard with all four corners removed.
43. Prove that you can use dominoes to tile a rectangularcheckerboard with an even number of squares.
Answer:
We can prove this statement by induction on the dimensions of the rectangular checkerboard.
Base case: If the rectangular checkerboard has dimensions 2 x 2, then we can clearly tile it with a single domino.
Inductive step: Assume that the statement is true for all rectangular checkerboards with dimensions less than m x n, where m and n are even. We
need to prove that the statement is also true for an m x n rectangular checkerboard.
Case 1: m is even.
In this case, we can divide the m x n rectangular checkerboard into two m x (n/2) rectangular checkerboards. By the induction hypothesis, each of
these smaller checkerboards can be tiled with dominoes. We can then place a row of dominoes horizontally to join the two halves, resulting in a
tiling of the original m x n checkerboard.
Case 2: n is even.
In this case, we can divide the m x n rectangular checkerboard into two (m/2) x n rectangular checkerboards. By the induction hypothesis, each of
these smaller checkerboards can be tiled with dominoes. We can then place a column of dominoes vertically to join the two halves, resulting in a
tiling of the original m x n checkerboard.
Therefore, by induction, we have shown that all even-dimensional rectangular checkerboards can be tiled with dominoes.
44. Prove or disprove that you can use dominoes to tile a5 × 5 checkerboard with three corners removed.
Answer:
We cannot use dominoes to tile a 5 × 5 checkerboard with three corners removed.
To see why, consider the following argument. A standard 5 × 5 checkerboard has 25 squares. Removing three corners leaves 22 squares. Each
domino covers exactly two squares, so it would take 11 dominoes to cover the board. But if we look at the board, we see that it has 13 black
squares and 9 white squares. Each domino must cover one black and one white square, so we need an even number of dominoes to cover the
board. However, 11 is an odd number, so it is impossible to cover the board with dominoes.
Therefore, we have proven that it is impossible to use dominoes to tile a 5 × 5 checkerboard with three corners removed.
First, we assume that the squares in the upper left and lower right corners are removed. We number the squares of the original checkerboard from
1 to 16, starting in the first row, moving right in this row, then starting in the leftmost square in the second row and moving right, and so on. We
remove squares 1 and 16.
We consider square 2, which is not removed. It must be covered by a domino either laid horizontally, which covers squares 2 and 3, or vertically,
which covers squares 2 and 6.
Case 1: Square 2 is covered by a domino laid horizontally.
Subcase 1.1: The domino covering squares 2 and 3 is oriented such that it extends to the right.
Then, squares 3 and 4 must be covered by a vertical domino, which covers squares 3 and 7. This forces square 6 to be uncovered, which cannot
be covered by any domino.
Subcase 1.2: The domino covering squares 2 and 3 is oriented such that it extends downward.
Then, squares 3 and 7 must be covered by a horizontal domino, which covers squares 3 and 4. This forces square 6 to be uncovered, which cannot
be covered by any domino.
Subcase 2.1: The domino covering squares 2 and 6 is oriented such that it extends to the right.
Then, squares 6 and 7 must be covered by a horizontal domino, which covers squares 6 and 5. This forces square 4 to be uncovered, which cannot
be covered by any domino.
Subcase 2.2: The domino covering squares 2 and 6 is oriented such that it extends downward.
Then, squares 6 and 10 must be covered by a vertical domino, which covers squares 6 and 7. This forces square 4 to be uncovered, which cannot
be covered by any domino.
In all cases, we have shown that it is impossible to tile the checkerboard as described. Therefore, a tiling using dominoes of a 4 × 4 checkerboard
with opposite corners removed does not exist.
46. Prove that when a white square and a black square are
removed from an 8 × 8 checkerboard (colored as in the
text) you can tile the remaining squares of the checkerboard using dominoes. [Hint: Show that when one black
and one white square are removed, each part of the partition of the remaining cells formed by inserting the barriers
shown in the figure can be covered by dominoes.]
Answer:
Let's assume that a white square and a black square are removed from an 8×8 checkerboard and we want to prove that the remaining squares can
be tiled using dominoes.
First, let's color the squares of the checkerboard in the usual way, with alternating black and white squares.
Without loss of generality, assume that the removed squares are a white square and a black square that are adjacent to each other (i.e., they share
an edge).
If we remove a white square and a black square from the checkerboard, then there are 30 white squares and 32 black squares remaining.
Therefore, it is clear that any tiling of the remaining squares must use 15 dominoes, with each domino covering one black and one white square.
Now, let's partition the remaining squares of the checkerboard into two parts, one consisting of 15 white squares and 16 black squares, and the
other consisting of 15 black squares and 16 white squares. We can insert barriers into the checkerboard along the boundary between these two
parts, as shown below:
BBBBBBBB|WWWWWWWW
BBBBBBBB|WWWWWWWW
BBBBBBBB|WWWWWWWW
BBBBBBBB|WWWWWWWW
---------+-------
WWWWWWWW|BBBBBBBB
WWWWWWWW|BBBBBBBB
WWWWWWWW|BBBBBBBB
WWWWWWWW|BBBBBBBB
Here, we have used "|" to denote the barriers that separate the two parts of the checkerboard, and "-" to denote the barriers between the rows.
Now, we need to show that each part of the partition can be covered by dominoes. Since the two parts are symmetric, it is enough to consider one
of them.
Consider the part of the partition consisting of 15 white squares and 16 black squares. Since there are an equal number of black and white
squares, we can cover this part of the partition using 8 vertical dominoes, with each domino covering two adjacent squares in the same column.
This leaves two remaining black squares, which can be covered by a horizontal domino.
Therefore, we have shown that the remaining squares of the checkerboard can be tiled using dominoes, regardless of which white and black
squares are removed.
47. Show that by removing two white squares and two black
squares from an 8 × 8 checkerboard (colored as in the
text) you can make it impossible to tile the remaining
squares using dominoes.
Answer:
Let's assume that it is possible to tile the remaining squares of an 8x8 checkerboard with two white squares and two black squares
removed, using dominoes.
Since two white squares and two black squares are removed, the board will have 30 squares (16 black, 14 white). Without loss of
generality, assume that the two removed white squares are on the same row and the two removed black squares are on the same column.
Now, the board has 14 white squares and 16 black squares, so there must be two white squares on the same column and two black
squares on the same row. Let's say the two white squares are on rows i and j, and the two black squares are on columns k and l.
Without loss of generality, assume i< j and k < l. Now, consider the four squares in rows i, j and columns k, l. They form a 2x2 square, and
we know that two opposite corners are of the same color (either black or white). Without loss of generality, assume they are black.
Now, in order to tile the remaining board with dominoes, we need to cover these four squares with a single domino. But a domino can
only cover two squares of opposite colors, so it is impossible to cover the four black squares with a single domino. Therefore, it is
impossible to tile the remaining squares of the checkerboard with two white squares and two black squares removed using dominoes.
Answer:
Let's first analyze the properties of the straight triominoes. Each triomino occupies three squares that are either all white or all black.
Thus, if a square is removed from the board and the remaining board can be tiled with straight triominoes, the color of the removed
square must be opposite to the colors of the squares covered by the triominoes.
Now, let's color the board such that each row starts with a black square and alternate colors. It looks like this:
BWBWBWBW
WBWBWBWB
BWBWBWBW
WBWBWBWB
BWBWBWBW
WBWBWBWB
BWBWBWBW
WBWBWBWB
Consider the three squares at the top left of the board. They are all black, and any straight triomino that covers them must cover three
black squares. This means that the removed square must be white, and any straight triomino that covers the remaining board must cover
only black squares. However, the remaining board contains 30 black squares and 32 white squares, so it cannot be tiled using straight
triominoes.
By similar arguments, we can eliminate any square that is white or on the border of the board, leaving only 30 squares to check. After
checking each of these squares, we find that none of them satisfy the condition, so there are no squares on the 8 × 8 checkerboard such
that the board obtained by removing one of these square can be tiled using straight triominoes.
Answer:
1. 2. 3. 4. 5.
* ** * * **
* **** **
b)
1. Yes, it is possible to tile a standard checkerboard using tetromino 1. Here is an example of such a tiling:
11110000
12222000
12222000
13333000
33344455
33666655
33666655
2. No, it is not possible to tile a standard checkerboard using tetromino 2. Notice that each tetromino covers exactly two white
squares and two black squares. Since a standard checkerboard has an equal number of white and black squares, any tiling
using tetromino 2 would cover an equal number of white and black squares, and hence would require an even number of
tetrominoes. However, the total number of squares covered by tetromino 2 is odd, so it is not possible to tile the checkerboard
with this tetromino.
3. Yes, it is possible to tile a standard checkerboard using tetromino 3. Here is an example of such a tiling:
12222000
11122000
13332000
33344455
36666655
36655555
37777777
4. No, it is not possible to tile a standard checkerboard using tetromino 4. Notice that each tetromino covers exactly two white
squares and two black squares. Since a standard checkerboard has an equal number of white and black squares, any tiling
using tetromino 4 would cover an equal number of white and black squares, and hence would require an even number of
tetrominoes. However, the total number of squares covered by tetromino 4 is odd, so it is not possible to tile the checkerboard
with this tetromino.
5. Yes, it is possible to tile a standard checkerboard using tetromino 5. Here is an example of such a tiling:
11122000
12222000
13332000
33334455
36666455
37766455
37777777
50. Prove or disprove that you can tile a 10 × 10 checkerboard using straight tetrominoes.
Answer:
We can disprove that you can tile a 10 × 10 checkerboard using straight tetrominoes by using a parity argument.
Each straight tetromino covers exactly two black and two white squares, so if we try to tile a 10 × 10 checkerboard with straight tetrominoes, we
will have 50 of each color. However, a standard checkerboard has 32 black squares and 32 white squares, so it is impossible to cover the board
with an equal number of each color using only straight tetrominoes.
Therefore, we have shown that it is impossible to tile a 10 × 10 checkerboard using straight tetrominoes.
Review Questions
1. a) Define the negation of a proposition.
b) What is the negation of “This is a boring course”?
Answer:
a) In logic, the negation of a proposition is a statement that has the opposite truth value of the original proposition. In other words, if the original
proposition is true, then its negation is false, and if the original proposition is false, then its negation is true.
b) The negation of "This is a boring course" would be "This is not a boring course."
2. a) Define (using truth tables) the disjunction, conjunction, exclusive or, conditional, and biconditional ofthe propositions p and q.
b) What are the disjunction, conjunction, exclusive or,conditional, and biconditional of the propositions “I’llgo to the movies tonight” and “I’ll
finish my discretemathematics homework”?
Answer:
a) Here are the truth tables for the five logical operators:
Disjunction (OR):
p q p OR q
T T T
T F T
F T T
F F F
Conjunction (AND):
p q p AND q
T T T
T F F
F T F
F F F
Exclusive Or (XOR):
p q p XOR q
T T F
T F T
F T T
F F F
Conditional (IF-THEN):
p q p -> q
T T T
T F F
F T T
F F T
p q p <-> q
T T T
T F F
F T F
F F T
b) The disjunction (OR) of "I'll go to the movies tonight" and "I'll finish my discrete mathematics homework" would be "I'll go to the movies
tonight OR I'll finish my discrete mathematics homework." The conjunction (AND) would be "I'll go to the movies tonight AND I'll finish my
discrete mathematics homework." The exclusive or (XOR) would be "I'll either go to the movies tonight or finish my discrete mathematics
homework, but not both." The conditional (IF-THEN) would be "If I finish my discrete mathematics homework, then I'll go to the movies
tonight." The biconditional (IF AND ONLY IF) would be "I'll go to the movies tonight if and only if I finish my discrete mathematics
homework."
3. a) Describe at least five different ways to write the conditional statement p → q in English.
b) Define the converse and contrapositive of a conditionalstatement.
c) State the converse and the contrapositive of the conditional statement “If it is sunny tomorrow, then I willgo for a walk in the woods.”
Answer:
a) Here are five different ways to write the conditional statement p → q in English:
c) The converse of the conditional statement “If it is sunny tomorrow, then I will go for a walk in the woods” is "If I go for a walk in the woods
tomorrow, then it will be sunny." The contrapositive of the same statement is "If I do not go for a walk in the woods tomorrow, then it will not be
sunny."
c) Show in at least two different ways that the compoundpropositions ¬p ∨ (r →¬q) and ¬p ∨¬q ∨¬r areequivalent.
Answer:
a) Two propositions are said to be logically equivalent if they have the same truth value under all possible interpretations. In other words, if the
truth values of the two propositions are always the same, regardless of the values assigned to their component propositions, then they are
logically equivalent.
b) There are several ways to show that two compound propositions are logically equivalent:
1. Use truth tables to show that the two propositions have the same truth value for all possible combinations of truth values of their
component propositions.
2. Use logical equivalences, which are valid transformations of propositional logic formulas, to show that the two propositions can
be transformed into each other.
3. Use arguments to show that the truth of one proposition implies the truth of the other, and vice versa.
c) Here are two different ways to show that ¬p ∨ (r →¬q) and ¬p ∨¬q ∨¬r are logically equivalent:
As we can see from the truth table, the two propositions have the same truth value for all possible combinations of truth values of their
component propositions. Therefore, they are logically equivalent.
As we can see from the above transformations, ¬p ∨ (r →¬q) is logically equivalent to ¬p ∨¬q ∨¬r, using the implication law and the
associativity of disjunction.
b) Explain why part (a) shows that the operators ∧, ∨,and ¬ are functionally complete.
c) Is there an operator such that the set containing justthis operator is functionally complete?
Answer:
a) To construct a compound proposition in disjunctive normal form (DNF) using a truth table, follow these steps:
1. Identify all the rows in the truth table where the compound proposition is true.
2. For each row in step 1, write down a conjunction of literals corresponding to the variables that are true in that row. If a variable
is true, include its literal in the conjunction; if a variable is false, include its negation in the conjunction.
3. Combine all the conjunctions obtained in step 2 using disjunction.
The resulting compound proposition will have the same truth table as the original compound proposition.
b) The fact that we can construct any compound proposition using only the operators ∧, ∨, and ¬ and DNF shows that these operators are
functionally complete. This is because any truth table can be represented using DNF, and any DNF can be constructed using the operators ∧, ∨,
and ¬. Therefore, we can construct any truth table using only these operators, which means they are functionally complete.
c) No, there is no single operator that is functionally complete. This is because any operator that does not include at least one binary operator (an
operator that takes two inputs) cannot generate enough complexity to represent all possible truth tables. The operators ∧, ∨, and ¬ are the simplest
binary operators that allow us to construct all possible truth tables.
6. What are the universal and existential quantifications ofa predicate P (x)? What are their negations?
Answer:
The universal quantification of a predicate P(x) over a domain D is the statement that "For all x in D, P(x) is true." We denote this by ∀x P(x).
The existential quantification of a predicate P(x) over a domain D is the statement that "There exists an x in D such that P(x) is true." We denote
this by ∃x P(x).
The negation of the universal quantification ∀x P(x) is the existential quantification ∃x ¬P(x), which states that "There exists an x in the domain
D such that P(x) is false."
The negation of the existential quantification ∃x P(x) is the universal quantification ∀x ¬P(x), which states that "For all x in the domain D, P(x) is
false."
7. a) What is the difference between the quantification∃x∀yP (x, y) and ∀y∃xP (x, y), where P (x, y) is apredicate?
b) Give an example of a predicate P (x, y) such that∃x∀yP (x, y) and ∀y∃xP (x, y) have different truthvalues.
Answer:
a) The quantification ∃x∀yP(x, y) asserts that there exists an x such that P(x, y) is true for all y in the domain. In other words, there is some x that
satisfies P(x, y) for all possible values of y. On the other hand, the quantification ∀y∃xP(x, y) asserts that for all y in the domain, there exists an x
such that P(x, y) is true. In other words, for every y, there is some x that satisfies P(x, y).
b) Let P(x, y) be the predicate "x is greater than y." Consider the domain of integers. Then, the statement ∃x∀yP(x, y) asserts that there exists an
integer x such that x is greater than every integer y. This is false, since there is no largest integer. Therefore, ∃x∀yP(x, y) is false.
On the other hand, the statement ∀y∃xP(x, y) asserts that for every integer y, there exists an integer x such that x is greater than y. This is true,
since for any y, we can choose x = y + 1, and x is greater than y. Therefore, ∀y∃xP(x, y) is true.
8. Describe what is meant by a valid argument in propositional logic and show that the argument “If the earth isflat, then you can sail off the edge
of the earth,” “You cannot sail off the edge of the earth,” therefore, “The earth isnot flat” is a valid argument.
Answer:
A valid argument in propositional logic is an argument in which the conclusion follows logically from the premises. In other words, if the
premises of a valid argument are true, then the conclusion must also be true.
To show that the argument "If the earth is flat, then you can sail off the edge of the earth, You cannot sail off the edge of the earth, therefore, the
earth is not flat" is a valid argument, we can use a proof by contradiction. Suppose that the premises are true but the conclusion is false, that is,
suppose that the earth is flat. Then, according to the first premise, you can sail off the edge of the earth. But the second premise states that you
cannot sail off the edge of the earth, which is a contradiction. Therefore, the assumption that the earth is flat must be false, and so the conclusion
that the earth is not flat must be true.
Since the argument is valid and its premises are true, we can conclude that the conclusion "The earth is not flat" is also true.
9. Use rules of inference to show that if the premises “Allzebras have stripes” and “Mark is a zebra” are true, thenthe conclusion “Mark has
stripes” is true.
Answer:
To show that the conclusion "Mark has stripes" follows from the premises "All zebras have stripes" and "Mark is a zebra," we can use the
universal instantiation and modus ponens rules of inference:
10. a) Describe what is meant by a direct proof, a proof bycontraposition, and a proof by contradiction of a conditional statement p → q.
b) Give a direct proof, a proof by contraposition and aproof by contradiction of the statement: “If n is even,then n + 4 is even.”
Answer:
a)
A direct proof of a conditional statement p → q involves assuming p is true and then using logical reasoning to show that q must also
be true.
A proof by contraposition of a conditional statement p → q involves proving the equivalent statement ¬q → ¬p, which means showing
that if q is false, then p must also be false.
A proof by contradiction of a conditional statement p → q involves assuming that p is true and q is false, and then showing that this
leads to a contradiction, which means that either p must be false or q must be true.
b)
Direct proof: Assume n is even, which means that there exists an integer k such that n = 2k. Then n + 4 = 2k + 4 = 2(k + 2), which
means that n + 4 is even. Therefore, if n is even, then n + 4 is even.
Proof by contraposition: We want to prove the contrapositive of the statement: If n + 4 is odd, then n is odd. Assume that n is even,
which means that n + 4 is also even. Then, if n + 4 is odd, this implies that n must be odd, since an even number plus an odd number is
always odd. Therefore, the contrapositive is true, which means that the original statement is also true.
Proof by contradiction: Assume that n is even and n + 4 is odd. Then, there exist integers k and m such that n = 2k and n + 4 = 2m + 1.
Substituting n = 2k into the second equation, we get 2k + 4 = 2m + 1, which means that 2k = 2m - 3. This implies that k is not an
integer, which is a contradiction. Therefore, the assumption that n is even and n + 4 is odd must be false, which means that if n is even,
then n + 4 is even.
b) To prove “The integer 3n + 2 is odd if and only if the integer 9n + 5 is even, where n is an integer,” we need to prove both of the conditional
statements:
9n + 5 = 9n + (2 + 3)
= 9n + 2 + 3
= 3(3n + 2) + 1
Since 3n + 2 is odd, we know that 3n + 2 = 2m + 1 for some integer m. Substituting this into the equation above, we get:
9n + 5 = 3(2m + 1) + 1
= 6m + 4
= 2(3m + 2)
Thus, 9n + 5 is even, as required.
Proof of (2):
Assume that the integer 9n + 5 is even. Then we can write 9n + 5 as 2k for some integer k. Substituting this into 3n + 2, we get:
3n + 2 = (9n + 5) - 6n - 3
= 2k - 6n - 3
= 2(k - 3n - 2) + 1
Therefore, we have shown both conditional statements, and so we can conclude that the biconditional statement “The integer 3n + 2 is odd if and
only if the integer 9n + 5 is even, where n is an integer” is true.
12. To prove that the statements p1, p2, p3, and p4 are equivalent, is it sufficient toshow that the conditional statementsp4 → p2, p3 → p1, and p1
→ p2 are valid? If not, provide another collection of conditional statements that canbe used to show that the four statements are equivalent.
Answer:
No, it is not sufficient to show that only these three conditional statements are valid to prove that the statements p1, p2, p3, and p4 are equivalent.
One approach to show that the four statements are equivalent is to use a collection of conditional statements that are all valid. For example, we
could show the following:
p1 → p2
p2 → p3
p3 → p4
p4 → p1
If we can prove all of these statements, then we have shown that the four statements are equivalent. The reasoning behind this approach is that the
chain of implications connects all four statements, so if any one of them is true, then all of them must be true.
13. a) Suppose that a statement of the form ∀xP (x) is false.How can this be proved?
b) Show that the statement “For every positive integer n, n2 ≥ 2n” is false.
Answer:
a) To prove that a statement of the form ∀xP(x) is false, we can provide a counterexample. This means finding a specific value of x for which
P(x) is false. If we can find even just one such x, then the statement ∀xP(x) is false.
b) To show that the statement “For every positive integer n, n2 ≥ 2n” is false, we can provide a counterexample. That is, we need to find a
positive integer n for which n2 < 2n.
One way to find such a counterexample is to try small values of n. For example, if we let n = 1, then n2 = 1 and 2n = 2, so n2 < 2n. Therefore, the
statement is false for n = 1, and we have shown that the statement “For every positive integer n, n2 ≥ 2n” is false.
14. What is the difference between a constructive and nonconstructive existence proof? Give an example of each.
Answer:
In mathematics, an existence proof is a type of proof that shows that a mathematical object with certain properties exists. There are two main
types of existence proofs: constructive and nonconstructive.
A constructive existence proof provides a method or algorithm for constructing the object in question. This method can be used to find a specific
example of the object. In other words, a constructive existence proof not only shows that the object exists, but also provides a way to find it.
For example, consider the statement "There exists a rational number between any two distinct real numbers." A constructive existence proof for
this statement would involve showing how to construct such a rational number. One way to do this is to take the average of the two real numbers
and then use the Euclidean algorithm to find the simplest form of the resulting fraction.
On the other hand, a nonconstructive existence proof shows that the object exists without providing a way to find it. This type of proof often
relies on logical arguments such as contradiction or use of the axiom of choice. A nonconstructive existence proof does not give an explicit
example of the object; it only shows that it must exist according to certain logical principles.
An example of a nonconstructive existence proof is the proof of the intermediate value theorem, which states that if a continuous function f(x)
takes on values of opposite signs at two points a and b, then it must take on the value 0 at some point between a and b. A nonconstructive proof of
this theorem involves assuming that such a point does not exist, and then arriving at a logical contradiction based on this assumption.
In summary, the main difference between a constructive and nonconstructive existence proof is that a constructive proof provides an algorithm to
construct an object with certain properties, while a nonconstructive proof shows only that such an object must exist based on logical principles.
15. What are the elements of a proof that there is a uniqueelement x such that P (x), where P (x) is a propositionalfunction?
Answer:
A proof that there is a unique element x such that P(x) requires two main elements:
Existence Proof: The proof must first show that there exists at least one element that satisfies P(x). This can be done by finding a specific value of
x that makes P(x) true, or by showing that a solution to P(x) can be constructed using a well-defined process.
Uniqueness Proof: The proof must then show that there is only one element that satisfies P(x). This can be done using a contradiction proof or by
assuming that there are two distinct elements x and y that satisfy P(x), and then showing that this assumption leads to a contradiction.
Existence Proof: To show that there exists an x such that P(x), we can find a specific value of x that makes P(x) true. In this case, x = 5 satisfies
P(x) since 5 + 5 = 10.
Uniqueness Proof: To show that there is only one x that satisfies P(x), we can use a contradiction proof. Suppose there exist two distinct values of
x, say a and b, such that P(a) and P(b) are both true. Then, we have a + 5 = 10 and b + 5 = 10. Subtracting the first equation from the second, we
get (b - a) = 0, which implies that a = b. Therefore, there is only one value of x (namely x = 5) that satisfies P(x), and thus P(x) has a unique
solution.
16. Explain how a proof by cases can be used to prove a resultabout absolute values, such as the fact that |xy| = |x||y|for all real numbers x and y.
Answer:
A proof by cases is a type of proof in which the statement to be proved is divided into two or more cases, and a separate argument is given for
each case. In a proof involving absolute values, we can use a proof by cases to consider different possible signs of the numbers involved.
Specifically, we can consider the cases where both x and y are nonnegative, both are negative, one is positive and the other is negative, and one or
both is zero.
To prove the equation |xy| = |x||y| for all real numbers x and y, we can use a proof by cases as follows:
Case 1: x and y are both nonnegative. In this case, we have xy ≥ 0, so |xy| = xy and |x| = x and |y| = y. Then |x||y| = xy, so |xy| = |x||y|.
Case 2: x and y are both negative. In this case, we also have xy ≥ 0, so |xy| = xy and |x| = -x and |y| = -y. Then |x||y| = xy, so |xy| = |x||y|.
Case 3: x is positive and y is negative (or vice versa). In this case, we have xy ≤ 0, so |xy| = -xy and |x| = x and |y| = -y (or vice versa). Then |x||y|
= -xy, so |xy| = |x||y|.
Case 4: x or y (or both) is zero. In this case, we have |xy| = 0 and |x||y| = 0, so the equation holds trivially.
Since we have considered all possible cases, and the equation holds in each case, we can conclude that |xy| = |x||y| for all real numbers x and y.
Supplementary Exercises
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.
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) q ∧ p
c) ¬q ∨¬p
d) q ↔ p
q) → (p ∧¬r).
Answer:
To find the truth table of the compound proposition (p ∨ q) → (p ∧¬r), we need to list all possible combinations of truth values for p, q, and r and
compute the truth value of the compound proposition for each combination.
p q r p∨q ¬r p (p ∨ q) →
∧¬r (p ∧¬r)
T T T T F F F
T T F T T T T
T F T T F F F
T F F T T T T
F T T T F F F
F T F T T F F
F F T F F F T
F F F F T F T
(p ∨ q) → (p ∧¬r)
F
T
F
T
F
F
T
T
b) ((p ∨ q) ∧¬p) → q
Answer:
a) To show that (¬q ∧ (p → q)) →¬p is a tautology, we need to show that it is always true, regardless of the truth values of p and q. We can use a
truth table to do this:
--|---|-------|----|--------------|----|-------------------
T|T| T | F| F | F| T
T|F| F | T| F | F| T
F|T| T | F| F | T| T
F|F| T | T| T | T| T
Since the final column is always true, regardless of the truth values of p and q, the compound proposition is a tautology.
b) To show that ((p ∨ q) ∧¬p) → q is a tautology, we need to show that it is always true, regardless of the truth values of p and q. We can use a
truth table to do this:
--|---|-------|----|-------------|---|---------------------
T|T| T | F| F |T| T
T|F| T | F| F |F| T
F|T| T | T| T |T| T
F|F| F | T| F |F| T
Since the final column is always true, regardless of the truth values of p and q, the compound proposition is a tautology.
The converse of this statement is q → p, which can be represented as "If q, then p".
The inverse of the original statement is ¬p → ¬q, which can be represented as "If not p, then not q".
The contrapositive of the original statement is ¬q → ¬p, which can be represented as "If not q, then not p".
The converse of the inverse is ¬q → ¬p, which is the contrapositive of the original statement.
This compound proposition is true when exactly three of the propositional variables p, q, r, and s are true and false otherwise.
To see why, suppose exactly three of the propositional variables are true. Without loss of generality, let these be p, q, and r. Then the first three
terms in the above compound proposition are true, and the last term is false, so the disjunction is true. Conversely, if fewer than three or more
than three propositional variables are true, then the compound proposition is false, since none of the disjuncts are true.
p q r q p → (q ∧ ¬(p → (q
∧ r) ∧ r))
r
T T T T T F
T T F F F T
T F T F F T
T F F F F T
F T T T T F
F T F F T F
F F T F T F
F F F F T F
p q ¬q p ∨¬q
T T F T
T F T T
F T F F
F F T T
r ¬r
T F
F T
p q r q→p p∧r (p ∧ r) ∨ (q
→ p)
T T T T T T
T T F T F T
T F T T T T
T F F T F F
F T T F F F
F T F F F F
F F T T F F
F F F T F F
Now, we can combine all four truth tables to see which sequences
of four answers will satisfy all four propositions:
Answer ¬(p → (q p ¬r (p ∧ r) ∨ (q Pass/Fail
Sequence ∧ r)) ∨¬q → p)
TTTT F T F T PASS
TTTF F T T T FAIL
TTFT F T T F FAIL
TTFF F T T F FAIL
TFTT T T F T FAIL
TFT
12. Explain why every obligato game has a winning strategy. “Exactly one of us is a knave.”?
Exercises 13 and 14 are set on the island of knights and knaves Answer:
described in Example 7 in Section 1.2. Yes, it is possible to determine what Aaron, Bohan, and Crystal are
based on their statements.
Answer:
Every obligato game has a winning strategy because the teacher is
always providing a set of logical propositions, and the student's If Aaron says "All of us are knaves," then it means that all three of
goal is to provide a set of consistent answers that satisfy all of them are knaves. This is because if Aaron were a knight, he would
those propositions. Since logic is a formal system with well- be lying, which is not possible.
defined rules, the student can use those rules to determine the
correct answers for each proposition and create a set of consistent
answers that satisfy all of them. Now, let's consider Bohan's statement. Bohan says "Exactly one of
us is a knave." Since we know that all three of them are knaves, it
means that Bohan is lying. If Bohan were a knight, he would be
To find the winning strategy, the student needs to carefully analyze telling the truth, which contradicts our previous conclusion that all
each proposition and determine its truth value. Then, the student three of them are knaves.
can use that information to determine the truth value of the next
proposition, and so on, until all propositions have been satisfied.
By doing so, the student can always create a set of consistent Therefore, we can conclude that Aaron and Crystal are knaves, and
answers that will pass the test. Bohan is a liar, but we cannot determine whether Bohan is a knave
or a knight based on the given information.
Brenda says "What Amy says is true." If Brenda is a knight or a real person” and “The tooth fairy is not a real person” and
normal, then Amy is telling the truth and is innocent. If Brenda is a conclusion “You can find gold at the end of the rainbow”
knave, then Amy is lying and is guilty.
is a valid argument. Does this show that the conclusion is
true?
Now, we can consider the statement made by Claire. Claire says
"Brenda is not a normal." If Claire is a knight or a knave, then Answer:
Brenda is either a knight or a knave, since we know that the
The argument in question has contradictory premises, which means
criminal is a knight and the other two are not. However, if Claire is
that at least one of them must be false. Therefore, we cannot
a normal, then Brenda could be a normal as well, since normals
conclude that the conclusion "You can find gold at the end of the
can lie or tell the truth.
rainbow" is true based on these premises.
To see why this is the case, we can use the rules of logic to analyze 19. Model 16 × 16 Sudoku puzzles (with 4 × 4 blocks) as
the argument. Let's assign the proposition "The tooth fairy is a real
person" the symbol P, and the proposition "The tooth fairy is not a satisfiability problems.
real person" the symbol ¬P. The argument can then be expressed Answer:
symbolically as:
To model a 16 × 16 Sudoku puzzle as a satisfiability problem, we
need to represent the puzzle as a set of propositional variables and
P ∧¬P → Q constraints, and then convert it into a Boolean formula in
conjunctive normal form (CNF).
where Q represents the conclusion "You can find gold at the end of
the rainbow." This argument is in the form of a material We will use the following notation:
implication, which is always true when the antecedent (P ∧¬P) is
false, regardless of the truth value of the consequent (Q). In other
words, if the premises of the argument contradict each other, then A variable Xi,j,k represents the proposition that the cell
the argument is logically valid, but it does not provide any in row i and column j contains the value k.
information about the truth or falsity of the conclusion. The values k range from 1 to 16.
The blocks are 4 × 4, so each block contains the values
from 1 to 16, and no value appears twice in the same
Therefore, the argument with premises "The tooth fairy is a real block.
person" and "The tooth fairy is not a real person" and conclusion The rows and columns also contain the values from 1 to
"You can find gold at the end of the rainbow" is a valid argument, 16, and no value appears twice in the same row or
but it does not show that the conclusion is true. column.
The constraints we need to encode are:
((p1 ∧ p2) ∧ p3) ∧ p4 = F ∧ T = F 3. Each value must appear exactly once in each column.
This can be expressed as the following CNF clause for
(((p1 ∧ p2) ∧ p3) ∧ p4) ∧ p5 = F ∧ F = F
each column and value:
...
e) ∃y ∀x (x is a student in class y → ¬P(x)) Alternatively, we can choose a domain with only one element, say
${a}$. Then, there are no distinct elements $x$ and $y$ in this
domain, so the statement is vacuously false.
21. Let P (m, n) be the statement “m divides n,” where the domain
for both variables consists of all positive integers.
24. Use existential and universal quantifiers to express the
(By “m divides n” we mean that n = km for some integer
statement “No one has more than three grandmothers” using the
k.) Determine the truth values of each of these statements. propositional function G(x, y), which represents
a) P (4, 5) b) P (2, 4) “x is the grandmother of y.”
c) ∀m ∀n P (m, n) d) ∃m ∀n P (m, n) Answer:
e) ∃n ∀m P (m, n) f )∀n P (1, n) We can express the statement "No one has more than three
grandmothers" using the quantifiers as follows:
Answer:
a) P(4, 5) is false since 4 does not divide 5.
∀x ¬∃y1∃y2∃y3∃y4(G(y1, x) ∧ G(y2, y1) ∧ G(y3, y2) ∧ G(y4,
b) P(2, 4) is true since 4 = 2(2).
y3))
c) ∀m ∀n P(m, n) means “For all pairs of positive integers m and
n, m divides n.” This is false since, for example, 2 does not divide
3. This translates to "For all x, it is not the case that there exist y1, y2,
y3, and y4 such that y1, y2, y3, and y4 are distinct and all of them
d) ∃m ∀n P(m, n) means “There is a positive integer m such that m
are grandmothers of x." In other words, every person x has at most
divides every positive integer n.” This is false since no such m
three distinct grandmothers.
exists.
Answer:
∀x ∃y1 ∃y2 ((y1 ≠ y2 ∧P(y1, x) ∧ P(y2, x) ∧∀z (P(z, x) → (z = y1 equals y.” In other words, there are exactly two values in the
∨ z = y2))) domain that satisfy P(x).
The statement above says that for all individuals x, there exist two d) ∃3xP(x) means that there are exactly 3 values in the domain that
individuals y1 and y2 such that y1 and y2 are different from each satisfy P(x). Using propositional logic, we can express this as
other and they are the biological parents of x. Moreover, it states (∃xP(x)) ∧ (∃y(P(y) ∧ y ≠ x)) ∧ (∃z(P(z) ∧ z ≠ x ∧ z ≠ y)) ∧
that if z is a biological parent of x, then z must be either y1 or y2, (∀w((P(w) → w = x) ∨ (P(w) → w = y) ∨ (P(w) → w = z))),
implying that everyone has exactly two biological parents. meaning “There exist x, y, and z such that P(x), P(y), and P(z) are
true, x, y, and z are distinct, and for all w, if P(w) is true, then w
equals x, y, or z.” In other words, there are exactly three values in
26. The quantifier ∃n denotes “there exists exactly n,” so that the domain that satisfy P(x).
∃nxP (x) means there exist exactly n values in the domain such
that P (x) is true. Determine the true value of 28. Let P (x, y) be a propositional function. Show that
these statements where the domain consists of all real ∃x ∀y P (x, y) → ∀y ∃x P (x, y) is a tautology.
numbers. Answer:
a) ∃0x(x2 = −1) b) ∃1x(|x| = 0) To show that the statement ∃x ∀y P (x, y) →∀y ∃x P (x, y) is a
c) ∃2x(x2 = 2) d) ∃3x(x = |x|) tautology, we need to show that it is true for all possible
interpretations of the propositional function P(x,y).
Answer:
c) ∃2x(x^2 = 2) is true, since there are exactly two real numbers Therefore, we have shown that ∃x ∀y P(x,y) →∀y ∃x P(x,y) holds
whose square is 2, namely √2 and -√2. when ∃x ∀y P(x,y) is true.
d) ∃3x(x = |x|) is false, since there are at most two real numbers
that satisfy the equation x = |x|. These numbers are 0 and 1, and Suppose ∃x ∀y P(x,y) is false. Then for every x there exists a y
there is no third number that satisfies this equation. such that P(x,y) is false. Let y be an arbitrary element in the
domain. Then for each x, P(x,y) is false. By universal
generalization, we can conclude that for any y in the domain, there
27. Express each of these statements using existential and exists an x such that P(x,y) is false.
universal quantifiers and propositional logic where ∃n is
defined in Exercise 26. Therefore, we have shown that ∃x ∀y P(x,y) →∀y ∃x P(x,y) holds
when ∃x ∀y P(x,y) is false.
a) ∃0xP (x) b) ∃1xP (x)
c) ∃2xP(x) means that there are exactly 2 values in the domain that
satisfy P(x). Using propositional logic, we can express this as
Case 1: P (a) is false. In this case, the implication P (a) → Q(a) is
(∃xP(x)) ∧ (∃y(P(y) ∧ y ≠ x)) ∧ (∀z((P(z) → z = x) ∨ (P(z) → z =
vacuously true, since any false statement implies any other
y))), meaning “There exist x and y such that P(x) and P(y) are true,
statement. Therefore, Q(a) is also true.
x and y are distinct, and for all z, if P(z) is true, then z equals x or z
Case 2: P (a) is true. In this case, since P (a) → Q(a) is true, we The statement ∀x ∃y P(x,y) means that for every x there exists at
must have Q(a) is true. least one y such that P(x,y) is true. However, it does not guarantee
that there exists a single x that works for all y such that P(x,y) is
true for all y.
Therefore, in either case, we have shown that ∃x Q(x) is true, so
we have established that ∃x (P (x) → Q(x)) →∀x P (x) →∃x Q(x).
On the other hand, the statement ∃x ∀y P(x,y) means that there
exists at least one x such that P(x,y) is true for all y. This statement
Next, suppose that ∀x P (x) →∃x Q(x) is true. Then either (∀x P requires a specific value of x that works for all y.
(x) is false) or (∀x P (x) is true and ∃x Q(x) is true). If ∀x P (x) is
false, then ∃x (P (x) → Q(x)) is vacuously true, since there are no
x for which P (x) is true. Therefore, we only need to consider the For example, consider the domain of all people and let P(x,y) mean
case where ∀x P (x) is true and ∃x Q(x) is true. "x is taller than y". Then, ∀x ∃y P(x,y) is true because for every
person x, there is at least one person y that x is taller than.
However, there is no single person who is taller than every other
In this case, we can choose some element a such that Q(a) is true. person, so ∃x ∀y P(x,y) is false.
Since ∃x Q(x) is true, there exists some element b such that Q(b) is
true. Now we consider two cases:
32. Find the negations of these statements.
a) If it snows today, then I will go skiing tomorrow.
Case 1: P (a) is true. In this case, we have established that ∃x (P (x)
→ Q(x)) is true, since we can choose a to satisfy P (a) → Q(a). b) Every person in this class understands mathematical
induction.
Case 2: P (a) is false. In this case, we have ∀x ¬P (x), so we can c) Some students in this class do not like discrete mathematics.
choose b to satisfy P (b) → Q(b). Therefore, we have established
d) In every mathematics class there is some student who
that ∃x (P (x) → Q(x)) is true.
falls asleep during lectures.
Answer:
Therefore, in either case, we have shown that ∃x (P (x) → Q(x)) is
true, so we have established that ∀x P (x) →∃x Q(x) →∃x (P (x) a) It is not the case that if it snows today, then I will go skiing
→ Q(x)). tomorrow.
b) There is at least one person in this class who does not
understand mathematical induction.
Since we have shown both directions, we conclude that ∃x (P (x)
→ Q(x)) and ∀x P (x) →∃x Q(x) always have the same truth value. c) All students in this class like discrete mathematics.
d) There exists a mathematics class in which no student falls asleep
during lectures.
30. If ∀y ∃x P (x, y) is true, does it necessarily follow that
∃x ∀y P (x, y) is true?
33. Express this statement using quantifiers: “Every student
Answer:
in this class has taken some course in every department
No, it does not necessarily follow that ∃x ∀y P(x, y) is true.
in the school of mathematical sciences.”
Answer:
The statement ∀y ∃x P(x, y) means that for every value of y in the
domain, there exists at least one value of x that makes P(x, y) true. Let the domain be the set of all students in this class.
This does not guarantee that there is a single value of x that makes
Let P(x, y, z) be the propositional function "student x has taken
P(x, y) true for all y in the domain.
course y in department z".
Then the statement can be expressed as:
For example, suppose the domain is the set of all real numbers, and
∀x∃y∀zP(x,y,z)
P(x, y) is the statement "x + y = 1". Then for any y, there exists an
x (namely, x = 1 - y) such that P(x, y) is true, because (1 - y) + y = which means for every student in this class, there exists a course
1. However, there is no single value of x that makes P(x, y) true for such that the student has taken that course in every department in
all y (since the equation x + y = 1 has infinitely many solutions, the school of mathematical sciences.
one for each value of y). Therefore, the statement ∃x ∀y P(x, y) is
false.
34. Express this statement using quantifiers: “There is a building
on the campus of some college in the United States in
31. If ∀x ∃y P (x, y) is true, does it necessarily follow that
which every room is painted white.”
∃x ∀y P (x, y) is true?
Answer:
Answer: Let B(x) be the propositional function "x is a building on a campus
of some college in the United States" and R(x) be the propositional
No, it does not necessarily follow that ∃x ∀y P(x,y) is true. function "every room in x is painted white". Then the statement
can be expressed as:
∃x(B(x) ∧∀y(y is a room in x → R(y))) To prove this statement, we can use a proof by contrapositive. That
is, we will show that if x is rational, then x3 is rational.
∃!x∈This class,∃!y∈Mathematics classes at this school,x has taken 39. Prove that if x is irrational and x ≥ 0, then √x is irrational.
y. Answer:
Without using the uniqueness quantifier: Proof: We will prove this statement by contradiction.
∃x∈Thisclass,∃y∈Mathematics classes at this school,∀z∈This
class,∀w∈Mathematics classes at this school,ifx≠z and y≠w, then x
has not taken w and z has not taken y, but x has taken y. Assume that x is irrational and x ≥ 0, but √x is rational. Then, by
definition, there exist two coprime integers p and q (where q ≠ 0)
This uses a series of universal quantifiers to ensure that no other such that √x = p/q.
student has taken the specified math class, and no other math class
has been taken by the specified student.
Squaring both sides of this equation yields x = p^2/q^2. Since p
and q are coprime, p^2 is also coprime with q^2. Therefore, if x is
36. Describe a rule of inference that can be used to prove that rational, then p^2/q^2 can be written in the form r/s where r and s
there are exactly two elements x and y in a domain such are coprime integers and s ≠ 0. But this would imply that √x = r/s,
which contradicts our assumption that √x is irrational. Hence, our
that P (x) and P (y) are true. Express this rule of inference assumption that √x is rational must be false.
as a statement in English.
Answer: Therefore, we have shown that if x is irrational and x ≥ 0, then √x
is irrational.
Describe a rule of inference that can be used to prove that
there are exactly two elements x and y in a domain such
40. Prove that given a nonnegative integer n, there is a unique
that P (x) and P (y) are true. Express this rule of inference
nonnegative integer m such that m2 ≤ n < (m + 1)2.
as a statement in English.
Answer:
We will prove the existence and uniqueness of such an integer m
37. Use rules of inference to show that if the premises
using the well-ordering principle.
∀x(P (x) → Q(x)), ∀x(Q(x) → R(x)), and ¬R(a),
Answer:
41. Prove that there exists an integer m such that m2 > 101000. for square in squares:
Is your proof constructive or nonconstructive? if sum(1 for x in squares if x == square) > 1:
Answer: print(square)
We can prove the existence of an integer m such that m^2 > break
10^1000 by contradiction.
When we run this program, we find that the integer 325 can be
Assume that there is no such integer m. This means that for every written as the sum of squares of positive integers in two different
integer m, we have m^2 ≤ 10^1000. ways: 325 = 1^2 + 18^2 = 5^2 + 16^2.
Consider the set of integers S = {1, 2, 3, ..., 10^500}. This set Therefore, we have proven that there exists a positive integer that
contains 10^500 + 1 integers. can be written as the sum of squares of positive integers in two
different ways. This proof is constructive, since we have provided
an algorithm to find such an integer.
Let us square each of these integers: 1^2, 2^2, 3^2, ..., (10^500)^2.
Each of these squares is less than or equal to (10^500)^2 =
10^1000. 43. Disprove the statement that every positive integer is thesum of
the cubes of eight nonnegative integers.
Answer:
Thus, each integer in the set S has a square less than or equal to
10^1000. We can disprove this statement by finding a counterexample, that
is, a positive integer that cannot be written as the sum of the cubes
of eight nonnegative integers. One such example is the number 23.
But S contains 10^500 + 1 integers, which is greater than 10^1000.
This contradicts the fact that every integer less than or equal to
10^1000 has a square less than or equal to 10^1000. To see why, note that the cube of any nonnegative integer is either
0 (if the integer is 0) or a positive integer of the form 1, 8, 27, 64,
125, 216, and so on. Since 23 is not equal to the sum of eight
Therefore, there must exist an integer m such that m^2 > 10^1000. positive integers of this form, it cannot be written as the sum of the
cubes of eight nonnegative integers.
42. Prove that there is a positive integer that can be written 44. Disprove the statement that every positive integer is thesum of
at most two squares and a cube of nonnegativeintegers.
as the sum of squares of positive integers in two different ways.
(Use a computer or calculator to speed up your Answer:
Then, we can iterate through the set and count the number of times
each sum appears. If we find a sum that appears twice, then we Since 23 is not equal to the sum of any two of these squares, it
have found a positive integer that can be written as the sum of cannot be written as the sum of two squares.
squares of positive integers in two different ways.
46. Assuming the truth of the theorem that states that √n print(f"The conditional statement p -> q is {conditional}")
isirrational whenever n is a positive integer that is not aperfect print(f"The biconditional statement p <-> q is {biconditional}")
square, prove that √2 + √3 is irrational.
Answer:
The program prompts the user to enter the truth values of
To prove that $\sqrt{2} + \sqrt{3}$ is irrational, we assume the propositions p and q and then computes the truth values of the
opposite, that $\sqrt{2}+\sqrt{3}$ is rational. Therefore, there exist conjunction, disjunction, exclusive or, conditional statement, and
integers $a$ and $b$, with $b\neq 0$, such that $\sqrt{2}+\ biconditional of these propositions using Python's logical operators
sqrt{3}=\frac{a}{b}$. (and, or, !=, not, and ==). Finally, the program prints the results to
the console.
To use this program, you can call the ‘is_satisfiable’ function with
Here's how you can use the function to find the bitwise operations a propositional formula as a string argument, like this:
of two bit strings of length ‘n:
str1 = "101010" formula = "(p and q) or (not p and not q)"
str2 = "110011" print(is_satisfiable(formula)) # prints True
and_str, or_str, xor_str = bitwise_operations(str1, str2)
print("Bitwise AND:", and_str) formula = "p and not p"
print("Bitwise OR:", or_str) print(is_satisfiable(formula)) # prints False
print("Bitwise XOR:", xor_str)
Note that the program assumes that the input formula is a valid
Output: Python expression, with propositional variables represented as
single uppercase or lowercase letters, and logical operators
Bitwise AND: 100010 represented as and, or, not, xor, etc. If the input formula contains
other symbols or operators, you may need to preprocess or parse it
Bitwise OR: 111011
before passing it to the program.
Bitwise XOR: 011001
def is_satisfiable(formula):
def fuzzy_disjunction(p, q):
# Get a list of unique variables in the formula
return max(p, q)
def play_game(m, n):
# Example usage board = initialize_board(m, n)
p = 0.8 players = [1, 2]
q = 0.6 random.shuffle(players)
print("Welcome to the game of Chomp!")
print("p and q:", fuzzy_conjunction(p, q)) print_board(board)
print("p or q:", fuzzy_disjunction(p, q)) while True:
for player in players:
The fuzzy_conjunction function takes the minimum of the truth row, col = get_move(player, board)
values of p and q to find the truth value of the conjunction, and the
fuzzy_disjunction function takes the maximum of the truth values apply_move((row, col), board)
of p and q to find the truth value of the disjunction. print_board(board)
if board[0][0] == 0:
Note that in fuzzy logic, truth values range between 0 and 1, where print(f"Player {player} wins!")
0 represents complete falsity and 1 represents complete truth.
return
Answer:
Here's a possible implementation of the game of Chomp in Python: This program uses a nested list to represent the game board, with 0
representing the poisoned square and 1 representing a regular
import random square. The program initializes the board, shuffles the order of the
players, and alternates between them until one of them eats the
poisoned square, at which point the game ends and the other player
def print_board(board): wins.
for row in board:
print(' '.join(map(str, row))) 6. Given a portion of a checkerboard, look for tilings of this
checkerboard with various types of polyominoes, including
dominoes, the two types of triominoes, and larger polyominoes.
def initialize_board(m, n): Answer:
board = [[1] * n for _ in range(m)] Here is a possible program that can find tilings of a checkerboard
board[0][0] = 0 # the bottom-left corner is the poisoned square with polyominoes:
return board
1. Define the checkerboard as an n x m grid, where each
cell can be either black or white.
def get_move(player, board): 2. Define the polyominoes as a set of shapes that can be
placed on the checkerboard.
while True:
3. Define a function that takes a partial tiling of the
print(f"Player {player}, enter your move (row column):") checkerboard as input and returns all possible ways to
extend the tiling with one more polyomino.
row, col = map(int, input().split()) 4. Define a function that checks if a tiling of the
if board[row][col] == 0: checkerboard is valid, i.e., if no two polyominoes
overlap and all cells of the checkerboard are covered.
print("Sorry, you cannot eat the poisoned square.") 5. Define a recursive function that generates all possible
tilings of the checkerboard by iteratively calling the
elif row == 0 and col == 0:
function from step 3 and checking the validity of the
print("Sorry, you cannot eat the bottom-left corner.") resulting tilings using the function from step 4.
6. Output all valid tilings found by the function from step
else: 5.
return row, col Note that this program can be quite computationally intensive,
especially for larger checkerboards and more complex polyomino
shapes. Therefore, various optimization techniques, such as
def apply_move(move, board): memoization, pruning, and parallelization, can be used to speed up
the search process.
row, col = move
for i in range(row, len(board)):
for j in range(col, len(board[i])):
board[i][j] = 0
print("Found:", n)
break
n += 1
1. Look for positive integers that are not the sum of the cubes of
nine different positive integers. This means that 24153319581254312065344 is not the sum of the
Answer: cubes of nine different positive integers, and therefore is a positive
integer that meets the requirement of the problem.
We can use a computer program to search for such positive
integers. Here is an example Python code:
n=1 2. Look for positive integers greater than 79 that are not the sum of
the fourth powers of 18 positive integers.
while True:
Answer:
cubes = []
Let's assume that there exists a positive integer greater than 79 that
for i in range(1, 10): can be written as the sum of the fourth powers of 18 positive
integers. We will use this assumption to derive a contradiction,
cubes.append(i**3)
which will prove that such an integer does not exist.
found = False
for i in range(1, 10):
Let N be a positive integer greater than 79 that can be written as
for j in range(i+1, 10): the sum of the fourth powers of 18 positive integers. Then we
have:
for k in range(j+1, 10):
for l in range(k+1, 10):
N = a1^4 + a2^4 + ... + a18^4
for m in range(l+1, 10):
for o in range(m+1, 10):
where a1, a2, ..., a18 are positive integers. Without loss of
for p in range(o+1, 10): generality, we can assume that a1 ≤ a2 ≤ ... ≤ a18.
for q in range(p+1, 10):
if n == cubes[i-1]+cubes[j-1]+cubes[k- Since 2^4 + 2^4 + 2^4 + 2^4 = 16 < 79, we know that each of the
1]+cubes[l-1]+cubes[m-1]+cubes[o-1]+cubes[p-1]+cubes[q-1]: terms a1^4, a2^4, ..., a18^4 must be greater than or equal to 16.
found = True Therefore:
break
if found: N ≥ 18 × 16 = 288
break
if found: This means that any integer that can be written as the sum of the
fourth powers of 18 positive integers must be at least 288.
break
if found:
However, we can also use the fact that:
break
if found:
a^4 ≡ 0 or 1 (mod 5)
break
if found:
for any integer a. This can be proved by considering the possible
break remainders of a when divided by 5.
if found:
break Using this fact, we can see that:
if found:
break N ≡ a1^4 + a2^4 + ... + a18^4 ≡ 0, 1, 2, 3, or 4 (mod 5)
if not found:
Now, we will consider all integers greater than 79 and less than
288. There are only 208 such integers, and we can check each one
of them to see if it can be written as the sum of the fourth powers This program searches for integers between 1 and 100,000 that can
of 18 positive integers. For each integer that cannot be so be written as the sum of cubes of positive integers in two different
expressed, we will mark it with an "X" in the table below: ways. Here are some of the results:
for n in range(1, 100000): 1. For a 2x2 grid of cookies, the first player can take the
cookie in the bottom right corner. The second player
# Find all pairs of positive integers (a, b) such that a^3 + b^3 = n
will be forced to take the cookie in the top left corner,
pairs = [] and the first player will win by taking the remaining
cookie in the bottom left corner.
for a in range(1, int(n**(1/3))+1):
b = round((n - a**3)**(1/3))
2. For a 3x3 grid of cookies, the first player can take the
if a**3 + b**3 == n: cookie in the bottom right corner. The second player
pairs.append((a, b)) will be forced to take the cookie in the bottom row that
is not adjacent to the corner cookie. The first player can
then take the cookie in the top right corner, leaving the
second player with a 2x2 grid. From there, the first
# Check if there are at least two different pairs of positive
player can use the strategy from example 1 to win.
integers
if len(pairs) >= 2 and len(set(pairs)) == 2:
3. For a 4x4 grid of cookies, the first player can take the
print(n, pairs)
cookie in the bottom right corner. The second player
will be forced to take the cookie in the second row from X
the bottom and second column from the right. The first XX
player can then take the cookie in the bottom row and X
second column from the right. The second player will 8. W-shaped pentomino:
be forced to take the cookie in the top row and second X X
column from the right. The first player can then take the XX
cookie in the top row and second column from the left, XX
leaving the second player with a 3x3 grid. From there, 9. X-shaped pentomino:
the first player can use the strategy from example 2 to X
win. XXX
X
10. Y-shaped pentomino:
4. For a 5x5 grid of cookies, the first player can take the XX
cookie in the bottom right corner. The second player X
will be forced to take the cookie in the third row from X
the bottom and third column from the right. The first X
player can then take the cookie in the second row from X
the bottom and second column from the right. The 11. Z-shaped pentomino:
second player will be forced to take the cookie in the XX
top row and third column from the right. The first X
player can then take the cookie in the second row from X
the top and third column from the left, leaving the X
second player with a 4x4 grid. From there, the first X
player can use the strategy from example 3 to win. 12. F-shaped pentomino:
XX
X
XX
Note that these winning strategies assume that both players are
X
playing optimally and will not make any mistakes. If one player
makes a mistake, the other player may be able to take advantage of 6. Find all the rectangles of 60 squares that can be tiled using every
it and win. one of the 12 different pentominoes.
Answer:
5. Construct the 12 different pentominoes, where a pentomino is a To find all the rectangles of 60 squares that can be tiled using
polyomino consisting of five squares. every one of the 12 different pentominoes, we can start by listing
all the possible dimensions of the rectangle. Since a rectangle with
Answer:
an odd number of squares cannot be tiled using pentominoes (since
Here are the 12 different pentominoes: each pentomino covers an odd number of squares), we only need
to consider rectangles with an even number of squares.
The factors of 60 are 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, and 60. We
1. I-shaped pentomino: can eliminate the factors 1 and 2, since a rectangle with only 1 or 2
X squares cannot be tiled with any pentomino. We can also eliminate
X the factors 4 and 6, since a rectangle with 4 or 6 squares can only
X be tiled with a single pentomino, and we need to use all 12
X pentominoes.
X
2. L-shaped pentomino: This leaves us with the following possible dimensions for the
X rectangle: 3x20, 4x15, 5x12, 10x6, and 30x2. We can check that all
X of these rectangles can indeed be tiled using every one of the 12
X different pentominoes.
XX
3. N-shaped pentomino:
XX For example, here is one way to tile a 5x12 rectangle using all 12
X pentominoes:
X
X NNNNNRTTUUV
X OOORRQTTUUV
4. P-shaped pentomino:
XX OOOPQQQSXVV
XX
X OOOPPPSSXXV
X LLLPPSZZZYX
5. T-shaped pentomino:
XXX LLLWWWZZYYX
X
MMMWWWZZYXX
X
6. U-shaped pentomino: MMMCCWWZZXY
X X
XXX CCCEFXXXXY
GGGEEFHHXY
7. V-shaped pentomino:
X GGGEEFFHHH
X
GGGBBFFFFH
Note that the letters represent the different pentominoes, and each
pentomino is represented by a different letter. Also, some of the
pentominoes are reflected or rotated to fit into the rectangle.
Writing Projects One solution to this paradox is to recognize that it assumes a self-
contained universe, where the barber and the villagers are the only
1. Discuss logical paradoxes, including the paradox of Epimenides entities. However, if we expand the universe to include other
the Cretan, Jourdain’s card paradox, and the barber paradox, and barbers and villagers, the paradox disappears. In this view, the
how they are resolved. paradox arises from a category mistake, where the barber is treated
Answer: as both a member and a non-member of the set of men who do not
shave themselves.
ogical paradoxes are statements or arguments that lead to a
contradiction or an absurdity when analyzed logically. They
challenge the consistency and coherence of a logical system and In conclusion, logical paradoxes are fascinating puzzles that
often raise philosophical questions about the nature of truth, challenge our understanding of language, truth, and meaning. They
meaning, and language. In this response, I will discuss three well- often lead to profound philosophical questions and require careful
known paradoxes and their resolutions. analysis to resolve them.
1. Paradox of Epimenides the Cretan: This paradox is also 2. Describe how fuzzy logic is being applied to practical
known as the Liar Paradox, which was first formulated applications. Consult one or more of the recent books on
by the ancient Greek philosopher Epimenides. The
paradox arises when a Cretan says, "All Cretans are fuzzy logic written for general audiences.
liars." If the statement is true, then the Cretan who
made it is also a liar, which means that the statement is Answer:
false. But if the statement is false, then there is at least Fuzzy logic has found numerous practical applications across a
one truthful Cretan, which contradicts the statement. wide range of fields, from engineering to medicine to finance. One
Thus, the statement is both true and false at the same major application of fuzzy logic is in control systems, where it is
time, leading to a paradox. used to model and control complex systems that are difficult to
One resolution of this paradox is to reject the principle of describe using traditional binary logic. For example, fuzzy logic is
bivalence, which states that every statement must be either true or used in the control of HVAC systems, traffic control systems, and
false. Another solution is to distinguish between sentences and industrial automation systems.
statements, where a sentence is a string of words, and a statement
is a meaningful assertion. In this view, the paradox arises when a
sentence refers to itself, creating a circular reference that leads to a Fuzzy logic is also being used in artificial intelligence and machine
contradiction. Thus, the paradox is resolved by denying self- learning, particularly in the development of fuzzy expert systems
reference in language. that can reason with imprecise or uncertain information. These
systems can be used for tasks such as decision-making, data
analysis, and pattern recognition.
2. Jourdain's card paradox: This paradox involves a set of
cards that have a letter on one side and a number on the
other side. The cards are arranged in two piles, one with In finance, fuzzy logic is used in risk analysis and portfolio
letters facing up, and the other with numbers facing up. optimization, where it can help to model the uncertainty and
The paradox arises when a person selects a card from complexity of financial markets. In medical diagnosis and
the letter pile and turns it over to reveal a number. decision-making, fuzzy logic can be used to help doctors and other
Then, the person selects a card from the number pile healthcare professionals make more accurate diagnoses and
and turns it over to reveal a letter. The question is treatment decisions based on incomplete or uncertain information.
whether the letters on the selected cards spell a
meaningful sentence.
Overall, the versatility and flexibility of fuzzy logic make it a
One solution to this paradox is to recognize that the paradox arises
useful tool in a wide range of applications where traditional binary
from a confusion between syntax and semantics. The letters and
logic may not be sufficient to capture the complexity and
numbers on the cards have different syntactic and semantic
uncertainty of real-world systems and data.
properties, and they cannot be combined arbitrarily. Thus, the
paradox is resolved by respecting the rules of syntax and semantics
in constructing meaningful sentences.
3. Describe some of the practical problems that can be modeled as
satisfiability problems.
3. Barber paradox: This paradox involves a barber who Answer:
shaves all men in a village who do not shave
themselves. The question is whether the barber shaves Satisfiability problems (SAT) involve determining whether a given
himself. If he does, then he is not a man who does not Boolean formula can be satisfied or not, i.e., whether there exists a
shave himself, and he should not shave himself variable assignment that makes the formula true. SAT problems
according to the rule. But if he does not shave himself, have been shown to be useful in modeling a wide range of
then he is a man who does not shave himself, and he practical problems, including:
should shave himself according to the rule. Thus, the
paradox arises from a self-referential rule that leads to a
contradiction. 1. Circuit design: The problem of determining whether a
given Boolean circuit can be designed to perform a
specific function can be modeled as a SAT problem.
appear in the same two cells. If these two cells are in
the same box, then that number cannot appear in any
2. Software testing: The problem of generating test cases other cells in that box.
for a software program that satisfy specific
requirements can be modeled as a SAT problem.
5. Swordfish: This technique is similar to X-wing, but
involves three rows or three columns. If a particular
3. Cryptography: The problem of breaking cryptographic number can only appear in the same three cells in these
codes by finding the key that encrypts a given message three rows or columns, then that number cannot appear
can be modeled as a SAT problem. in any other cells in those rows or columns.
4. Scheduling: The problem of scheduling tasks subject to 6. Chains: This technique involves linking cells together
certain constraints can be modeled as a SAT problem. based on the possible numbers they can contain. For
example, if cell A can contain either 1 or 2, and cell B
can contain either 2 or 3, then cell C cannot contain 1
5. Combinatorial optimization: The problem of finding the because it would create a chain of A-1-B-3, which
optimal solution to a combinatorial optimization would violate the rules of Sudoku.
problem, such as the traveling salesman problem, can
be modeled as a SAT problem.
These techniques can be used alone or in combination to solve
even the most difficult Sudoku puzzles without the use of a
6. Planning: The problem of planning a sequence of computer.
actions to achieve a goal subject to certain constraints
can be modeled as a SAT problem.
5. Describe the basic rules of WFF’N PROOF, The Game of
7. Artificial intelligence: The problem of reasoning about Modern Logic, developed by Layman Allen. Give examples of
uncertain or incomplete information can be modeled as some of the games included in WFF’N PROOF.
a fuzzy SAT problem, which allows for partial truth Answer:
values.
WFF'N PROOF is a board game developed by Layman Allen to
teach the basics of propositional and predicate logic. The game is
Overall, SAT problems have been shown to have a wide range of designed to be played by two to six players and can be used to
applications in science, engineering, and industry. teach logic to students of all ages.
4. Describe some of the techniques that have been devised The game is played on a board with 81 squares arranged in a 9x9
grid. Each square contains a letter or symbol that represents a
to help people solve Sudoku puzzles without the use of a logical connective or a variable. The players take turns building
logical formulas on the board using the symbols.
computer.
Answer:
The basic rules of WFF'N PROOF are as follows:
Sudoku is a logic-based puzzle that requires no mathematical or
arithmetical skills to solve. There are several techniques that have
been devised to help people solve Sudoku puzzles without the use
of a computer. Some of these techniques are: 1. Players take turns building logical formulas on the
board.
2. Formulas can be built by placing symbols in the squares
on the board.
1. Scanning: This technique involves scanning the rows,
3. Each formula must be a well-formed formula (WFF),
columns, and boxes to find out where a particular
which means that it must follow the rules of
number can be placed. The goal is to identify cells that
propositional or predicate logic.
have only one possible number, and to fill them in.
4. Players can use parentheses to group symbols and
create more complex formulas.
5. The first player to build a valid formula that satisfies a
2. Elimination: This technique involves eliminating given condition (such as being a tautology or a
possible numbers from cells based on what is already contradiction) wins the game.
present in the row, column, or box. For example, if a
row already has 1, 2, and 3, then you can eliminate Some examples of the games included in WFF'N PROOF are:
those numbers from the remaining cells in that row.
Answer:
Automated theorem proving (ATP) is the process of using One approach to DNA computing for SAT involves the use of a
computers to automatically and mechanically prove mathematical DNA library, which is a collection of DNA molecules that encode
theorems without human intervention. The primary goal of ATP is all possible combinations of truth assignments to the propositional
to develop algorithms and systems capable of proving variables in the Boolean formula. The library is then screened
mathematical theorems, which could be used to solve complex using DNA probes that are designed to detect the presence or
mathematical problems and verify the correctness of computer absence of specific sequences that correspond to satisfying
programs. assignments of the formula. The result of the screening is a set of
DNA sequences that correspond to satisfying assignments of the
formula.
One of the most significant applications of ATP is in the field of
artificial intelligence, where it is used to develop intelligent agents
capable of problem-solving and decision-making. It is also used in Another approach to DNA computing for SAT involves the use of
software engineering to verify the correctness of computer DNA strand displacement reactions, which can be used to
programs, particularly in safety-critical systems like aerospace and implement logical gates and circuits that mimic the behavior of
medical devices. Boolean functions. The Boolean formula is encoded into a network
of DNA strands that interact through strand displacement reactions
to produce a final output that corresponds to a satisfying
assignment of the formula.
ATP has made significant progress in the past few decades, and
several automated theorem provers have been developed. One of
the earliest ATP systems, called the resolution theorem prover, was
developed in the 1960s by Robinson. It was based on the DNA computing has been used to solve small instances of the SAT
resolution principle, which is a fundamental inference rule in problem, typically involving fewer than 10 variables. While DNA
propositional logic. computing is still in the experimental stage and is not yet practical
for solving large-scale SAT problems, it has the potential to
provide a new approach to solving computational problems that is
fundamentally different from traditional digital computing.
Other automated theorem provers that have been developed
include Otter, which is a theorem prover based on resolution and
paramodulation, and E, which is a higher-order logic theorem
prover based on a combination of techniques, including backward 11. Look up some of the incorrect proofs of famous open
chaining and model elimination. More recently, machine learning- questions and open questions that were solved since 1970
based approaches have been applied to ATP, including the use of and describe the type of error made in each proof.
deep learning models for theorem proving. Answer: