You are on page 1of 155

NAMA :ANDIKA SOPIAN SAMOSIR

NPM : 2202050009
PRODI : ILMU KOMPUTER

PROGRAM STUDI S1 ILMU KOMPUTER


FAKULTAS MATEMATIKA DAN ILMU PENGETAHUAN ALAM
UNIVERSITAS HKBP NOMMENSEN PEMATANG SIANTAR
2022/2023
Section 1.1 Propositional Logic – Exercises
1. Which of these sentences are propositions? What are 5. What is the negation of each of these propositions?
thetruthvaluesof those that are propositions?
a) Steve has more than 100 GB free disk space on hislaptop.
a) Boston is the capital of Massachusetts. b) Zach blocks e-mails and texts from Jennifer.
b) Miami is the capital of Florida. c) 7 · 11 · 13 = 999.
c) 2 + 3 = 5. d) Diane rode her bicycle 100 miles on Sunday.
d) 5 + 7 = 10. Answer:
e) x + 2 = 11.
f ) Answer this question. a. The negation of "Steve has more than 100 GB free disk
Answer : space on his laptop" is "Steve does not have more than
100 GB free disk space on his laptop" or "Steve has 100
1. a and d : true GB or less free disk space on his laptop."
2. b and c : false b. The negation of "Zach blocks e-mails and texts from
3. e and f not a proposition Jennifer" is "Zach does not block e-mails and texts from
Jennifer" or "Zach allows e-mails and texts from
Jennifer."
2. Which of these are propositions?What are the truth valuesof
c. The negation of "7 • 11 • 13 = 999" is "7 • 11 • 13 ≠ 999"
those that are propositions?
or "7 • 11 • 13 is not equal to 999."
a) Do not pass go.
d. The negation of "Diane rode her bicycle 100 miles on
b) What time is it?
Sunday" is "Diane did not ride her bicycle 100 miles on
c) There are no black flies in Maine.
Sunday" or "Diane rode her bicycle fewer than 100 miles
d) 4 + x = 5.
on Sunday."
e) The moon is made of green cheese.
f ) 2n ≥ 100. 6. Suppose that SmartphoneA has 256 MB RAM and 32
Answer: GBROM, and the resolution of its camera is 8 MP;
Smartphone B has 288 MB RAM and 64 GB ROM, and
a) "Do not pass go" is a command or an imperative
theresolution of its camera is 4 MP; and Smartphone C has128
sentence, not a proposition.
MB RAM and 32 GB ROM, and the resolution ofits camera is
b) "What time is it?" is a question, not a proposition.
c) "There are no black files in Mine" is a proposition. Its 5 MP. Determine the truth value of each ofthese propositions.
truth value depends on whether there are any black files a) Smartphone B has the most RAM of these three
in Mine. smartphones.
d) "4 + x = 5" is a proposition. Its truth value depends on
the value of x. b) Smartphone C has more ROM or a higher resolutioncamera
e) "The moon is made of green cheese" is a proposition. Its than Smartphone B.
truth value is false.
f) "2n ≥ 100" is a proposition. Its truth value depends on c) Smartphone B has more RAM, more ROM, and ahigher
the value of n. resolution camera than Smartphone A.
d) If Smartphone B has more RAM and more ROM
3. What is the negation of each of these propositions? thanSmartphone C, then it also has a higher
a) Mei has an MP3 player. resolutioncamera.
b) There is no pollution in New Jersey.
c) 2 + 1 = 3. e) Smartphone A has more RAM than Smartphone B ifand only
d) The summer in Maine is hot and sunny. if Smartphone B has more RAM than Smartphone A.
Answer: Answer:
a. The negation of "Mei has an MP3 player" is "Mei does 1. a and b : true
not have an MP3 player." 2. c, d and e : false
b. The negation of "There is no pollution in New Jersey" is
"There is pollution in New Jersey." 7. Suppose that during the most recent fiscal year, the annual
c. The negation of "2 + 1 = 3" is "2 + 1 ≠ 3" or "2 + 1 is not revenue of Acme Computer was 138 billion dollarsand its net
equal to 3." profit was 8 billion dollars, the annual revenueof Nadir
d. The negation of "The summer in Maine ishot and sunny" Software was 87 billion dollars and its net profitwas 5 billion
is "The summer in Maine is not hot and sunny" or "The dollars, and the annual revenue of QuixoteMedia was 111
summer in Maine is cool and cloudy." billion dollars and its net profit was13 billion dollars.
Determine the truth value of each ofthese propositions for the
4. What is the negation of each of these propositions?
most recent fiscal year.
a) Jennifer and Teja are friends.
a) Quixote Media had the largest annual revenue.
b) There are 13 items in a baker’s dozen.
b) Nadir Software had the lowest net profit and
c) Abby sent more than 100 text messages every day.
AcmeComputer had the largest annual revenue.
d) 121 is a perfect square
c) Acme Computer had the largest net profit or QuixoteMedia
Answer:
had the largest net profit.
a) The negation of "Jennifer and Teja are friends" is d) If Quixote Media had the smallest net profit, thenAcme
"Jennifer and Teja are not friends." Computer had the largest annual revenue.
b) The negation of "There are 13 items in a baker's dozen" is e) Nadir Software had the smallest net profit if and onlyif
"There are not 13 items in a baker's dozen" or "A baker's Acme Computer had the largest annual revenue.
dozen does not have 13 items." Answer:
c) The negation of "Abby sent more than 100 text messages
1. a : false
every day" is "Abby did not send more than 100 text
2. b, c, d and e : True
messages every day" or "Abby sent 100 or fewer text
messages every day."
d) The negation of "121 is a perfect square" is "121 is not a
perfect square." 8. Let p and q be the propositions
p : I bought a lottery ticket this week. h) Either the votes have not been counted, or the election is not
q : I won the million dollar jackpot. decided and the votes have been counted.
Express each of these propositions as an English sentence.
11. Let p and q be the propositions
a) ¬p b) p ∨ q c) p → q
d) p ∧ q e) p ↔ q f )¬p →¬q p : It is below freezing.
g) ¬p ∧¬q h) ¬p ∨ (p ∧ q)
Answer: q : It is snowing.

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?

a) If 1 + 1 = 2, then 2 + 2 = 5. a) To take discrete mathematics, you must have takencalculus


b) If 1 + 1 = 3, then 2 + 2 = 4. or a course in computer science.
b) When you buy a new car fromAcme Motor Company,you c) That the Pistons win the championship implies thatthey
get $2000 back in cash or a 2% car loan. beat the Lakers.
c) Dinner for two includes two items from column A orthree d) It is necessary to walk 8 miles to get to the top ofLong’s
items from column B. Peak.
d) School is closed if more than 2 feet of snow falls or ifthe e) To get tenure as a professor, it is sufficient to be
wind chill is below −100. worldfamous.
Answer: f) If you drive more than 400 miles, you will need to
buygasoline.
a. If the or is an inclusive or, it means that a student can take g) Your guarantee is good only if you bought your CDplayer
discrete mathematics if they have taken calculus, or if they less than 90 days ago.
have taken a course in computer science, or if they have h) Jan will go swimming unless the water is too cold.
taken both. If the or is an exclusive or, it means that a Answer:
student can only take discrete mathematics if they have
taken either calculus or a course in computer science, but a) If the wind blows from the northeast, then it snows.
not both. It is likely that the intended meaning is an b) If it stays warm for a week, then the apple trees will
inclusive or, as a student who has taken both calculus and a bloom.
course in computer science should also be able to take c) If the Pistons win the championship, then they beat the
discrete mathematics. Lakers.
b. If the or is an inclusive or, it means that a customer can get d) To get to the top of Long’s Peak, it is necessary to walk 8
either $2000 back in cash, or they can get a 2% car loan, or miles.
they can get both. If the or is an exclusive or, it means that a e) If a professor is world-famous, then they get tenure.
customer can only get either $2000 back in cash or a 2% car f) If you drive more than 400 miles, then you will need to
loan, but not both. It is not clear which meaning is intended buy gasoline.
without more context. g) If you bought your CD player less than 90 days ago, then
c. If the or is an inclusive or, it means that a dinner for two can your guarantee is good.
include two items from column A, or three items from h) Jan will go swimming unless the water is too cold. (Note:
column B, or one item from column A and two items from This statement is already in "if p, then q" form. We can
column B, or one item from column B and two items from rewrite it as "If the water is not too cold, then Jan will go
column A. If the or is an exclusive or, it means that a dinner swimming.")
for two can only include either two items from column A or
three items from column B, but not both. It is likely that the 24. Write each of these statements in the form “if p, then q”in
intended meaning is an inclusive or, as a dinner for two English. [Hint: Refer to the list of common ways to express
should be flexible in what items are chosen. conditional statements provided in this section.]
d. If the or is an inclusive or, it means that school is closed if a) I will remember to send you the address only if yousend
more than 2 feet of snow falls, or if the wind chill is below me an e-mail message.
−100, or if both of these conditions are met. If the or is an b) To be a citizen of this country, it is sufficient that youwere
exclusive or, it means that school is closed if either more born in the United States.
than 2 feet of snow falls or the wind chill is below −100, but c) If you keep your textbook, it will be a useful referencein
not both. It is likely that the intended meaning is an your future courses.
inclusive or, as both conditions can make it difficult or d) The Red Wings will win the Stanley Cup if their
dangerous for students and staff to travel to school. goalieplays well.
22. Write each of these statements in the form “if p, then q”in e) That you get the job implies that you had the
English. [Hint: Refer to the list of common ways to express bestcredentials.
conditional statements provided in this section.] f ) The beach erodes whenever there is a storm.
g) It is necessary to have a valid password to log on tothe
a) It is necessary to wash the boss’s car to get promoted. server.
b) Winds from the south imply a spring thaw. h) You will reach the summit unless you begin your climbtoo
c) A sufficient condition for the warranty to be good isthat late.
you bought the computer less than a year ago. Answer:
d) Willy gets caught whenever he cheats.
e) You can access the website only if you pay a subscription a) If you send me an e-mail message, then I will remember
fee. to send you the address.
f ) etting elected follows from knowing the right people. b) If you were born in the United States, then you are a
g) Carol gets seasick whenever she is on a boat. citizen of this country.
Answer: c) If you keep your textbook, then it will be a useful
reference in your future courses.
a) If you want to get promoted, then you need to wash the d) If the goalie plays well, then the Red Wings will win the
boss's car. Stanley Cup.
b) If there are winds from the south, then there will be a e) If you had the best credentials, then you get the job.
spring thaw. f) Whenever there is a storm, the beach erodes.
c) If you bought the computer less than a year ago, then the g) If you want to log on to the server, then you must have a
warranty will be good. valid password.
d) If Willy cheats, then he gets caught. h) Unless you begin your climb too late, you will reach the
e) You need to pay a subscription fee if you want to access summit.
the website.
f) If you know the right people, then you can get elected. 25. Write each of these propositions in the form “p if andonly if q”
g) If Carol is on a boat, then she gets seasick. in English.

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

e) (p ⊕ q) ∨ (p ⊕¬q) f ) (p ⊕ q) ∧ (p ⊕¬q) b) ¬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

36. Construct a truth table for each of these compound T F F T T T


propositions. F T T F T F
a) (p ∨ q) ∨ r b) (p ∨ q) ∧ r F T F T T T
c) (p ∧ q) ∨ r d) (p ∧ q) ∧ r F F T F F F
e) (p ∨ q) ∧¬r f ) (p ∧ q) ∨¬r
F F F T T T
Answer:

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

b) ¬p → (q → r) 38. Construct a truth table for ((p → q) → r) → s.


p q r ¬p q→r ¬p → (q → r) Answer:
T T T F T T
T T F F F T
T F T F T T
T F F F T T
F T T T T T
F T F T F F
F F T T T T
F F F 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:

F T T F F T T 1. Assume that p, q, and r have the same truth value. Without


F T F F F F F loss of generality, let us assume that they are all true.
2. In this case, we know that ¬q, ¬r, and ¬p are all false since
F F T T F F F they are negations of true values.
F F F T F T T 3. Therefore, (p ∨ ¬q) is true since at least one of p and ¬q is
true.
4. Similarly, (q ∨ ¬r) is true since at least one of q and ¬r is
f) (¬p ↔ ¬q) ↔ (q ↔ r) true.
p q r ¬p ¬q ¬p ↔ q↔ (¬p ↔ ¬q) ↔ (q 5. Finally, (r ∨ ¬p) is true since at least one of r and ¬p is true.
¬q r ↔ r) 6. Thus, we have shown that (p ∨ ¬q) ∧ (q ∨ ¬r) ∧ (r ∨ ¬p) is
true when p, q, and r have the same truth value.
T T T F F T T T
7. Now, suppose that p, q, and r do not have the same truth 43. Find the bitwise OR, bitwise AND, and bitwise XOR ofeach of
value. Without loss of generality, let us assume that p is true these pairs of bit strings.
and q and r are false.
8. In this case, we know that ¬q and ¬r are both true since they a) 101 1110, 010 0001
are negations of false values. b) 1111 0000, 1010 1010
9. Therefore, (p ∨ ¬q) is true since p is true. c) 00 0111 0001, 10 0100 1000
10. However, (q ∨ ¬r) and (r ∨ ¬p) are both false since both q d) 11 1111 1111, 00 0000 0000
and r are false and p is true. Answer:
11. Thus, we have shown that (p ∨ ¬q) ∧ (q ∨ ¬r) ∧ (r ∨ ¬p) is
false when p, q, and r do not have the same truth value. a)For the bit strings 101 1110 and 010 0001:

 Bitwise OR: 111 1111


41. Explain, without using a truth table, why (p ∨ q ∨ r) ∧(¬p ∨¬q
 Bitwise AND: 000 0000
∨¬r) is true when at least one of p, q, and ris true and at least
one is false, but is false when all threevariables have the same  Bitwise XOR: 111 1111
truth value.
Answer: b) For the bit strings 1111 0000 and 1010 1010:

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?

45. The truth value of the negation of a proposition in fuzzylogic Answer:


is 1 minus the truth value of the proposition. Whatare the truth The assertion "This statement is false" is not a proposition in the
values of the statements “Fred is not happy”and “John is not sense that it cannot be assigned a definite truth value, as it leads to
happy?” a paradox known as the liar paradox.
If we assume the assertion to be true, then it must be false as it
Answer: states that the statement is false. On the other hand, if we assume
The truth values of the statements "Fred is not happy" and "John is the assertion to be false, then it must be true as it contradicts its
not happy" cannot be determined without additional information or own claim of falsity. Therefore, the assertion leads to a self-
context. referential and contradictory statement that cannot be assigned a
In fuzzy logic, the truth value of a proposition is a number between definite truth value.
0 and 1 inclusive, where 0 represents absolute falsehood and 1 In general, propositions must be able to be assigned a definite truth
represents absolute truth. The truth value of the negation of a value of either true or false. Since the assertion "This statement is
proposition is 1 minus the truth value of the original proposition. false" leads to a paradox and cannot be assigned a definite truth
Therefore, if the truth value of the original proposition "Fred is value, it cannot be considered a proposition.
happy" is 0.8, then the truth value of its negation "Fred is not
happy" would be 0.2. 49. The nth statement in a list of 100 statements is “Exactlyn of
However, without knowing the truth value of the original
the statements in this list are false.”
propositions "Fred is happy" and "John is happy," we cannot
a) What conclusions can you draw from these statements?
determine the truth values of their negations. Additionally, it is
worth noting that in natural language, the meaning of a negated b) Answer part (a) if the nth statement is “At least n of the
statement may not always be the opposite of the original statement. statements in this list are false.”
For example, "Fred is not happy" could mean that Fred is neutral c) Answer part (b) assuming that the list contains
or content, rather than unhappy. 99statements.
Answer:

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)."

d) The statement can be expressed as: (r ∧ ¬p) → q, using the


conditional and conjunction connectives. Symbolically, it would be
7. Express these system specifications using the propositions p
represented as (r ∧ ~p) → q. In English, it means that if the user
“The message is scanned for viruses” and q “Themessage was
has not entered a valid password but has paid the subscription fee,
sent from an unknown system” togetherwith logical then access is granted.
connectives (including negations).
a) “The message is scanned for viruses whenever 9.Are these system specifications consistent? "The system is in
themessagewas sent from an unknown system.” multiuser state if and only if it is operating normally. If the system
b) “The message was sent from an unknown system butit was is operating normally, the kernel is functioning. The kernel is
not scanned for viruses.” disabled or the system is in interrupt mode. If the system is not in
c) “It is necessary to scan the message for viruses whenever it multiuser state, then it is in interrupt mode. System is not disturbed
was sent from an unknown system.” mode."
d) “When a message is not sent from an unknown systemit is Answer:
not scanned for viruses.”
The system specifications are not consistent.
Let p denote "The system is in multiuser state"
Let q denote "The system is operating normally" For the last specification to be true, s has to be false.
Let r denote "The kernel is functioning" If s is false, ¬p has to be false in order for the fourth specification
Let s denote "The system is in interrupt mode" to be true. Therefore p has to be true.
Also, if s is false, in order for the third statement to be true, ¬r has
The system specification are as follows: to be true. Therefore r has to be false.
1) The system is in multiuser state if and only if it is operating
normally - p↔q If r is false, q has to be false (to satisfy the second specification).
2) If the system is operating normally, the kernel is functioning - But, if q is false, p also has to be false (to satisfy the first
q→r specification).
3) The kernel is not functioning or the system is in interrupt mode.
- ¬r∨s We have arrived to a contradiction, stating that p has to be true and
4) If the system is not in multiuser state, then it is in interrupt false. Therefore, the system specifications are not consistent.
mode. - ¬p→s
5) The system is not in interrupt mode. - ¬s
10. Are these system specifications consistent? “Wheneverthe contradicts the third statement by stating that new messages will
system software is being upgraded, users cannot access the file not be sent to the message buffer.
system. If users can access the file system,then they can save new
Furthermore, the second statement contradicts the first statement
files. If users cannot save newfiles, then the system software is not
by stating that if the file system is not locked, the system is
being upgraded.” functioning normally. However, the first statement implies that
Answer: new messages will only be queued if the file system is not locked,
suggesting that the system may not be functioning normally in this
These system specifications are consistent. Each statement is case.
logically compatible with the others and there is no direct
contradiction between them. Additionally, the logical connections Therefore, due to these inconsistencies, these system specifications
between each statement are well-defined and follow logically from are not consistent.
one to the next. Therefore, the system specifications are consistent.
The first statement states that users cannot access the file system 13. What Boolean search would you use to look for Webpages
whenever the system software is being upgraded. The second about beaches in New Jersey? What if you wantedto find Web
statement states that if users can access the file system, then they
pages about beaches on the isle of Jersey (inthe English Channel)?
can save new files. The third statement states that if users cannot
save new files, then the system software is not being upgraded. Answer:
These statements are all logically compatible and consistent with
each other. To find webpages about beaches in New Jersey, you could use the
Boolean search query "beaches AND New Jersey". This will
retrieve results that include both the keywords "beaches" and "New
11. Are these system specifications consistent? “The routercan Jersey".
send packets to the edge system only if it supports thenew address
space. For the router to support the new address space it is To find webpages about beaches on the isle of Jersey in the
necessary that the latest software releasebe installed. The router English Channel, you could use the Boolean search query "beaches
can send packets to the edge system if the latest software release is AND Jersey AND English Channel". This will retrieve results that
installed, Therouterdoes not support the new address space.” include all three keywords, and help to differentiate from results
related to New Jersey.
Answer:

These system specifications are not consistent. There is a direct


14. What Boolean search would you use to look for Webpages
contradiction between the second and third statements. The second
statement states that for the router to support the new address about hiking in West Virginia? What if you wantedto find Web
space, the latest software release must be installed. The third pages about hiking inVirginia, but not in WestVirginia?
statement, however, states that the router does not support the new Answer:
address space. Therefore, these statements cannot all be true at the
same time. To find webpages about hiking in West Virginia, you could use the
Boolean search query "hiking AND West Virginia". This will
This inconsistency makes it impossible to determine whether the
retrieve results that include both the keywords "hiking" and "West
router can send packets to the edge system or not. Therefore, these
Virginia".
system specifications are not consistent.
To find webpages about hiking in Virginia but not in West
Virginia, you could use the Boolean search query "hiking AND
12. Are these system specifications consistent? “If the filesystem is
Virginia NOT West Virginia". This will retrieve results that
not locked, then new messages will be queued.If the file system is include the keyword "hiking" and "Virginia" but exclude results
not locked, then the system is functioning normally, and that mention "West Virginia".
conversely. If new messages are notqueued, then they will be sent
to the message buffer. Ifthe file system is not locked, then new
messages will besent to the message buffer. New messages will not
15. Each inhabitant of a remote village always tells the truthor
be sentto the message buffer.”
always lies.A villager will give only a “Yes” or a “No”response to
Answer: a question a tourist asks. Suppose you are atourist visiting this area
and come to a fork in the road.One branch leads to the ruins you
These system specifications are not consistent. There are want to visit; the otherbranch leads deep into the jungle. A villager
contradictions between some of the statements that make it is standingat the fork in the road. What one question can you ask
impossible for all the statements to be true at the same time. thevillager to determine which branch to take?
The first and third statements are logically compatible with each
Answer:
other and state that if the file system is not locked, new messages
will be queued, and if new messages are not queued, they will be "Are you able to tell me that the ruins are down the left path?"
sent to the message buffer. However, the fourth statement
16. An explorer is captured by a group of cannibals. There aretwo T F F - this scenario also works
types of cannibals—those who always tell the truthand those who
always lie. The cannibals will barbecuethe explorer unless he can F T T - this is not a possibility; K will attend only if J does
determine whether a particular cannibal always lies or always tells F T F - this is not a possibility; S will attend only if K does
the truth. He isallowed to ask the cannibal exactly one question.
F FF - the hostess has a great time on her own! This is the null
a) Explain why the question “Are you a liar?” does notwork. option.
b) Find a question that the explorer can use to determinewhether
the cannibal always lies or always tells thetruth.
Exercises 19–23 relate to inhabitants of the island of knightsand
Answer: knaves created by Smullyan, where knights always tellthe truth
a)The question "Are you a liar?" does not work because of the and knaves always lie. You encounter two people,A and B.
following: Determine, if possible, what A and B are if theyaddress you in the
ways described. If you cannot determinewhat these two people are,
The cannibal either lies or tells the truth can you draw any conclusions?
1) If he tells the truth, he will answer no.
2) If he lies, he will answer no. 19. A says “At least one of us is a knave” and B says nothing.
Therefore, the explorer cannot know if he lies or tells the truth Answer:
because the answer will be the same.
Person A is a knight, and person B is a knave.
Person A says "at least one of us is a knave" and person B says
b) One of the questions which might work is "If I asked you if you nothing.If person A is telling the truth that at least one of A or B is
are a liar what would you answer?" a knave, then A must be a knight and B must be a knave. If person
A is lying, then she must be a knave as a liar. This contradicts the
1) If the cannibal is telling the truth, he will answer No. true statement "neither of us is a knave," so person A must be a
2) If the cannibal lies, he will answer Yes. knight and person B must be a knave.

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.

26. A says “I am the knave,” B says “I am the knave,” and Csays “I


Exercises 24–31 relate to inhabitants of an island on whichthere am the knave.”
are three kinds of people: knights who always tell thetruth, knaves Answer:
who always lie, and spies (called normalsbySmullyan [Sm78])
who can either lie or tell the truth. Youencounter three people, A, There are no solutions.
B, and C. You know one of thesepeople is a knight, one is a knave,
and one is a spy. Each of thethree people knows the type of person Person A says, "I am the knave," B says "I am the knave," and C
each of other two is. Foreach of these situations, if possible, says "I am the knave."
determine whether thereis a unique solution and determine who the One of these individuals must be the knight, but by claiming to be
knave, knight, andspy are. When there is no unique solution, list all the knave, this individual lies. Therefore, the situation is
possiblesolutions or state that there are no solutions. impossible and has no solutions.

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, A is lying. B is telling the truth and so is C. Neither


of them can be the knave, so there are no solutions where A is the 33. Steve would like to determine the relative salaries of
spy. threecoworkers using two facts. First, he knows that if Fredis not
the highest paid of the three, then Janice is. Second, he knows that
if Janice is not the lowest paid, thenMaggie is paid the most. Is it
possible to determine therelative salaries of Fred, Maggie, and
If A is the knave, she is indeed lying. Person B can be the knight or Janice from whatSteve knows? If so, who is paid the most and who
the spy. If knight, B is telling the truth, and if spy, B is choosing to theleast? Explain your reasoning.
lie. C's statement is a lie, so she must be the spy as the knave
position is already taken. B can be the knight. Answer:
It is possible. Fred is paid the most and Janice the least.
31. A says “I am not the spy,” B says “I am not the spy,” andC says Statement 1:
“I am not thespy.”
If Fred is not the highest paid of the three, then Janice is.
Answer:
There are no solutions to this scenario.
Statement 2:
Person A says "I am not the spy," B says "I am not the spy," and C
says "I am not the spy." If Janice is not the lowest paid, Maggie is paid the most

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.

Exercises 32–38 are puzzles that can be solved by


translatingstatements into logical expressions and reasoning from If Janice is the lowest paid, Fred is the highest paid (statement 1).
theseexpressions using truth tables.

Then, obviously, Maggie is in the middle.


32. The police have three suspects for the murder of Mr.Cooper:
Mr. Smith, Mr. Jones, and Mr. Williams. Smith,Jones, and
Williams each declare that they did not killCooper. Smith also
34. Five friends have access to a chat room. Is it possible
states that Cooper was a friend ofJones and that Williams disliked
todetermine who is chatting if the following information isknown?
him. Jones also statesthat he did not know Cooper and that he was
Either Kevin or Heather, or both, are chatting.Either Randy or gardener cannot both be telling thetruth; the gardener and the
Vijay, but not both, are chatting. If Abbyis chatting, so is Randy. handyman are not both lying;and if the handyman is telling the
Vijay and Kevin are either bothchatting or neither is. If Heather is truth then the cook islying. For each of the four witnesses, can the
chatting, then so areAbby and Kevin. Explain your reasoning. detective determine whether that person is telling the truth or
lying?Explain your reasoning.
Answer:
Answer:
It is possible, Vijay and Kevin are chatting, Randy, Abby and
Heather are not. The detective cannot determine whether G and H are telling the
truth or lying.
Lets list the statements
B= The butler is telling the truth
1) Either Kevin or Heather, or both, are chatting.
C = The cook is telling the truth
2) Either Randy or Vijay, but not both, are chatting.
G = The gardener is telling the truth
3) If Abby is chatting, so is Randy.
H - The handyman is telling the truth
4) Vijay and Kevin are either both chatting or neither is.
5) If Heather is chatting, then so are Abby and Kevin.
Lets list the statements
1) If the butler is telling the truth, so is the cook.
Rewrite the statements using propositional logic notation. The first
letter of the name of one of the friend means that person is 2) The cook and the gardener cannot both be telling the truth.
chatting. E.g. K means"Kevin is chatting". All the statements
below have to be true and our goal is to find whether K,H,R,V,A 3) The gardener and the handyman are not both lying.
are true or false. 4)If the handyman is telling the truth, the cook is lying.

1) K∨H Now, rewrite the statements.


2) R⊕V 1) B→C
3) A→R 2) ¬C∨¬G
4) V↔K 3) G∨H
5) H↔(A∧K) 4) H→¬C

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).

Therefore, the tiger is in room 1, and the lady is in room 2.

b) The output of the middle Not gate is: ¬ p.


38. Solve this famous logic puzzle, attributed to Albert Einstein, Then, the output of the bottom AND gate is: (¬ p) ∧ q
and known as the zebra puzzle. Five men withdifferent
nationalities and with different jobs live in consecutive houses on a The output of the OR gate is: p ∨ ((¬ p) ∧ q).
street. These houses are painted different colors. The men have
Finally the output of the Not gate is:
different pets and have different favorite drinks. Determine who
owns a zebra andwhose favorite drink is mineral water (which is ¬(p∨((¬p)∧q))
one of thefavorite drinks) given these clues: The Englishman
livesin the red house. The Spaniard owns a dog. The Japaneseman
is a painter. The Italian drinks tea. The Norwegianlives in the first
41. Find the output of each of these combinatorial circuits.
house on the left. The green house isimmediately to the right of the
white one. The photographer breeds snails.The diplomat lives in a) p q r
the yellow house.Milk is drunk in the middle house. The owner of
b) p q p r
Answer:

a) ¬(p ∧ ( q ∨¬ r))

b) (( ¬ p) ∧ ( ¬ q)) ∨(p ∧ r)

a) Starting from the left.


First, the output of the Not gate is : ¬ r

The output of the OR gate is: q ∨¬ 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:

b) The output of the top two Not gates is ¬ p and ¬ q.

Then ,the output of the top AND gate is ( ¬ p) ∧ ( ¬ q). The output
of the bottom AND gate is p ∧ r.

Therefore, the output of this circuit is

((¬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:

2. Show that ¬(¬p) and p are logically equivalent.


Answer:
Let p be the proposition that John attends a baseball game.
The expression ¬(¬p) means that John will not not attend the baseball game.
When we say something is "not not", that is a double negative, which is the same as not saying either of the "nots". Instead, we might say that
John attends a baseball game, which we defined as p. Therefore, p=¬(¬p).
This was an explanation problem, so the explanation is given above in the answer section. When thinking about this type of question, it is helpful
to put it in context of a real situation.

3. Use truth tables to verify the commutative laws


a) p ∨ q ≡ q ∨ p.

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

4. Use truth tables to verify the associative laws

a) (p ∨ q) ∨ r ≡ p ∨ (q ∨ r).

b) (p ∧ q) ∧ r ≡ p ∧ (q ∧ r).

Answer:
a.

p q r p∨q (p∨q)∨r q∨r p∨(q∨r)

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∧q)∧r q ∧r p ∧(q∧r)


T T T T T T T
T T F T F F F
T F T F F F F
T F F F F F F
F T T F F T F
F T F F F F F
F F T F F F F
F F F F F F F

a.The columns for (p∨q)∨r and p∨(q∨r) are identical.

b.The columns for (p∧q)∧r and p∧(q∧r) are identical.

5. Use a truth table to verify the distributive law

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

The columns for p∧(q∨r) and (p∧q)∨(p∧r) are identical.

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

The columns for ¬(p∧q) and ¬p∨¬q are identical.

7. Use De Morgan’s laws to find the negation of each of thefollowing statements.


a) Jan is rich and happy.
b) Carlos will bicycle or run tomorrow.
c) Mei walks or takes the bus to class.
d) Ibrahim is smart and hard working
Answer:
a) The negation of "Jan is rich and happy" is "Jan is not rich or not happy"
b) The negation of "Carlos will bicycle or run tomorrow" is "Carlos will not bicycle and will not run tomorrow"
c) The negation of "Mei walks or takes the bus to class" is "Mei does not walk and does not take the bus to class"
d) The negation of "Ibrahim is smart and hard working" is "Ibrahim is not smart or not hard working"

8. Use De Morgan’s laws to find the negation of each of thefollowing statements.


a) Kwame will take a job in industry or go to graduateschool.
b) Yoshiko knows Java and calculus.
c) James is young and strong.
d) Rita will move to Oregon or Washington.
Answer:
a. Kwame will not take a job in industry and Kwame will not go to graduate school.
b. Yoshiko does not know Java or Yoshiko does not know calculus.
c. James is not young or James is not strong.
d. Rita will not move to Oregon and Rita will not move to Washington.
9. Show that each of these conditional statements is a tautology by using truth tables.

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.

p q p→q ¬(p→q) ¬(p→q)→p


T T T F T
T F F T T
F T T F T
F F T F T

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.

p q p→q ¬(p→q) ¬(p→q)→p


T T T F T
T F F T T
F T T F T
F F T F T

f) 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) ¬q ¬(p→q)→¬q


T T T F F T
T F F T T T
F T T F F T
F F T F T T
10. Show that each of these conditional statements is a tautology by using truth tables.

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.

a) (pf) The proof is rather simple:

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)

Thus, by associativity of disjunction (∨), we have

¬p∨(p∨q)≡(¬p∨p)∨q

However, by the Law of Excluded Middle (a∨¬a≡T) and commutivity of disjunction,

(¬p∨p)∨q≡T∨q

Finally, since a∨b≡b∨a and a∨T≡T, this yields

T∨q≡T

Thus, p⇒(p∨q)≡T, as desired.


b) (pf) The proof is just as easy:

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:

c) (eq) Show ¬p⇒(p⇒q) is a tautology:

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.

c) (pf) This proof is a little more involved:

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.

d) (eq) Show (p∧q)⇒(p⇒q) is a tautology.

(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).

e) (eq) Show that ¬(p⇒q)⇒p is a tautology.

¬(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

So ¬(p⇒q)⇒p is, in fact, a tautology.

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.

f) (eq) Show that ¬(p⇒q)⇒¬q 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

law; double negation; commutative and associative laws; negation law.


b) We want to show that if the entire hypothesis is true, then the conclusion p → r is true. To do this, we
need only show that if p is true, then r is true. Suppose p is true. Then by the first part of the hypothesis,
we conclude that q is true. It now follows from the second part of the hypothesis that r is true, as desired.
c) Assume the hypothesis is true. Then p is true, and since the second part of the hypothesis is true, we
conclude that q is also true, as desired.
d) Assume the hypothesis is true. Since the first part of the hypothesis is true, we know that either p or q
is true. If p is true, then the second part of the hypothesis tells us that r is true; similarly, if q is true, then
the third part of the hypothesis tells us that r is true. Thus in either case we conclude that r is true.
13. Use truth tables to verify the absorption laws.

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

a.The columns for p∨(p∧q) and p are identical.

b.The columns for p∧(p∨q) and p are identical.

14. Determine whether (¬p ∧ (p → q)) →¬q is a tautology.

Answer:

(¬p∧(p→q))→¬q is not a tautology

p q ¬p p→q ¬p∧(p→q) ¬q (¬p∧(p→q))→¬


q
T T F T F F T
T F F F F T T
F T T T T F F
F F T T T T T

(¬p∧(p→q))→¬q does not have all T values in its column,

so it is not a tautology.(in row 3, T→F is false)

15. Determine whether (¬q ∧ (p → q)) →¬p is a tautology.

Answer:

(¬q∧(p→q))→¬p is a tautology.

p q ¬q p→q ¬q∧(p→q) ¬p (¬q∧(p→q))→¬


p
T T F T F F T
T F T F F F T
F T F T F T T
F F T T T T T

(¬q∧(p→q))→¬p has all T values in its column,so it 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.

17. Show that ¬(p ↔ q) and p ↔ ¬q are logically equivalent.


Answer:
The statement ¬(p↔q) means "the opposite of p if and only if q". This statement evaluates to true only when p and q have the opposite truth
value, so it is only true when p is true and q is false or p is false and q is true. The second proposition, p↔¬q means "p if and only if not q". This
too will evaluate to true only when both p and q are have opposite truth values, as it is saying one if and only if not the other. Since the two
propositions have the same truth value for every truth assignment of p and q, they are logically equivalent.

18. Show that p → q and¬q → ¬p are logically equivalent.


Answer:

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.

19. Show that¬p ↔ q and p ↔ ¬q are logically equivalent.


Answer:
The logical connective ↔, or "if and only if" evaluates to true if the propositions on each side of the connective have the same truth
value. In the case of both ¬p↔q and p↔¬q, one variable would have to be false and the other would have to be true in order for the
propositions on each side of the arrow to have the truth value. This means that the propositions evaluate to the same truth values for all
values of p and q, and so they are equivalent.

20. Show that ¬(p ⊕ q) and p ↔ q are logically equivalent.

Answer:

The columns in the truth table for ¬(p⊕q) and p↔qare identical, so the statements are logically equivalent.

p q p⊕q ¬(p⊕q) p↔q


T T F T T
T F T F F
F T T F F
F F F T T

21. Show that ¬(p ↔ q) and ¬p ↔ q are logically equivalent.


Answer:

p q p↔q ¬(p↔q) ¬p ¬p↔q


T T T F F F
T F F T F T
F T F T T T
F F T F T F

The columns in the truth table for ¬(p↔q) and ¬p↔qare identical, so the statements are logically equivalent.

22. Show that (p → q) ∧ (p → r) and p → (q ∧ r) 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.

23. Show that (p → r) ∧ (q → r) and (p ∨ q) →r are logically equivalent.

Answer:

We start with (p∨q)→r


Use Logical Equivalence: (p→q)≡(¬p∨q)
(p∨q)→r≡¬(p∨q)∨r

Use De Morgan;s Law:


≡(¬p∧¬q)∨r

Use Distributive Law:


≡(¬p∨r)∧(¬q∨r)

Use Logical Equivalence: (p→q)≡(¬p∨q)


≡(p→r)∧(q→r)

Thus we have derived that (p∨q)→r is logically equivalent to (p→r)∧(q→r)

24. Show that (p → q) ∨ (p → r) and p → (q ∨ r) are logically equivalent.

Answer:

We start with p→(q∨r)


Use Logical Equivalence: (p→q)≡(¬p∨q)
p→(q∨r)≡¬p∨(q∨r)

Use Idempotent Law:


≡(¬p∨¬p)∨(q∨r)

Use Associative and Commutative Law:


≡(¬p∨q)∨(¬p∨r)

Use Logical Equivalence:(p→q)≡(¬p∨q)


≡(p→q)∨(p→r)
We have thus derived that p→(q∨r)≡(p→q)∨(p→r)

25. Show that (p → r) ∨ (q → r) and (p ∧ q) →r are logically equivalent.

Answer:

We start with (p∧q)→r


Use Logical Equivalence: (p→q)≡(¬p∨q)
(p∧q)→r≡¬(p∧q)∨r

Use De Morgan's Law:


≡(¬p∨¬q)∨r

Use Idempotent Law:


≡(¬p∨¬q)∨(r∨r)

Use Associative and Commutative Law:


≡(¬p∨r)∨(¬q∨r)

Use Logical Equivalence:(p→q)≡(¬p∨q)


≡(p→r)∨(q→r)

We have thus derived that (p∧q)→r≡(p→r)∨(q→r).

26. Show that¬p → (q → r) and q → (p ∨ r) are logicallyequivalent.

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)

Use Associative Law:


(p∨¬q)∨r)

Use Commutative Law:


(¬q∨p)∨r)

Use Associative Law:


¬q∨(p∨r)

Use Logical Equivalence:(p→q)≡(¬p∨q)


≡q→(p∨r)

We have thus derived that ¬p→(q→r)≡ q→(p∨r) .

27. Show that p ↔ q and (p → q) ∧ (q → p) are logicallyequivalent.

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)

Use Distributive Law:


≡[p∨(¬p∧¬q)]∧[q∨(¬p∧¬q)]

≡[(p∨¬p)∧(p∨¬q)]∧[(q∨¬p)∧(q∨¬q)]

Use Negation Laws:


≡[T∧(p∨¬q)]∧[(q∨¬p)∧T]

Use Identity Law:


≡(p∨¬q)∧(q∨¬p)

Use Commutative Law:


≡(q∨¬p)∧(p∨¬q)
≡(¬p∨q)∧(¬q∨p)

Use Logical equivalence (2):


≡(p→q)∧(q→p)

We have thus derived that p↔q is logically equivalent with ≡(p→q)∧(q→p)

28. Show that p ↔ q and¬p ↔ ¬q are logically equivalent.


Answer:
The logical connective ↔, or "if and only if" evaluates to true if the propositions on each side of the connective have the same truth value. In the
case of both ¬p↔¬q and p↔q, both p and q would have to be false, or both p and q would have to be true in order for the propositions on each
side of the arrow to have the truth value. This means that the propositions evaluate to the same truth values for all values of p and q, and so they
are equivalent.

29. Show that (p → q) ∧ (q → r) → (p → r) is a tautology.

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.

30. Show that (p ∨ q) ∧ (¬p ∨ r) → (q ∨ 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.

31. Show that (p → q) → r and p → (q → r) are not logically equivalent.


Answer:
To show that these are not logically equivalent.
We need only find one assignment of truth values to p, q, and
r for which the truth values of (p _, q) _, r and p _, (q _, r) differ.
One such assignment is F for all three.
Then (p _, q) _, r is false and p _, (q _, r) is true.

32. Show that (p ∧ q) → r and (p → r) ∧ (q → r) are notlogically equivalent.

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,

which is true, but the second will be F ∧ T, which is false.

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.

34. Find the dual of each of these compound propositions.

a) p ∨¬q b) p ∧ (q ∨ (r ∧ T))

c) (p ∧¬q) ∨ (q ∧ F)

Answer:

The dual operator replaces ∨ by ∧, ∧ by ∨ , T by F and F by T.


a) given: p ∨¬q

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)

35. Find the dual of each of these compound propositions.

a) p ∧¬q ∧¬r b) (p ∧ q ∧ r) ∨ s

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

Answer:

The dual operator replaces ∨ by ∧, ∧ by ∨, T by F and F by T.

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)

36. When does s∗ = s, where s is a compound proposition?

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

both are logically equivalent to p .

37. Show that (s∗)∗ = s when s is a compound proposition.

Answer:
If we apply the operation for forming the dual twice to a proposition,

then every symbol returns to what it originally was.

The /\ changes to the V, then changes back to the /\.

Similarly the V changes to the /\, then back to the V.

The same thing happens with the T and the F.


Thus the dual of the dual of a proposition s, namely (s*)*, is equal to the original proposition s.

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

law, is its own dual, since there are no occurrences of ∧, ∨, T, or F to replace.

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 can also allow them to involve the constants T and F.

We want to show that if p and q are logically equivalent, then p* and q* are logically equivalent.

The trick is to look at 'P and -.q.

They are certainly logically equivalent if p and q are.

Now if p is a conjunction, say r /\ s, then 'P is logically equivalent, by De Morgan's law, to -.r V -.s

A similar statement applies if p is a disjunction.

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.

Call these atomic propositions p1 , p2 , etc.

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:

Following the hint, we easily see that the answer is p ∧ q ∧¬r .

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

(p /\ q /\ -.r) V (p /\ -.q /\ r) V (-.p /\ q /\ r).


42. Suppose that a truth table in n propositional variables isspecified. Show that a compound proposition with thistruth table can be formed by
taking the disjunction ofconjunctions of the variables or their negations, with oneconjunction included for each combination of values forwhich
the compound proposition is true. The resultingcompound proposition is said to be in disjunctive normal form.
A collection of logical operators is called functionally complete if every compound proposition is logically equivalent toa compound proposition
involving only these logical operators.
Answer:
The statement of the problem is really the solution. Each line of the truth table corresponds to exactly one
combination of truth values for the n atomic propositions involved. We can write down a conjunction that
is true precisely in this case, namely the conjunction of all the atomic propositions that are true and the
negations of all the atomic propositions that are false. If we do this for each line of the truth table for which
the value of the compound proposition is to be true, and take the disjunction of the resulting propositions,
then we have the desired proposition in its disjunctive normal form.

43. Show that ¬, ∧, and ∨ form a functionally complete collection of logical operators.

Answer:
Given a compound proposition p, we can construct its truth table

write down a proposition q in disjunctive normal form that is logically equivalent to p.

Since q involves only -, , /\, and V,

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.

46. Construct a truth table for the logical operator NAND.


Answer:
p NAND q is true if and only if p or q or both p and q are false.
p NAND q is denoted as p|q

p q p|q
T T F
T F T
F T T
F F T

47. Show that p | q is logically equivalent to ¬(p ∧ q).

Answer:
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 both statements p and q are true.

A negation ¬p is true if p is false.


p NAND q ( denoted as p|q )is true if and only if p or q or both p and q are false.

p q p∧q p|q ¬(p∧q)


T T T F F
T F F T T
F T F T T
F F F T T

48. Construct a truth table for the logical operator NOR.


Answer:
p NOR q is true if and only if both p and q are false.
p NOR q is denoted as p↓q
p q p↓q
T T F
T F F
F T F
F F T

49. Show that p ↓ q is logically equivalent to ¬(p ∨ q).

Answer:
wo 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 either of p or q are true.


A negation ¬p is true if p is false.
p ↓ q is true if and only if both p and q are false.
p q p∨q ¬(p∨q) p↓q
T T T F F
T F T F F
F T T F F
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.

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.

b) Show that (p ↓ q) ↓ (p ↓ q) is logically equivalentto p ∨ q.

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)

p q p↓q (p↓q)↓(p↓q) p∨q


T T F T T
T F F T T
F T F T T
F F T F F

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))

52. Show that {|} is a functionally complete collection of logical operators.


Answer:
This exercise is similar to Exercise 50. First we can see from the truth tables that (p | p) ≡ (¬p) and that
((p | p) | (q | q)) ≡ (p ∨ q). Then we argue exactly as in part (c) of Exercise 50: by Exercise 45, every
compound proposition is logically equivalent to one that uses only ¬ and ∨. But by our observations at the
beginning of the present exercise, we can get rid of all the negations and disjunctions by using NAND’s . Thus
every compound proposition can be converted into a logically equivalent compound proposition involving only
NAND’s.

53. Show that p | q and q | p are equivalent.


Answer:
Two propositions are logically equivalent if they have the same truth value for any combination of truth values of the variables.

p NAND q is true if and only if both p or q or both are false.


p NAND q is denoted as p|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.

p NAND q is true if and only if both p or q or both are false.


p NAND q is denoted as p|q
p q r q|r p|q p|(q|r) (p|q)|r
T T T F F T T
T T F T F F T
T F T T T F F
T F F T T F T
F T T F T T F
F T F T T T T
F F T T T T F
F F F T T T T

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.

"The directory database is opened,'' "The monitor is put


in a closed state," and "The system is in its initial state,'' respectively.

Then the given statement reads -iin ___, (do ___, me).

By the third line of Table 7 (twice), this is equivalent to in V (-ido V 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:

p q r p∨¬q ¬p∨q q∨r q∨¬r ¬q∨¬r

-----------------------------------
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.

p q r s p ∨ ¬q ¬p ∨ ¬r ¬p ∨ ¬r ∨ ¬p ∨ q ∨ q∨r∨ q ∨ ¬r ∨ ¬p ∨ ¬q p∨r p∨r∨


∨s ∨s ¬s ¬s ¬s ¬s ∨ ¬s ∨s ¬s
T T T T T F F F F F F F T
T T T F T F F F F F F T T
T T F T T F F F F F F T T
T T F F T F F F T T F T T
T F T T T F F T T F F T T
T F T F T F F F F F T T T
T F F T T T T T T T F T T
T F F F T T T F F T T T T
F T T T T T T T F F F T F
F T T F F T T T F T T F F
F T F T F T T T T T F F F
F T F F F T T F F T T F F
F F T T T T T T T F F T F
F F T F F T T T T T T F F
F F F T F T T T T T F F F
F F F F F T T F F T T F F

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.

61. Determine whether each of these compound propositionsis satisfiable.

a) (p ∨¬q) ∧ (¬p ∨ q) ∧ (¬p ∨¬q)


b) (p → q) ∧ (p →¬q) ∧ (¬p → q) ∧ (¬p →¬q)
c) (p ↔ q) ∧ (¬p ↔ q)
Answer:
a) satisfiable
b) unsatisfiable
c) unsatisfiable
We draw truth table to check whether the following compound propositions are satisfiable or not.

a)

p q p∨¬q ¬p∨q ¬p∨¬q compoundstatement


T T T T F F
T F T F T F
F T F T T F
F F T T T T

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)

p q p→q p→¬q ¬p→q ¬p→¬q compoundpropositio


n
T T T F T T F
T F F T T T F
F T T T T F F
F F T T F T F

In the truth table we see that the compound statement is always false, hence, compound statement is unsatisfiable.

c)

p q p↔q ¬p↔q compoundproposition


T T T F F
T F F T F
F T F T F
F F T F F

In the truth table we see that the compound statement is always false, hence, compound statement is unsatisfiable.

62. Determine whether each of these compound propositionsis satisfiable.

a) (p ∨ q ∨¬r) ∧ (p ∨¬q ∨¬s) ∧ (p ∨¬r ∨¬s) ∧(¬p ∨¬q ∨¬s) ∧ (p ∨ q ∨¬s)

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 v;=1 p(i,j,n). To assert that column j contains all 9 numbers.

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.

This gives us /\~= 1 /\~= 1 v;=1 p( i, j, n).

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

1. Let P (x) denote the statement “x ≤4.” What are thesetruth b) 0


values?
c) 0
a) P (0) b) P (4) c) P (6)
d) 0
Answer:
The truth values of Q(x,y) are 1 only if x is the capital of y.
a) True
a) Q(Denver, Colorado)=1
b) True
b) Q(Detroit, Michigan)=0. Lansing is the capital.
c) False
c) Q(Massachusetts, Boston)=0. Massachusetts is a state, and
To evaluate a specific value of a predicate, we plug in the given Boston is its capital city.
value, and see whether that makes the resulting statement true.
d) Q(New York, New York)=0. Albany is the capital of New York.
a) P(0)::=0≤4 Since 0≤4, this is true.
b) P(4)::=4≤4 Since 4≤4, this is true.
4. State the value of x after the statement if P (x) then x := 1is
c) P(6)::=6≤4 Since 6≰4, this is false. executed, where P (x) is the statement “x > 1,” if thevalue of x
when this statement is reached is
a) x = 0. b) x = 1.
2. Let P (x) be the statement “the word x contains theletter a.”
What are these truth values? c) x = 2.

a) P (orange) b) P (lemon) Answer:

c) P (true) d) P (false) a) 0

Answer: b) 1

a) T c) 1

b) F The statement takes the input value of x to 1 if x>1 and leaves it


alone otherwise. So
c) F
a) x=0 ⟹ 0
d) T
b) x=1 ⟹ 1
The truth value for the yes or no statement "the word x contains
the letter a" is either 1 or 0 for P(x), depending on the presence of c) x=2 ⟹ 1
the letter a.
a) P(orange)=1
5. Let P (x) be the statement “x spends more than five hoursevery
b) P(lemon)=0 weekday in class,” where the domain for x consistsof all students.
Express each of these quantifications inEnglish.
c) P(true)=0
a) ∃xP (x) b) ∀xP (x)
d) P(false)=1
c) ∃x ¬P (x) d) ∀x ¬P (x)

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))

a) ∀x(C(x) → F(x)) b) ∀x(C(x) ∧ F(x)) c) ∀x(P(x)∨Q(x))

c) ∃x(C(x) → F(x)) d) ∃x(C(x) ∧ F(x)) d) ¬∃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.

e) ∃xP(x) is satisfied by x=0, so this value is 1.


14. Determine the truth value of each of these statements if
f) ∀xP(x) is not true for x=−1, so this value is 0.
the domain consists of all real numbers.
a) 1
a) ∃x(x3 = −1) b) ∃x(x4 < x2)
b) 1
c) ∀x((−x)2 = x2) d) ∀x(2x > x)
c) 0
Answer:
d) 0
a) 1
e) 1
b) 1
f) 0
c) 1
d) 0
12. Let Q(x) be the statement “x + 1 > 2x.” If the domain
Before starting the problem, consider the domain, all real numbers.
consists of all integers, what are these truth values?
a) ∃x(x3=−1) is satisfied by x=−1, so the statement is true.
a) Q(0) b) Q(−1) c) Q(1)
b) ∃x(x4x) is x=−1, so the statement is not true.
d) ∃xQ(x) e) ∀xQ(x) f )∃x¬Q(x)

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.

d) 1 b) The statement that ∃n(n2=2) is untrue, because 2√ is not an


integer.
e) 0
c) ∀n(n2≥n) is true.
f) 1
d) ∃n(n2<0) is not true, because there are no imaginary integers.
g) 0

16. Determine the truth value of each of these statements if


13. Determine the truth value of each of these statements if
the domain of each variable consists of all real numbers.
the domain consists of all integers.
a) ∃x(x2 = 2) b) ∃x(x2 = −1)
a) ∀n(n + 1 > n) b) ∃n(2n = 3n)
c) ∀x(x2 + 2 ≥ 1) d) ∀x(x2 = x)
c) ∃n(n = −n) d) ∀n(3n ≤ 4n)
Answer:
Answer:
a) True
a) 1
b) False
b) 1
c) True
c) 1
d) False P(−2)∨P(−1)∨P(0)∨P(1)∨P(2)
a) There are two numbers on the reals that would satisfy the
equation, ∃ x(x2=2) : 2√ and −2√. Thus, it is true.

b) ∀ x P(x) means that there exists a value of x for which P(x) is


b) This can never be true because square of a number can never be true, thus P(-2) is true and P(-1) is true and P(0) is true and P(1) is
negative. It is always positive. true and P(2) is true.
So, we can rewrite the proposition as:
c) Given ∀ x (x2+2≥1) ≡∀ x (x2≥−1). P(−2)∧P(−1)∧P(0)∧P(1)∧P(2)

Since square of a number can never be negative. So, ∀x(x2≥0)


implying that ∀x(x2≥−1) is always true.

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.

a) P(0) ∨ P(1) ∨ P(2) ∨ P(3) ∨ P(4)


e) ¬ ∃x P(x) is the negation of ∃x P(x) in part a) , thus we take the
b) P(0)∧P(1)∧P(2)∧P(3)∧P(4) c) ¬P(0)∨¬P(1)∨ negation of part (a):
¬P(2) ∨¬P(3) ∨¬P(4) d) ¬P(0) ∧¬P(1) ∧ ¬(P(−2)∨P(−1)∨P(0)∨P(1)∨P(2))
¬P(2) ∧¬P(3) ∧¬P(4) e) ¬(P (0) ∨ P(1) ∨ P(2) ∨

P(3) ∨ P(4)) f) ¬(P (0) ∧ P(1) ∧ P(2) ∧ P(3) ∧ P(4))

f) ¬∀x P(x) is the negation of ∀x P(x) in part b) , thus we take the


18. Suppose that the domain of the propositional function negation of the result in part b):

P (x) consists of the integers −2, −1, 0, 1, and 2. Write ¬(P(−2)∧P(−1)∧P(0)∧P(1)∧P(2))

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).

Universal quantification :∀ x P(x)


b) For every value between 1 and 5 we need P(x) is true, this thus
equivalent with P(1)∧P(2)∧P(3)∧P(4)∧P(5).
Solution-

a) ∃ x P(x) means that there exists a value of x for which P(x) is


true, thus P(-2) is true or P(-1) is true or P(0) is true or P(1) is true c) This statement is negation of the statement in a, and is thus
or P(2) is true. equivalent with ¬(P(1)∨P(2)∨P(3)∨P(4)∨P(5)).

So, we can rewrite the proposition as:


d) This statement is negation of the statement in b, and is thus ∀x((x<0)→P(x)) means that for all of the negative value of x: P(x)
equivalent with ¬(P(1)∧P(2)∧P(3)∧P(4)∧P(5)). is true, thus P(-1) is true and P(-3) is true and P(-5) is true. Using
above interpretation of symbols, we can rewrite the proposition as:

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.

Answer: d) No two different people have the same grandmother.

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.

P(−5)∧P(−3)∧P(−1)∧P(3)∧P(5) c) Every two people have the same first name.


d) Someone knows more than two other people.
Answer:

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

e) ∃x¬P(x) means that there exists a value of x for which ¬P(x) is


true, thus ¬P(−5) is true or ¬P(−3) is true or ¬P(−1) is true or ¬P(1) (b) The following domain makes the statement true, because many
is true or ¬P(3) is true or ¬P(5) is true. Using above interpretation college students are older than 21 years.
of symbols, we can rewrite the proposition as :
’’True” domain = All college students
¬P(−5)∨¬P(−3)∨¬P(−1)∨¬P(1)∨¬P(3)∨¬P(5)
The following domain makes the statement false, because all
children in a kindergarten class are between the ages of 2 and 7
(age depends on the country).
''False" domain = All children in a kindergarten class.
Let R(x) be "x is born in california" and A(x) be "x is in your
class".
(c) The following domain makes the statement true, because all
people in the domain have the same first name. ∃x(A(x)∧¬R(x))
’’True" domain = Jennifer Lopez, Jennifer Aniston, Jennifer
Lawrence.
The following domain makes the statement false, because there are
many different first names in the world. d) There is a student means ∃x and x has to be in your class and
has to have been in a movie.
"False" domain = All people in the world.
∃x(S(x))

(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".

"True", domain = All people in the world. ∃x(A(x)∧S(x))

The following domain makes the statement false, because people


that live alone on an uninhabited island don’t know every bod}'
beside themselves.
e) No student means ¬(∃x) and x has to be in your class and has to
"False’’ domain = All people that live alone on an uninhabited have taken a course in logic programming.
island.
¬(∃xT(x))

23. Translate in two ways each of these statements into logical


expressions using predicates, quantifiers, and logical Let T(x) be "x has taken a course in logic programming" and A(x)
be " x is in your class".
connectives. First, let the domain consist of the students
¬(∃x(T(x)∧A(x)))
in your class and second, let it consist of all people.
a) Someone in your class can speak Hindi.
24. Translate in two ways each of these statements into logical
b) Everyone in your class is friendly. expressions using predicates, quantifiers, and logical
c) There is a person in your class who was not born in connectives. First, let the domain consist of the students
California. in your class and second, let it consist of all people.
d) A student in your class has been in a movie. a) Everyone in your class has a cellular phone.
e) No student in your class has taken a course in b) Somebody in your class has seen a foreign movie.
logicprogramming.
c) There is a person in your class who cannot swim.
Answer:
d) All students in your class can solve quadratic equations.
a) There exists a person in your class that can speak hindi.
e) Some student in your class does not want to be rich.
∃xP(x)
Answer:

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))

D(x) in your class


C(x) has a cellular phone
b) Everyone means ∀x and if x is in your class then x has to be
friendly.

∀xQ(x) b) 1. ∃xF(x)

2. ∃x(D(x)∧F(x))

Let Q(x) be "x is friendly" and A(x) is " x is in your class".

∀x(A(x)→Q(x)) D(x) in your class


F(x) seen a foreign movie

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))

e)1.∃x¬R(x) 26. Translate each of these statements into logical expressions in


2.∃x(D(x)∧¬R(x)) three different ways by varying the domain and

D(x) in your class by using predicates with one and with two variables.

R(x) want to be rich a) Someone in your school has visited Uzbekistan.


b) Everyone in your class has studied calculus and C++.

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)

e) Someone in your class does not play hockey.


27. Translate each of these statements into logical expressions in
three different ways by varying the domain and
Using a one-variable predicate and a domain of all students in your
by using predicates with one and with two variables.
class: ∃x(¬PlaysHockey(x))
a) A student in your school has lived in Vietnam.
Using a two-variable predicate and a domain of all possible pairs
b) There is a student in your school who cannot speak of students and sports: ∃x,y(Student(x) ∧ Sport(y) ∧¬Plays(x, y) ∧
y=Hockey)
Hindi.
Using a two-variable predicate and a domain of all possible pairs
c) A student in your school knows Java, Prolog, and of students and their extracurricular activities: ∃x,y(Student(x) ∧
C++. Activity(y) ∧¬ParticipatesIn(x, y) ∧ y=Hockey)

d) Everyone in your class enjoys Thai food.


e) Someone in your class does not play hockey. 28. Translate each of these statements into logical expressions
using predicates, quantifiers, and logical connectives.
Answer:
a) Something is not in the correct place.
a) A student in your school has lived in Vietnam.
b) All tools are in the correct place and are in excellent
condition.
Using a one-variable predicate and a domain of all students in your
school: ∃x(LivesInVietnam(x)) c) Everything is in the correct place and in excellent condition.

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)

Using a one-variable predicate and a domain of all students in your


b)Let P{x) mean "x is in the correct place“. Let R(x) mean "x is in
school: ∃x(¬SpeaksHindi(x)) excellent condition".
Using a two-variable predicate and a domain of all possible pairs The domain of x are tools.
of students and languages: ∃x,y(Student(x) ∧ Language(y)
∧¬Speaks(x, y) ∧ y=Hindi) ∀x(P(x)∧R(x))

Using a two-variable predicate and a domain of all possible pairs


of students and their language abilities: ∃x,y(Student(x)
c) Let P{x) mean "x is in the correct place“. Let R(x) mean "x is in
∧LanguageAbility(y) ∧¬CanSpeak(x, y) ∧ y=Hindi)
excellent condition".
c) A student in your school knows Java, Prolog, and C++.
∀x(P(x)∧R(x))

Using a one-variable predicate and a domain of all students in your


d) Let P{x) mean "x is in the correct place“. Let R(x) mean "x is in
school: ∃x(KnowsJava(x) ∧KnowsProlog(x)
excellent condition".
∧KnowsCPlusPlus(x))
The domain of x are tools.
Using a two-variable predicate and a domain of all possible pairs
of students and programming languages: ∃x,y(Student(x) ¬∀x(P(x)∧R(x))
∧ProgrammingLanguage(y) ∧ Knows(x, Java) ∧ Knows(x, Prolog)
∧ Knows(x, CPlusPlus)) Nothing means that there does not exists.

Using a two-variable predicate and a domain of all possible pairs


of students and their knowledge base: ∃x,y(Student(x) ∧ e) Let P{x) mean "x is in the correct place“. Let R(x) mean "x is in
Knowledge(y) ∧HasKnowledgeOf(x, Java) ∧HasKnowledgeOf(x, excellent condition".
Prolog) ∧HasKnowledgeOf(x, CPlusPlus))
But can be taken as "and".
d) Everyone in your class enjoys Thai food.
∀x(¬P(x)∧R(x)) ¬P(1,2)∧¬P(2,2)∧¬P(3,2)

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))

d) x can take on the values 0,1 or 2.


c) Let the domain be the collection of all propositions.
¬Q(0,0,1)∨¬Q(1,0,1)∨¬Q(2,0,1)
Let P(x) means " x is a tautology" and R(x) means that " x is a
contingency".

∃x∃y((R(x)∧R(y))→P(x∨y)) 32. Express each of these statements using quantifiers. Then


form the negation of the statement so that no negation is
d)Let the domain be the collection of all propositions. to the left of a quantifier. Next, express the negation in
Let P(x) means " x is a tautology". simple English. (Do not simply use the phrase “It is not
∀x∀y((P(x)∧P(y))→P(x∧y)) the case that.”)
a) All dogs have fleas.
30. Suppose the domain of the propositional function P (x, y) b) There is a horse that can add.
consists of pairs x and y, where x is 1, 2, or 3 and y is c) Every koala can climb.
1, 2, or 3. Write out these propositions using disjunctions d) No monkey can speak French.
and conjunctions. e) There exists a pig that can swim and catch fish.
a) ∃x P (x, 3) b) ∀y P (1, y) Answer:
c) ∃y¬P (2, y) d) ∀x ¬P (x, 2) a) a) Let the domain be dogs and P(x) mean "x has fleas”. We can
then rewrite the given statement as:
Answer:
∀xP(x)
a) x 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(1,3)∨P(2,3)∨P(3,3) ¬(∀xP(x))≡∃x¬P(x)

This means: There is a dog that does not have fleas.


b) y can be 1,2 or 3 and all values of y are possible.

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)

This means: All horses can not add.


d) x can be 1,2 or 3 and all values have to be possible.
c) c) Let the domain he koalas and R(x) mean “x can climb”, The negation is then by De Morgan’s Law for Qualifiers and the
rewrite the given statement as: double negation law:

∀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)

The negation is then by De Morgan’s Law for Qualifiers:


d) Let the domain he monkeys and S(x) mean ’ x can speak French'
. We can then rewrite the given statement as ”every monkey can ¬(∀xR(x))≡∃x¬R(x)
not. speak French":
This means: There is a bird that cannot fly.
∀x(¬S(x))

The negation is then by De Morgan’s Law for Qualifiers and the


double negation law: d) Let the domain be dogs and S(x) mean " x can talk". We can
then rewrite the given statement as "every monkey can not speak
¬(∀x(¬S(x)))≡∃x¬(¬S(x))≡∃xS(x) French":

This means: A monkey can speak French. ¬∃xS(x)

The negation is then by the double negation law:


e) Let the domain be pigs and T(x) mean "x can swim" and U(x) ¬(¬∃xS(x))≡∃xS(x)
mean "x can catch fish“. We can then rewrite the given statement
as: This means: There is a dog that can talk.

∃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.

This means : All drivers obey the speed limits.


b) Let the domain be rabbits and Q(x) mean "x knows calculus”.
We can then rewrite the given statement as:
b) Let the domain be Swedish movies and Q(x) means " x is
∀x¬Q(x) serious".We can rewrite the given statement as :

∀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.

¬(∀xQ(x))≡∃x¬Q(x) a) ∀x(x2 = x) b) ∀x(x2 = 2)

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

c) ∀x(x = 1) of predicate, among other things.

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.

b) ∀x(S(x, malfunctioning) ∨ S(x, diagnostic)) Answer:

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

on.” Then we have (∃x L(x)) →¬B .


39. Translate these specifications into English where F (p) is
d) Let D(x) be “Product x can be delivered,” and let M (x) be
“Printer p is out of service,” B(p) is “Printer p is busy,”
“There are at least x megabytes of memory available” and S(x) be
L(j) is “Print job j is lost,” and Q(j) is “Print job j is “The connection speed is at least x kilobits per second,” where the
domain of
queued.”
discourse for the last two propositional functions are positive
a) ∃p(F (p) ∧ B(p)) →∃jL(j) numbers. Then we have (M (8) ∧S(56)) →
b) ∀pB(p) →∃jQ(j) D(video on demand) .
c) ∃j (Q(j) ∧ L(j)) → ∃pF (p)

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).

P(x) -> Q(x)


b) Let A(x, y) be “Group member x can access resource y ,” and let
S(x, y) be “System x is in state y .”

c) Then we have S(file system, locked) → ∀x A(x, system mailbox).

According to the authoritative logician S.C.Kleene, Mathematical


logic, Dover (1967), page 63:
c) Let S(x, y) be “System x is in state y .” Recalling that “only if”
indicates a necessary condition, we have

"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).

d) Let T (x) be “The throughput is at least x kbps,” where the


Thus, with: domain of discourse is positive numbers,
let M (x, y) be “Resource x is in mode y ,” and let S(x, y) be
“Router x is in state y .” Then we have
"The diagnostic monitor tracks the status of all systems except the
main console", (T (100) ∧¬T (500) ∧¬M (proxy server, diagnostic)) →∃x S(x,
normal).
(i) ∀s[TracStat(DiaMon,s)∨MainCons(s)],

43. Determine whether ∀x(P (x) → Q(x)) and ∀xP (x) →


that is equivalent to: ∀s[¬MainCons(s)→TracStat(DiaMon,s)].
∀xQ(x) are logically equivalent. Justify your answer.

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).

Hence, ∀x(P(x)→Q(x)) and ∀xP(x)→∀xQ(x) are not logically


d) equivalent.

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.

P(x) -> Q(x) 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.

b) If (∃xP(x))∧A is true, then A is true and there exists a value y


Thus, the two expressions always have the same truth value and for which P(y) is true. Thus, P(y)∧A is true, which means that
thus they are logically equivalent. ∃x(P(x)∧A) is true.

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.

a) (∀xP (x)) ∨ A ≡∀x(P (x) ∨ A)


Thus the two expressions always have the same truth value and
b) (∃xP (x)) ∨ A ≡∃x(P (x) ∨ A) thus they are logically equivalent.

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.

a) ∀x(A → P (x)) ≡ A →∀xP (x)


If (∀xP(x))∨A is false, then A is false and there is a value y such
that P(y) is false. Then, P(y)∨A is false, which means that b) ∃x(A → P (x)) ≡ A →∃xP (x)
∀x(P(x)∨A) is false.
Answer:
Logical Equivalences:
Thus the two expressions always have the same truth value and
p→q≡¬p∨q
thus they are logically equivalent.

a) A→∀xP(x) is logically equivalent with ¬A∨(∀xP(x)) by above


b) If (∃xP(x))∨A is true, then A is true or there exists a value y for
Logical Equivalence.
which P(y) is true. Thus, P(y)∨A is true, which means that
∃x(P(x)∨A) is true. By previous exercise, this is logically equivalent to

∀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.

And thus A→∀xP(x)≡∀x(A→P(x))


47. Establish these logical equivalences, where x does not
occur as a free variable in A. Assume that the domain is b) A→∃xP(x) is logically equivalent with ¬A∨(∃xP(x)) by above
nonempty. Logical Equivalence.

a) (∀xP (x)) ∧ A ≡∀x(P (x) ∧ A) By previous exercise 46, this is logically equivalent to

b) (∃xP (x)) ∧ A ≡∃x(P (x) ∧ A) ∃x(¬A∨P(x)

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.

And thus A→∃xP(x)≡∃x(A→P(x))


If (∀xP(x))∧A is false, then A is false or there is a value y such that
P(y) is false. Then, P(y)∧A is false, which means that ∀x(P(x)∧A)
is false.
49. Establish these logical equivalences, where x does not
occur as a free variable in A. Assume that the domain is
nonempty. 51. Show that ∃xP (x) ∧∃xQ(x) and ∃x(P (x) ∧ Q(x)) arenot
logically equivalent.
a) ∀x(P (x) → A) ≡∃xP (x) → A
Answer:
b) ∃x(P (x) → A) ≡∀xP (x) → A
Let the domain consist of y and z for which
Answer:
P(y) is false
Logical Equivalences:
Q(y) is true
p→q≡¬p∨q
P(z) is true
Q(z) is false.
De Morgan's Law for Qualifiers:
∃xP(x)∧∃xQ(x) is then true (because ∃xP(x) and ∃xQ(x) is true)
¬∃xP(x)≡∀x¬P(x) and ∃x(P(x)∧Q(x)) ls false (since P(x) and Q(x) are never true at
¬∀xP(x)≡∃x¬P(x) the same time).
Since the two expressions do not have the same truth value for this
case, the two expressions can’t be logically equivalent.

a) ∀xP(x)→A is logically equivalent with ¬(∀xP(x))∨A by above


Logical Equivalence. 52. As mentioned in the text, the notation ∃!xP (x) denotes

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

. values of these statements?

Use result of exercise 46 and Logical Equivalence a) ∃!x(x > 1) b) ∃!x(x2 = 1)

≡∃x(¬P(x)∨A) c) ∃!x(x + 3 = 2x) d) ∃!x(x = x + 1)

. Answer:

a) ∃!x(x > 1) means “There exists a unique x such that x > 1 is


true.”
≡∃x(P(x)→A)
But x = 2 and x = 3 both satisfy P(x): x>1. Thus the statement is
. false.
Thus, ∀xP(x)→A is logically equivalent with ∃x(P(x)→A)

b) For both x = 1 and x = -1, whave x2=1


b) Use Logical Equivalence, Thus there does not exists a unique x such that x2=1 is true.
∃xP(x)→A≡¬∃xP(x)∨A So, the statement is false.
Use De Morgan's Law for Qualifiers:

≡∀x(¬P(x))∨A c) Solving x+3=2x


. ≡(3=2x−x)
By previous exercise 46, this is logically equivalent to ≡ x=3.
≡∀x(¬P(x)∨A) Thus there is a unique value of x for which x+3=2x.
. So, the statement is true.
≡∀x(P(x)→A)

. d) Let us solve x=x+1


≡ x−x=1

Thus, ∃xP(x)→A is logically equivalent with ∀x(P(x)→A) ≡ 0=1


This equation can never be true. So, the given equation has no
solution.
50. Show that ∀xP (x) ∨∀xQ(x) and ∀x(P (x) ∨ Q(x)) are
Since, the given equation has no solution, there does not exist any
not logically equivalent. value of x for which x=x+1 is true.
Answer: Thus, the statement is false.
Let P(x) be the statement that x is an even number and Q(x) be x is
an odd number, where x denotes the domain of all positive
integers. So (∀xP(x)) and (∀xQ(x)) are false. But 53. What are the truth values of these statements?

∀x(P(x)∨Q(x)) will always be true, because x will always be a) ∃!xP (x) →∃xP (x)

either even or odd. b) ∀xP (x) →∃!xP (x)

c) ∃!x¬P (x) →¬∀xP (x)


Answer: e) ?teaches(grossman,Y)

a) ∃!xP(x) →∃xP(x) Answer:

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?

Domain: 1,2,3 a) ?enrolled(kevin,ee222)

So, we have the following cases: b) ?enrolled(kiko,math273)

1) P(1) is True c) ?instructor(grossman,X)

P(2) is false. d) ?instructor(X,cs301)

P(3) is false. e) ?teaches(X,kevin)


Answer:

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

c) ?enrolled(X,cs301) mother(M, Y ) and father(F, X), which represent that M

d) ?enrolled(kiko,Y) is the mother of Y and F is the father of X, respectively.


Give a Prolog rule to define the predicate sibling(X, Y ), ∀x(P(x) →¬R(x))
which represents that X and Y are siblings (that is, have
the same mother and the same father). d) Yes, (c) follows from (a) and (b).
Answer: To see this, suppose for the sake of contradiction that there exists a
professor who is vain. Then, by (c), that professor cannot be a
sibling(X, Y) :-
professor. Therefore, there are no professors who are vain. By (a),
mother(M, X), this implies that there are no professors who are ignorant. Thus, we
have shown that if (a) and (b) hold, then (c) must also hold.
mother(M, Y),
father(F, X),
60. Let P (x), Q(x), and R(x) be the statements “x is a
father(F, Y), clearexplanation,” “x is satisfactory,” and “x is an
X \= Y. excuse,”respectively. Suppose that the domain for x consists of all

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.

a) No professors are ignorant: If x is able to manage a crocodile, then x can't be despised.This


statement if true for all x.
∀x(P(x) →¬Q(x))
∀x(R(x)→¬ S(x))

b) All ignorant people are vain:


c)Rewrite the given statement " Illogical persons are despised" in
∀x(Q(x) → R(x)) If-then form.
If x is not logical, then x is despised.This statement if true for all x.
c) No professors are vain: ∀x(¬Q(x) → S(x))
d)Rewrite the given statement " Babies cannot manage crocodile" c)Rewrite the given statement " All my poultry are ducks" in If-
in If-then form. then form.
If x is baby, then x cannot manage a crocodile.This statement if If x is one of my poultry , then x is a duck.This statement if true
true for all x. for all x.

∀x(P(x)→¬ R(x)) ∀x(Q(x)→P(x))

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))

b) Rewrite the given statement " No officers ever decline to waltz


in If-then form.
If x is a officer, then x is willing to waltz.This statement if true for
all x.

∀x(R(x)→S(x))

Section 1.5 - Nested Quantifiers – Exercises


1. Translate these statements into English, where the domain (c) Consider x and y are both real numbers. For every real numbers
x and y there must exist a real number z such that xy=z.
for each variable consists of all real numbers.

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).

Answer: Universal quantification ∀xP(x): P(x) for all values of x in the


domain.
Let P(x,y) be the statement "Student x has taken class y," where the
domain x is all students, y is computer science classes at your
school.
Answer
(a) There is a student in your class that has taken a computer
(a) Student Sarah Smith has visited the website www.att.com.
science course.
(b) There is a student in your class that has visited the website
∃x∃yP(x,y)
www.imbd.org.
(c) There is a website that José Orez has visited.
(b) There is a student in your class that has taken all computer
(d) There is a website that Ashok Puri and Cidy Yoon have both
science courses.
visited.
∃x∀yP(x,y)
(e) There is a student in your class, beside David Belcher, that has
visited all websites that David Belcher visited.

(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

e) ∃x∃y∀z((x = y) ∧ (C(x, z) → C(y, z)))

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 cuisine that Monique Arsenault or Jay Johnson


b. There exists a student x that is enrolled in class Math 695. likes.
C(x, y) means student, x is enrolled in class y T(x,y) means that student x likes cuisine y
∃ means there exists. ∃ means THERE EXISTS, ∨ means OR

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 EVERY, ¬


d. There exists a student x that is enrolled in class Math 222 and is means NOT
enrolled in class CS 252.
C(x, y) means student, x is enrolled in class y
e. There exists two students such that for every cuisine, the
∃ means there exists and ∧ means AND. students both like the cuisine or the students both do not like the
cuisine.
T(x,y) means that student x likes cuisine y
e. 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 if x is ∃ means THERE EXISTS, ↔ means IF-AND-ONLY-IF, ∀ means
enrolled in class 2 then y is also enrolled in class 2. EVERY.
C(x, y) means student, x is enrolled in class 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.

d)¬∃x∀yF(x,y) f ) Someone in your class does not have an Internet connection.


g) Not everyone in your class has an Internet connection.
e)∀y∃xF(x,y)
h) Exactly one student in your class has an Internet connection.
f)¬∃x(F(x,Fred)∧F(x,Jerry))
i) Everyone except one student in your class has an Internet
connection.
g)∃y1∃y2(F(Nancy,y1)∧F(Nancy,y2)∧y1,=y2∧∀y(F(Nancy,y)→(y
=y1∨y=y2))) j) Everyone in your class with an Internet connection

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))

h) Some student has never been asked a question by a f) (x)


faculty member.
g) (x)
Answer:
a) A(Louis, Professor Michaels) h) (x = y ↔ I(y))

b) ∀x(S(x)->A(x, Professor Gross) i) (x , = y ↔ I(y)) j) ∀x(I(x) →∃y(x , = y ∧ C(x, y)))


c) ∀x(F(x)->(A(x, Professor Miller) V A(Professor Miller, x)))
k) (I(x) ∧∀y(x , = y →¬C(x, y)))
d) ∃x∀y(S(x)^F(y)->¬A(x,y))
l) (x , = y ∧¬C(x, y))
e) ∃x∃y(S(x)^F(y)->¬A(x,y))

f) ∃x∀y(S(x)^F(y)->A(x,y)) m) (x, y)

g) ∃x∀y((F(x)^F(y)->A(x,y)) n) (x , = y ∧∀z ¬(C(x, z) ∧ C(y, z)))


h) ∃x∃y(F(x)^S(y)->¬A(x,y))
o) (x , = y ∧∀z(C(x, z) ∨ C(y, z)))

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.

student has telephoned the first student.


n) There are two different students in your class who d) ∀x ∃y ProgrammingLanguage(x, y)

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:

a) ∼M(Chou, Koko) e) ∃x ∃y ∀z (CourseOffered(z) ∧Department(z, y) →TakenBy(x,


z))
b) ∼(M(Arlene, Sarah) ∨ T(Arlene, Sarah))
where CourseOffered(z), Department(z, y), and TakenBy(x, z) are
c) ∼M(José, Deborah) predicates that are true if "course z is offered," "z belongs to
d) ∀x M(x, Ken) department y," and "x has taken course z," respectively.

e) ∼∃x T(x, Nina)


f) ∃x ∃y (x ≠ y ∧GrewUpIn(x, t) ∧GrewUpIn(y, t) ∧∀z (z ≠ x ∧ z ≠
f) ∀x (M(x, Avi) ∨ T(x, Avi))
y →¬GrewUpIn(z, t)))
g) ∃x ∀y (y ≠ x →M(x, y))
where GrewUpIn(x, t) is the predicate "x grew up in town t."
h) ∃x ∀y (y ≠ x →M(x, y) ∨ T(x, y))

i) ∃x ∃y (x ≠ y ∧M(x, y) ∧ M(y, x))


g) ∀x ∃y ∃z (y ≠ x ∧ z ≠ x ∧ChatGroup(y, z) ∧ Chatted(x, y, z))
j) ∃x M(x, x)
where ChatGroup(y, z) and Chatted(x, y, z) are predicates that are
k) ∃x (∀y ∼M(y, x) ∧∀y ∼T(y, x) ∧∀y (y ≠ x → (∼M(x, y) ∨∼T(x, true if "y and z are in the same chat group" and "x has chatted with
y)))) y in chat group z," respectively.

l) ∀x ∃y (M(x, y) ∨ T(x, y))

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.

a) ∀x ∃y (ComputerScienceStudent(x) → NeedsCourse(x, y) Answer:


∧DiscreteMathematics(y))
a) Let the domain be all students in the discrete mathematics class
where ComputerScienceStudent(x), NeedsCourse(x, y), and
Let A(x) mean "student x is a junior"
DiscreteMathematics(y) are predicates that are true if "x is a
computer science student," "x needs course y," and "y is discrete ∃xA(x)
mathematics," respectively.
True, because there arc 4 juniors (2 junior mathematics majors and
2 junior computer science majors).
b) ∃x ∃y (Student(x) ∧Owns(y, x) ∧PersonalComputer(y))

where Student(x), Owns(y, x), and PersonalComputer(y) are


predicates that are true if "x is a student," "y is owned by x," and
"y is a personal computer," respectively. b)Let the domain be all students in the discrete mathematics class
Let B(x) mean “student x is a computer science major"

c) ∀x ∃y (Student(x) →TakenCourse(x, y) ∀xB(x)


∧ComputerScienceCourse(y)) False, because there are also mathematics majors in the class.
where TakenCourse(x, y) and ComputerScienceCourse(y) are
predicates that are true if "x has taken course y" and "y is a
computer science course," respectively. c)Let the domain be all students in the discrete mathematics class
Let A(x) mean “student r is a junior" and C(x) menu "student x is a
mathematics major"
d) ∃x ∃y (Student(x) ∧TakenCourse(x, y)
∧ComputerScienceCourse(y)) ∃x[¬A(x)∧¬C(x)]

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)]

False, because there is a mathematics major who is a freshman.


f) ∃x ∃y ∀z (Student(x) ∧ Building(y) ∧Room(z, y) →BeenIn(x,
z))
where Room(z, y) and BeenIn(x, z) are predicates that are true if "z e) Let the domain be all majors
is a room in building y" and "x has been in room z," respectively.
Let E(y) mean “there is a student in the class in every year of study
with major y".
g) ∀x ∀y ∃z (Student(x) ∧ Building(y) →Room(z, y) ∧BeenIn(x, ∃yE(y)
z))
False, because mathematics majors do not have a senior and
where Room(z, y) and BeenIn(x, z) are predicates that are true if "z computer science majors do not have a freshman.
is a room in building y" and "x has been in room z," respectively.
(a) True
(b) False
16. A discrete mathematics class contains 1 mathematics major
who is a freshman, 12 mathematics majors who are (c) True

sophomores, 15 computer science majors who are sophomores, 2 (d) False


mathematics majors who are juniors, 2 computer (e) False
b) Let B( x. y) mean ”e-mail address of user x has sent message y
on the system that is contained in the archive" and C(x) mean "e-
17. Express each of these system specifications using predicates, mail address of user x can be retrieved".
quantifiers, and logical connectives, if necessary.
∀x∃y[B(x,y)→C(x)]
a) Every user has access to exactly one mailbox.
b) There is a process that continues to run during all error
c) Let D(x. y) mean "mechanism x can detect security breach y"
conditions only if the kernel is working correctly.
and E(z) mean "process z has been compromised".
c) All users on the campus network can access all websites whose
∀x∃yD(x,y)↔∃zE(z)
url has a .edu extension.
d) There are exactly two systems that monitor every remote server.
d)
Answer:
Let F(x. y. z) mean “path x connects distinct endpoints y and z ”
a) $\forall u \exists m (Access(u,m) \land (\forall m' \neq m)(\neg
Access(u,m')))$, where $Access(u,m)$ means user $u$ has access ∀y∀z∃x∃a[x≠a→(F(x,y,z)∧F(a,y,z))]
to mailbox $m$.

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 $

sent by every user on the system.


c) For every security breach there is at least one mechanism that 20. Express each of these statements using predicates, quantifiers,
can detect that breach if and only if there is logical connectives, and mathematical operators

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:

We Have to prove that on which domain ∀x∀y∀z∃w((w = x) ∧ (w


= y) ∧ (w = z)) is false?true?
As we know that Answer:
Any domain with four or more members makes the statement true; a) Rewrite statement:
any domain with three or fewer members makes the statement If a real number is negative and
false.
another real number is also negative
then the product is positive.
21. Use predicates, quantifiers, logical connectives, and
∃x∃y[(x<0∧y<0)→xy>0)]
mathematical operators to express the statement that every positive
integer is the sum of the squares of four integers.
Answer: b)Rewrite statement:

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.

This statement is equivalent to saying that every positive integer


can be written as the sum of the squares of four integers. d)Rewrite statement:
If a real number is negative, then it does not have a (real) square
root.
22. Use predicates, quantifiers, logical connectives, and
∀x[x<0→¬∃y(x=y2)]
mathematical operators to express the statement that there
is a positive integer that is not the sum of three squares.
24. Translate each of these nested quantifications into an English
Answer: statement that expresses a mathematical fact. The
Let P(n) be the proposition that n is not the sum of three squares, domain in each case consists of all real numbers.
where the domain of n is all positive integers.
a) ∃x∀y(x + y = y)

b) ∀x∀y(((x ≥ 0) ∧ (y < 0)) → (x − y > 0))


The statement we want to express is: "There exists a positive
integer n such that P(n) is true." c) ∃x∃y(((x ≤ 0) ∧ (y ≤ 0)) ∧ (x − y > 0))

d) ∀x∀y((x = 0) ∧ (y = 0) ↔ (xy = 0))


Using quantifiers and logical connectives, we can express this as: Answer:

a. ∃ means THERE EXISTS and ∀ means FOR EVERY


∃n∈Z+ : P(n) There exists a real number (x) that when added to any real number
(y) results in the value of that real number (y).

This can be read as "There exists an n in the set of positive integers


such that P(n) is true," or more colloquially, "There is a positive b.∃ means THERE EXISTS and → means IF-THEN
integer that is not the sum of three squares."
≥0 means non-negative
>0 means positive
23. Express each of these mathematical statements using
<0 means negative
predicates, quantifiers, logical connectives, and mathematical
operators.
a) The product of two negative real numbers is positive. The difference of any non-negative real number and any negative
real number is positive.
b) The difference of a real number and itself is zero.
c.∃ means THERE EXISTS and ∧ means AND
c) Every positive real number has exactly two square
≤0 means non-positive
roots.
>0 means positive
d) A negative real number does not have a square root
There exist two non-positive real numbers whose difference is
that is a real number. positive.
d) ∃xQ(x, 2):
d. ∀ means FOR EVERY and ∧ means AND and↔ means IF AND We need to determine whether there exists an integer x such that
ONLY IF Q(x, 2) is true.
For every two real numbers, the two real numbers are both non- x+2=x-2
zero if and only if their product is non-zero.
4 = -4

This is false for all integers x, so ∃xQ(x, 2) is false.


25. Translate each of these nested quantifications into an English
statement that expresses a mathematical fact. The
domain in each case consists of all real numbers. e) ∃x∃yQ(x, y):

a) ∃x∀y(xy = y) We need to determine whether there exist integers x and y such


that Q(x, y) is true.
b) ∀x∀y(((x < 0) ∧ (y < 0)) → (xy> 0))
Let x = 0 and y = 0, then
c) ∃x∃y((x2 > y) ∧ (x < y))
0+0=0-0
d) ∀x∀y∃z(x + y = z)
0=0
Answer:
So Q(0, 0) is true, and thus ∃x∃yQ(x, y) is true.
a) There exists a real number x such that for all real numbers y, the
product of x and y equals y.

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

Thus, Q(x, y) is true for some y, and thus ∀x∃yQ(x, y) is true.


d) For all real numbers x and y, there exists a real number z such
that the sum of x and y equals z.
g) ∃y∀xQ(x, y):

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.

the truth values? y+x=y-x

a) Q(1, 1) b) Q(2, 0) 2x = 0

c) ∀yQ(1, y) d) ∃xQ(x, 2) x=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)

i) ∀x∀yQ(x, y) h) ∀y∃xQ(x, y):

Answer: We need to determine whether for every integer y, there exists an


integer x such that Q(x, y) is true.
a) Q(1, 1):
For any y, we can choose x = y/2, then
1 + 1 = 1 - 1 is false, so Q(1, 1) is false.
x + y = y/2 + y = 3y/2
x - y = y/2 - y = -y/2
b) Q(2, 0):
Thus, Q(x, y) is true for this choice of x, and thus ∀y∃xQ(x, y) is
2 + 0 = 2 - 0 is true, so Q(2, 0) is true. true.

c) ∀yQ(1, y): i) ∀x∀yQ(x, y):


We need to determine whether Q(1, y) is true for all y. We need to determine whether Q(x, y) is true for all integers x and
1+y=1-y 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.

g) ∃n∃m(n + m = 4 ∧ n − m = 1) d) True. This statement is equivalent to the existence of two real


numbers x and y such that x + y = y + x, which is true for any x
h) ∃n∃m(n + m = 4 ∧ n − m = 2) and y.
i) ∀n∀m∃p(p = (m + n)/2) e) True. This statement says that for any real number x, if x = 0,
then there exists a real number y such that xy = 1. This is true
Answer:
because for x = 0, any non-zero y will satisfy xy = 1.
a) The statement is true. For any integer $n$, we can always find
f) False. This statement says that there exists a real number x such
an integer $m$ such that $m=n^2+1$. Then $n^2<m$, which
that for any real number y, if y = 0, then xy = 1. However, if y = 0,
means $n^2<m$ is true for all integers $n$.
then xy = 0 for any x, so the statement is false.
g) True. For any real number x, we can choose y = 1 − x, and we
b) The statement is false. If we let $n=3$, then $n<m^2$ is not true have x + y = 1.
for all integers $m$.
h) True. Solving the system of equations gives x = −3/2 and y = 2,
which are both real numbers.

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.

a) ∀x∀yP (x, y) b) ∃x∃yP (x, y)


f) The statement is false. There are no two integers $n$ and $m$
such that $n^2+m^2=6$. c) ∃x∀yP (x, y) d) ∀y∃xP (x, y)

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:

28. Determine the truth value of each of these statements if


(P(1, 1) ∨ P(1, 2) ∨ P(1, 3)) ∨ (P(2, 1) ∨ P(2, 2) ∨ P(2, 3)) ∨ (P(3,
the domain of each variable consists of all real numbers.
1) ∨ P(3, 2) ∨ P(3, 3))
a) ∀x∃y(x2 = y) b) ∀x∃y(x = y2)

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)

c) ¬∀y∀x(P (x, y) ∨ Q(x, y))


30. Rewrite each of these statements so that negations appear only
within predicates (that is, so that no negation d) ¬(∃x∃y¬P (x, y) ∧∀x∀yQ(x, y))
is outside a quantifier or an expression involving logical e) ¬∀x(∃y∀zP (x, y, z) ∧∃z∀yP (x, y, z))
connectives). Answer:
a) ¬∃y∃xP (x, y) b) ¬∀x∃yP (x, y) a) $\exists x \exists y \neg P(x, y)$
c) ¬∃y(Q(y) ∧∀x¬R(x, y)) b) $\exists y \forall x \neg P(x, y)$
d) ¬∃y(∃xR(x, y) ∨∀xS(x, y)) c) $\exists y \exists x \neg (P(x, y) \lor Q(x, y))$
e) ¬∃y(∀x∃zT (x, y, z) ∨∃x∀zU(x, y, z)) d) $\exists x \exists y (P(x, y) \land \neg Q(x, y))$
Answer: e) $\exists x \exists y \exists z (\neg P(x, y, z) \lor \neg P(x, z, y))$
a) ∀y∀x¬P (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:

The statement ∀x∀y((x = y) →∀z((z = x) ∨ (z = y))) can be


translated as: for all x and y, if x equals y, then for all z, either z
31. Express the negations of each of these statements so that
equals x or z equals y.
all negation symbols immediately precede predicates.

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))

d) ¬∀x∃y(P(x, y) → Q(x, y)) ⇔∃x∀y¬(P(x, y) → Q(x, y))


⇔∃x∀y(P(x, y) ∧¬Q(x, y)) 35. Find a common domain for the variables x, y, z,

and w for which the statement ∀x∀y∀z∃w((w = x) ∧

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.

a) ∃z∀y∀xT (x, y, z) Answer:

b) ∃x∃yP (x, y) ∧∀x∀yQ(x, y) The statement ∀x∀y∀z∃w((w = x) ∧ (w = y) ∧ (w = z)) states that


for any values of x, y, and z, there exists a value of w that is equal
c) ∃x∃y(Q(x, y) ↔ Q(y, x)) to all of them.
d) ∀y∃x∃z(T (x, y, z) ∨ Q(x, y))

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))

c) ∀x∀y(Q(x, y) ∧¬Q(y, x))


On the other hand, if we restrict the domain of x, y, z, and w to the
d) ∃y∀x∀z(¬T(x, y, z) ∧¬Q(x, y)) set of positive integers, the statement becomes false. To see why,
consider the case where x = 1, y = 2, and z = 3. The statement d) Every movie actor has either been in a movie with
would then assert the existence of a positive integer w that is equal
to 1, 2, and 3 at the same time, which is impossible. Kevin Bacon or has been in a movie with someone
who has been in a movie with Kevin Bacon.

36. Express each of these statements using quantifiers. Then Answer:

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.

Negation: ∀x(loss(x) ≤ 1000). Every person has lost at most one


thousand dollars playing the lottery.
d) ∀x(MovieActor(x) → (∃y(MovieActor(y) ∧InMovie(x, y,
b) ∃x∃y(chat(x, y) ∧∀z(x ≠ z ∧ chat(x, z) → y = z)) KevinBacon)) ∨ (∃y∃z(MovieActor(y) ∧MovieActor(z)
∧InMovie(x, y, z)))))
Negation: ∀x∃y(chat(x, y) ∧∀z(x ≠ z ∧ chat(x, z) → y ≠ z)). For
every student in this class, there is no one else in this class with Negation: ∃x(MovieActor(x) ∧¬(∃y(MovieActor(y) ∧InMovie(x,
whom the student has chatted. y, KevinBacon)) ∨ (∃y∃z(MovieActor(y) ∧MovieActor(z)
∧InMovie(x, y, z)))))
c) ∼∃x∃y∃z(x ≠ y ∧ x ≠ z ∧ y ≠ z ∧ email(x, y) ∧ email(x, z)
∧¬email(y, z) ∧¬email(z, y)) Negation in English: There exists a movie actor who has not been
in a movie with Kevin Bacon and has not been in a movie with
Negation: ∀x∃y∃z(x ≠ y ∧ x ≠ z ∧ y ≠ z ∧ email(x, y) ∧ email(x, z) someone who has been in a movie with Kevin Bacon.
∧ email(y, z)). For every student in this class, there are two other
students in this class to whom the student has sent e-mail.

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.

c) No one has climbed every mountain in the Himalayas.


English: Every student in this class has never seen a computer. = 1. Therefore, the only possible values of x and y are 0 and 1, and
indeed 02 = 03 = 0, and 12 = 13 = 1.
c) $\neg(\exists$ student $s$ in this class who has taken every
mathematics course offered at this school) $\equiv$ $\forall$
student $s$ in this class, $s$ has not taken every mathematics
course offered at this school. 41. Use quantifiers to express the associative law for multiplication
of real numbers.
Answer:
English: Every student in this class has not taken every
mathematics course offered at this school. The associative law for multiplication of real numbers can be
expressed as:
d) $\neg(\exists$ student $s$ in this class who has been in at least
one room of every building on campus) $\equiv$ $\forall$ student
$s$ in this class, $s$ has not been in at least one room of every $∀x∀y∀z(x(yz) = (xy)z)$
building on campus.

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)

b) The statement is true. Every integer x has a square y = x2, so the


statement is satisfied for every x. This means that for any real numbers a, b, and c, multiplying a by
the sum of b and c is the same as multiplying a by b and adding
that to the product of a and c.
c) The statement is false. A counterexample is x = 0 and y = −1.
We have that 0(−1) = 0, but 0 < 0.
2.Right distributive law: For all real numbers a, b, and c, we have:

∀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.

b) ∀x∃y(y2 − x < 100)

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)),

where all quantifiers have the same nonempty domain,

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.)

a) the nonzero real numbers. Answer:

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.

Next, assume ∀x∃y¬P(x, y) is true. This means that for every x,


c) The statement is true. To see this, note that if x is positive, then there exists a y such that ¬P(x, y) is true. In other words, it is not
we can take y = 1/x. Then xy = x(1/x) = 1, so the statement is true the case that there exists an x such that for all y, P(x, y) is true.
for the domain of positive real numbers. This can be expressed as ¬∃x∀yP(x, y).

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.

a) the positive real numbers.


b) the integers. To show that ∀xP(x) ∨∀xQ(x) and ∀x∀y(P(x) ∨ Q(y)) are logically
equivalent, we need to show that they have the same truth value
c) the nonzero real numbers. under any interpretation.
Answer:
a) Let's first consider the positive real numbers as the domain. The
statement is true in this case. To see this, let's take any positive real First, assume ∀xP(x) ∨∀xQ(x) is true. This means that either for
number $x$. Then, for any $y$ greater than or equal to $\sqrt{x}$, every x, P(x) is true, or for every x, Q(x) is true. If P(x) is true for
we have $x \leq y^2$. This is because $y^2$ is greater than or every x, then for every x and y, P(x) ∨ Q(y) is true. If Q(x) is true
equal to $x$, and $x$ is less than or equal to $y^2$, which implies
for every x, then for every x and y, P(x) ∨ Q(y) is true. Therefore, Q(y)) is in prenex normal form, whereas ∃xP (x) ∨∀xQ(x)is not
∀x∀y(P(x) ∨ Q(y)) is true. (because the quantifiers do not all occur first).
Every statement formed from propositional variables,predicates, T,
and F using logical connectives and quantifiers is equivalent to a
Next, assume ∀x∀y(P(x) ∨ Q(y)) is true. This means that for every statement in prenex normal form.
x and y, P(x) ∨ Q(y) is true. In particular, for every x, P(x) ∨ Q(x)
is true. If P(x) is true for some x, then ∀xP(x) is true. If Q(x) is true Exercise 51 asks for a proof of this fact.
for some x, then ∀xQ(x) is true. Therefore, ∀xP(x) ∨∀xQ(x) is
true.

50. Put these statements in prenex normal form. [Hint: Uselogical


Therefore, ∀xP(x) ∨∀xQ(x) and ∀x∀y(P(x) ∨ Q(y)) are logically
equivalence from Tables 6 and 7 in Section 1.3,Table 2 in Section
equivalent.
1.4, Example 19 in Section 1.4,Exercises 45 and 46 in Section 1.4,
and Exercises 48 and49.]

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

Answer: b) ∃x(¬P (x) ∧¬Q(x))

a) To show that ∀xP(x) ∧∃xQ(x) is logically equivalent to c) ¬∃xP (x) ∨∃xQ(x)


∀x∃y(P(x) ∧ Q(y)), we need to show that each statement implies
the other.
51. Show how to transform an arbitrary statement to a statement in
prenex normal form that is equivalent to the given
First, assume ∀xP(x) ∧∃xQ(x). Then there exists some value of x
statement. (Note: A formal solution of this exercise requires use of
(call it a) such that Q(a) is true. Since ∀xP(x) is true, in particular,
structural induction, covered in Section 5.3.)
P(a) is true. Therefore, we can say that ∃y(P(a) ∧ Q(y)) is true by
setting y to be equal to a. Moreover, since this is true for any value Answer:
of x, we can conclude that ∀x∃y(P(x) ∧ Q(y)) is true.
To transform an arbitrary statement into a statement in prenex
normal form, we follow these steps:

Now assume that ∀x∃y(P(x) ∧ Q(y)). Then for any value of x,


there exists some value of y (call it b) such that P(x) ∧ Q(b) is true.
If the statement does not contain any quantifiers, it is already in
In particular, this means that there exists some value of b such that
prenex normal form.
Q(b) is true. Therefore, we can say that ∃xQ(x) is true. Moreover,
since ∀xP(x) is true, we can conclude that ∀xP(x) ∧∃xQ(x) is true. If the statement begins with a quantifier, we can move that
quantifier to the front of the statement.
If the statement has the form P ∧ Q or P ∨ Q, we can transform
b) To show that ∀xP(x) ∨∃xQ(x) is equivalent to ∀x∃y(P(x) ∨
each of P and Q to prenex normal form and then combine them
Q(y)), we again need to show that each statement implies the other.
using the appropriate logical connective.
If the statement has the form ¬P, we can transform P to prenex
First, assume that ∀xP(x) ∨∃xQ(x) is true. If ∀xP(x) is true, then normal form and then negate it.
for any value of x, we can set y to be equal to x, and we have P(x)
If the statement has the form P → Q or P ↔ Q, we can transform P
∨ Q(y). If ∃xQ(x) is true, then there exists some value of x (call it
and Q to prenex normal form and then combine them using the
a) such that Q(a) is true. We can set y to be equal to a, and we have
appropriate logical connective.
Q(y) ∨ P(x) (note that we can switch the order of the disjunction
without changing the truth value). Therefore, we can say that We can use structural induction to show that any statement can be
∀x∃y(P(x) ∨ Q(y)) is true. transformed into prenex normal form using these steps. The base
case is when the statement does not contain any quantifiers, which
is already in prenex normal form. For the induction step, assume
Now assume that ∀x∃y(P(x) ∨ Q(y)). Then for any value of x, that the steps can transform any statement of size n or less into
there exists some value of y (call it b) such that P(x) ∨ Q(b) is true. prenex normal form. To transform a statement of size n+1, we
If P(x) is true, then we have ∀xP(x). If Q(b) is true, then we have apply the above steps to the outermost connective, which has at
∃xQ(x). Therefore, we can say that ∀xP(x) ∨∃xQ(x) is true. least one of its operands of size n or less. By the induction
hypothesis, we can transform that operand into prenex normal
form, and then apply the appropriate step to combine it with the
other operand.
A statement is in prenex normal form (PNF) if and only if itis of
the form
Q1x1Q2x2 · · · QkxkP (x1, x2, . . . ,xk), Using this method, we can transform any statement into an
equivalent statement in prenex normal form.
where each Qi, i = 1, 2, . . . , k, is either the existential quantifier or
the universal quantifier, and P (x1, . . . , xk) is a predicate involving
no quantifiers. For example, ∃x∀y(P (x, y) ∧
52. Express the quantification ∃!xP (x), introduced in Section 1.4,
using universal quantifications, existential quantifications, and
logical operators.
Answer:

The quantification ∃!xP (x) means "there exists a unique x such


that P (x) is true." We can express this using universal
quantifications, existential quantifications, and logical operators as
follows:

∃x(P(x) ∧∀y(P(y) → y = x))

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.

Chapter 1 - Section 1.6 - Rules of Inference – Exercises


1. 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 Socrates is human, then Socrates is mortal.Socrates is human.

∴ Socrates is mortal.

Answer:
Modus Ponens:
p→qp
−−−

∴q

Ans-
Let us assume:
p="Socrates is human"
q="Socrates is mortal"

Then we can write the given argument as


p→qp
−−−

∴q

The order of statements in the argument does not matter, so


pp→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.

∴ George has eight legs.

Answer:
Modua tollens:
p→q¬q
−−−

∴¬p

Let us assume :
p="George have eight legs"
q="George is a spider".

Then we can write the given argument as


¬p→¬qq
−−−

∴p

q≡¬(¬q)
This can also be written as:
¬p→¬q¬(¬q)
−−−

∴¬(¬p)

Then the conclusion is true according to modus tollens rule.


Argument form is modus tollens.
Argument is valid
Conclusion is true since premises are true.

3. What rule of inference is used in each of these arguments?


a) Alice is a mathematics major. Therefore, Alice is either amathematicsmajor or a computer sciencemajor.
b) Jerry is a mathematics major and a computer sciencemajor. Therefore, Jerry is a mathematics major.
c) If it is rainy, then the pool will be closed. It is rainy.Therefore, the pool is closed.
d) If it snows today, the university will close. The university is not closed today. Therefore, it did not snowtoday.
e) If I go swimming, then I will stay in the sun too long.If I stay in the sun too long, then I will sunburn. Therefore, if I go swimming, then I will
sunburn.
Answer:
a) Let us assume:
p="Alice is a mathematics major"
q="Alice is a computer science major"

We can write the given argument using above stated interpretation as:
p
−−−

p∨q

Using Rule of addition

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

Note that the argument uses rule of simplification.

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

Note that the argument uses rule of Modus Ponens.

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

Note that the argument uses rule of Modus Tollens.

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

Note that the argument uses rule of Hypothetical Syllogism.


a) Addition
b) Simplification
c) Modus Ponens
d) Modus Tollens
e) Hypothetical Syllogism

4. What rule of inference is used in each of these arguments?


a) Kangaroos live inAustralia and aremarsupials.Therefore, kangaroos are marsupials.
b) It is either hotter than 100 degrees today or the pollution is dangerous. It is less than 100 degrees outsidetoday. Therefore, the pollution is
dangerous.
c) Linda is an excellent swimmer. If Linda is an excellentswimmer, then she can work as a lifeguard. Therefore,Linda can work as a lifeguard.
d) Steve will work at a computer company this summer.Therefore, this summer Steve will work at a computercompany or he will be a beach
bum.
e) If I work all night on this homework, then I can answer all the exercises. If I answer all the exercises, Iwill understand the material. Therefore,
if I work allnight on this homework, then I will understand thematerial.
Answer:
a) Let us assume:
q="Kangaroos live in Australia"
p="Kangaroos are marsupials"
We can write the given argument using above stated interpretation as:

p∧q

∴p

Note that the argument uses rule of simplification.

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

Note that the argument uses rule of Disjunctive Syllogism

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

Note that the argument uses rule of Modus Ponens.

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

Note that the argument uses rule of Addition.

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

Note that the argument uses rule of Hypothetical Syllogism.


a) Simplification
b) Disjunctive Syllogism
c) Modus Ponens
d) Addition
e) Hypothetical Syllogism

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"

We can write the given statements as:


1) “Randy works hard” ≡p
2) “If Randy works hard, then he is a dull boy,” ≡p→q
3) “If Randy is a dull boy, then he will not get the job” ≡q→¬r

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:

If something is a man, then it is not an island. (premise)


Manhattan is an island. (premise)
Therefore, Manhattan is not a man. (conclusion)
This argument follows the form of Modus Tollens, which is a valid argument form in propositional logic.

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.

b) The argument uses the following rule of inference:

 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.

20. Determine whether these are valid arguments.


a) If x is a positive real number, then x2 is a positive realnumber. Therefore, if a2 is positive, where a is a realnumber, then a is a positive real
number.
b) If x2 = 0, where x is a real number, then x = 0. Leta be a real number with a2 = 0; then a = 0.
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.

1. ∃xP (x) ∨∃xQ(x) Premise

2. ∃xP (x) Simplification from (1)

3. P (c) Existential instantiation from (2)

4. ∃xQ(x) Simplification from (1)

5. Q(c) Existential instantiation from (4)

6. P (c) ∧ Q(c) Conjunction from (3) and (5)

7. ∃x(P (x) ∧ Q(x)) Existential generalization

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.

1. ∀x(P (x) ∨ Q(x)) Premise

2. P (c) ∨ Q(c) Universal instantiation from (1)

3. P (c) Simplification from (2)

4. ∀xP (x) Universal generalization from (3)

5. Q(c) Simplification from (2)

6. ∀xQ(x) Universal generalization from (5)

7. ∀x(P (x) ∨∀xQ(x)) Conjunction from (4) and (6)

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))

We want to prove that the following statement is true:

2. ¬Q(a) → ¬P(a)

To do this, we assume ¬Q(a) as a premise and show that it implies ¬P(a):

3. ¬Q(a) Assume for conditional proof


4. P(a) Assume for conditional proof
5. P(a) → Q(a) Universal instantiation of (1)
6. Q(a) Modus ponens using (4) and (5)
7. Q(a) ∧¬Q(a) Conjunction of (3) and (6)
8. ¬P(a) Negation introduction from (4) to (7)
9. ¬Q(a) → ¬P(a) Conditional proof, discharging assumption in (3)

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:

1. ∀x(P(x) → (Q(x) ∧ S(x))) Premise


2. ∀x(P(x) ∧ R(x)) Premise
3. P(a) ∧ R(a) Universal instantiation from (2)
4. P(a) → (Q(a) ∧ S(a)) Universal instantiation from (1)
5. P(a) Simplification from (3)
6. Q(a) ∧ S(a) Modus ponens from (4) and (5)
7. R(a) Simplification from (3)
8. S(a) Simplification from (6)
9. R(b) ∧ S(b) Universal generalization from (7) and (8)

Therefore, ∀x(R(x) ∧ S(x)) is true.

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:

1. ∀x(P(x) ∨ Q(x)) Premise


2. ∀x((¬P(x) ∧ Q(x)) → R(x)) Premise
3. ¬R(a) for a particular element a in the domain, Assume for Universal Conditional Proof (UCP)
4. P(a) ∨ Q(a) Universal instantiation from (1)
5. Case 1: P(a) Assume for Conditional Proof (CP)
6. ¬(¬P(a) ∧ Q(a)) Simplification from (2) with (5)
7. ¬¬P(a) ∨¬Q(a) De Morgan's law applied to (6)
8. P(a) ∨¬Q(a) Double negation applied to (7)
9. Q(a) Assume for CP
10. ¬P(a) ∧ Q(a) Conjunction from (5) and (9)
11. R(a) Modus ponens applied to (2) with (10)
12. This contradicts (3). Thus, ¬¬R(a) by indirect proof.
13. ¬R(a) → P(a) Material implication applied to (8)
14. ∀x(¬R(x) → P(x)) Universal generalization.

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:

1. ∀x(P(x) ∨ Q(x)) Premise


2. ∀x(¬Q(x) ∨ S(x)) Premise
3. ∀x(R(x) →¬S(x)) Premise
4. ∃x¬P(x) Premise
5. ¬P(a) Existential instantiation from (4)
6. P(a) ∨ Q(a) Universal instantiation from (1)
7. Q(a) ¬P(a) ∧ (P(a) ∨ Q(a)) Simplification from (5) and (6)
8. ¬Q(a) ∨ S(a) Universal instantiation from (2)
9. S(a) ¬Q(a) ∧ (¬Q(a) ∨ S(a)) Simplification from (7) and (8)
10. R(a) → ¬S(a) Universal instantiation from (3)
11. ¬S(a) Modus ponens from (10) and (9)
12. ¬Q(a) ¬S(a) ∧ (¬Q(a) ∨ S(a)) Simplification from (9)
13. ¬Q(a) Modus tollens from (11) and (12)
14. ∃x¬R(x) ¬R(a) Existential instantiation
15. ¬R(a) ∨ P(a) Addition from (14)
16. ∃x¬R(x) Existential generalization from (15)

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:

1. Write the negation of the equivalence we want to prove: p ∧¬p ≠ F.

2. Convert the negation of the equivalence to CNF (conjunctive normal form):


(p ∧¬p) ∧ F

3. Apply resolution to the CNF formula:


(p ∧¬p ∨ F) ∧ (¬p ∨ p)

4. Simplify the resulting formula:


T∧T

5. Use the fact that a conditional statement with a false hypothesis is true:
(p ∧¬p) → F

6. Negate the formula from step 5 to obtain the original formula:


¬((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:

(p ∨ q) ∧ (¬p ∨ q) ∧ (p ∨¬q) ∧ (¬p ∨¬q)

= (p ∧¬p ∨ p ∧ q ∨¬p ∧ q ∨¬p ∧¬q)

∧ (p ∧¬p ∨ p ∧¬q ∨¬p ∧ q ∨¬p ∧¬q)

= (p ∧ q ∨¬p ∧ q ∨¬p ∧¬q)

∧ (p ∧¬q ∨¬p ∧ q ∨¬p ∧¬q)


We can now use resolution to derive a contradiction. We create clauses from the two conjuncts of the proposition, and add the negation of each
clause to the set of clauses:

C1: p ∨ q

C2: ¬p ∨ q

C3: p ∨¬q

C4: ¬p ∨ ¬q

C5: ¬p ∧¬q

C6: ¬p ∧ q

C7: p ∧¬q

We start by resolving C1 and C2 with respect to q, which results =T


in:

C8: p ∨¬p
We can now resolve C8 and C9 with respect to q, which results in:
=T
C10: F

Next, we resolve C3 and C4 with respect to p, which results in:


34. The Logic Problem, taken from WFF’N PROOF, TheGame of
C9: ¬q ∨ q Logic, has these two assumptions:
1. “Logic is difficult or not many students like logic.” to ¬M ∨ L ∨ ¬S. Then, we can use commutativity and associativity
of ∨ to get the desired conclusion.
2. “If mathematics is easy, then logic is not difficult.”
By translating these assumptions into statements involving
propositional variables and logical connectives, determine whether 35. Determine whether this argument, taken from Kalish
each of the following are valid conclusionsof these assumptions: andMontague [KaMo64], is valid.If Superman were able and
willing to prevent evil,he would do so. If Superman were unable to
a) That mathematics is not easy, if many students likelogic.
preventevil, he would be impotent; if he were unwillingto prevent
b) That not many students like logic, if mathematics isnot easy. evil, he would be malevolent. Supermandoes not prevent evil. If
Superman exists, he is neither impotent nor malevolent. Therefore,
c) That mathematics is not easy or logic is difficult. Supermandoes not exist.
d) That logic is not difficult or mathematics is not easy. Answer:
e) That if not many students like logic, then either mathematics is This argument is valid, and it follows the form of a reductio ad
not easy or logic is not difficult. absurdum. To prove that Superman does not exist, the argument
Answer: assumes that he exists and derives a contradiction, which leads to
the conclusion that the initial assumption of his existence must be
To translate the assumptions into statements involving false.
propositional variables and logical connectives, we can let:

The argument proceeds as follows:


 L represent "Logic is difficult"
 S represent "Many students like logic"
 M represent "Mathematics is easy" 1. If Superman were able and willing to prevent evil, he
would do so. (premise)
Then we have:
2. If Superman were unable to prevent evil, he would be
impotent. (premise)
3. If Superman were unwilling to prevent evil, he would
 L ∨¬S be malevolent. (premise)
 M → ¬L 4. Superman does not prevent evil. (premise)
5. If Superman exists, he is neither impotent nor
Now we can use these to determine whether each of the following
malevolent. (premise)
are valid conclusions:
6. Assume for contradiction that Superman exists.
7. From 1 and 4, it follows that Superman is either unable
or unwilling to prevent evil.
a) That mathematics is not easy, if many students like logic. 8. From 2 and 5, it follows that if Superman exists, he is
To show this is a valid conclusion, we need to prove that ¬M not impotent.
follows logically from S. We can do this by assuming ¬M and 9. From 3 and 5, it follows that if Superman exists, he is
using modus ponens with (2) to conclude ¬L. Then, we can use not malevolent.
modus ponens again with (1) to conclude ¬S. Therefore, the 10. Therefore, if Superman exists, he is both able and
conclusion is valid. unwilling to prevent evil, which is a contradiction.
11. Therefore, the assumption that Superman exists must be
false.
12. Therefore, Superman does not exist.
b) That not many students like logic, if mathematics is not easy.
Since the argument is valid and its premises are all plausible, the
To show this is a valid conclusion, we need to prove that ¬S
conclusion that Superman does not exist is a sound one.
follows logically from ¬M. We can do this by assuming ¬S and
using modus tollens with (1) to conclude L. Then, we can use
modus ponens with (2) to conclude ¬M. Therefore, the conclusion
is valid.

c) That mathematics is not easy or logic is difficult.


This conclusion is not valid, as it does not follow logically from
the assumptions. We cannot simply combine (1) and (2) to get this
conclusion.

d) That logic is not difficult or mathematics is not easy.


This conclusion is valid, as we can use disjunctive syllogism with
(1) and (2) to get ¬L ∨¬S ∨¬M, which is equivalent to ¬L ∨¬M
∨¬S. Then, we can use commutativity and associativity of ∨ to get
the desired conclusion.

e) That if not many students like logic, then either mathematics is


not easy or logic is not difficult.
This conclusion is valid, as we can use modus tollens with (2) and
contrapositive with (1) to get ¬S → (¬M ∨ L), which is equivalent
Hence,Proved.

3. Show that the square of an even number is an even numberusing


a direct proof.
Answer:
Chapter 1 - Section 1.7 - Introduction to Proofs – Exercises
SOLUTION:
1. Use a direct proof to show that the sum of two odd integersis
even.
Answer: Let,
SOLUTION: Even number (a) = 2k
Let,
First odd integer (a) = 2k+1 Now,
& a2 = (2k)2
Second odd integer (b) = 2m+1 = 4k2 = 2(2k2)
where in both. k and m are the any integers. = even.

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$:

Therefore, we have proven that if $m + n$ and $n + p$ are even n−m2 =a2


integers, where $m$, $n$, and $p$ are integers, then $m + p$ is Substituting this expression in the previous equation gives:
even.
n=a2+m2
Therefore, we have shown that $n$ can be written as the difference
6. Use a direct proof to show that the product of two oddnumbers of two squares, namely $a^2$ and $m^2$. Since this holds for
is odd. every odd integer $n$, we have proven that every odd integer is the
Answer: difference of two squares.

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.

Suppose we have two odd integers $m$ and $n$. By definition,


this means that there exist integers $a$ and $b$ such that: 8. Prove that if n is a perfect square, then n + 2 is not aperfect
m=2a+1 square.

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:

7. Use a direct proof to show that every odd integer is (b+a)(b−a)=2


thedifference of two squares. Since $2$ is a prime number, it can only be factored as $2 \cdot 1$
Answer: or $1 \cdot 2$. Therefore, we have two possible cases:

To prove that every odd integer is the difference of two squares,


we can use a direct proof. Case 1: $b+a = 2$ and $b-a = 1$

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:

Therefore, we have proven that if $n$ is a perfect square, then ac


$n+2$ is not a perfect square. xy=
bd
Since $a$, $b$, $c$, and $d$ are all integers and $b \neq 0$ and $d
9. Use a proof by contradiction to prove that the sum of \neq 0$, it follows that $bd \neq 0$ and $ac$ is an integer.
anirrational number and a rational number is irrational. Therefore, we can write:
Answer:
ac
xy=
To prove that the sum of an irrational number and a rational bd
number is irrational, we can use a proof by contradiction.
where $ac$ and $bd$ are integers and $bd \neq 0$. This shows that
$xy$ can be expressed as the quotient of two integers, where the
Suppose that $x$ is an irrational number and $y$ is a rational denominator is not equal to zero. Therefore, $xy$ is a rational
number, and that $x+y$ is a rational number. Then there exist number.
integers $p$ and $q$ such that $q \neq 0$ and:

p Therefore, we have proven that the product of two rational


x + y=
q numbers is rational using a direct proof.

We can rearrange this equation to get:


11. Prove or disprove that the product of two irrational numbers is
p irrational.
x= − y
q Answer:
Since the difference and product of a rational number and an The statement "the product of two irrational numbers is irrational"
irrational number is irrational, it follows that $x$ must be is true. We can prove this using a proof by contradiction.
irrational.

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.

Therefore, we can conclude that the assumption that $xy$ is


Suppose that $x$ and $y$ are rational numbers. Then there exist rational leads to a contradiction. Hence, the product of two
integers $a, b, c,$ and $d$ such that $b \neq 0$ and $d \neq 0$ irrational numbers is irrational.
such that:
Therefore, we have proven that the product of two irrational px
numbers is irrational. 1=
q
Since $x$ is irrational, we know that $px$ is also irrational, as the
12. Prove or disprove that the product of a nonzero rationalnumber product of a nonzero rational number and an irrational number is
and an irrational number is irrational. always irrational. Therefore, the equation above implies that $1$ is
Answer: irrational, which is a contradiction. Hence, the assumption that
$1/x$ is rational must be false.
The statement "the product of a nonzero rational number and an
irrational number is irrational" is true. We can prove this using a
proof by contradiction. Therefore, we can conclude that if $x$ is irrational, then $1/x$ is
irrational.

Suppose that $x$ is a nonzero rational number, $y$ is an irrational


number, and that $xy$ is a rational number. Then there exist Thus, we have proven the statement.
integers $a$ and $b$ such that $b \neq 0$ and:

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.

Suppose that $x$ is irrational and $1/x$ is rational. Then there


exist integers $p$ and $q$ with $q \neq 0$ such that: The contrapositive of this statement is "if $x < 1$ and $y < 1$,
then $x+y< 2$." We will prove this statement instead.
1 p
=
x q
Suppose $x < 1$ and $y < 1$. Adding these inequalities, we get:
Multiplying both sides of the equation by $x$, we get:
x+y<1+1=2
Therefore, we can conclude that if $x < 1$ and $y < 1$, then Hence, the contrapositive of the statement is true. Therefore, if
$x+y< 2$. $n^3+5$ is odd, then $n$ must be even.

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.

We want to prove that if $n^3+5$ is odd, then $n$ is even.


Thus, we have proved that if $x+y \geq 2$, where $x$ and $y$ are
real numbers, then $x \geq 1$ or $y \geq 1$.
Suppose, for the sake of contradiction, that $n$ is odd. Then
$n=2k+1$ for some integer $k$. Substituting this expression into
16. Prove that if m and n are integers and mn is even, then mis $n^3+5$, we get:
even or n is even.
\begin{align*}
Answer:
n^3+5 &= (2k+1)^3 + 5 \
We will prove the statement "if $m$ and $n$ are integers and
$mn$ is even, then $m$ is even or $n$ is even" using a proof by &= 8k^3+12k^2+6k+1+5 \
contradiction. &= 8k^3+12k^2+6k+6
\end{align*}
Suppose that $m$ and $n$ are integers, $mn$ is even, and both The right-hand side can be factored as $2(4k^3+6k^2+3k+3)$,
$m$ and $n$ are odd. Then there exist integers $k$ and $l$ such which is an even number. This contradicts the assumption that
that: $n^3+5$ is odd.
m=2k+1andn=2l+1
Multiplying these equations, we get: Therefore, our assumption that $n$ is odd must be false. Hence,
mn=(2k+1)(2l+1)=4kl+2k+2l+1 $n$ must be even.

The right-hand side of this equation can be rewritten as:


mn=2(2kl+k+l)+1 Thus, we have proven that if $n^3+5$ is odd, then $n$ is even
using both a proof by contraposition and a proof by contradiction.
Therefore, $mn$ is odd, contradicting the assumption that $mn$ is
even.
18. Prove that if n is an integer and 3n + 2 is even, then n iseven
using
Hence, our assumption that both $m$ and $n$ are odd must be
false. Therefore, either $m$ is even or $n$ is even. a) a proof by contraposition.
b) a proof by contradiction.

Thus, we have proven the statement. Answer:


a) Proof by contraposition:

17. Show that if n is an integer and n3 + 5 is odd, then n iseven


using We want to prove that if $n$ is odd, then $3n+2$ is odd.
a) a proof by contraposition.
b) a proof by contradiction. Suppose $n$ is odd. Then $n=2k+1$ for some integer $k$.
Answer: Substituting this expression into $3n+2$, we get:

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.

The right-hand side is odd, since it can be written as $2(3k+2)+1$.


This contradicts the assumption that $3n+2$ is even. Assume that it is possible to pick three socks from the drawer
without getting a pair of blue socks or a pair of black socks. This
means that we must have exactly one blue sock and one black sock
Therefore, our assumption that $n$ is odd must be false. Hence, among the three socks that we picked.
$n$ must be even.

Without loss of generality, assume that the first sock we picked is


Thus, we have proven that if $3n+2$ is even, then $n$ is even blue. Then, the other two socks we picked must be black in order
using both a proof by contraposition and a proof by contradiction. to avoid getting a pair of blue socks or a pair of black socks. But
this contradicts the fact that we only have blue and black socks in
the drawer, and there are not enough black socks to form a pair.
19. Prove the proposition P(0), where P(n) is the proposition “If n
is a positive integer greater than 1, then n2 >n.”What kind of proof
did you use? Therefore, our assumption that it is possible to pick three socks
without getting a pair of blue socks or a pair of black socks must
Answer:
be false. Hence, we must get either a pair of blue socks or a pair of
To prove P(0), we need to prove the proposition P(n) for n = 2. black socks when picking three socks from the drawer containing
just blue socks and black socks.

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.

This is a contradiction, so our assumption that no day of the week


P(1) states that if 1 is a positive integer, then 1^2 ≥ 1. This is true has at least ten of the 64 days chosen must be false. Therefore,
since 1^2 = 1 and 1 ≥ 1. there must be at least one day of the week that has at least ten of
the 64 days chosen.

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.

7n + 4 = 7(2k) + 4 = 14k + 4 = 2(7k + 2)


25. Use a proof by contradiction to show that there is no rational
number r for whichr3 + r + 1 = 0. [Hint: Assumethat r = a/b is a
root, where a and b are integers and a/b Thus, 7n + 4 is even, and the forward direction is proved.
is in lowest terms. Obtain an equation involving integersby
multiplying by b3. Then look at whether a and b areeach odd or
even.] Now, we prove the reverse direction:

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:

Assume that there is a rational number r = a/b (in lowest terms)


n = (2m - 4)/7 = 2(m/7) - 2/7
such that r3 + r + 1 = 0, where a and b are integers. Then, we can
write:

Since n is a positive integer, (2m/7) must be greater than or equal


to 1. Thus, m must be greater than or equal to 4.
r3 = -r - 1

If m is even, then (2m/7) is not an integer, which means that n is


Multiplying both sides by b3, we get:
not an integer. Therefore, m must be odd.

a^3 = -ab^2 - b^3


Substituting m = 2k + 1 in the expression for n, we get:

Since a and b are in lowest terms, they must be relatively prime.


n = 2(2k + 1)/7 - 2/7 = (4k + 2)/7
Thus, both a and b cannot be even. If both a and b are odd, then the
right-hand side is odd, which means that the left-hand side must
also be odd. But this is a contradiction, because the cube of any
odd number is odd. Thus, n is of the form (4k + 2)/7, which is not an integer.
Therefore, n cannot be odd, and it must be even.

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.

27. Prove that if n is a positive integer, then n is odd if andonly if


Therefore, there is no rational number r that satisfies the equation 5n + 6 is odd.
r3 + r + 1 = 0. Answer:
To prove that if $n$ is a positive integer, then $n$ is odd if and
26. Prove that if n is a positive integer, then n is even if andonly if only if $5n+6$ is odd, we need to prove two implications:
7n + 4 is even.
Answer: 1. If $n$ is odd, then $5n+6$ is odd.
We need to prove the following statement: 2. If $5n+6$ is odd, then $n$ is odd.
Proof of implication 1: If $n$ is odd, then $n = 2k+1$ for some
integer $k$. Substituting this into $5n+6$, we get:
For any positive integer n, n is even if and only if 7n + 4 is even.
5n+6=5(2k+1)+6=10k+11=2(5k+5)+1
Since $5k+5$ is an integer, we see that $5n+6$ is of the form
First, we prove the forward direction: $2m+1$ for some integer $m$ and hence, is odd.

Proof of implication 2: If $5n+6$ is odd, then $5n+6 = 2k+1$ for


some integer $k$. Rearranging the equation, we get:
5n=2k−5 If m = n, then we can substitute n for m in the equation m^2 = n^2
to get:
Since the left-hand side is odd, the right-hand side must be odd as
well. This implies that $k$ is odd, so we can write $k=2j+1$ for
some integer $j$. Substituting this into the equation, we get:
n^2 = n^2
5n=2(2j+1)−5=4j−3

This equation is true for all values of n, so we have shown that if m


Rearranging again, we get: = n, then m^2 = n^2.

4 j−3 4 j−5+3 4 ( j−1) 2


n= = = +
5 5 5 5 Case 2: m = -n

Since $j$ is odd, $j-1$ is even, so $4(j-1)$ is even. Therefore, $\


frac{4(j-1)}{5}$ is an even integer. The term $\frac{2}{5}$ is not If m = -n, then we can substitute -n for m in the equation m^2 =
an integer, so $n$ cannot be an integer. Hence, $n$ is not an even n^2 to get:
integer and must be odd.

(-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:

28. Prove that m2 = n2 if and only if m = n or m = −n. n^2 = n^2


Answer:
To prove that m^2 = n^2 if and only if m = n or m = -n, we need to This equation is true for all values of n, so we have shown that if m
prove two implications: = -n, then m^2 = n^2.

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:

29. Prove or disprove that if m and n are integers such thatmn = 1,


m^2 - n^2 = 0 then either m = 1 and n = 1, or else m = −1and n = −1.

We can factor the left-hand side of the equation using the Answer:
difference of squares formula: This statement is true.

(m - n)(m + n) = 0 We can prove it using a proof by contradiction. Suppose that there


exist integers $m$ and $n$ such that $mn = 1$ and neither $m =
1$ and $n = 1$, nor $m = -1$ and $n = -1$.
Since the product of two numbers is zero if and only if one or both
of the numbers is zero, we have:
Since $mn = 1$, we know that $m$ and $n$ cannot both be zero.
We can assume without loss of generality that $m \neq 0$. Then
m - n = 0 or m + n = 0 we can write $n = \frac{1}{m}$.

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:

Let x be the average of a and b. Then we have:


x-a>0

x = (a + b)/2
Multiplying both sides by 2 gives:

Since a is less than b, we can write:


2x - 2a > 0

b-a>0
Adding 2a to both sides gives:

Multiplying both sides by 1/2 gives:


2x > 2a

(b - a)/2 > 0
Dividing both sides by 2 gives:

Adding (a + b)/2 to both sides gives:


x>a

(b + a)/2 > a
Substituting x = (a + b)/2 gives:

Therefore, the average of a and b is greater than a.


(a + b)/2 > a

(i) a is less than b implies (iii) the average of a and b is less than b:
Multiplying both sides by 2 gives:

Let x be the average of a and b. Then we have:


a + b > 2a

x = (a + b)/2
Subtracting a from both sides gives:

Since a is less than b, we can write:


b>a

b-a>0
Therefore, a is less than b.

Multiplying both sides by 1/2 gives:


(ii) the average of a and b is greater than a implies (iii) the average
of a and b is less than b:
(b - a)/2 > 0

Let x be the average of a and b. Then we have:


Subtracting (a + b)/2 from both sides gives:

x = (a + b)/2
b - (a + b)/2 > 0

Assuming that x is greater than a, we can write:


Therefore, the average of a and b is less than b.

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:

Subtracting b from both sides gives: b - x > -a

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:

(i) implies (ii): Suppose 3x + 2 is even. Then there exists an integer


x-b>0 k such that 3x + 2 = 2k. Solving for x, we get x = (2k - 2)/3 = 2(k-
1)/3 - 2/3. Since k-1 is an integer, 2(k-1)/3 is an integer, so x is an
integer. Thus, x + 5 is odd.
Adding b to both sides gives:

(ii) implies (iii): Suppose x + 5 is odd. Then there exists an integer


k such that x + 5 = 2k + 1. Solving for x, we get x = 2k - 4 = 2(k-
x>b
2). Since k-2 is an integer, 2(k-2) is an even integer, so x is even.
Thus, x2 is even.

Therefore, the average of a and b is less than b.


(iii) implies (i): Suppose x2 is even. Then x is even, since the
square of an odd integer is odd and the square of an even integer is
(iii) the average of a and b is less than b implies (i) a is less than b: even. Let x = 2k for some integer k. Then 3x + 2 = 6k + 2 = 2(3k +
1), which is even.

Let x be the average of a and b. Then we have:


Therefore, we have shown that (i), (ii), and (iii) are equivalent
statements.
x = (a + b)/2

32. Show that these statements about the real number x


Assuming that x is less than b, we can write: areequivalent: (i) x is rational, (ii) x/2 is rational, (iii) 3x – 1is
rational.
ATo show that (i), (ii), and (iii) are equivalent statements about the
b-x>0
real number x, we need to show that each statement implies the
other two.

Multiplying both sides by 2 gives:


(i) $x$ is rational $\implies$ (ii) $x/2$ is rational: If $x$ is
rational, then we can write $x$ as $x = p/q$ where $p$ and $q$ are
2b - 2x > 0 integers with $q \neq 0$. Thus, $x/2 = p/(2q)$, which shows that
$x/2$ is also rational.

Subtracting 2a from both sides gives:


(i) $x$ is rational $\implies$ (iii) $3x - 1$ is rational: If $x$ is
rational, then we can write $x$ as $x = p/q$ where $p$ and $q$ are
2b - 2x - 2a + 2a > 0 integers with $q \neq 0$. Thus, $3x - 1 = (3p - q)/q$, which shows
that $3x - 1$ is also rational.

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:

Dividing both sides by 2 gives:


33. Show that these statements about the real number x
areequivalent: (i) x is irrational, (ii) 3x + 2 is irrational,(iii) x/2 is
b-x+a>0 irrational.
Answer: must be irrational. It follows that x/2 is also irrational, and 3x - 1 is
irrational since it is the sum of an irrational number and a rational
We will prove that the statements (i), (ii), and (iii) are equivalent number (namely, 2x/2 and -1, respectively).
by showing that each statement implies the other two.

(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.

First, we will show p1 ↔ p4:


(i) Assume that x is irrational. We will show that (ii) and (iii) are
true.
Since x is irrational, we can write x as an infinite non-repeating p1: If it is raining, then the streets are wet.
decimal. Then x/2 is also an infinite non-repeating decimal, and
p4: If the streets are not wet, then it is not raining.
thus irrational. Adding 2 to 3x will not change the irrationality of
x, so 3x + 2 is also irrational. Hence, (ii) and (iii) are true.

To see that these are equivalent, note that the contrapositive of p1


is "If the streets are not wet, then it is not raining." Thus, p1 and p4
(ii) Assume that 3x + 2 is irrational. We will show that (i) and (iii)
are logically equivalent.
are true.
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 Next, we will show p2 ↔ p3:
factors other than 1 (i.e., p/q is in lowest terms). Then 3x + 2 = (3p
+ 2q)/q is also a ratio of two integers, and hence rational. This
contradicts our assumption that 3x + 2 is irrational. Therefore, x p2: If the store is closed, then the lights are off.
p3: If the lights are not off, then the store is not closed. of an even number of odd integers is even). This means
that p3 is true.
2. p3 → p1: If p3 is true, then every odd integer can be
Again, the contrapositive of p2 is "If the lights are not off, then the written in the form n = 2k + 1 for some integer k. We
store is not closed." Thus, p2 and p3 are logically equivalent. can express k as the sum of distinct powers of 2, say k
= 2^{i_1} + 2^{i_2} + ... + 2^{i_m}. Then n =
2^{i_1+1} + 2^{i_2+1} + ... + 2^{i_m+1} - 1 is a sum
of distinct powers of 2, since the exponents i_1+1,
Finally, we will show p1 ↔ p3:
i_2+1, ..., i_m+1 are all distinct. Therefore, p1 is true.
Since we've shown that p1 ↔ p4, p2 ↔ p3, and p1 ↔ p3, we can
p1: If it is raining, then the streets are wet. conclude that all five propositions are equivalent.

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.

For example, the number 7 cannot be written as the sum of the


Therefore, we have shown that p1, p2, p3, and p4 are all logically
squares of three integers. To see why, suppose that 7 can be written
equivalent.
in this way, so we have:

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:

We can also assume without loss of generality that a ≤ b ≤ c. Then


we have:
First, we'll show that p1 ↔ p4. That is, we'll show that p1 implies
p4 and p4 implies p1.
1. p1 → p4: If p1 is true, then every positive integer can a^2 ≤ a^2 + b^2 ≤ a^2 + b^2 + c^2 = 7
be written as the sum of distinct powers of 2. In
particular, every positive even integer can be written as
the sum of distinct powers of 2, since every even Since a^2 can only be 0, 1, or 4, this means that a can only be 0, 1,
integer is a multiple of 2. This means that p4 is true. or 2.
2. p4 → p1: If p4 is true, then every positive even integer
can be written as the sum of distinct powers of 2. We
can extend this to show that every positive integer can
be written as the sum of distinct powers of 2, by adding If a = 0, then we have b^2 + c^2 = 7, which is impossible since the
1 to the sum if the integer is odd. Therefore, p1 is true. squares of integers are always non-negative.

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.

Dividing both sides of this inequality by n, we have:


(ii) $\Rightarrow$ (iii): Assume that $n+1$ is odd, then we can
write $n+1 = 2k+1$ for some integer $k$. Substituting $n=2k-1$
(A1 + A2 + · · · + An)/n < A into $3n+1$ gives $3n+1=3(2k-1)+1=6k-2=2(3k-1)$, which is
even.

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.

If 1 − n is even, then n is odd, and so n^2 is odd. If n^3 is odd, then


n is odd, and so n^2 is odd. If n^2 + 1 is even, then n^2 is odd. 2. Prove that there are no positive perfect cubes less than 1000 that
are the sum of the cubes of two positive integers.

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.

3. Prove that if x and y are real numbers, then max(x, y) + min(x,


y) = x + y. [Hint: Use a proof by cases, with the two cases
corresponding to x ≥ y and x < y, respectively.]
Answer:
Case 1: x is greater than or equal to y.If x is greater than or equal to
y then the max (x,y) = x and min (x,y) = y. Therefore, max (x,y) +
min (x,y) = x + y.

4. Use a proof by cases to show that min(a, min(b, c)) =


min(min(a, b), c) whenever a, b, and c are real numbers.
Answer:
We are given the real numbers a,b,c.

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(b,c)≤a and min(b,c)=b


min(x, y) = y = (x + y − |x − y|)/2
b≤a and b≤c
max(x, y) = x = (x + y + |x − y|)/2

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

6. Prove using the notion of without loss of generality that 5x + 5y


is an odd integer when x and y are integers of opposite parity.
Case 3: min(a,min(b,c))=c
Answer:
Let x=2k+1, where k is some integer.
min(b,c)≤a and min(b,c)=c
Let y=2i, where i is some integer.
c≤a and c≤b
5 x+5 y=5(2 k+1)+5(2 i)
c≤min(a,b)
5 x+5 y=10 k+5+10 i
min(min(a,b),c)=c
5 x+5 y=10 k+10 i+4+1
5 x+5 y=2(5 k+5 i+2)+1 is odd
So we got:

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

$A = 651000 - 82001 + 3177 = 569176,$


9. Prove that there are 100 consecutive positive integers thatare not
perfect squares. Is your proof constructive or nonconstructive?
Answer: $B = 791212 - 92399 + 22001 = 720814,$
Yes. Consider the integers from 2501 to 2600. This proof is
constructive.
$C = 244493 - 58192 + 71777 = 203078.$
502 is 2500 and 512 is 2601. There can't be any perfect squares
between these two because n2 is monotonic for positive n and as We want to show that the product of two of these numbers is
such any square between these would have to be the square of a nonnegative.
non-integer.

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:

11. Prove that there exists a pair of consecutive integers suchthat


one of these integers is a perfect square and the otheris a perfect $B\times C = (720814)(203078) = 146525641252,$
cube.
Answer:
which is clearly positive. Thus, the statement is true in this case.
To prove that there exists a pair of consecutive integers such that
one is a perfect square and the other is a perfect cube, we will use
the Pigeonhole Principle. If none of the numbers is zero, then they all have the same sign,
since the sum of two negative numbers and a positive number is
negative. Without loss of generality, let us assume that they are all
Consider the set of consecutive integers starting from $1$ up to positive. Then we have:
$7^3 = 343$. This set contains $343$ integers.

$A\times B = (569176)(720814) = 410246211264,$


Now, consider the set of perfect squares less than or equal to
$343$. The largest perfect square less than or equal to $343$ is
$18^2 = 324$. Thus, the set of perfect squares less than or equal to $A\times C = (569176)(203078) = 115729868928,$
$343$ contains $18$ integers.

$B\times C = (720814)(203078) = 146525641252.$


Similarly, consider the set of perfect cubes less than or equal to
$343$. The largest perfect cube less than or equal to $343$ is $7^3
= 343$. Thus, the set of perfect cubes less than or equal to $343$
contains $7$ integers. Since all three products are positive, the statement is true in this
case as well.

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.

$P(y) \leftrightarrow x = y.$


Consider $\sqrt{2}$, which is an irrational number. Now, let $x = \
frac{1}{\sqrt{2}}$. Since $\sqrt{2}$ is irrational, $\frac{1}{\
sqrt{2}}$ is also irrational. Since $P(y)$ is true, we have $x = y$, and thus there is a unique
element $x$ such that $P(x)$ is true.

Next, consider $y = \sqrt{2}$. Since $x$ is rational and $y$ is


irrational, we have: Conversely, suppose there is a unique element $x$ such that $P(x)
$ is true. Let $y$ be any element such that $P(y)$ is true. Then we
have:
$xy = \frac{1}{\sqrt{2}} \times \sqrt{2} = 1,$

$P(y) \leftrightarrow x = y.$


which is clearly irrational.

Since there is a unique $x$ such that $P(x)$ is true, we have $x =


y$, and thus $\forall y (P(y) \leftrightarrow x = y)$. Therefore, $\
Therefore, we have found a rational number $x$ and an irrational
exists x \forall y (P(y) \leftrightarrow x = y)$ is equivalent to ∃!
number $y$ such that $xy$ is irrational. This completes the proof.
xP(x).

14. Prove or disprove that if a and b are rational numbers,then ab is


b) ∃xP(x) ∧∀x∀y(P(x) ∧ P(y) → x = y):
also rational.
Answer:
Suppose there exists an element $x$ such that $P(x)$ is true, and
The statement is true. We will prove that if $a$ and $b$ are
suppose $y$ is any element such that $P(y)$ is also true. Then we
rational numbers, then $ab$ is also rational.
have:

Suppose $a$ and $b$ are rational numbers. Then, by definition,


$P(x) \text{ and } P(y) \rightarrow x = y.$
there exist integers $p, q, r$, and $s$ with $q \neq 0$ and $s \neq
0$ such that $a = \frac{p}{q}$ and $b = \frac{r}{s}$. It follows
that:
Since $P(x)$ and $P(y)$ are both true, we have $x = y$, and thus
there is a unique element $x$ such that $P(x)$ is true.
$ab = \frac{p}{q} \cdot \frac{r}{s} = \frac{pr}{qs}.$

Conversely, suppose there is a unique element $x$ such that $P(x)


$ is true. Since this element exists, we have $\exists x P(x)$. Now,
Since $p, q, r,$ and $s$ are integers, $pr$ and $qs$ are also
let $x$ and $y$ be any elements such that $P(x)$ and $P(y)$ are
integers. Moreover, $qs \neq 0$ since $q \neq 0$ and $s \neq 0$.
both true. Then we have $x = y$, since there is a unique element
Therefore, $ab = \frac{pr}{qs}$ is a ratio of integers and thus is a
$x$ such that $P(x)$ is true. Therefore, $\forall x\forall y(P(x) \
rational number.
text{ and } P(y) \rightarrow x = y)$, and ∃!xP(x) is equivalent to
$\exists x P(x) \text{ and } \forall x\forall y(P(x) \text{ and } P(y) \
rightarrow x = y)$.
Therefore, if $a$ and $b$ are rational numbers, then $ab$ is also
rational.
c) ∃x(P(x) ∧∀y(P(y) → x = y)):

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:

b) ∃xP (x) ∧∀x∀y(P (x) ∧ P (y) → x = y)

c) ∃x(P (x) ∧∀y(P (y) → x = y)) $P(y) \rightarrow x = y.$

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$.

Uniqueness: Suppose that there exist integers $n_1$ and $n_2$


Suppose there exists another integer $m$ such that $|r-m|<1/2$. and numbers ${x}_1$ and ${x}_2$ such that $x = n_1 + {x}_1$,
Then $|n-m| \leq |r-n| + |r-m| < 1$, which implies that $|n-m|\leq 0$ $0 \leq {x}_1 < 1$, $x = n_2 + {x}_2$, and $0 \leq {x}_2 < 1$.
since $n$ is the largest integer in $S$. Therefore, $n=m$, and we Then we have:
have shown the uniqueness of $n$.
\begin{align*}
n_1 + {x}_1 &= n_2 + {x}_2 \
To summarize, there exists an integer $n$ in the set $S$ such that
{x}_1 - {x}_2 &= n_2 - n_1
$|r-n|<1/2$. Furthermore, this integer is unique, as any other
integer satisfying this condition must be equal to $n$. \end{align*}
The left-hand side of the second equation is between $-1$ and $1$,
while the right-hand side is an integer, so we must have ${x}_1 -
19. Show that if n is an odd integer, then there is a uniqueinteger k
{x}_2 = 0$ and $n_1 = n_2$. Therefore, $n$ and ${x}$ are
such that n is the sum of k − 2 and k + 3.
unique.
Answer:
Therefore, there exists a unique integer $n$ and a unique number $ The last inequality follows because we added $2$ to both sides of
{x}$ such that $x = n + {x}$ and $0 \leq {x} < 1$ for any real $x^2 - 2 + \frac{1}{x^2} \geq 0$.
number $x$.

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$.

22. Use forward reasoning to show that if x is a nonzero


realnumber, then x2 + 1/x2 ≥ 2. [Hint: Start with the inequality (x To prove this conjecture, we can use the Cauchy-Schwarz
− 1/x)2 ≥ 0 which holds for all nonzero realnumbers x.] inequality, which states that for any two sequences of real numbers
$a_1, a_2, \ldots, a_n$ and $b_1, b_2, \ldots, b_n$, we have $
Answer: (a_1^2 + a_2^2 + \cdots + a_n^2)(b_1^2 + b_2^2 + \cdots +
Starting with the inequality $(x - \frac{1}{x})^2 \geq 0$ which b_n^2) \geq (a_1b_1 + a_2b_2 + \cdots + a_nb_n)^2$.
holds for all nonzero real numbers $x$, we can expand the square
and simplify to get:
Taking $n = 2$, $a_1 = x/\sqrt{2}$, $a_2 = y/\sqrt{2}$, $b_1 = \
\begin{align*} sqrt{2}$, and $b_2 = \sqrt{2}$, we have
(x - \frac{1}{x})^2 &\geq 0 \ \begin{align*}
x^2 - 2 + \frac{1}{x^2} &\geq 0 \ \left(\frac{x^2+y^2}{2}\right)\cdot 2 &\geq (x+y)^2 \
x^2 + \frac{1}{x^2} &\geq 2 \sqrt{\frac{x^2+y^2}{2}} &\geq \frac{x+y}{2}
\end{align*} \end{align*}
The last inequality follows by dividing both sides by $\sqrt{2}$ two unequal bits you insert a 1 to producenine new bits. Then you
and taking the square root. erase the nine original bits. Showthat when you iterate this
procedure, you can never getnine zeros. [Hint: Work backward,
assuming that you didend up with nine zeros.]
Therefore, we have shown that for any two positive real numbers Answer:
$x$ and $y$, the quadratic mean of $x$ and $y$ is always greater
than or equal to the arithmetic mean of $x$ and $y$, which Suppose that after some number of iterations we end up with nine
confirms our conjecture. zeros. Then, working backward, the nine zeros must have been
created by inserting ones between equal bits and zeros between
unequal bits in a sequence of eight bits. Without loss of generality,
let the first bit be a 1. Then, to create the sequence of nine zeros,
we must have a sequence of alternating ones and zeros starting
25. Write the numbers 1, 2, . . . , 2n on a blackboard, wheren is an with a 1, since we cannot insert a zero between two equal bits. But
odd integer. Pick any two of the numbers, j andk, write |j − k| on this is impossible, since we only have five ones and four zeros.
the board and erase j and k. Continuethis process until only one Therefore, we cannot end up with nine zeros after any number of
integer is written on the board.Prove that this integer must be odd. iterations.
Answer:
We can prove this by induction on n. 27. Formulate a conjecture about the decimal digits that appear as
the final decimal digit of the fourth power of aninteger. Prove your
conjecture using a proof by cases.
Base case: n = 1
Answer:
In this case, we have the numbers 1 and 2 on the board. We can
Conjecture: The final decimal digit of the fourth power of any
calculate |1 - 2| = 1 and erase 1 and 2, leaving only the odd number
integer is either 0, 1, 6, or 5.
1 on the board.

Proof: We will prove this conjecture by considering the possible


Inductive step:
final digits of the fourth powers of integers modulo 10.
Assume that the claim is true for some odd integer n. We want to
show that it is also true for n + 2.
Case 1: The final digit of the integer is 0.
In this case, the final digit of any power of the integer will be 0.
Write the numbers 1, 2, ..., 2(n+2) on the board. By the induction
Therefore, the final digit of the fourth power of the integer will be
hypothesis, the process will end with an odd number. We want to
0.
show that the odd number must be one of 2n+1, 2n+3, or 2n+5.

Case 2: The final digit of the integer is 1.


Consider the pairs (1, 2n+1), (2, 2n), ..., (2n, 2n+2), (2n+1, 2n+2),
(2n+2, 2n+3), (2n+3, 2n+4), (2n+4, 2n+5), and (2n+5, 2n+6). Each In this case, the final digit of any power of the integer will be 1.
pair consists of consecutive integers or the odd integer 2n+1 and Therefore, the final digit of the fourth power of the integer will be
the even integer 2n+2. 1.

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^2 ≡ 2000km + 20m + 1 (mod 100)


Case 8: The final digit of the integer is 7.
In this case, the final digit of the square of the integer will be 9,
and the final digit of the fourth power of the integer will be the If m is even, then 20m is divisible by 4 and the final two decimal
final digit of the product of 9 and 9, which is 1. digits of n^2 are 01. Otherwise, 20m is not divisible by 4 and the
final two decimal digits of n^2 are either 21 or 81.

Case 9: The final digit of the integer is 8.


Case 3: r ends in 2
In this case, the final digit of the square of the integer will be 4,
and the final digit of the fourth
In this case, we have r = 10k + 2 for some integer k. Then n can be
written as n = 100k + 10m + 2, where m is an integer from 0 to 9.
28. Formulate a conjecture about the final two decimal digitsof the The square of n is:
square of an integer. Prove your conjecture using aproof by cases.
Answer:
n^2 = (100k + 10m + 2)^2 = 10000k^2 + 2000km + 400k + 40m +
Conjecture: The final two decimal digits of the square of any 4
integer can only take on one of the values 00, 01, 04, 09, 16, 21,
24, 25, 29, 41, 44, 49, 56, 61, 64, 69, 76, 81, 84, 89, or 96.
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
Proof: We will prove this conjecture by considering all possible 400k are multiples of 100, they do not contribute to the final two
remainders of an integer when divided by 100 and then computing decimal digits.
the square of each possible remainder. Let n be an integer and let r
be the remainder of n when divided by 100. Then we have:
29. Prove that there is no positive integer n such that n2 +n3 = 100.
Case 1: r ends in 0 Answer:
We will prove the given statement by contradiction. Assume that
there exists a positive integer n such that n2 + n3 = 100. Then we
In this case, we have r = 10k for some integer k. Then n can be have:
written as n = 100k + 10m, where m is an integer from 0 to 9. The
square of n is:
n2 + n3 = 100
n^2 = (100k + 10m)^2 = 10000k^2 + 2000km + 100m^2
n2 + n3 - 100 = 0
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
100m^2 are multiples of 100, they do not contribute to the final n(n + 1)2 - 100 = 0
two decimal digits. Thus, we have:

Using the quadratic formula to solve for n, we get:


n^2 ≡ 2000km (mod 100)

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

In this case, we have r = 10k + 1 for some integer k. Then n can be


written as n = 100k + 10m + 1, where m is an integer from 0 to 9. However, n must be a positive integer, so this is a contradiction.
The square of n is: Therefore, there is no positive integer n such that n2 + n3 = 100.

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.

2m^2n^2 = 2m^4 + 2n^4


Note that any even number squared is divisible by 4, and any odd
number squared is congruent to 1 modulo 4. Thus, if x is odd, then
2x^2 is congruent to 2 modulo 4. If x is even, then 2x^2 is Dividing both sides by 2m^2n^2, we get:
congruent to 0 modulo 4. Similarly, if y is odd, then 5y^2 is
congruent to 5 modulo 4, and if y is even, then 5y^2 is congruent
to 0 modulo 4.
1 = (m/n)^4 + 1/(m/n)^4

Now, if both x and y are even, then 2x^2 + 5y^2 is divisible by 4,


Letting t = m/n, we get:
but 14 is not, so this case leads to a contradiction. If both x and y
are odd, then 2x^2 and 5y^2 are congruent to 2 and 5 modulo 4,
respectively, so their sum is congruent to 1 modulo 4, which is not
possible since 14 is congruent to 2 modulo 4. Thus, we must have 1 = t^4 + 1/t^4
exactly one of x and y even, and the other odd.

Multiplying both sides by t^4, we get:


If y is even and x is odd, then 2x^2 is congruent to 2 modulo 4 and
5y^2 is congruent to 0 modulo 4, so their sum is congruent to 2
modulo 4, which is again not possible. If y is odd and x is even, t^4 = t^4 + 1
then 2x^2 is congruent to 0 modulo 4 and 5y^2 is congruent to 5
modulo 4, so their sum is congruent to 1 modulo 4, which is not
possible since 14 is congruent to 2 modulo 4. This equation has infinitely many solutions in real numbers t (for
example, t = (2^(1/4))^(1/2^n) for any positive integer n), which
correspond to infinitely many solutions in positive integers m and
Therefore, there are no solutions in integers x and y to the equation n (since m and n differ by a factor of t). Substituting these
2x^2 + 5y^2 = 14. solutions into the expressions for x, y, and z, we get infinitely
many solutions in positive integers x, y, and z to the equation x^2
+ y^2 = z^2. Therefore, the equation has infinitely many solutions
31. Prove that there are no solutions in positive integers x andy to in positive integers.
the equation x4 + y4 = 625.
Answer: 33. Adapt the proof in Example 4 in Section 1.7 to prove thatif n =
First, we can note that $625 = 5^4$. Let us consider the parity of abc, where a, b, and c are positive integers, thena ≤ √3 n, b ≤ √3 n,
$x$ and $y$. Without loss of generality, assume that $x$ is even or c ≤ √3 n.
and $y$ is odd. Then, $x^4$ is a multiple of 16 while $y^4$ is an Answer:
odd number, so $x^4 + y^4$ is not a multiple of 16. But $5^4$ is a
multiple of 16, which means that $x^4 + y^4$ cannot be equal to We will prove the statement by contradiction. Suppose that there
$5^4$. exists a positive integer n = abc such that a > √3 n, b > √3 n, and c
> √3 n. Then we have:

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

32. Prove that there are infinitely many solutions in positive


integers x, y, and z to the equation x2 + y2 = z2.[Hint: Let x = m2 Multiplying these inequalities, we get:
− n2, y = 2mn, and z = m2 + n2,where m and n are integers.]
Answer:
a2b2c2 > 27n3 = 27a2b2c2
Let us substitute the suggested expressions for x, y, and z into the
equation x2 + y2 = z2 and simplify:
Simplifying, we obtain:

(m^2 - n^2)^2 + (2mn)^2 = (m^2 + n^2)^2


0 > 26a2b2c2

Expanding and simplifying the left-hand side, we get:

m^4 - 2m^2n^2 + n^4 + 4m^2n^2 = m^4 + 2m^2n^2 + n^4


This is a contradiction since a, b, and c are positive integers. Now consider the distance between b and q. We have:
Therefore, our assumption that a > √3 n, b > √3 n, and c > √3 n
must be false. Hence, we conclude that a ≤ √3 n, b ≤ √3 n, or c ≤
√3 n for any positive integer n = abc, where a, b, and c are positive b-q=b-r+r-q
integers.

Since b - r is a positive rational number and r - q is a negative


34. Prove that √3 2 is irrational. rational number, their sum is a positive rational number. Thus, we
Answer: have found a positive rational number that is less than b - q,
contradicting the fact that q ≤ b. Therefore, our initial assumption
o prove that $\sqrt{3}$ is irrational, we will use a proof by that there is no irrational number between a and b must be false,
contradiction. Assume that $\sqrt{3}$ is a rational number, which and the statement is proved.
means that it can be expressed as the ratio of two integers $p$ and
$q$ in lowest terms: $\sqrt{3}=\frac{p}{q}$. We can also assume
that $q > 0$ because otherwise we can multiply both sides of the 36. Prove that between every rational number and every irrational
equation by $-1$. number there is an irrational number.

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}$

We can assume without loss of generality that x < y. Let r = y −


Multiplying both sides by $q^2$, we get: x. Since y is irrational, r cannot be zero. Since x is rational and r
is irrational, it follows that s = x + r/2 is irrational. (If s were
rational, then we could write r = 2(s − x) as a ratio of integers,
$p^2 = 3q^2$ contradicting the fact that r is irrational.)

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

40. Verify the 3x + 1 conjecture for these integers.


a) 16 b) 11 c) 35 d) 113
Answer:
a) Starting with 16:
16 → 8 → 4 → 2 → 1
It took 4 steps to reach 1, so the conjecture holds for 16.

b) Starting with 11:


11 → 34 → 17 → 52 → 26 → 13 → 40 → 20 → 10 → 5 → 16 → 8 → 4 → 2 → 1
It took 14 steps to reach 1, so the conjecture holds for 11.

c) Starting with 35:


35 → 106 → 53 → 160 → 80 → 40 → 20 → 10 → 5 → 16 → 8 → 4 → 2 → 1
It took 13 steps to reach 1, so the conjecture holds for 35.

d) Starting with 113:


113 → 340 → 170 → 85 → 256 → 128 → 64 → 32 → 16 → 8 → 4 → 2 → 1
It took 12 steps to reach 1, so the conjecture holds for 113.

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.

There are two cases to consider:

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.

45. Use a proof by exhaustion to show that a tiling using


dominoes of a 4 × 4 checkerboard with opposite corners
removed does not exist. [Hint: First show that you can
assume that the squares in the upper left and lower right
corners are removed. 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. Remove
squares 1 and 16. To begin the proof, note that square 2 is
covered either by a domino laid horizontally, which covers squares 2 and 3, or vertically, which covers squares 2
and 6. Consider each of these cases separately, and work
through all the subcases that arise.]
Answer:
We proceed by exhaustion to show that a tiling using dominoes of a 4 × 4 checkerboard with opposite corners removed does not exist.

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.

Case 2: Square 2 is covered by a domino laid vertically.

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.

48. Find all squares, if they exist, on an 8 × 8 checkerboard


such that the board obtained by removing one of these
square can be tiled using straight triominoes. [Hint: First
use arguments based on coloring and rotations to eliminate as many squares as possible from consideration.]

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.

49. a) Draw each of the five different tetrominoes, where a


tetromino is a polyomino consisting of four squares.
b) For each of the five different tetrominoes, prove or disprove that you can tile a standard checkerboard using
these tetrominoes.

Answer:

a) Here are the five different tetrominoes:

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

Biconditional (IF AND ONLY IF):

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:

1. "If p, then q."


2. "Q if p."
3. "P implies q."
4. "Q whenever p."
5. "Q is a necessary condition for p."
b) The converse of a conditional statement p → q is the statement q → p. In other words, it is the statement formed by interchanging the
hypothesis and conclusion of the original statement. The contrapositive of a conditional statement p → q is the statement ~q → ~p, where ~p
denotes the negation of p and ~q denotes the negation of q. In other words, it is the statement formed by negating both the hypothesis and
conclusion of the original statement, and then interchanging them.

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."

4. a) What does it mean for two propositions to be logicallyequivalent?


b) Describe the different ways to show that two compound propositions are logically equivalent.

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:

Method 1 - Using Truth Tables:

p q r r → ¬q ¬p ¬p ∨ (r →¬q) ¬p ∨¬q ∨¬r


T T T F F F F
T T F T F T T
T F T T F T T
T F F T F T T
F T T F T T T
F T F T T T T
F F T T T T T
F F F T T T T

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.

Method 2 - Using Logical Equivalences:

¬p ∨ (r →¬q) (Implication law)

≡ ¬p ∨ (¬r ∨¬q) (Implication law)

≡ (¬p ∨¬r) ∨¬q (Associativity of disjunction)

≡ ¬p ∨¬q ∨¬r (Associativity of disjunction)

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.

5. (Depends on the Exercise Set in Section 1.3)


a) Given a truth table, explain how to use disjunctive normal form to construct a compound proposition withthis truth table.

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:

1. All zebras have stripes. (Premise)


2. Mark is a zebra. (Premise)
3. From 1, we can infer that "Mark has stripes" is true for any zebra, including Mark. This is an application of the universal
instantiation rule, which allows us to substitute any specific instance of a universally quantified statement. So, we have "Mark
has stripes." (UI on 1)
4. Modus ponens allows us to conclude that "Mark has stripes" is true, since it follows directly from premises 2 and 3.
Therefore, we have shown that the conclusion "Mark has stripes" follows from the premises "All zebras have stripes" and "Mark is a zebra" using
the rules of universal instantiation and modus ponens.

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.

11. a) Describe a way to prove the biconditional p ↔ q.


b) Prove the statement: “The integer 3n + 2 is odd if andonly if the integer 9n + 5 is even, where n is an integer.”
Answer:
a) To prove the biconditional p ↔ q, we need to prove both the conditional statements p → q and q → p. If we can prove both of these
implications, then we can conclude that p ↔ q is true.

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:

1. If the integer 3n + 2 is odd, then the integer 9n + 5 is even.


2. If the integer 9n + 5 is even, then the integer 3n + 2 is odd.
Proof of (1):
Assume that the integer 3n + 2 is odd. Then we can write 3n + 2 as 2k + 1 for some integer k. Substituting this into 9n + 5, we get:

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

Since 2(k - 3n - 2) is an even integer, we conclude that 3n + 2 is odd, as required.

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.

Example of an Existence and Uniqueness Proof:


Consider the propositional function P(x) = "x + 5 = 10". To show that there exists a unique x such that P(x), we can follow these steps:

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

2. Find the truth table of the compound proposition (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

Therefore, the truth table of the compound proposition (p ∨ q) → (p ∧¬r) is:

(p ∨ q) → (p ∧¬r)
F
T
F
T
F
F
T
T

3. Show that these compound propositions are tautologies.

a) (¬q ∧ (p → q)) →¬p

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:

p | q | p → q | ¬q | ¬q ∧ (p → q) | ¬p | (¬q ∧ (p → q)) →¬p

--|---|-------|----|--------------|----|-------------------
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:

p | q | p ∨ q | ¬p | (p ∨ q) ∧¬p | q | ((p ∨ q) ∧¬p) → q

--|---|-------|----|-------------|---|---------------------
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.

4. Give the converse, the contrapositive, and the inverse of


these conditional statements.
a) If it rains today, then I will drive to work.
b) If |x| = x, then x ≥ 0.
c) If n is greater than 3, then n2 is greater than 9.
Answer:
a) Converse: If I drive to work, then it will rain today.
Contrapositive: If I don't drive to work, then it will not rain today.
Inverse: If it doesn't rain today, then I won't drive to work.

b) Converse: If x ≥ 0, then |x| = x.


Contrapositive: If x < 0, then |x| ≠ x.
Inverse: If |x| ≠ x, then x < 0 or x > 0.

c) Converse: If n2 is greater than 9, then n is greater than 3.


Contrapositive: If n ≤ 3, then n2 is not greater than 9.
Inverse: If n is not greater than 3, then n2 is not greater than 9.

5. Given a conditional statement p → q, find the converse


of its inverse, the converse of its converse, and the converse of its contrapositive.
Answer:
he conditional statement p → q can be represented as "If p, then q".

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.

The converse of the converse is the original statement, p → q.

The converse of the contrapositive is the inverse, ¬p → ¬q.

6. Given a conditional statement p → q, find the inverse of


its inverse, the inverse of its converse, and the inverse of
its contrapositive.
Answer:
Given a conditional statement $p \rightarrow q$,

 The inverse of its inverse is the original statement $p \rightarrow q$.


 The inverse of its converse is the contrapositive $\neg q \rightarrow \neg p$.
 The inverse of its contrapositive is the converse $q \rightarrow p$.

We can summarize these relationships in the following table:

Statement Inverse Inverse of Inverse of


Converse Contrapositiv
e
$p \ $p \ $\neg q \ $q \
rightarrow rightarrow rightarrow rightarrow p$
q$ q$ \neg p$

7. Find a compound proposition involving the propositional


variables p, q, r, and s that is true when exactly three of
these propositional variables are true and is false otherwise.
Answer:
One possible compound proposition that satisfies the given conditions is:

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

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.

8. Show that these statements are inconsistent: “If Sergei


takes the job offer then he will get a signing bonus.” “If
Sergei takes the job offer, then he will receive a higher
salary.” “If Sergei gets a signing bonus, then he will not
receive a higher salary.” “Sergei takes the job offer.”
Answer:
Assuming all four statements are true, we can derive a contradiction. If Sergei takes the job offer, then by the first statement, he will get a signing
bonus. But by the third statement, if he gets a signing bonus, then he will not receive a higher salary, contradicting the second statement that he
will receive a higher salary if he takes the job offer. Therefore, the statements are inconsistent.

9. Show that these statements are inconsistent: “If Miranda


does not take a course in discrete mathematics, then she
will not graduate.” “If Miranda does not graduate, then
she is not qualified for the job.” “If Miranda reads this
book, then she is qualified for the job.” “Miranda does
not take a course in discrete mathematics but she reads For the second set of statements, we have:
this book.”
Teachers in the Middle Ages supposedly tested the realtime  Let p be “Miranda takes a course in discrete
mathematics.”
propositional logic ability of a student via a technique known
 Let q be “Miranda graduates.”
as an obligato game. In an obligato game, a number of rounds  Let r be “Miranda is qualified for the job.”
 Let s be “Miranda reads this book.”
is set and in each round the teacher gives the student successive
assertions that the student must either accept or reject as Then the given statements can be translated as:
they are given. When the student accepts an assertion, it is
added as a commitment; when the student rejects an assertion  ¬p → ¬q
 ¬q → ¬r
its negation is added as a commitment. The student passes
 s→r
the test if the consistency of all commitments is maintained  ¬p ∧ s
throughout the test. To show that these statements are inconsistent, we assume that
they are consistent and derive a contradiction. Using the first two
statements, we can conclude that:

10. Suppose that in a three-round obligato game, the teacher


 ¬p → ¬r (by transitivity of implication)
first gives the student the proposition p → q, then the
Using this and the third statement, we can conclude that:
proposition ¬(p ∨ r) ∨ q, and finally the proposition q.

For which of the eight possible sequences of three answers


 s → ¬p (contrapositive of ¬p → ¬r)
will the student pass the test?  s → ¬r (by transitivity of implication)
Answer: Now, we can use the fourth statement, ¬p ∧ s, to conclude that ¬r
is true. But this contradicts the implication s →¬r, which we
For the first set of statements, we have:
derived above. Therefore, the statements are inconsistent.

 Let p be “Sergei takes the job offer.”


As for the obligato game, it is a technique used to test a student's
 Let q be “Sergei gets a signing bonus.” ability to maintain consistency in their beliefs. The teacher presents
 Let r be “Sergei receives a higher salary.” a series of statements that the student must either accept or reject,
Then the given statements can be translated as: and the student passes the test if they are able to consistently
maintain their beliefs throughout the game. The game is a way to
test the student's ability to reason logically and avoid
contradictions.
 p→q
 p→r
 q → ¬r
11. Suppose that in a four-round obligato game, the teacher
 p
first gives the student the proposition ¬(p → (q ∧ r)),
To show that these statements are inconsistent, we assume that
they are consistent and derive a contradiction. Using the first three then the proposition p ∨¬q, then the proposition ¬r, and
statements, we can conclude that:
finally, the proposition (p ∧ r) ∨ (q → p). For which of

the 16 possible sequences of four answers will the student


 p → (q ∧¬r) (by combining the first three statements)
pass the test?
 ¬(q ∧¬r) →¬p (contrapositive of the above statement)
Answer:
Now, we can use the fourth statement, p, to conclude that q ∧¬r is
true. But this contradicts the negation of q ∧¬r, which we derived To determine whether the student passes the test, we need to see if
above. Therefore, the statements are inconsistent. they can consistently provide answers that satisfy all four
propositions given by the teacher. We can use truth tables to check
this.

First, let's consider the proposition ¬(p → (q ∧ r)). We can write


out a truth table for this proposition:

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

Now let's move on to the second proposition, p ∨¬q:

p q ¬q p ∨¬q
T T F T
T F T T
F T F F
F F T T

Next, we have ¬r:

r ¬r
T F

F T

Finally, we have (p ∧ r) ∨ (q → p):

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.

Regarding Exercises 13 and 14, in the island of knights and


knaves, the inhabitants always tell the truth or always lie, In summary, the solution is:
respectively. Therefore, the winning strategy for the obligato game
in this scenario is to assume that all inhabitants are of the same
type (either all knights or all knaves) and answer accordingly
 Aaron and Crystal are knaves
based on that assumption.
 Bohan is a liar (but we cannot determine if he is a
knave or a knight)

For example, in Exercise 13, the teacher gives the proposition


"Either I am a knave or both of us are knaves." To find the winning
14. Suppose that you meet three people, Anita, Boris, and
strategy, the student should assume that both the teacher and the
inhabitant are of the same type, either both knights or both knaves. Carmen. What are Anita, Boris, and Carmen if Anita says
If they assume that both are knights, they will conclude that the
proposition is false, and therefore the inhabitant is a knight. If they “I am a knave and Boris is a knight” and Boris says “Exactly one
assume that both are knaves, they will conclude that the of the three of us is a knight”?
proposition is true, and therefore the inhabitant is a knave. By Answer:
providing this consistent answer, the student will pass the test.
Based on the given statements, we can determine the following:

Similarly, in Exercise 14, the teacher gives the proposition "You


and I are of different types." The winning strategy for the student is Anita says "I am a knave and Boris is a knight". Since she is
to assume that the inhabitant is of the opposite type of the teacher claiming to be a knave, it means that she is lying. If she were a
and answer accordingly. For example, if the teacher is a knight, the knight, she would be telling the truth, which is not possible since
student should assume that the inhabitant is a knave and answer she also claims that Boris is a knight. Therefore, Anita is a knave.
accordingly. By providing this consistent answer, the student will
pass the test.
Boris says "Exactly one of the three of us is a knight". Since we
already know that Boris is a knight, it means that there is only one
13. Suppose that you meet three people Aaron, Bohan, and other knight among Anita and Carmen. If there were two knights,
Boris would not be telling the truth, and if there were no knights,
Crystal. Can you determine whatAaron, Bohan, and Crystal are Boris would not be a knight himself.
ifAaron says “All of us are knaves” and Bohan says
Now, we have two possibilities:  If Amy is a knight, then she is innocent.
 If Amy is a knave or normal, then she is guilty.
 If Brenda is a knight or normal, then Amy is innocent.
1. Carmen is a knave: In this case, Boris is the only  If Brenda is a knave, then Amy is guilty.
knight, and Anita is a knave. This satisfies both  If Claire is a knight or knave, then Brenda is either a
statements. knight or a knave.
2. Carmen is a knight: In this case, Boris is the only  If Claire is a normal, then Brenda could be a normal.
knight, and Anita's statement is false. This also satisfies
both statements. Since we know that the criminal is a knight, we can eliminate the
possibility that Amy is a knave or normal. Therefore, either Amy
Therefore, the possible solutions are: and Brenda are both knights, or Brenda is a knight and Amy is a
normal. If Amy were a normal, then Brenda would also have to be
a normal, which contradicts Claire's statement. Therefore, the only
 Anita is a knave, Boris is a knight, and Carmen is a possibility is that both Amy and Brenda are knights.
knave
 Anita is a knave, Boris is a knight, and Carmen is a
knight In summary, the guilty party is Claire, and the innocent parties are
Amy and Brenda.
We cannot determine for sure which of these two possibilities is
correct based on the given information.

16. Show that if S is a proposition, where S is the conditional


15. (Adapted from [Sm78]) Suppose that on an island there statement “If S is true, then unicorns live,” then “Unicorns live” is
true. Show that it follows that S cannot be a
are three types of people, knights, knaves, and normals
proposition. (This paradox is known as Löb’s paradox.)
(also known as spies). Knights always tell the truth,
Answer:
knaves always lie, and normals sometimes lie and sometimes tell
the truth. Detectives questioned three inhabitants of the island— Assume that S is true. Then, by the definition of the conditional
Amy, Brenda, and Claire—as part statement, "If S is true, then unicorns live," we can conclude that
unicorns must indeed live. Therefore, "Unicorns live" is true.
of the investigation of a crime. The detectives knew that
one of the three committed the crime, but not which one.
Now, consider the converse statement: if "Unicorns live" is true,
They also knew that the criminal was a knight, and that the
then S must be true. This is because S is a conditional statement
other two were not. Additionally, the detectives recorded that says if S is true, then unicorns live. Therefore, if unicorns do
in fact live, then S must be true.
these statements: Amy: “I am innocent.” Brenda: “What
Amy says is true.” Claire: “Brenda is not a normal.” After
analyzing their information, the detectives positively However, this reasoning leads to a paradox, known as Löb's
paradox. If we use the above argument to prove that S is true, then
identified the guilty party. Who was it? we are assuming the truth of "Unicorns live" in order to do so. But
Answer: if we assume the truth of "Unicorns live," then we are effectively
assuming the truth of the consequent of S. This circular reasoning
Since we know that the criminal is a knight and the other two are makes it impossible to say whether S is actually true or not.
not, we can eliminate any statements made by the non-knights as
potentially false. Therefore, we can focus on Amy's and Brenda's
statements. Therefore, S cannot be a proposition, since it leads to a paradoxical
situation. The paradox arises because the proposition S makes
reference to its own truth, leading to circular reasoning and self-
Amy says "I am innocent." If she is a knight, then she is telling the reference.
truth and is innocent. If she is a knave or normal, then she is lying
and is guilty.
17. Show that the argument with premises “The tooth fairy is a

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.

Combining the information from the three statements, we can


However, we can still examine the logical validity of the argument.
make the following deductions:
The argument takes the form of a paradox known as a
"contradiction in the premises" or "inconsistent premises." In this
type of paradox, the premises of an argument contradict each other, Therefore, 100 i=1(pi ∧ pi+1) is F and ∧ 100 i=1(pi ∨ pi+1) is
making it possible to derive any conclusion from them. F.

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:

18. Suppose that the truth value of the proposition pi is T


whenever i is an odd positive integer and is F whenever i is an 1. Every cell must contain exactly one value. This can be
even positive integer. Find the truth values expressed as the following CNF clause for each cell:

of 100 i=1(pi ∧ pi+1) and ∧100 i=1(pi ∨ pi+1).

Answer: (X_i,j,1 ∨ X_i,j,2 ∨ ... ∨ X_i,j,16) ∧


(¬X_i,j,k∨¬X_i,j,l) for all k, l such that 1 ≤ k < l ≤ 16
We can evaluate the truth value of 100 i=1(pi ∧ pi+1) and ∧
100 i=1(pi ∨ pi+1) by breaking them down into smaller
expressions and evaluating each one separately.
2. Each value must appear exactly once in each row. This
can be expressed as the following CNF clause for each
row and value:
For 100 i=1(pi ∧ pi+1):

(X_i,1,k∨ X_i,2,k ∨ ... ∨ X_i,16,k) ∧


p1 ∧ p2 = F ∧ T = F (¬X_i,j,k∨¬X_i,l,k) for all j, l such that 1 ≤ j < l ≤ 16
(p1 ∧ p2) ∧ p3 = F ∧ F = F

((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:
...

We can see that every other term in the expression is F, since pi


(X_1,j,k ∨ X_2,j,k ∨ ... ∨ X_16,j,k) ∧
and pi+1 have opposite truth values whenever i is even.
(¬X_i,j,k∨¬X_l,j,k) for all i, l such that 1 ≤i< l ≤ 16
Therefore, the entire expression is F.

For ∧ 100 i=1(pi ∨ pi+1):


4. Each value must appear exactly once in each block.
p1 ∨ p2 = T ∨ F = T This can be expressed as the following CNF clause for
(p1 ∨ p2) ∧ p3 = T ∧ F = F each block and value:

((p1 ∨ p2) ∧ p3) ∨ p4 = F ∨ T = T

(((p1 ∨ p2) ∧ p3) ∨ p4) ∧ p5 = T ∧ F = F (X_i,j,k∨ X_i+1,j,k ∨ X_i+2,j,k ∨ X_i+3,j,k) ∧


(¬X_i,j,k∨¬X_i,j+1,k ∨¬X_i,j+2,k ∨¬X_i,j+3,k) for all
... i, j such that i mod 4 = j mod 4 = 0,1,2,3
We can see that every other term in the expression is F, since pi
and pi+1 have opposite truth values whenever i is even.
Therefore, the entire expression is F. We can combine all these CNF clauses together using the
conjunction operator ∧ to form a single CNF formula that
represents the Sudoku puzzle as a satisfiability problem. If this
formula is satisfiable, then there is a valid solution to the puzzle.
The statement ∃x∃y(x = y ∧∀z((z = x) ∨ (z = y))) asserts the
existence of two objects x and y such that they are equal to each
Note that solving this problem using a general-purpose SAT solver
other and are the only objects in the domain that have this property.
may not be very efficient, since there are a large number of
In other words, there are no other objects in the domain that are
variables and constraints. However, specialized algorithms and
equal to x or y.
heuristics can be used to improve performance, such as
propagating unit clauses, using variable and value ordering
heuristics, and exploiting the symmetries and constraints of
Sudoku puzzles. To find a domain that makes this statement true, we need to choose
a domain that contains exactly two distinct objects. For example,
we can let the domain be {0, 1}, where 0 and 1 are distinct objects.
Then we can interpret x and y as 0 and 1 in some order. This
20. Let P (x) be the statement “Student x knows calculus” and
satisfies the condition x = y ∧∀z((z = x) ∨ (z = y)), since 0 = 1 is
let Q(y) be the statement “Class y contains a student who false and every element in the domain is either 0 or 1. Therefore,
the statement is true for this domain.
knows calculus.” Express each of these as quantifications
of P (x) and Q(y).
23. Find a domain for the quantifiers in ∃x∃y(x = y ∧
a) Some students know calculus.
∀z((z = x) ∨ (z = y))) such that this statement is false.
b) Not every student knows calculus.
Answer:
c) Every class has a student in it who knows calculus.
We can prove that the statement $\exists x \exists y(x = y \land \
d) Every student in every class knows calculus. forall z((z = x) \lor (z = y)))$ is false by showing that for any
e) There is at least one class with no students who know possible domain, there exists no values for $x$ and $y$ that satisfy
the statement.
calculus.
Answer:
Suppose the domain is the set of integers. Then, for any two
a) ∃x P(x) distinct integers $x$ and $y$, the statement $\forallz((z = x) \lor (z
= y))$ is false since there exists some integer $z$ that is not equal
b) ¬∀x P(x)
to $x$ or $y$. Therefore, the whole statement is false for any
c) ∀y ∃x (x is a student in class y ∧ P(x)) domain over the integers.

d) ∀y ∀x (x is a student in class y → P(x))

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.

e) ∃n ∀m P(m, n) means “There is a positive integer n that is


divisible by every positive integer m.” This is true since we can 25. Use existential and universal quantifiers to express the
choose n = 1.
statement “Everyone has exactly two biological parents”
f) ∀n P(1, n) means “Every positive integer is divisible by 1.” This
is true by definition. using the propositional function P (x, y), which represents “x is the
biological parent of y.”
Answer:
22. Find a domain for the quantifiers in ∃x∃y(x = y ∧
The statement "Everyone has exactly two biological parents" can
∀z((z = x) ∨ (z = y))) such that this statement is true. be expressed using existential and universal quantifiers as:

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:

a) ∃0x(x^2 = -1) is false, since there are no real numbers whose


square is -1. Suppose ∃x ∀y P(x,y) is true. Then there exists an x such that
P(x,y) is true for all y. Let y be an arbitrary element in the domain.
b) ∃1x(|x| = 0) is false, since the absolute value of a real number is Then P(x,y) is true. By existential generalization, we can conclude
always nonnegative, and it is only equal to 0 if the number itself is that there exists an x such that P(x,y) is true for any y in the
0. Thus, there can be at most one real number that satisfies the domain.
equation |x| = 0, and since there is no such number, the statement is
false.

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) d) ∃3xP (x)


Since the statement holds for both cases, we can conclude that it is
Answer:
a tautology.
a) ∃0xP(x) means that there are exactly 0 values in the domain that
satisfy P(x). This is equivalent to saying that no value in the
domain satisfies P(x). Using propositional logic, we can express 29. Let P (x) and Q(x) be propositional functions. Show
this as ¬∃xP(x), meaning “It is not the case that there exists an x
such that P(x) is true.” Using both existential and universal that∃x (P (x) → Q(x)) and∀x P (x) →∃x Q(x) always
quantifiers, we can write this as ∀x¬P(x), meaning “For all x, P(x) have the same truth value.
is not true.”
Answer:

To show that ∃x (P (x) → Q(x)) and ∀x P (x) →∃x Q(x) always


b) ∃1xP(x) means that there is exactly 1 value in the domain that have the same truth value, we need to show that either both are
satisfies P(x). Using propositional logic, we can express this as true or both are false.
(∃xP(x)) ∧ (∀y(P(y) → y = x)), meaning “There exists an x such
that P(x) is true, and for all y, if P(y) is true, then y equals x. ” In
other words, there is exactly one value in the domain that satisfies
First, suppose that ∃x (P (x) → Q(x)) is true. Then there exists
P(x).
some element a in the domain such that P (a) → Q(a) is true. Now
we consider two cases:

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.

Translated into English, this statement says "There exists a


building on a campus of some college in the United States such Assume that x is rational. By definition, this means that x can be
that every room in that building is painted white." expressed as the ratio of two integers, say x = p/q where p and q
are integers and q is not zero.

35. Express the statement “There is exactly one student in this


Then, x3 = (p/q)3 = p3/q3. Since p and q are integers, their cubes,
class who has taken exactly one mathematics class at this p3 and q3, are also integers. Therefore, x3 can be expressed as the
school” using the uniqueness quantifier. Then express this ratio of two integers, p3 and q3. This shows that x3 is rational.

statement using quantifiers, without using the uniqueness


quantifier. Therefore, by proving the contrapositive, we have shown that if x3
Answer: is irrational, then x is irrational.

Using the uniqueness quantifier:

∃!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),

where a is in the domain, are true, then the conclusion


Existence: Let S be the set of all nonnegative integers k such that
¬P (a) is true. k2 ≤ n. Since n + 1 is a nonnegative integer, S is nonempty. By the
well-ordering principle, S has a least element, say m. We claim that
Answer: m is the desired integer. Since m is in S, we have m2 ≤ n. Also,
Here's a formal proof using rules of inference: since m is the least element of S, we have (m + 1)2 > n or
equivalently, m2 + 2m + 1 > n. Since m2 ≤ n, we have 2m + 1 > n -
m2 ≥ 0, which implies m ≤ (n + 1)/2. Hence, m is a nonnegative
integer satisfying m2 ≤ n < (m + 1)2.
1. ∀x(P(x) → Q(x)) (Premise)
2. ∀x(Q(x) → R(x)) (Premise)
3. ¬R(a) (Premise)
Uniqueness: Suppose that there exist nonnegative integers m and k
4. Q(a) → R(a) (Universal instantiation of premise 2)
such that m2 ≤ n < (m + 1)2 and k2 ≤ n < (k + 1)2. Without loss of
5. ¬Q(a) (Modus tollens using premises 3 and 4)
generality, we can assume that m ≤ k. Then (k - m)(k + m + 1) ≤ k2
6. P(a) → Q(a) (Universal instantiation of premise 1)
- m2 ≤ n - m2 < (m + 1)2 - m2 = 2m + 1. Since k - m and k + m +
7. ¬P(a) (Modus tollens using premises 5 and 6)
1 are both positive integers, we have k - m ≤ (n - m2)/(k + m + 1)
Therefore, ¬P(a) is true. < (2m + 1)/(k + m + 1). Since k + m + 1 > m ≥ 1, we have (2m +
1)/(k + m + 1) < 1, which implies k - m = 0 or equivalently, k = m.
Therefore, there is a unique nonnegative integer m satisfying m2 ≤
38. Prove that if x3 is irrational, then x is irrational. n < (m + 1)2.

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.

This proof is nonconstructive because it does not provide an


explicit value for m that satisfies the condition. It only proves the Therefore, the statement that every positive integer is the sum of
existence of such an integer. the cubes of eight nonnegative integers is false.

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:

work.) We can disprove the statement by providing a counterexample.


Consider the positive integer 23. We can show that 23 cannot be
Answer: written as the sum of at most two squares and a cube of
nonnegative integers.
To prove that there exists a positive integer that can be written as
the sum of squares of positive integers in two different ways, we
can use a computer to search for such an integer.
First, we notice that 23 cannot be written as the sum of two
squares. To see this, we can list out the squares of the positive
integers up to 5:
First, we can write a program to generate all possible sums of
squares of two positive integers up to a certain limit, say 1000. We
can store these sums in a set to remove duplicates.
1, 4, 9, 16, 25

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.

Next, we can check whether 23 can be written as the sum of a


Here is some Python code that implements this approach: square and a cube. We can list out the cubes of the positive integers
up to 3:
squares = set()
for i in range(1, 32):
1, 8, 27
for j in range(i, 32):
squares.add(i**2 + j**2)
We notice that 23 is not equal to the sum of any one of these cubes
a 2−2 b2
and any one of the squares we listed earlier. Therefore, 23 cannot √ 3=
be written as the sum of at most two squares and a cube of 2 ab
nonnegative integers.
This means that $\sqrt{3}$ is rational, which contradicts the
assumption that $\sqrt{n}$ is irrational whenever $n$ is a positive
integer that is not a perfect square. Therefore, the assumption that
Since we have found a counterexample, the statement is disproved.
$\sqrt{2}+\sqrt{3}$ is rational must be false, and we can conclude
that $\sqrt{2}+\sqrt{3}$ is irrational.

45. Disprove the statement that every positive integer is thesum of


36 fifth powers of nonnegative integers.
Answer:
We can disprove the statement by finding a counterexample, i.e., a
Computer Projects
positive integer that cannot be written as the sum of 36 fifth
powers of nonnegative integers. 1. Given the truth values of the propositions p and q, find the truth
values of the conjunction, disjunction, exclusive or, conditional
statement, and biconditional of these propositions.
Note that the fifth power of any nonnegative integer is itself
Answer:
nonnegative. Thus, the sum of 36 fifth powers of nonnegative
integers is also a nonnegative integer. Therefore, we need to find a # Read the truth values of propositions p and q
positive integer that is not a sum of 36 fifth powers of nonnegative
integers. p = input("Enter the truth value of proposition p (True or False):
").lower() == "true"
q = input("Enter the truth value of proposition q (True or False):
One such example is 11. To see that 11 is not a sum of 36 fifth ").lower() == "true"
powers of nonnegative integers, suppose for the sake of
contradiction that there exist nonnegative integers $a_1, a_2, \
ldots, a_{36}$ such that $11 = a_1^5 + a_2^5 + \cdots + # Compute the truth values of the logical operators
a_{36}^5$. Note that $a_i^5 \leqa_i^4 a_{i+1}$ for $i \geq 1$,
and this can be proven by showing that $a_i^5 \leq a_i^4 a_{i+1} \ conjunction = p and q
iffa_i \leq a_{i+1}^{\frac{1}{5}}$, which is true since $a_i$ and
disjunction = p or q
$a_{i+1}$ are nonnegative. Thus, we have:
5 5 5 4 4 4 exclusive_or = p != q
11=a1 +a2 +…+ a36 ≤a 1 a2 +a 1 a2 +…+ a2 a37
conditional = not p or q
Since $11 < 2^4 \cdot 1 + 2^4 \cdot 1 = 32$, we have: biconditional = p == q
4 4 4
a a2 +a a3 +…+ a a 37< 32,
1 2 36
# Print the results
which contradicts $11 = a_1^5 + a_2^5 + \cdots + a_{36}^5$.
Therefore, 11 cannot be written as the sum of 36 fifth powers of print(f"The conjunction of p and q is {conjunction}")
nonnegative integers, and the statement that every positive integer
is the sum of 36 fifth powers of nonnegative integers is false. print(f"The disjunction of p and q is {disjunction}")
print(f"The exclusive or of p and q is {exclusive_or}")

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.

We can rearrange this equation to get:


Example output:
a
√ 2= − √3 Enter the truth value of proposition p (True or False): True
b
Enter the truth value of proposition q (True or False): False
Squaring both sides of the equation, we get:
The conjunction of p and q is False
2
a a
2= 2 −2 √ 3+3 The disjunction of p and q is True
b b The exclusive or of p and q is True
Rearranging, we get: The conditional statement p -> q is False
The biconditional statement p <-> q is False
variables = sorted(list(set([c for c in formula if c.isalpha()])))
2. Given two bit strings of length n, find the bitwise AND, bitwise
OR, and bitwise XOR of these strings.
# Generate all possible truth value assignments for the variables
Answer:
assignments = itertools.product([True, False],
def bitwise_operations(str1, str2): repeat=len(variables))
and_str = ""
or_str = "" # Evaluate the formula for each possible truth value assignment
xor_str = "" for assignment in assignments:
for i in range(len(str1)): # Create a dictionary mapping variables to truth values
if str1[i] == "1" and str2[i] == "1": values = dict(zip(variables, assignment))
and_str += "1"
or_str += "1" # Evaluate the formula using the truth values for this
assignment
xor_str += "0"
result = eval(formula, values)
elif str1[i] == "1" or str2[i] == "1":
and_str += "0"
# If the formula evaluates to True for any assignment, it is
or_str += "1" satisfiable
xor_str += "1" if result:
else: return True
and_str += "0"
or_str += "0" # If the formula is False for all assignments, it is unsatisfiable
xor_str += "0" return False
return and_str, or_str, xor_str

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

4. Given the truth values of the propositions p and q in fuzzy logic,


3. Give a compound proposition, determine whether it is satisfiable find the truth value of the disjunction and the conjunction of p and
by checking its truth value for all positive assignments of truth q (see Exercises 46 and 47 of Section 1.1).
values to its propositional variables.
Answer:
Answer:
Here's an example program in Python to find the truth value of the
Here's a Python program that takes a propositional formula as disjunction and conjunction of p and q in fuzzy logic, given their
input and checks if it is satisfiable by evaluating it for all possible truth values:
truth value assignments:
def fuzzy_conjunction(p, q):
import itertools
return min(p, q)

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

5. Given positive integers m and n, interactively play the game of


Chomp. play_game(3, 4) # play a game on a 3x4 board

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

This code iterates through positive integers n starting from 1, and


for each n checks if it can be expressed as the sum of the cubes of
nine different positive integers. If not, it prints out the value of n
and stops. When run, the program outputs:

Computations and Explorations Found: 24153319581254312065344

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:

Interger Sum of fourth powers?  1729: [(1, 12), (9, 10)]


 4104: [(2, 16), (9, 15)]
80 X  13832: [(2, 24), (18, 20)]
81 X  39312: [(2, 34), (15, 33)]
 20683: [(10, 27), (19, 24)]
82 X  32832: [(4, 32), (18, 30)]
… …  39366: [(7, 33), (23, 28)]
 40033: [(9, 34), (16, 33)]
285 X  46683: [(3, 36), (27, 30)]
286 X  64232: [(17, 31), (26, 27)]
 65728: [(12, 40), (31, 33)]
287 X  110656: [(2, 48), (32, 40)]
 110808: [(6, 48), (36, 38)]
 134379: [(12, 45), (22, 43)]
We can see that all 208 integers in this range cannot be expressed  149389: [(8, 48), (32, 42)]
as the sum of the fourth powers of 18 positive integers.  165464: [(18, 40), (28, 38)]
 171288: [(9, 51), (27, 48)]
 195841: [(16, 49), (37, 40)]
Therefore, our assumption that there exists a positive integer  216027: [(3, 57), (39, 54)]
greater than 79 that can be written as the sum of the fourth powers  216125: [(15, 50), (29, 48)]
of 18 positive integers is false. In other words, there are no positive
 262656: [(6, 60), (36, 54)]
integers greater than 79 that are not the sum of the fourth powers
 314496: [(9, 63), (33, 60)]
of 18 positive integers.
 320264: [(4, 68), (38, 66)]
 327763: [(19, 66), (34, 63)]
 373464: [(18, 66), (39, 63)]
3. Find as many positive integers as you can that can be written as
 402597: [(20, 67), (37, 64)]
the sum of cubes of positive integers, in two different ways,
sharing this property with 1729.  439101: [(21, 68), (32, 67)]
 443889: [(18, 69), (38,
Answer:
The property shared by 1729 is that it can be expressed as the sum
of cubes of positive integers in two different ways: 4. Try to find winning strategies for the game of Chomp for
different initial configurations of cookies.
Answer:
$1729 = 1^3 + 12^3 = 9^3 + 10^3$
The game of Chomp is a two-player game played on a rectangular
grid of cookies. The players take turns removing a cookie and all
the cookies above and to the right of it. The player who takes the
To find other integers with this property, we can use a computer
last cookie loses.
program to search for solutions. Here is an example Python
program that searches for integers that can be written as the sum of
cubes of positive integers in two different ways:
There are various winning strategies for different initial
# Search for integers that can be written as the sum of cubes of configurations of cookies in the game of Chomp. Here are a few
positive integers in two different ways examples:

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.

1. Tautology: In this game, players take turns building


3. Subsets: This technique involves looking for subsets of logical formulas on the board. The first player to build a
numbers that can only appear in a particular row, tautology wins the game.
column, or box. For example, if there are only two cells 2. Contradiction: In this game, players take turns building
in a row that can have 1 and 2, then those cells must logical formulas on the board. The first player to build a
contain 1 and 2 in some order. contradiction wins the game.
3. Proof: In this game, one player selects a formula and
challenges the other players to prove that it is a
4. X-wing: This technique involves looking for two rows tautology or a contradiction. The other players take
or two columns where a particular number can only
turns building logical formulas on the board to try to principle of unification, which is a process of matching two terms
prove or disprove the selected formula. and finding a set of variable bindings that make them equal.
4. Truth Tables: In this game, players take turns building
logical formulas on the board and then use truth tables
to evaluate them. The first player to correctly evaluate a The Prolog interpreter uses the resolution algorithm to search for
formula wins the game. solutions to queries by unifying them with a set of rules and facts
that define the knowledge base of the program. The algorithm
proceeds by matching the query with the first rule or fact in the
6. Read some of the writings of Lewis Carroll on symbolic knowledge base that unifies with it. If a unification is found, the
algorithm attempts to prove the body of the rule or fact by
logic. Describe in detail some of the models he used to recursively applying the resolution algorithm to each of its
represent logical arguments and the rules of inference he subgoals. If a subgoal cannot be proven, the algorithm backtracks
to the previous subgoal and attempts to find another rule or fact
used in these arguments. that can unify with the query.
Answer:
Lewis Carroll, also known as Charles Dodgson, was a The Prolog interpreter also uses a technique called backtracking to
mathematician, logician, and writer who is well known for his explore multiple solutions to a query. When a solution is found, the
work on symbolic logic. His most famous work in this area is his interpreter backtracks to find other solutions by attempting to unify
book "Symbolic Logic," which was published in 1896. In this the query with other rules or facts that were not previously
book, Carroll presents a new method of representing logical considered.
arguments using diagrams, which he calls "logical graphs."

The resolution algorithm in Prolog is very powerful and allows the


Carroll's logical graphs are similar to Venn diagrams, but they are language to solve a wide variety of problems. However, it can also
more general and can be used to represent more complex be very inefficient for certain types of queries, particularly those
arguments. In Carroll's system, each proposition is represented by that involve complex search spaces. To address this issue, Prolog
a circle, and the relationships between propositions are represented includes a number of optimization techniques, such as
by lines connecting the circles. For example, the proposition "All memoization and constraint propagation, that can be used to
men are mortal" would be represented by a circle labeled "Men" improve the performance of the language.
that is completely contained within a circle labeled "Mortals." The
line connecting the two circles represents the relationship between
these two propositions. 8. Discuss some of the techniques used in computationallogic,
including Skolem’s rule.

Carroll also developed a set of rules for manipulating logical Answer:


graphs, which he called "Diagrammatical Reasoning." These rules Computational logic is a subfield of computer science that deals
allow one to transform one diagram into another diagram that with the study of logic and its applications in computer science.
represents the same logical argument. For example, one of Some of the techniques used in computational logic include
Carroll's rules is the "principle of commutation," which states that resolution, Skolemization, model checking, and proof search.
if two circles are connected by a line, the order of the circles can
be reversed without changing the meaning of the argument.
Skolem’s rule is a technique used in first-order logic to eliminate
existential quantifiers. An existential quantifier asserts the
Carroll used his logical graphs to represent a wide variety of existence of an object that satisfies a given property. For example,
logical arguments, including syllogisms, conditional statements, the statement “There exists an x such that x is prime” can be
and logical paradoxes. He also used them to analyze the structure
expressed as ∃x (prime(x)). Skolemization is the process of
of mathematical proofs, and to investigate the properties of various
removing existential quantifiers by introducing Skolem functions
logical systems.
or Skolem constants. Skolem functions are functions that return a
specific object that satisfies a given property. Skolem constants are
constants that denote a specific object that satisfies a given
Overall, Carroll's work on symbolic logic was highly influential in property.
the development of modern mathematical logic. His use of
diagrams to represent logical arguments provided a new
perspective on the subject, and his rules of inference continue to be
The Skolem normal form is a standard form for first-order logical
studied and applied today.
formulas that eliminates all existential quantifiers. The Skolem
normal form is obtained by applying Skolemization to a first-order
logical formula. The Skolem normal form is useful because it
7. Extend the discussion of Prolog given in Section 1.4, explaining allows us to reason about the logical formula using standard
in more depth how Prolog employs resolution. techniques of propositional logic.
Answer:
Prolog is a programming language that is based on logic Another technique used in computational logic is resolution, which
programming, which is a type of declarative programming is a proof procedure used to show the validity of a logical formula.
paradigm. The language is designed to allow the programmer to Resolution works by combining two clauses to form a new clause,
write logical statements in a form that can be used to solve which is then added to the set of clauses being considered. The
problems. resolution rule states that if a clause contains a literal and another
clause contains the negation of that literal, then we can resolve
these two clauses to obtain a new clause that does not contain that
At the heart of Prolog is a resolution algorithm that allows the literal or its negation. This process continues until either a
language to solve logical queries. The algorithm is based on the
contradiction is found or all possible resolutions have been
exhausted.
In summary, ATP is a crucial area of research in mathematics,
computer science, and artificial intelligence. Its potential
applications are widespread, and the progress made in developing
Model checking is another technique used in computational logic, automated theorem provers has opened up new possibilities in
which involves checking whether a given logical formula is true in solving complex mathematical problems and verifying the
a given model. Model checking is used to verify the correctness of correctness of computer programs.
computer hardware and software systems, as well as in other
applications such as planning and scheduling.
10. Describe how DNA computing has been used to solve
Proof search is the process of searching for a proof of a logical instances of the satisfiability problem.
formula using a given set of inference rules. Proof search is a
fundamental technique in automated theorem proving, which is the Answer:
process of proving mathematical theorems using a computer. DNA computing is a field of study that uses DNA molecules to
perform computation and solve problems. One of the applications
of DNA computing is to solve instances of the satisfiability
In summary, computational logic involves the use of various problem (SAT). The SAT problem involves finding a satisfying
techniques and methods, such as Skolemization, resolution, model assignment of truth values to propositional variables that make a
checking, and proof search, to reason about logical formulas and given Boolean formula true.
solve logical problems.

To solve SAT problems using DNA computing, the variables and


9. “Automated theorem proving” is the task of using computers to clauses of the Boolean formula are encoded into DNA sequences.
mechanically prove theorems. Discuss the goals The DNA sequences are then mixed together and allowed to
undergo a series of biochemical reactions, such as annealing and
and applications of automated theorem proving and the amplification, that are designed to mimic the logical operations of
progress made in developing automated theorem provers. Boolean algebra.

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:

There have been several incorrect proofs of famous open questions


in mathematics, as well as open questions that have been solved
While ATP has shown significant progress in recent years, there since 1970. Here are a few examples, along with the types of errors
are still many challenges that need to be addressed. For instance, made in each proof:
the size and complexity of the problems that can be solved by ATP
systems are still limited. In addition, the correctness of the proofs
1. Fermat's Last Theorem Fermat's Last Theorem states that
generated by ATP systems is not always guaranteed, and there is a
there are no three positive integers a, b, and c such that a^n
need for techniques to verify the correctness of these proofs. + b^n = c^n for any integer value of n greater than 2. The
theorem was famously proved by Andrew Wiles in 1995,
but there were several incorrect proofs attempted before
that. One incorrect proof was published by Soviet
mathematician Yuri Vladimirovich Matiyasevich in 1977. In general, finding winning strategies for specific initial
Matiyasevich claimed to have proven Fermat's Last configurations of Chomp can be a challenging problem. Some
Theorem using a method that involved solving Diophantine methods that have been used to find winning strategies include
equations. However, his proof contained a subtle error that mathematical analysis, computer simulation, and brute force
was discovered by mathematician Roger Heath-Brown in search.
1983. The error was related to the use of modular forms and
the modular Galois representations of elliptic curves.
2. Four Color Theorem The Four Color Theorem states that 13. Describe various aspects of proof strategy discussed by
any map on a plane can be colored with at most four colors
so that no two adjacent regions have the same color. The George Pólya in his writings on reasoning, including
theorem was famously proved by Kenneth Appel and
Wolfgang Haken in 1976 using a computer-assisted proof, [Po62], [Po71], and [Po90].
but there were several incorrect proofs attempted before
that. One incorrect proof was published by Percy John Answer:
Heawood in 1890. Heawood claimed to have proven the George Pólya was a mathematician who made significant
theorem using a method that involved subdividing the map contributions to the field of mathematics education and problem
into smaller regions and applying mathematical induction. solving. In his writings on reasoning, he discussed various aspects
However, his proof contained a subtle error that was related of proof strategy, including the following:
to the boundary conditions of the map.
3. P vs NP Problem The P vs NP Problem is one of the most
famous open problems in computer science and 1. Understanding the problem According to Pólya, the first
mathematics. It asks whether all decision problems that can step in solving a problem is to understand it. This involves
be solved by a non-deterministic Turing machine in reading the problem carefully, identifying any relevant
polynomial time can also be solved by a deterministic information, and clarifying any ambiguous terms or
Turing machine in polynomial time. Although the problem concepts. Once the problem is clearly understood, one can
remains unsolved, there have been several attempted proofs begin to formulate a strategy for solving it.
that have turned out to be incorrect. One notable example is 2. Formulating a plan Pólya emphasized the importance of
the proof attempted by Vinay Deolalikar in 2010. Deolalikar formulating a plan or strategy for solving a problem. This
claimed to have proven that P ≠ NP using a novel approach involves thinking about the problem from different
that involved statistical physics and the behavior of spin perspectives, identifying similarities to other problems that
glasses. However, his proof contained several errors related have been solved in the past, and breaking the problem
to the statistical physics calculations and the assumptions down into smaller, more manageable parts. The goal of this
made about the properties of spin glasses. step is to develop a clear and efficient approach to solving
the problem.
3. Carrying out the plan Once a plan has been formulated, the
These examples illustrate the difficulty of solving open problems next step is to carry it out. This involves implementing the
in mathematics and the importance of rigor and thoroughness in strategy that was developed in the previous step, and using
the proof process. Even small errors or oversights can lead to logical reasoning to move from one step to the next. It is
incorrect conclusions and wasted effort. important to be flexible and willing to modify the plan if
necessary as new information or obstacles arise.
12. Discuss what is known about winning strategies in the 4. Checking the solution Finally, Pólya emphasized the
importance of checking the solution once it has been found.
game of Chomp. This involves reviewing the steps that were taken to solve
the problem, checking for errors or inconsistencies, and
Answer: verifying that the solution is correct. It is important to be
thorough and rigorous in this step, as errors or oversights
The game of Chomp is a two-player game where each player takes
can easily be missed.
turns eating cookies from a rectangular grid of cookies. The game
starts with a rectangular grid of cookies, and each player takes
turns choosing a cookie to eat along with all cookies to the right Throughout his writings, Pólya emphasized the importance of
and below it. The player who eats the last cookie loses the game. logical reasoning, creativity, and persistence in problem solving.
He believed that these skills were essential for success in
mathematics and many other fields, and that they could be
developed and improved with practice and experience.
Winning strategies in the game of Chomp are highly dependent on
the initial configuration of cookies. In general, there are no simple,
universal winning strategies that work for all initial configurations. 14. Describe a few problems and results about tilings with
polyominoes, as described in [Go94] and [Ma91], for example.
However, for some specific initial configurations, winning Answer:
strategies have been discovered. For example, if the initial
configuration is a rectangle of cookies, the first player can win the Tiling problems with polyominoes have been studied extensively
and have led to many interesting results in mathematics. Here are a
game by simply mimicking the second player's moves. That is, the
few examples:
first player should always choose the cookie directly below and to
the right of the cookie that the second player chooses.
1. Tiling a rectangle with polyominoes One problem is to determine
whether a given rectangle can be tiled with a given set of
Another example of a winning strategy is the "switching strategy" polyominoes. This problem is known to be NP-complete in
general, meaning that it is computationally infeasible to solve
for the configuration of a 2x4 rectangle of cookies. In this strategy,
efficiently for large rectangles and sets of polyominoes. However,
the first player eats the cookie in the bottom-left corner, and the
there are some special cases that can be solved efficiently. For
second player responds by eating the cookie in the top-right corner. example, it is known that a rectangle can be tiled with a given set
Then, the first player eats the cookie in the top-left corner, and the of right trominoes (polyominoes made up of three squares) if and
second player responds by eating the cookie in the bottom-right only if the rectangle has an odd area.
corner. This pattern continues until one player is forced to eat the
last cookie, at which point they lose.
2. Enumerating polyominoes Another problem is to count the number polyominoes, and the two problems are equivalent in the limit of
of different polyominoes of a given size. This problem has been large size. The number of SAWs grows even more rapidly than the
solved exactly for some small sizes, but it becomes number of polyominoes, and it is known that the growth rate is
computationally infeasible for larger sizes. However, there are related to the critical behavior of percolation on the square lattice.
some interesting asymptotic results. For example, it is known that
the number of polyominoes of size n grows exponentially with n, 4. Monotone paths Finally, another related problem is to count the
and the exponential growth rate has been calculated to several number of monotone paths on a square lattice. A monotone path is
decimal places. a path that moves only to the right or up, but never left or down.
Monotone paths are also related to polyominoes, and the two
problems are again equivalent in the limit of large size. The
number of monotone paths is known to have a simple
3. Self-avoiding walks A related problem is to count the number of combinatorial formula, and the generating function has interesting
self-avoiding walks (SAWs) on a square lattice. A SAW is a path connections to modular forms and elliptic curves.
that starts at the origin and visits each lattice point exactly once,
without ever crossing itself. SAWs are closely related to

You might also like