y = y + x. This has the same meaning as
the statement For all real numbers x, for
all real numbers y, x + y = y + x. That is,
xyP (x, y) and yxP (x, y) have the
same meaning, P1: 1/1 P2: 1/2 QC: 1/1
T
computer and x and y are friends. In other
words, every student in your school has a
computer or has a friend who has a
computer. EXAMPLE 10 Translate the
statement xyz(F (x, y) F (x, z) (y
= z) F (y,
succinctly as The product of a positive
real number and a negative real number is
always a negative real number.
THINKING OF QUANTIFICATION AS
LOOPS In working with quantifications of
more than one v
existential and universal quantifiers!
Example 4 illustrates that the order in
which quantifiers appear makes a
difference. The statements yxP (x, y)
and xyP (x, y) are not logically
equivalent. The
inverse. (A multiplicative inverse of a real
number x is a real number y such that xy
= 1.) P1: 1/1 P2: 1/2 QC: 1/1 T1: 2 CH017T Rosen-2311T MHIA017-Rosen-v5.cls
May 13, 2011 15:27 1.5 Nested
Quantifi
conjunctions, and negations. a) xP (x) b)
xP (x) c) xP (x) d) xP (x) e) xP
(x) f ) xP (x) P1: 1/1 P2: 1/2 QC: 1/1
T1: 2 CH01-7T Rosen-2311T MHIA017Rosen-v5.cls May 13, 2011 15:27 54 1 /
The Foundation
or 2, y = 0 or 1, and z = 0 or 1. Write out
these propositions using disjunctions and
conjunctions. a) yQ(0, y, 0) b) xQ(x, 1,
1) c) zQ(0, 0, z) d) xQ(x, 0, 1) P1:
1/1 P2: 1/2 QC: 1/1 T1: 2 CH01-7T
Ro
statement x knows the computer
language C+. Express each of these
sentences in terms of P (x), Q(x),
quantifiers, and logical connectives. The
domain for quantifiers consists of all
students at your s
system errors have been detected. c) The
file system cannot be backed up if there is
a user currently logged on. d) Video on
demand can be delivered when there are
at least 8 megabytes of memory avail
= z) (T (x, y) T (z, y) e) xzy(T
(x, y) T (z, y) f ) xzy(T (x, y) T
(z, y) 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
least 60 course hours, or at least 45
course hours and write a masters thesis,
and receive a grade no lower than a B in
all required courses, to receive a masters
degree. d) There is a student who has
a student none of whose friends are also
friends with each other. Translating
English Sentences into Logical
Expressions In Section 1.4 we showed
how quantifiers can be used to translate
sentences int
Introduction In Section 1.4 we defined the
existential and universal quantifiers and
showed how they can be used to
represent mathematical statements. We
also explained how they can be used to
transla
domain consist of the students in your
class and second, let it consist of all
people. a) Everyone in your class has a
cellular phone. b) Somebody in your class
has seen a foreign movie. c) There is a
the statements xyzQ(x, y, z) and
zxyQ(x, y, z), where the domain of all
variables consists of all real numbers?
Solution: Suppose that x and y are
assigned values. Then, there exists a real
number z s
Let Q(x) be the statement x + 1 > 2x. If
the domain consists of all integers, what
are these truth values? a) Q(0) b) Q(1) c)
Q(1) d) xQ(x) e) xQ(x) f ) xQ(x) g)
xQ(x) 13. Determine the truth value of
student in your class who has chatted
with everyone in your class over the
Internet. n) There are at least two
students in your class who have not
chatted with the same person in your
class. o) There
= 1) P (x) d) x(x 0) P (x) e)
x(P (x) x(x < 0) P (x) 21. For
each of these statements find a domain
for which the statement is true and a
domain for which the statement is false.
a) Everyone is studyi
has asked every faculty member a
question. g) There is a faculty member
who has asked every other faculty
member a question. h) Some student has
never been asked a question by a faculty
member. 12. Le
of z that satisfies the equation x + y = z for
all values of x and y. Translating
Mathematical Statements into Statements
Involving Nested Quantifiers
Mathematical statements expressed in
English can
respectively. Give a Prolog rule to define
the predicate sibling(X, Y ), which
represents that X and Y are siblings (that
is, have the same mother and the same
father). 58. Suppose that Prolog facts a
(x). We obtain the logically equivalent
expression xy(F (x) P (x) M(x,
y). EXAMPLE 12 Express the
statement Everyone has exactly one best
friend as a logical expression involving
predicates, quantifie
such that 0 < |x a| < and |f (x) L| .
Exercises 1. Translate these statements
into English, where the domain for each
variable consists of all real numbers. a)
xy(x < y) b) xy(x 0) (y 0)
(xy 0) c) x
to the domain of f. Solution: To say that
limxa f (x) does not exist means that for
all real numbers L, limxa f (x) = L. By
using Example 8, the statement limxa f
(x)
= L can be expressed as >0 >0 x(0
variables. a) A student in your school has
lived in Vietnam. b) There is a student in
your school who cannot speak Hindi. c) A
student in your school knows Java, Prolog,
and C+. d) Everyone in your cl
v5.cls May 13, 2011 15:27 56 1 / The
Foundations: Logic and Proofs 43.
Determine whether x(P (x) Q(x) and
xP (x) xQ(x) are logically equivalent.
Justify your answer. 44. Determine
whether x(P (x) Q(x)
= 1). EXAMPLE 15 Use quantifiers to
express the statement that There does
not exist a woman who has taken a flight
on every airline in the world. Solution:
This statement is the negation of the
statem
secret. d) There is someone in this class
who does not have a good attitude. 35.
Find a counterexample, if possible, to
these universally quantified statements,
where the domain for all variables
cons
we never hit such an x, then we know that
xyP (x, y)is false. Finally, to see
whether xyP (x, y) is true, we loop
through the values for x, where for each x
we loop through the values for y until we
h
that xP (x) xQ(x) and x(P (x)
Q(x) are not logically equivalent. 51.
Show that xP (x) xQ(x) and x(P (x)
Q(x) are not logically equivalent. 52. As
mentioned in the text, the notation !xP
(x) denotes