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

Chapter1.5

This document covers the topic of nested quantifiers in discrete mathematics, including their definitions, order, and how to translate between mathematical statements and logical expressions. It emphasizes the importance of the order of quantifiers and provides examples of translating statements to and from English. Additionally, it discusses how to negate nested quantifiers.

Uploaded by

b7ydpwrpxm
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)
20 views

Chapter1.5

This document covers the topic of nested quantifiers in discrete mathematics, including their definitions, order, and how to translate between mathematical statements and logical expressions. It emphasizes the importance of the order of quantifiers and provides examples of translating statements to and from English. Additionally, it discusses how to negate nested quantifiers.

Uploaded by

b7ydpwrpxm
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/ 25

Discrete Mathematics

College of Computer Science & Engineering


Computer Science & AI Department

All slides' contents are adapted from the book Discrete Mathematics and its Applications by Rosen, 8th edition.

1
The Foundations:
Logic and Proofs

Chapter 1

2
The Foundations:
Logic and Proofs

Chapter 1 : Section 1.5

Nested Quantifiers

3
Outline

•Understanding Nested Quantifiers


•The Order of Quantifiers
•Translating Mathematical statements to statements
involving nested quantifiers
•Translating from Nested Quantifiers to English
•Translating English sentences to logical expressions
•Negating Nested Quantifiers.

4 4
Understanding
1
Nested quantifiers

5
Nested Quantifiers
Two quantifiers are nested if one is within the scope of another; such
as:
x y (x + y = 0)
 Note that: Everything within the scope of a quantifier can be
thought as a propositional function.
e.g., x y (x + y = 0) is the same thing as
∀x Q(x) where,
Q(x) is ∃ y P(x,y) where.
P(x , y) is (x + y = 0).

Nested Quantifiers commonly occurs in mathematics and computer


science.

6
Nested Quantifiers
 Additive Inverse: for every real number x,
there’s a real number y such that: x + y =0.

xy ( x  y 0)
 Commutative Law for Addition: x+y=y+x

xy ( x  y  y  x)
 Associative Law for Addition: x+(y + z) = (x + y) +
z
xyz ( x  ( y  z ) ( x  y )  z )
Also see Example 2 on page 61
7
Thinking of quantification as a
loop

∀x∀y P(x,y) ∀x ∃y P(x,y)


For all x
For all y
P(x,y) all are true at least one is true
for all x and y in y loop and all x
End for all y
End for all x

8
Thinking of quantification as a
loop
∃x ∀y P(x,y)
For all y
For all x
P(x,y) at least one is true in x loop and all y
End for all x
End for all y

∃x ∃y P(x,y)
For all x
For all y
P(x,y) at least one is true.
End for all y
End for all x

9
The order of
2
quantifiers

10
Order of Nested Quantifiers

The order of quantifiers is important unless all the quantifiers are


universal quantifiers, or all are existential quantifiers
Let P(x,y) be the statement x+y = y+x “domain is real numbers”
What is the meaning of:
∀x ∀y P(x,y) : “ For all real numbers x, for all real numbers y,
x+y = y+x”
∀y ∀x P(x,y) : “ For all real numbers y, for all real numbers x,
x+y = y+x”
Both have the same meaning

11
Order of Nested Quantifiers

xyP ( x, y ) yxP ( x, y )
xyP( x, y ) yxP( x, y )
We cannot always change the order of quantifiers:
x y P ( x, y ) yx P ( x, y ) ?
x y ( x  y 0) yx ( x  y 0)
true false

12
Order of Nested Quantifiers:
Examples
Let U be the real numbers, Define
P(x,y) : x ∙ y = 0
What is the truth value of the following:
1. xyP(x,y)
Answer: False
2. xyP(x,y)
Answer: True
3. xy P(x,y)
Answer: True
4. x  y P(x,y)
Answer: True 13
Quantifications of Two Variables

Statement When True? When False


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

There is an x for which P(x,y) For every x there is a y for


is true for every y. which P(x,y) is false.

There is a pair x, y for which P(x,y) is false for every pair


P(x,y) is true. x,y

14
Translating Mathematical
statements to statements
3
involving nested
quantifiers

15
Translate the following statements into logical expression

 “the sum of two positive integers is always positive”


∀x∀y( (x>0)  (y>0)  (x+y>0))
Or
∀x∀y(x+y>0),
where the domain of both x and y consists of all positive integers.

“every real number except zero has a multiplicative inverse”


∀x ( (x  0)  ∃ y(xy=1))

1
16
Translating from
4 nested quantifiers to
English

17
Translate the statements into English

∀x(C(x)  ∃ y(C(y)  F(x,y) ))


where C(x) is “x has a computer”
F(x,y) is “x and y are friends”
the domain for both x and y consists of all student in your school.

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

“every student in your school has a computer or has a friend who has a
computer”

1
18
Translating English
5 sentences to logical
expressions

19
Translating from English to logical
expressions

Express the statement as logical expression (quantifiers, predicates,


logical connectives) the domain consists of all people.
“ if a person is male and is a parent, then this person is someone’s father”
∀x( (M(x)  P(x))  ∃ y F(x,y) )
where M(x) is “x is male ”
P(x) is “x is a parent”
F(x,y) is “x is the father of y”

Or ∀x ∃y ( (M(x)  P(x))  F(x,y) )

2
20
Negating nested
6
quantifiers

21
Negating Nested Quantifiers

Negate the statement:


w a f (P(w,f ) ∧ Q(f,a))

w a f (P(w,f)Q(f,a)) by De Morgan’s for 


w a f (P(w,f)Q(f,a))

w a f (P(w,f)Q(f,a)) by De Morgan’s for 


w a f  (P(w,f)Q(f,a)) by De Morgan’s for 
w a f ( P(w,f)Q(f,a)) by De Morgan’s for ∧

22
Negating Nested Quantifiers

Negate this statement( no negation precedes a quantifier)

∀x ∃y (xy=1)

(∀x ∃y (xy=1))
∃ x ∃ y (xy=1)
∃ x ∀y (xy=1)
∃ x ∀y (xy1)

2
23
Summery

•Understanding Nested Quantifiers


•The Order of Quantifiers
•Translating Mathematical statements to statements
involving nested quantifiers
•Translating from Nested Quantifiers to English
•Translating English sentences to logical expressions
•Negating Nested Quantifiers.

24 24
Reference

• Textbook: “Discrete Mathematics and


Its Applications”, by Kenneth Rosen,
8th ed. Chapter 1.5: Nested quantifiers

25

You might also like