0% found this document useful (0 votes)
21 views20 pages

Discrete Structures Lecture 4

Uploaded by

acousticsak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views20 pages

Discrete Structures Lecture 4

Uploaded by

acousticsak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 20

CSD101 - Discrete Structures

(Discrete Mathematics)
Fall 2016

Lecture - 4
Nested
Quantifiers
Quantifiers with Restricted Domain

Quantifiers with Restricted Domain

Quantifiers with Restricted Domain
Quantifiers with Restricted Domain
Nested Quantifiers
• Two quantifiers are nested if one is within scope of other,
such as
∀x∃y(x + y = 0).

• Everything within the scope of a quantifier can be thought


of as a propositional function.
• For example,
∀x∃y(x + y = 0)
is the same thing as ∀xQ(x), where Q(x) is ∃yP(x, y), where P(x, y)
is x + y = 0.
Nested Quantifiers

• “For all , there exists a such that”.


• Example:
• where and are integers

• There exists an x such that for all , is true”


• Example:

• THINK QUANTIFICATION AS LOOPS


Nested Quantifiers Example
• Let Domain of is the students in this class
Doamin of is the courses in software engineering
= “ takes course ” true when takes course
otherwise false.
Translate the following logical expression:
Meaning of multiple quantifiers
Suppose = “x likes y.”
Domain of x: {St1, St2}; Domain of y: {Cricket, Hockey}

• true for all x, y pairs.

• true for at least one x, y pair.

• For every value of x we can find a (possibly


different) y so that P(x,y) is true.

• There is at least one x for which P(x,y) is


always true.
Predicates - the meaning of multiple quantifiers

Statement When True? When False?


∀x∀yP(x, y) P(x, y) is true for every There is a pair x, y for
∀y∀xP(x, y) pair x, y. which P(x, y) is false.
∀x∃yP(x, y) For every x there is a y There is an x such that
for which P(x, y) is true. P(x, y) is false for every
y.

∃x∀yP(x, y) There is an x for which For every x there is a y


P(x, y) is true for every y. for which P(x, y) is false.
∃x∃yP(x, y) There is a pair x, y for P(x, y) is false for every
∃y∃xP(x, y) which P(x, y) is true. pair x, y.
Example
• Let Q(x, y) denote “x + y = 0.” What are the truth values of
the quantifications ∃y∀xQ(x, y) and ∀x∃yQ(x, y), where the
domain for all variables consists of all real numbers?

• Solution:
The quantification ∃y∀xQ(x, y) denotes the
proposition
“There is a real number y such that for every real number x,
Q(x, y).”
• No matter what value of y is chosen, there is only one value
of x for which x + y = 0. Because there is no real number y
such that x + y = 0 for all real numbers x, the statement
∃y∀xQ(x, y) is false.
Example
• The quantification ∀x∃yQ(x, 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 ∀x∃yQ(x, y) is true.
Order of Quantifiers

• xy and xy are not equivalent!


• xy P(x,y)
• P(x,y) = (x+y == 0) is false

• xy P(x,y)
• P(x,y) = (x+y == 0) is true
Example

Domain: Real numbers


• True/False???
• For all real numbers x and for all real numbers y there is a
real number z such that .
• True
• True/False???
• There is a real number z such that for all real numbers x
and for all real numbers y it is true that .
• False
Translating between English and Quantifiers
• Translate the statement “The sum of two positive integers
is always positive” into a logical expression.
• Solution:
• First rewrite it so that the implied quantifiers and a domain
are shown: “For every two integers, if these integers are
both positive, then the sum of these integers is positive.”
• Next, introduce the variables x and y to obtain “For all
positive integers x and y, x + y is positive.”
• Statement is ∀x∀y((x > 0) ∧ (y > 0) → (x +y > 0)),
• where the domain for both variables consists positive
integers.
Translating between English and Quantifiers
• Translate the statement
∀x(C(x) ∨ ∃y(C(y) ∧ 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, x 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.
Negating Multiple Quantifiers
• Recall negation rules for single quantifiers:
• ¬x P(x) = x ¬P(x)
• ¬x P(x) = x ¬P(x)
• Essentially, you change the quantifier(s), and negate
what it’s quantifying

• Examples:
• ¬(xy P(x,y)) = x ¬y P(x,y) = xy ¬P(x,y)
• ¬(xyz P(x,y,z)) = x¬yz P(x,y,z)
= xy ¬ z P(x,y,z) = xyz ¬P(x,y,z)
Negating Multiple Quantifiers

• Consider ¬(xy P(x,y)) = xy ¬P(x,y)


• The left side is saying “for all x, there exists a y such
that P is true”
• To negate it, you need to show that “there exists an x
such that for all y, P is false”
• Consider ¬(xy P(x,y)) = xy ¬P(x,y)
• The left side is saying “there exists an x such that for all
y, P is true”
• To negate it, you need to show that “for all x, there
exists a y such that P is false”
Chapter Reading
• Chapter 1, Kenneth H. Rosen, Discrete Mathematics and
Its Applications, Section 1.5
Chapter Exercise (For Practice)
• Question # 1, 2, 3, 4, 8, 23, 24, 25, 26, 27, 30, 31, 39, 41

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy