Exercise 1.4 Discrete
Exercise 1.4 Discrete
4
Predicates and Quantifiers
c) This time x is equal to 1 at the end, since the condition is true, so the statement x := 1 is executed.
6. The answers given here are not unique, but care must be taken not to confuse nonequivalent
sentences. Parts
© and (f) are equivalent; and parts (d) and € are equivalent. But these two pairs are not equivalent to
Each other.
a) Some student in the school has visited North Dakota. (Alternatively, there exists a student in the
school
North Dakota.)
c) This is the negation of part (a): No student in the school has visited North Dakota. (Alternatively,
there
Does not exist a student in the school who has visited North Dakota.)
d) Some student in the school has not visited North Dakota. (Alternatively, there exists a student in
the
e) This is the negation of part (b): It is not true that every student in the school has visited North
Dakota.
(Alternatively, not all students in the school have visited North Dakota.)
f) All students in the school have not visited North Dakota. (This is technically the correct answer,
although
Common English usage takes this sentence to mean—incorrectly—the answer to part €. To be perfectly
Clear, one could say that every student in this school has failed to visit North Dakota, or simply that no
8. Note that part (b) and part (c) are not the sorts of things one would normally say.
a) If an animal is a rabbit, then that animal hops. (Alternatively, every rabbit hops.)
c) There exists an animal such that if it is a rabbit, then it hops. (Note that this is trivially true,
satisfied,
For example, by lions, so it is not the sort of thing one would say.)
d) There exists an animal that is a rabbit and hops. (Alternatively, some rabbits hop. Alternatively,
some
10. a) We assume that this means that one student has all three animals: ∃x(C(x) ∧ D(x) ∧ F(x)).
f) Here the owners of these pets can be different: (∃x C(x))∧(∃x D(x))∧(∃x F(x)). There is no harm
in using
The same dummy variable, but this could also be written, for example, as ( ∃x C(x)) ∧ ( ∃y D(y)) ∧ ( ∃z
F(z)).
12. a) Since 0 + 1 > 2 · 0, we know that Q(0) is true.
c) Since 1 + 1
> 2 · 1, we know that Q(1) is false.
d) From part (a) we know that there is at least one x that makes Q(x) true, so ∃x Q(x) is true.
e) From part © we know that there is at least one x that makes Q(x) false, so ∀x Q(x) is false.
g) From part © we know that there is at least one x that makes Q(x) false, so ∃x¬Q(x) is true.
h) From part (a) we know that there is at least one x that makes Q(x) true, so ∀x¬Q(x) is false
d) Twice a positive number is larger than the number, but this inequality is not true for negative
numbers
And 16.
a) We want to assert that P(x) is true for some x in the domain, so either P(−2) is true or P(−1) is
true
Or P(0) is true or P(1) is true or P(2) is true. Thus the answer is P(−2) ∨P(−1) ∨P(0) ∨P(1) ∨P(2). The
Other parts of this exercise are similar. Note that by De Morgan’s laws, the expression in part © is
logically
Equivalent to the expression in part (f), and the expression in part (d) is logically equivalent to the
expression
In part €.
e) This is just the negation of part (a): ¬(P(−2) ∨ P(−1) ∨ P(0) ∨ P(1) ∨ P(2))
f) This is just the negation of part (b): ¬(P(−2) ∧ P(−1) ∧ P(0) ∧ P(1) ∧ P(2))
20. Existential quantifiers are like disjunctions, and universal quantifiers are like conjunctions. See
Examples 11
And 16.
a) We want to assert that P(x) is true for some x in the domain, so either P(−5) is true or P(−3) is
true or
P(−1) is true or P(1) is true orP(3) is true or P(5) is true. Thus the answer is P(−5) ∨ P(−3) ∨ P(−1) ∨
((1
= 1) → P(1)) ∧ ((3
= 1) → P(3)) ∧ ((5
= 1) → P(5)). However, since the hypothesis x
= 1 is false when
X is 1 and true when x is anything other than 1, we have more simply P(−5) ∧P(−3) ∧P(−1) ∧P(3) ∧P(5).
1) ∧ P(1)) ∨ ((3 ≥ 0) ∧ P(3)) ∨ ((5 ≥ 0) ∧ P(5)). Since only three of the x’s in the domain
meet the condition,
The answer is equivalent to P(1) ∨ P(3) ∨ P(5).
(P(−1) ∧ P(−3) ∧ P(−5)). This is equivalent to (¬P(1) ∨ ¬P(3) ∨ ¬P(5)) ∧ (P(−1) ∧ P(−3) ∧ P(−5)).
a) A domain consisting of a few adults in certain parts of India would make this true. If the domain
were all
b) If the domain is all residents of the United States, then this is true. If the domain is the set of
pupils in a
c) If the domain consists of all the United States Presidents whose last name is Bush, then the
statement is
True. If the domain consists of all United States Presidents, then the statement is false.
d) If the domain were all residents of the United States, then this is certainly true. If the domain
consists of
All babies born in the last five minutes, one would expect the statement to be false (it’s not even clear
that
These babies “know” their mothers yet).
24. In order to do the translation the second way, we let C(x) be the propositional function “x is in your
class.”
Note that for the second way, we always want to use conditional statements with universal quantifiers
and
a) Let P(x) be “x has a cellular phone.” Then we have ∀x P(x) the first way, or ∀x(C(x) → P(x)) the
Second way.
b) Let F(x) be “x has seen a foreign movie.” Then we have ∃x F(x) the first way, or ∃x(C(x) ∧ F(x))
the
Second way.
c) Let S(x) be “x can swim.” Then we have ∃x¬S(x) the first way, or ∃x(C(x) ∧ ¬S(x)) the second
way.
d) Let Q(x) be “x can solve quadratic equations.” Then we have ∀x Q(x) the first way, or ∀x(C(x) →
Q(x))
e) Let R(x) be “x wants to be rich.” Then we have ∃x¬R(x) the first way, or ∃x(C(x)∧ ¬R(x)) the
second
Way
26. In all of these, we will let Y (x) be the propositional function that x is in your school or class, as
appropriate.
a) If we let U(x) be “x has visited Uzbekistan,” then we have ∃x U(x) if the domain is just your
schoolmates,
or ∃x(Y (x) ∧ U(x)) if the domain is all people. If we let V (x, y) mean that person x has visited country y ,
then we can rewrite this last one as ∃x(Y (x) ∧ V (x, Uzbekistan)).
b) If we let C(x) and P(x) be the propositional functions asserting that x has studied calculus and C++,
respectively, then we have ∀x(C(x)∧P(x)) if the domain is just your schoolmates, or ∀x(Y (x) →
(C(x)∧P(x)))
if the domain is all people. If we let S(x, y) mean that person x has studied subject y , then we can
rewrite
c) If we let B(x) and M(x) be the propositional functions asserting that x owns a bicycle and a motorcycle,
respectively, then we have ∀x(¬(B(x)∧M(x))) if the domain is just your schoolmates, or ∀x(Y (x) →
¬(B(x)∧
M(x))) if the domain is all people. Note that “no one” became “for all ... not.” If we let O(x, y) mean that
person x owns item y , then we can rewrite this last one as ∀x(Y (x) → ¬(O(x, bicycle) ∧ O(x,
motorcycle))).
d) If we let H(x) be “x is happy,” then we have ∃x¬H(x) if the domain is just your schoolmates, or
∃x(Y (x)∧ ¬H(x)) if the domain is all people. If we let E(x, y) mean that person x is in mental state y , then
e) If we let T(x) be “x was born in the twentieth century,” then we have ∀x T(x) if the domain is just your
schoolmates, or ∀x(Y (x) → T(x)) if the domain is all people. If we let B(x, y) mean that person x was born
in the yth century, then we can rewrite this last one as ∀x(Y (x) → B(x, 20)).
28. Let R(x) be “x is in the correct place”; let E(x) be “x is in excellent condition”; let T(x) be “x is a [or
b) If something is a tool, then it is in the correct place place and in excellent condition: ∀x (T(x) → (R(x)
∧
E(x))).
c) ∀x (R(x) ∧ E(x))
d) This is saying that everything fails to satisfy the condition: ∀x¬(R(x) ∧ E(x)).
32. In each case we need to specify some propositional functions (predicates) and identify the domain of
discourse.
a) Let F(x) be “x has fleas,” and let the domain of discourse be dogs. Our original statement is ∀x F(x).
Its negation is ∃x¬F(x). In English this reads “There is a dog that does not have fleas.”
b) Let H(x) be “x can add,” where the domain of discourse is horses. Then our original statement is ∃x
H(x).
Its negation is ∀x¬H(x). In English this is rendered most simply as “No horse can add.”
c) Let C(x) be “x can climb,” and let the domain of discourse be koalas. Our original statement is ∀x C(x).
Its negation is ∃x¬C(x). In English this reads “There is a koala that cannot climb.”
d) Let F(x) be “x can speak French,” and let the domain of discourse be monkeys. Our original statement
is ¬∃x F(x) or ∀x¬F(x). Its negation is ∃x F(x). In English this reads “There is a monkey that can speak
French.”
e) Let S(x) be “x can swim” and let C(x) be “x can catch fish,” where the domain of discourse is pigs. Then
our original statement is ∃x (S(x) ∧ C(x)). Its negation is ∀x¬(S(x) ∧ C(x)), which could also be written
∀x (¬S(x)∨ ¬C(x)) by De Morgan’s law. In English this is “No pig can both swim and catch fish,” or “Every
34. a) Let S(x) be “x obeys the speed limit,” where the domain of discourse is drivers. The original
statement
Is ∃x¬S(x), the negation is ∀x S(x), “All drivers obey the speed limit.”
b) Let S(x) be “x is serious,” where the domain of discourse is Swedish movies. The original statement is
∀x S(x), the negation is ∃x¬S(x), “Some Swedish movies are not serious.”
c) Let S(x) be “x can keep a secret,” where the domain of discourse is people. The original statement is
¬∃x S(x), the negation is ∃x S(x), “Some people can keep a secret.”
d) Let A(x) be “x has a good attitude,” where the domain of discourse is people in this class. The original
statement is ∃x¬A(x), the negation is ∀x A(x), “Everyone in this class has a good attitude.”
36. a) Since 12 = 1, this statement is false; x = 1 is a counterexample. So is x = 0 (these are the only two
Counterexamples).
e) No system is working. (We could also say “Every system is not working,” as long as we understood
that
40. There are many ways to write these, depending on what we use for predicates.
a) Let F(x) be “There is less than x megabytes free on the hard disk,” with the domain of discourse
being
Positive numbers, and let W(x) be “User x is sent a warning message.” Then we have F(30) → ∀x W(x).
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) Let B be the proposition “The file system can be backed up,” and let L(x) be “User x is currently
logged
Discourse for the last two propositional functions are positive numbers. Then we have (M(8) ∧ S(56)) →
D(video on demand).
42. There are many ways to write these, depending on what we use for predicates.
a) Let A(x) be “User x has access to an electronic mailbox.” Then we have ∀x A(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) Let S(x, y) be “System x is in state y .” Recalling that “only if” indicates a necessary condition, we
have
d) Let T(x) be “The throughput is at least x kbps,” where the 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
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
46. a) There are two cases. 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). 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) There are two cases. 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).
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.
48. a) There are two cases. If A is false, then both sides of the equivalence are true, because a
conditional
Statement with a false hypothesis is true. If A is true, then A → P(x) is equivalent to P(x) for each x, so
The left-hand side is equivalent to ∀x P(x), which is equivalent to the right-hand side.
b) There are two cases. If A is false, then both sides of the equivalence are true, because a conditional
statement with a false hypothesis is true (and we are assuming that the domain is nonempty). If A is
true,
then A → P(x) is equivalent to P(x) for each x, so the left-hand side is equivalent to ∃x P(x), which is
50. It is enough to find a counterexample. It is intuitively clear that the first proposition is asserting much
more
Than the second. It is saying that one of the two predicates, P or Q, is universally true; whereas the
second
Proposition is simply saying that for every x either P(x) or Q(x) holds, but which it is may well depend
On x. As a simple counterexample, let P(x) be the statement that x is odd, and let Q(x) be the statement
That x is even. Let the domain of discourse be the positive integers. The second proposition is true, since
Every positive integer is either odd or even. But the first proposition is false, since it is neither the case
that
All positive integers are odd nor the case that all of them are even.
52. a) This is false, since there are many values of x that make x > 1 true.
b) This is false, since there are two values of x that make x2 = 1 true.
c) This is true, since by algebra we see that the unique solution to the equation is x = 3.
54. There are only three cases in which ∃x!P(x) is true, so we form the disjunction of these three cases.
The
Answer is thus (P(1) ∧ ¬P(2) ∧ ¬P(3)) ∨ (¬P(1) ∧ P(2) ∧ ¬P(3)) ∨ (¬P(1) ∧ ¬P(2) ∧ P(3)).
56. A Prolog query returns a yes/no answer if there are no variables in the query, and it returns the
values that
a) None of the facts was that Kevin was enrolled in EE 222. So the response is no.
b) One of the facts was that Kiko was enrolled in Math 273. So the response is yes.
c) Prolog returns the names of the courses for which Grossman is the instructor, namely just
cs301.
d) Prolog returns the names of the instructor for CS 301, namely grossman.
e) Prolog returns the names of the instructors teaching any course that Kevin is enrolled in, namely
chan,
Since Chan is the instructor in Math 273, the only course Kevin is enrolled in.
58. Following the idea and syntax of Example 28, we have the following rule:
Note that we used the comma to mean “and” and the semicolon to mean “or.” For X to be the
grandfather
b) ∃x(R(x) ∧ ¬Q(x))
c) ∃x(R(x) ∧ ¬P(x))
e) Yes. The unsatisfactory excuse guaranteed by part (b) cannot be a clear explanation by part (a).
b) ∀x(R(x) → S(x))
c) ∀x(Q(x) → P(x))
d) ∀x(Q(x) → ¬R(x))
f) Yes. If x is one of my poultry, then he is a duck (by part ©), hence not willing to waltz (part (a)).
Since