0% found this document useful (0 votes)
455 views

Exercise 1.4 Discrete

Uploaded by

Maira aman
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
455 views

Exercise 1.4 Discrete

Uploaded by

Maira aman
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 18

 SECTION 1.

4
Predicates and Quantifiers

2. a) This is true, since there is an a in orange.

b) This is false, since there is no a in lemon.

c) This is false, since there is no a in true.

d) This is true, since there is an a in false.

4. a) Here x is still equal to 0, since the condition is false.

b) Here x is still equal to 1, since the condition is false.

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

Who has visited North Dakota.)


b) Every student in the school has visited North Dakota. (Alternatively, all students in the school
have visited

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

School who has not visited North Dakota.)

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

Student has visited North Dakota.)

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

b) Every animal is a rabbit and 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

Hopping animals are rabbits.)

10. a) We assume that this means that one student has all three animals: ∃x(C(x) ∧ D(x) ∧ F(x)).

b) ∀x(C(x) ∨ D(x) ∨ F(x))

c) ∃x(C(x) ∧ F(x) ∧ ¬D(x))

e) This is the negation of part (a): ¬∃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.

b) Since (−1) + 1 > 2 · (−1), we know that Q(−1) 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

c) Since (−x)2 = ((−1)x)2 = (−1)2x2 = x2 , we know that ∀x((−x)2 = x2) is true.

d) Twice a positive number is larger than the number, but this inequality is not true for negative
numbers

or 0. Therefore ∀x(2x>x) is false.

16. a) true (x = √2)

b) false (√−1 is not a real number)

c) true (the left-hand side is always at least 2)

d) false (not true for x = 1 or x = 0)


18. 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(−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 €.

b) P(−2) ∧ P(−1) ∧ P(0) ∧ P(1) ∧ P(2)

c) ¬P(−2) ∨ ¬P(−1) ∨ ¬P(0) ∨ ¬P(1) ∨ ¬P(2)

d) ¬P(−2) ∧ ¬P(−1) ∧ ¬P(0) ∧ ¬P(1) ∧ ¬P(2)

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

P(1) ∨ P(3) ∨ P(5).

b) P(−5) ∧ P(−3) ∧ P(−1) ∧ P(1) ∧ P(3) ∧ P(5)

c) The formal translation is as follows: ((−5


= 1) → P(−5)) ∧ ((−3
= 1) → P(−3)) ∧ ((−1
= 1) → 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).

d) The formal translation is as follows: ((−5 ≥ 0)∧P(−5))∨((−3 ≥ 0)∧P(−3))∨((−1 ≥ 0)∧P(−1))∨((1 ≥

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

e) For the second part we again restrict the domain:


(¬P(−5)∨¬P(−3)∨¬P(−1)∨¬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)).

22. Many answer are possible in each case.

a) A domain consisting of a few adults in certain parts of India would make this true. If the domain
were all

Residents of the United States, then this is certainly false.

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

First grade class, it is false.

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

Conjunctions with existential quantifiers.

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

The second way.

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

this last one as ∀x(Y (x) → (S(x, calculus) ∧ S(x, C++))).

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

we can rewrite this last one as ∃x(Y (x) ∧ ¬E(x, happy)).

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

your] tool”; and let the domain of discourse be all things.

a) There exists something not in the correct place: ∃x¬R(x).

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

e) There exists a tool with this property: ∃x (T(x) ∧ ¬R(x) ∧ E(x)).

30. a) P(1, 3) ∨ P(2, 3) ∨ P(3, 3)

b) P(1, 1) ∧ P(1, 2) ∧ P(1, 3)

c) ¬P(2, 1) ∨ ¬P(2, 2) ∨ ¬P(2, 3)

d) ¬P(1, 2) ∧ ¬P(2, 2) ∧ ¬P(3, 2)

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

Pig either is unable to swim or is unable to catch fish.”

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

b) There are two counterexamples: x = √2 and x = −√2.

c) There is one counterexample: x = 0.


38. a) Some system is open.

b) Every system is either malfunctioning or in a diagnostic state.

c) Some system is open, or some system is in a diagnostic state.

d) Some system is unavailable.

e) No system is working. (We could also say “Every system is not working,” as long as we understood
that

this is different from “Not every system is working.”)

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

“System errors have been detected.” Then we have E → (( ∀x¬O(x)) ∧ ( ∀x¬C(x))).

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.


d) Let D(x) be “Product x can be delivered,” and let M(x) be “There are at least x megabytes of
memory available” and S(x) be “The connection speed is at least x kilobits per second,” where
the domain of

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

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

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

S(firewall, diagnostic) → S(proxy server, diagnostic).

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

(T(100) ∧ ¬T(500) ∧ ¬M(proxy server, diagnostic)) → ∃x S(x, normal).


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.

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

equivalent to the right-hand side.

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.

e) This is false, since there are no values of x that make x = x + 1 true.

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

Make the query true if there are

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:

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 mean “or.” For X to be the
grandfather

Of Y, X must be either Y’s father’s father or Y’s mother’s father.

60. a) ∀x(P(x) → Q(x))

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

62. a) ∀x(P(x) → ¬S(x))

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

Officers are always willing to waltz (part (b)), x is not an officer.

You might also like