This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 50 SI. 52. 53. 54. 55. 56. 57. 58. l The Foundations: Logic and Proofs Show that VxPlx) v ‘9’): 9m and when) v thh are
not logically equivalent. Show that E.rP{x) A El.rQ(x) and ittPtx) A Q(x}) are
not logically equivalent. As mentioned in the text. the notation Ellx P(.r) denotes
“There exists a unique .r such that Plx] is true.” If the domain consists of all integers, what are the truth
values of these statements? s) also > 1} b) anti? 2 l] c) El!x(x + 3 m 2):) d) 3!x{x = x +1) What are the truth values of these statements? a) El!.rP{.r'J —; Ele(.r) b) VxPLr) —r Elletx} c) 3!.Y—IP(X} —> —»V.tP[x) Write out E!x Pfx ]. where the domain consists of the inte
gers l. 2. and 3. in terms of negations. conjunctions, and
disjunctions. Given the Prolog facts in Example 28. what would Prolog
return given these queries? 3) ?irtstructor l Chart . math273l
b) ?instructortpatel,cs301l
c) ?enrolledlx,cs301} d} ?enrolled(kiko.Yl e) ?teacheslgrossman,¥l Given the Prolog facts in Example 28. what would Prolog
return when given these queries? 3) ?enrolledlkevin.ee2221
b) ?enrolledtkiko.math273l
c} ?instructor lgrossmart . K}
d} ?instructorlx,cs301) e) ?teachestx,kevinl Suppose that Prolog facts are used to deﬁne the predicates
mother(M, Y) and farherl F . X ), which represent that M
is the mother of Y and F is the father of X . respectively.
Give a Prolog rule to deﬁne the predicate sibling{X. Y),
which represents that X and l’ are siblings (that is, have
the same mother and the same father). Suppose that Prolog facts are used to deﬁne the pred
icates mother(M_. Y) and fbthertF. X "J, which repre
sent that M is the mother of Y and F is the father of
X , respectively. Give a Prolog rule to deﬁne the predicate
gmndfarheﬂX , Y}, which represents that X is the grand
father of Y. [Hints You can write a disjunction in Prolog 1.4 Nested Quantiﬁers E Introduction i —,'i U either by using a semicolon to separate predicates or by
putting these predicates on separate lines.] Exercises 59—62 are based on questions found in the book
Symbolic Logic by Lewis Carroll. 59. 60. 61 62. Let PU}, le ), and Rtx) be the statements “.t is a profes
sor," “.r is ignorant," and “x is vain.” respectively. Express
each of these statements using quantiﬁers: logical con—
nectives; and PM}. le}. and Rlx). where the domain
consists of all people. a) No professors are ignorant. b) All ignorant people are vain. c) No professors are vain. d) Does (cl follow from (a) and (bl? Let PU), Q{.r), and R(x} be the statements “.r is a clear
explanation.“ “x is satisfactory.” and “.r is an excuse."
respectively. Suppose that the domain for .r consists of all
English text. Express each ofthese statements using quan—
tiﬁers. logical connectives, and PU), th). and Rtxl. a) All clear explanations are satisfactory. b) Some excuses are unsatisfactory. e) Some excuses are not clear explanations.
it‘d) Does (cl follow from (a) and {b}? . Let Plx), th}, Rtx}, and S(.r} be the statements “x is a baby," “.r is logical,“ "x is able to manage a crocodile."
and “x is despised." respectively. Suppose that the domain
consists of all people. Express each of these statements
using quantiﬁers; logical connectives; and Pix], QM),
RU}. and 50:).
a) Babiesareillogical.
b) Nobody is despised who can manage a crocodile.
c) Illogical persons are despised.
ti) Babies cannot manage crocodiles. ﬁe) Does (d) follow from (a). lb], and {c}? lfnot. is there a correct conclusion? Let P(.r). Q{.t). Rlxl, and 3(x} be the statements “.1'
is a duck," “x is one of my poultry,” “x is an ofﬁcer,”
and “x is willing to waltz,” respectively. Express each of
these statements using quantiﬁers; logical connectives;
and Phi). Q(.r), Rtx}, and S(.r}.
a) No ducks are willing to waltz.
b) No ofﬁcers ever decline to waltz.
c) All my poultry are ducks.
(1) My poultry are not ofﬁcers. are) Does (d) follow from (a). (b), and [c]? If not. is there a correct conclusion? In Section 1.3 we deﬁned the existential and universal quantiﬁers and showed how they can be
used to represent mathematical statements. We also explained how they can be used to translate lFl’ EXAMPLE 1 Extra Examines " EXAMPLE 2 1.4 Nested Quantiﬁers 51 English sentences into logical expressions. In this section we will study nested quantifiers. Two
quantiﬁers are nested if one is within the scope of the other, such as Vx3y(x +y = 0). Note that everything within the scope of a quantiﬁer can be thought of as a propositional function.
For example, VxEIy{x +y = 0) is the same thing as VxQ(x)_. where Q(x_) is Hyﬂx. y), where P(x. y) is x +y = O. Nested
quantiﬁers commonly occur in mathematics and computer science. Although nested quantiﬁers
can sometimes be difﬁcult to understand, the rules we have already studied in Section 1.3 can help us use them.
To understand these statements involving many quantiﬁers, we need to unravel what the quantiﬁers and predicates that appear mean. This is illustrated in Examples 1 and 2. Assume that the domain for the variables x and y consists of all real numbers. The statement VxVy(x + y = y + x) says that x + y = y + x for all real numbers x and y. This is the commutative law for addition
of real numbers. Likewise, the statement Vxﬂﬂx + y = 0) says that for every real number .1: there is a real number y such that .r + y = 0. This states that
every real number has an additive inverse. Similarly, the statement VxVsz{x + ("v + 2) = (x + y) + z)
is the associative law for addition of real numbers. {
Translate into English the statement VxVy((x s 0) A (y a. 0) —> (xy < 0)}. where the domain for both variables consists of all real numbers. Solution: This statement says that for every real number .1: and for every real number y, if x > O
and y < 0. then xy < 0. That is, this statement says that for real numbers it and y, if .r is positive
and y is negative, then xy is negative. This can be stated more succinctly as “The product of a
positive real number and a negative real number is always a negative real number.” 4 THINKING OF QUANTIFICATION AS LOOPS In working with quantiﬁcations of more
than one variable, it is sometimes helpful to think in terms of nested loops. (Of course, if there
are inﬁnitely many elements in the domain of some variable, we cannot actually loop through
all values. Nevertheless, this way of thinking is helpful in understanding nested quantiﬁers.) For
example, to see whether VxVyP(x. y) is true. we loop through the values for x, and for each x
we loop through the values for ,v. If we ﬁnd that Ptx, y) is true for all values for x and y, we
have determined that V_rV_vP(.r. y) is true. If we ever hit a value x for which we hit a value y
for which P(x. y) is false, we have shown that VxVyP(x. y) is false. Similarly, to determine whether VxEIyP(x, y) is true, we loop through the values for x.
For each x we loop through the values for __v until we ﬁnd a y for which P(x. y) is true. If for 52 l t The Foundations: Logic and Proofs EXAMPLE 3 [Film
Ettamntes " EXAMPLE 4 1—53 every I we hit such a y, then VxEIyP(x, y) is true; if for some .r we never hit such a y, then
Wily P (x. y} is false. To see whether 3xVyP(_x, y) is true, we loop through the values for 1: until we ﬁnd an x for
which P{'.\'. y) is always true when we loop through all values for y. Once we ﬁnd such an x, we
know that Eley P (x. y) is true. If we never hit such an x, then we know that itVyPLr. y) is false. Finally, to see whether SxElyPLr. y) is true. we loop through the values for x, where for
each .r we loop through the values for y until we hit an x for which we hit a y for which P(x, y)
is true. The statement 3x3yP(x, y) is false only if we never hit an x for which we hit a y such that P{.r_. y} is true. The Order of Quantiﬁers Many mathematical statements involve multiple quantiﬁcations of propositional functions in» volving more than one variable. [t is important to note that the order of the quantiﬁers is important. unless all the quantiﬁers are universal quantiﬁers or all are existential quantiﬁers.
These remarks are illustrated by Examples 3—5. Let P(:c. y) be the statement “at + y = y + .1: What are the truth values of the quantiﬁcations
VxVyPix. y) and V‘vi P{x. y) where the domain for all variables consists of all real numbers? Sohttfon: The quantiﬁcation
VxV_t:P(.r. y)
denotes the proposition
“For all real numbers x, for all real numbers y. x + y = y + x.” Because P(.r, y) is true for all real numbers 3: and y (it is the commutative law for addition,
which is an axiom for the real numbers—see Appendix 1), the proposition VxVItrPlx. y) is
true. Note that the statement V’ny P(.r. Iv) says “For all real numbers y, for all real numbers x.
x + y = y + x.” This has the same meaning as the statement as “For all real numbers x. for all
realnumbersyu +y = y + x.”Thatis,VxVyP(x. y} and VyV.rP(x, y) have the same meaning,
and both are true. This illustrates the principle that the order of nested universal quantiﬁers in
a statement without other quantiﬁers can be changed without changing the meaning of the quantiﬁed statement. 4 Let Q(_r, y) denote “x + y = 0.“ What are the truth values of the quantiﬁcations 5ny Q(.r. y)
and V.r3yQ{x. y}, where the domain for all variables consists of all real numbers? Solution: The quantiﬁcation Elny th. __t']
denotes the proposition
“There is a real number y such that for every real number x, Q(x. y).” No matter what value ofy is chosen, there is only one value ofx for which .1: + y = 0. Because
there is no real number y such that x + y = 0 for all real numbers 1', the statement 1vi Q(x. y) is false. )‘ —53 EXAMPLE 5 1.4 Nested Quantiﬁers 53 TABLE 1 Quantiﬁeations of Two Variables. VxVyPLt. y) P(x. y} is true for every pairx. y. There is a pair x. y for which P(x. y) is false. There is an .t such that
P(x. y} is false for every _v. For every x there is a y for
which PLr. y} is false. Ptx. y) is false for every
pair I. ,v. VJ'V.t P (x . y) For every .r there is a ,v for VxElyPtx. y}
which P(.r. y) is true.
EleyP(x. y) There is an x for which Ptx. y]
is true for every y.
HxElyP{x. y)
EIyEIx P(x. y) The quantiﬁcation There is a pair x. y for which
P(x. Iv) is true. Vx El y Q {.1' , y)
denotes the proposition “For every real number x there is a real number y such that Q(x. y)“ Given a real number x, there is a real number y such that x + y = 0; namely, y = —x. Hence,
the statement VxElyth. y) is true. { Example 4 illustrates that the order in which quantiﬁers appear makes a difference. The state
ments 5ny P (x. y) and Vx By P (x. y) are not logically equivalent. The statement 3’ny P (I. y) is
true if and only if there is a y that makes P(x. y) true for every 3:. So, for this statement to be true,
there must be a particular value of y for which P (x, y) is true regardless of the choice of x. On the
other hand, VinyPUc. y) is true ifand only iffor every value ofx there is a value ofy for which
P(x. y) is true. So, for this statement to be true, no matter which x you choose, there must be a
value of y (possibly depending on the x you choose) for which P(x. y) is true. In other words,
in the second case, y can depend on x, whereas in the ﬁrst case, y is a constant independent of it. From these observations, it follows that if ELvi P(x. y) is true, then VxEIyP(x. y) must also
be true. However, if VxEIyP(x, y) is true, it is not necessary for EnyPtx, y) to be true. (See
Supplementary Exercises 24 and 25 at the end of this chapter.) Table 1 summarizes the meanings of the different possible quantiﬁcations involving two variables.
Quantiﬁcations of more than two variables are also common, as Example 5 illustrates. Let Q(x. y. 2) be the statement “x + y = 2.” What are the truth values of the statements
VxVyEIzQ(x.y, z) and ElexVyQ(_x._v.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 2 such that
x + y = 2. Consequently, the quantiﬁcation VxVyEIzQ{x,y.z). 54 l I The Foundations: Logic and Proofs EXAMPLE 6 mm _\
minutes *' EXAMPLE 7 which is the statement “For all real numbers it and for all real numbers y there is a real number 2 such that
x + y = z,” is true. The order of the quantiﬁcation here is important, because the quantiﬁcation
ElexVyQ(x, y, 2), which is the statement “There is a real number 2 such that for all real numbers .1: and for all real numbers y it is
true that x + y = z,” is false, because there is no value of 2 that satisﬁes the equation x + y = z for all values of x
and y. 4 Translating Mathematical Statements into
Statements Involving Nested Quantiﬁers Mathematical statements expressed in English can be translated into logical expressions as
Examples 6~8 show. Translate the statement “The sum of two positive integers is always positive" into a logical
expression. Sciatica: To tranSIate this statement into a logical expression, we ﬁrst rewrite it so that the implied
quantiﬁers and a domain are shown: “For every two integers, if these integers are both positive,
then the sum of these integers is positive.“ Next, we introduce the variables x and '1' to obtain “For
all positive integers x and y, x + y is positive." Consequently, we can express this statement as VxVy((x > 0) A (y r; 0) —> {x + y > 0)). where the domain for both variables consists of all integers. Note that we could also translate
this using the positive integers as the domain. Then the statement “The sum of two positive
integers is always positive” becomes “For every two positive integers, the sum of these integers is positive. We can express this as
VxVy(x + y > 0), where the domain for both variables consists of all positive integers. { Translate the statement “Every real number except zero has a multiplicative inverse.” (A mul—
tiplicative inverse of a real number x is a real number y such that xy = 1.) Solution: We ﬁrst rewrite this as “For every real number x except zero, x has a multiplicative
inverse.” We can rewrite this as “For every real number x, if x 75 0, then there exists a real
number y such that xy = 1.” This can be rewritten as Vxﬂx 5e 0) —+ Elytxy = 1)). <l One example that you may be familiar with is the concept of limit, which is important in
calculus. EXAMPLE 8 EXAMPLE 9 EXAMPLE 10 1.4 Nested Quantiﬁers 55 (Requires caicuius) Express the deﬁnition of a limit using quantiﬁers. Solution: Recall that the deﬁnition of the statement lim f(x) = L Nat? is: For every real number 6 > 0 there exists a real number 6 > 0 such that f{.t) — L c 6
whenever 0 < Ix — at < 8. This deﬁnition ofa limit can be phrased in terms of quantiﬁers by VEEIdew < Ix ~ al < 5 —+ [f(.r) — L 4 E). where the damain for the variables 8 and 6 consists of all positive real numbers and for it consists of all real numbers.
This deﬁnition can also be expressed as V€>036>0V.r(0 < Ix—al <5—+ f{x)—L <6) when the domain for the variables 6 and 6 consists of all real numbers, rather than just the positive
real numbers. [Here restricted quantiﬁers have been used. Recall that Vx; {i P(x) means that
for all x with x> 0, Put) is true] { Translating from Nested Quantiﬁers into English Expressions with nested quantiﬁers expressing statements in English can be quite complicated.
The ﬁrst step in translating such an expression is to write out what the quantiﬁers and predicates in the expression mean. The next step is to express this meaning in a simpler sentence. This
process is illustrated in Examples 9 and [0. Translate the statement
Vx(C{x) V El_v{_C(y) A F(x. y))) into English, where C (x) is “x has a computer," F (x. y) is “x and y are friends,“ and the domain
for both x and y consists of all students in your school. Solution: The statement says that for every student x in your school, it has a computer or there
is a student y such that y has a 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. { Translate the statement
BxVsz({F(x.y) A For. 2) A (y as 2}} —> ﬁFU‘ZD into English, where F ((3.27) means a and b are friends and the domain for x, y, and 2 consists
of all students in your school. Solution: We ﬁrst examine the expression (Rx. y) A F(x, 2} A 0/ ¢ 2]) —> ﬁFLy. z). This
expression says that if students it and y are friends, and students it and z are friends, and further
more, if y and z are not the same student, then y and z are not friends. It follows that the original
statement. which is triply quantiﬁed, says that there is a student at such that for all students y
and all students 2 other than y, if x and y are friends and x and z are friends, then y and z are
not friends. In other words, there is a student none of whose friends are also friends with each other. 4 56  The Foundations: Logic and Proofs EXAMPLE 11 EXAMPLE 12 EXAMPLE 13 Translating English Sentences into Logical Expressions In Section 1.3 we showed how quantiﬁers can be used to translate sentences into logical expres
sions. However. we avoided sentences whose translation into logical expressions required the
use of nested quantiﬁers. We now address the translation of such sentences. Express the statement “If a person is female and is a parent, then this person is someone’s
mother” as a logical expression involving predicates, quantiﬁers with a domain consisting of all people, and logical connectives. Solution: The statement “If a person is female and is a parent, then this person is someone’s
mother” can he expressed as “For every person .r. if person .r is female and person .1: is a parent.
then there exists a person Av such that person 1' is the mother of person y." We introduce the
propositional functions F (x) to represent "3: is female,” P (x) to represent “.1: is a parent,” and
Mtr. y) to represent “x is the mother of); The original statement can be represented as V.\‘((F(x) A P[x)_} —» ElyM(x.y)). Using the null quantiﬁcation rule in part (b) of Exercise 4? in SectiOn 1.3, we can move Ely to
the left so that it appears just after Vx, because y does not appear in F (x) A P(x). We obtain
the logically equivalent expression V.rEly({F(x) A P{.r)) —> M(x. '12)). ‘ Express the statement “Everyone has exactly one best friend" as a logical expression involving
predicates, quantiﬁers with a domain consisting of all people, and logical connectives. Solution: The statement “Everyone has exactly one best friend” can be expressed as “For every
person .r, person .1' has exactly one best friend.” Introducing the universal quantiﬁer. we see that
this statement is the same as “W: (person it has exactly one best ﬁ'iend).” where the domain consists of all people.
To say that x has exactly one best friend means that there is a person y who is the best friend of x, and furthermore, that for every person 2, if person 2 is not person in then 2 is not the best
friend of x. When we introduce the predicate B(.r, y) to be the statement “y is the best friend
of x," the statement that x has exactly one best friend can be represented as 3y(B(X« .v) A Vzttz as y) > —B(x. 2D)
Consequently, our original statement can be expressed as
VxEI,v(B(x r) A Vzttz s9 y) 4+ nBU. 2D) [Note that we can write this statement as VxHIyB (x. y), where El! is the “uniqueness quantifier"
deﬁned on page 31] 4 Use quantiﬁers to express the statement “There is a woman who has taken a ﬂight on every
airline in the world." RSSGSSITIEIII EXAMPLE 14
Extra
Examples EXAMPLE 15 EXAMPLE 16 I .4 Nested Quantiﬁers 57 Solution: Let P(w, f) be “w has taken f" and Q(f. o) be “f is a ﬂight on a.” We can express
the statement as EleoElf(P(w. f) A QU; 0)). where the domains of discourse for w. f, and o consist of all the women in the world, all airplane
ﬂights, and all airlines, respectively.
The statement could also be expressed as 3ththR(w. f. a). where R(w. f. a) is “w has...
View
Full Document
 Spring '09
 ganong

Click to edit the document details