Homework 2
TRẦN PHÚC ĐỨC/MSSV 2310807/nhóm L05
Ngày 22 tháng 1 năm 2024
Section 1.4
Problem 9
p(x): xcanspeakRussian
q(x):x knows the computer language C++.
a) There is a student at your school who can speak Russian and who knows
C++.:∃x(p(x)∩q(x))
b) There is a student at your school who can speak Russian but who doesn’t
know C++.:∃x(p(x)∩¬q(x))
c) Every student at your school either can speak Russian or knows C++.:∀x(p(x)∪q(x))
d) No student at your school can speak Russian or knows C++.:¬∃x(p(x)∩q(x))
Problem 10
C(x):x has a cat
D(x):x has a dog
F(x):has a ferret.
a) A student in your class has a cat, a dog, and a ferret.:∃x(C(x)∩D(x)∩F(x))
b) All students in your class have a cat, a dog, or a ferret.:∀x(C(x)∪D(x)∪F(x))
c) Some student in your class has a cat and a ferret, but not a dog.:∃x(C(x)∩F(x)∩¬D(x))
d) No student in your class has a cat, a dog, and a ferret.:¬∃x(C(x)∩F(x)∩D(x))
e) For each of the three animals, cats, dogs, and ferrets,there is a student in your
class who has this animal as a pet.:(∃xC(x))∩(∃xD(x))∩(∃xF(x))
Problem 33
a) T(x):x can learn new tricks;x be old dogs.
Some old dogs can learn new tricks.:∃xT(x)
negation:¬∃xT(x):No old dogs can learn new tricks.
b) C(x):x knows calculus;x be rabbits.
No rabbit knows calculus.:¬∃xC(x)
negation:There is a rabbit that knows calculus.:∃xC(x)
1
c) F(x):x can fly;x be birds
Every bird can fly.∀xF(x)
Negation:not all birds can fly.:¬∀xF(x)
or There is a bird who cannot fly.:∃x¬F(x)
d) T(x):x can talk;x be dogs.
There is no dog that can talk.:¬∃xT(x)
negation:There is a dog that talks.:∃xT(x)
e) Let F(x) and R(x) be the predicates that x knows French and knows Rus-
sian;x be people in this class
There is no one in this class who knows French and Russian.:¬∃x(F(x)∩R(x))
negation:There is someone in this class who knows French and Russian.:∃x(F(x)∩R(x)
Problem 34
a) Let S(x) be “x obeys the speed limit,” where the domain of discourse is drivers
Some drivers do not obey the speed limit.:∃x¬S(x)
negation:All drivers obey the speed limit.:∀xS(x)
b) Let S(x) be “x is serious,” where the domain of discourse is Swedish movies
All Swedish movies are serious.:∀xS(x)
negation:Some Swedish movies are not serious.:∃x¬S(x)
c) Let S(x) be “x can keep a secret,” where the domain of discourse is people.
No one can keep a secret.:¬∃xS(x)
negation:Some people can keep a secret.:∃xS(x)
d) Let A(x) be “x has a good attitude,” where the domain of discourse is people
in this class
There is someone in this class who does not have a good attitude:∃x¬A(x)
negation:Everyone in this class has a good attitude:∀xA(x)
Problem 39
F(p):Printer p is out of service
B(p): Printer p is busy,
L(j) : Print job j is lost,
Q(j):“Print job j is queued.”
a) ∃p(F(p)∩ B(p))→∃jL(j ):If there is a printer that is both out of service and
busy, then some job has been lost.
b)∀pB(p)→∃jQ(j):If every printer is busy, then there is a job in the queue.
c) ∃j(Q(j)∩L(j))→∃pF(p):If there is a job that is both queued and lost, then
some printer is out of service.
d) (∀pB(p)∩∀jQ(j))→∃jL(j):If every printer is busy and every job is queued,
then some job is lost.
2
Problem 44
We want propositional functions P and Q that are sometimes, but not always,
true (so that the second biconditional is F < − > F and hence true), but such
that there is an x making one true and the other false. For 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
∀x(P(x)< − >Q(x)) is false.
Problem 45
Both are true precisely when at least one of P(x) and Q(x) is true for at least
one value of x in the domain (universe of discourse)
Problem 46
a)(∀xP(x))∪A≡∀x(P(x)∪A)
There are two cases.
case 1:If A is true, then (∀xP(x))∪A is true, and since P(x)∪A is true for all
x,∀x(P(x)∪A) is also true. Thus both sides of the logical equivalence are true
(hence equivalent)
case 2:Now suppose that A is false. If P(x) is true for all x, then the left-hand
side is true. Furthermore, the right-hand side is also true (since P(x) ∪ A is true
for all x). On the other hand, if P(x) is false for some x, then both sides are
false.
=>Therefore again the two sides are logically equivalent.
b) (∃xP(x))∪A≡∃x(P(x)∪A)
There are two cases.
case 1:If A is true, then (∃xP(x)) ∪ A is true, and since P(x) ∪ A is true for
some (really all) x, ∃x(P(x) ∪ A) is also true. Thus both sides of the logical
equivalence are true (hence equivalent).
case 2:Now suppose that A is false. If P(x) is true for at least one x, then the
left-hand side is true. Furthermore, the right-hand side is also true (since P(x)
∪ A is true for that x). On the other hand, if P(x) is false for all x,then both
sides are false.
=>Therefore again the two sides are logically equivalent.
Problem 47
a) (∀xP(x))∪A≡∀x(P(x)∩A) There are two cases.
case 1: Suppose that A is true. Then the left-hand side is logically equivalent to
∀xP(x), since the conjunction of any proposition with a true proposition has the
same truth value as that proposition. By similar reasoning the right-hand side
is equivalent to ∀xP(x). Therefore the two propositions are logically equivalent
3
in this case
case 2:each one is true precisely when P(x) is true for every x. On the other
hand, suppose that A is false.Then the left-hand side is certainly false. Further-
more, for every x, P(x) ∩ A is false, so the right-hand side is false as well.
b) (∃xP(x)) ∩ A ≡ ∃x(P(x) ∩ A)
If A is true, then both sides are logically equivalent to ∃xP(x). If A is false, then
both sides are false
Problem 61
P(x):x is a baby
Q(x):x is logical
R(x):x is able to manage a crocodile
S(x):x is despised
a) Babies are illogical:∀x(P(x)→¬Q(x))
b) Nobody is despised who can manage a crocodile.: If a person can manage a
crocodile, then that person is not despised: ∀x(R(x)→¬S(x)).
c) Every person who is not logical is necessarily despised: ∀x(¬Q(x)→S(x)).
d) Every person who is a baby cannot manage a crocodile: ∀x(P(x)→¬R(x)).
e) The conclusion follows. Suppose that x is a baby. Then by the first premise, x
is illogical, and hence,by the third premise, x is despised. 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
crocodiles.
Problem 62
P(x):x is a duck
Q(x): x is one of my poultry
R(x):x is an officer,
S(x):x is willing to waltz
a) ∀x(P(x) → ¬S(x))
b) ∀x(R(x) → S(x))
c) ∀x(Q(x) → P(x))
d) ∀x(Q(x) → ¬R(x))
e) Yes. If x is one of my poultry, then he is a duck (by part (c)), hence not
willing to waltz (part (a)). Since officers are always willing to waltz (part (b)),
x is not an officer.
4
Section 1.5
Problem 17
a)u:user u
m:mail box m
n:mail box n
A(u, m):user u has access to mailbox m
Every user has access to exactly one mailbox.:∀u∃m(A(u,m)∩∀n(n̸=m→¬A(u,n))
b)p:process
e:enrol
H(e):error condition e is in effect
S(x,y):the status of x is y.
There is a process that continues to run during all error conditions only if the ker-
nel is working correctly.:∃p∀e(H(e)→S(p,running))→S(kernel,working correctly)
c)u:user u
S:website S
E(s,x):websites has extension x
A(u,s):user u can access website s
All users on the campus network can access all websites whose url has a .edu
extension.:∀u∀s(E(s,.edu)→A(u,s))
d)M(a, b):system a monitors remote server b
There are exactly two systems that monitor every remote server.: ∃x∃y(x∀y∩∀z((∀sM(z,s))
< − > (z = x ∪ z = y)))
Problem 18
a) A(x): console x is accessible
H(x):fault condition x is happening
f:fault condition
c:console
At least one console must be accessible during every fault condition.:∀f(H(f)→∃cA(c))
b)A(x): the archive contains message x
S(x, y):user x sent message y
R(x):the e-mail address of user x can be retrieved
m:message
u:user
The e-mail address of every user can be retrieved whenever the archive contains
at least one message:(∀u∃m(A(m)∩S(u,m)))→∀uR(u)
c) D(x, y):mechanism x can detect breach y
C(x):process x has been compromised
For every security breach there is at least one mechanism that can detect that
breach if and only if there is a process that has not been compromised.:(∀b∃m
D(m, b)) < − > ∃p¬C(p)
d)C(p, x, y):path p connects endpoint x to endpoint y
5
There are at least two paths connecting every two distinct endpoints on the
network.:∀x∀y(x ̸= y → ∃p∃q(p̸=q∩C(p, x, y)∩C(q, x, y)))
e)K(x, y):person x knows the password of user y
SysAdm: system administrator
No one knows the password of every user on the system except for the system
administrator, who knows all passwords.:∀x((∀uK(x,u))< − >x = SysAdm)
Problem 34
The logical expression is asserting that the domain consists of at most two mem-
bers. (It is saying that whenever you have two unequal objects, any object has
to be one of those two. Note that this is vacuously true for domains with one
element.) Therefore any domain having one or two members will make it true
(such as the female members of the United States Supreme Court in 2005), and
any domain with more than two members will make it false (such as all members
of the United States Supreme Court in 2005)
Problem 35
If the domain (universe of discourse) has at least four members, then no matter
what values are assigned to x, y, and z, there will always be another member
of the domain, different from those three, that we can assign to w to make the
statement true. Thus we can use a domain such as United States Senators. On
the other hand, for any domain with three or fewer members, if we assign all the
members to x, y, and z (repeating some if necessary), then there will be nothing
left to assign to w to make the statement true. For this we can use a domain
such as your biological parents.
Problem 36
a)L(x, y):person x has lost y dollars playing the lottery
No one has lost more than one thousand dollars playing the lottery.:¬∃x∃y(y >
1000∩L(x, y))
Negation:someone has lost more than one thousand dollars playing the lottery.:∃x∃y(y
> 1000∩L(x, y))
b)C(x, y):person x has chatted with person y
There is a student in this class who has chatted with exactly one other student.:∃x∃y(y̸=x∩∀z(z̸=x
→ (z = y< − >C(x, z)))).
Negation:everybody in this class has either chatted with no one else or has chat-
ted with two or more others:∀x∀y(y̸=x→∃z(z̸=x∩¬(z = y− >C(x, z))))
c)E(x, y):person x has sent e-mail to person y
No student in this class has sent e-mail to exactly two other students in this
class.:¬∃x∃y∃z(y̸=z∩x̸=y∩x̸=z∩∀w(w̸=x→(E(x, w)< − >(w = y∪w = z))))
6
Negation:some student in this class has sent e-mail to exactly two other students
in this class.:∃x∃y∃z(y̸=z∩x̸=y∩x̸=z∩∀w(w̸=x→(E(x, w)< − >(w = y∪w =
z))))
d)S(x, y):student x has solved exercise y
Some student has solved every exercise in this book.:∃xyS(x, y)
Negation:for every student in this class, there is some exercise that he or she
has not solved.:∀x∃y¬S(x, y).
e)S(x, y):student x has solved exercise y
B(y, z):exercise y is in section z of the book.
No student has solved at least one exercise in every section of this book.:¬∃x∀z∃y(B(y,z)∩S(x,y)).
Negation:some student has solved at least one exercise in every section of this
book.:∃x∀z∃y(B(y,z)∩S(x,y))
Problem 37
a) T(x,y): x has taken y, where x ranges over students in this class and y ranges
over mathematics classes at this school
Every student in this class has taken exactly two mathematics classes at this
school.:∀x∃y∃z(y̸=z∩T(x,y)∩T(x,z)∩∀w(T(x,w) →(w = y∪w = z)))
Negation:There is someone in this class for whom no matter which two distinct
math courses you consider, these are not the two and only two math courses this
person has taken.:∃x∀y∀z(y = z∪¬T(x, y)∪¬T(x, z)∪∃w(T(x, w)∩w̸=y∩w̸=z))
b)V(x,y):x has visited y, where x ranges over people and y ranges over countries.
Someone has visited every country in the world except Libya.:∃x∀y(V(x, y)<
− >y ̸=Libya)
Negation:For every person there is a country such that either that country is
Libya and the person has visited it, or else that country is not Libya and the
person has not visited it.:∃x∀y(V(x, y)< − >y =Libya)
c)C(x,y):x has climbed y , where x ranges over people and y ranges over moun-
tains in the Himalayas
No one has climbed every mountain in the Himalayas.:¬∃x∀yC(x,y)
Negation:Someone has climbed every mountain in the Himalayas.:∃x∀yC(x,y)
d)M(x, y, z):x has been in movie z with y, where the domains for x and y are
movie actors, and for z is movies
Every movie actor has either been in a movie with Kevin Bacon or has been in
a movie with someone who has been in a movie with Kevin Bacon.:∀x((∃zM(x,
Kevin Bacon, z))∪(∃y∃z1∃z2(M(x,y,z1)∩M(y,Kevin Bacon, z2 )))).
Negation:there is someone who has neither been in a movie with Kevin Ba-
con nor been in a movie with someone who has been in a movie with Kevin
Bacon.:∃x((∀z¬M(x, Kevin Bacon, z))∩(∀y∀z1∀z2(¬M(x, y, z1)∪¬M(y, Kevin
Bacon, z2 ) )))
7
Problem 47
De Morgan’s Laws for Quantifiers.:
+)¬∀xP(x)≡∃x¬P(x)
+)¬∃xQ(x)≡∀x¬Q(x)
=>¬∃x∀yP(x,y)≡∀x¬∀yP(x,y)≡∀x∃y¬P(x,y)
Problem 48
We need to show that each of these propositions implies the other. Suppose
that xP(x)xQ(x) is true. We want to show that ∀x∀y(P(x)∪Q(y)) is true. By
our hypothesis, one of two things must be true. Either P is universally true, or
Q is universally true
In the first case,∀x∀y(P(x)∪Q(y)) is true, since the first expression in the dis-
junction is true, no matter what x and y are
in the second case, ∀x∀y(P(x)∪Q(y)) is also true, since now the second expres-
sion in the disjunction is true, no matter what x and y are
Section 1.6
Problem 11
Suppose that p1 , p2 , ... , Pn are true.We want to establish that q→r is true.
If q is false, then we are done, vacuously.
Otherwise, q is true, so by the validity of the given argument form, we know
that r is true.
Problem 12
+)q∩(q → (u∩t))=>u∩t(modus ponens).
+)u∩(u → p)=>p(modus ponens)
+)(p)∩(t)=>p∩t(conjunction)
+)(p∩t)∩((p∩t)→(r∪s))=>r∪s(modus ponens)
+)(r∪s)∩¬r=>s(disjunctive syllogism)
Problem 23
The error occurs in step (5), because we cannot assume, as is being done here,
that the c that makes P true
8
Problem 24
Steps 3 and 5 are incorrect; simplification applies to conjunctions, not disjunc-
tions.
Problem 34
d:logic is difficult
s:many students like logic
e:mathematics is easy.
a) That mathematics is not easy, if many students like logic.:s→¬e
b) That not many students like logic, if mathematics is not easy.:¬e→¬s
c) That mathematics is not easy or logic is difficult.:¬e∪d
d) That logic is not difficult or mathematics is not easy:¬d∪¬e
e) That if not many students like logic, then either mathematics is not easy or
logic is not difficult.:¬s→(¬e∪¬d)
Problem 35
This argument is valid. We argue by contradiction. Assume that Superman does
exist. Then he is not impotent, and he is not malevolent (this follows from the
fourth sentence). Therefore by (the contrapositives of) the two parts of the sec-
ond sentence, we conclude that he is able to prevent evil, and he is willing
to prevent evil. By the first sentence, we therefore know that Superman does
prevent evil. This contradicts the third sentence. Since we have arrived at a con-
tradiction, our original assumption must have been false, so we conclude finally
that Superman does not exist