0% found this document useful (0 votes)
33 views61 pages

Ch01-Lecture 3&4 (Week 2)

The document discusses predicates, quantifiers, and their use in logical statements. Specifically, it covers: 1) Defining predicates as statements about variables and assigning truth values. 2) Using quantifiers like "forall" and "there exists" to express the scope of predicates. 3) Examples of translating between logical expressions and English statements.

Uploaded by

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

Ch01-Lecture 3&4 (Week 2)

The document discusses predicates, quantifiers, and their use in logical statements. Specifically, it covers: 1) Defining predicates as statements about variables and assigning truth values. 2) Using quantifiers like "forall" and "there exists" to express the scope of predicates. 3) Examples of translating between logical expressions and English statements.

Uploaded by

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

CS1101

Discrete Mathematics 1

Chapter 01
The Foundations: Logic
Today’s Topics

•1.4 Predicates and Quantifiers


•1.5 Nested Quantifiers

2
Predicates and Quantifiers (1/22)

Predicate:
𝑥 is greater than 3

3
Predicates and Quantifiers (1/22)

Predicate:
𝑥 is greater than 3

The subject The predicate

We can denote the statement "𝑥 𝑖𝑠 𝑔𝑟𝑒𝑎𝑡𝑒𝑟 𝑡ℎ𝑎𝑛 3" by 𝑷 𝒙

where 𝑷 denotes the predicate "𝑖𝑠𝑔𝑟𝑒𝑎𝑡𝑒𝑟𝑡ℎ𝑎𝑛 3" and 𝒙 is the variable.

The statement 𝑷(𝒙) is also said to be the value of the propositional function 𝑷 at 𝒙.
Once a value has been assigned to the variable 𝒙, the statement 𝑷(𝒙) becomes a
proposition and has a truth value.

4
Predicates and Quantifiers (2/22)

Example1:

Solution

We obtain the statement P(4) by setting x = 4 in the statement


“x > 3.” Hence, P(4), which is the statement “4 > 3,” is true.
However, P(2), which is the statement “2 > 3,” is false.

5
Predicates and Quantifiers (2/22)

Example1:

T F

6
Predicates and Quantifiers (3/22)

Example2:

7
Predicates and Quantifiers (3/22)

Example2:

F T

8
Predicates and Quantifiers (4/22)

Example3:

9
Predicates and Quantifiers (4/22)

Example3:

T T F

T F
F T

10
Predicates and Quantifiers (5/22)

Quantifiers:
Expresses the extent to which a predicate is true over a
range of elements.

Quantifier

Universal Existential Uniqueness

11
Predicates and Quantifiers (5/22)

Quantifiers:
Quantifier

Universal Existential Uniqueness

12
Predicates and Quantifiers (6/22)

Quantifiers:
Quantifier

Universal Existential Uniqueness

13
Predicates and Quantifiers (7/22)

Quantifiers:
Quantifier

Universal Existential Uniqueness

∃! 𝒙𝑷(𝒙)
∃ 1 𝒙𝑷(𝒙)

14
Predicates and Quantifiers (8/22)

Quantifiers:
Quantifier

Universal Existential Uniqueness

∃! 𝒙𝑷 𝒙 , ∃ 1 𝒙𝑷(𝒙)

15
Predicates and Quantifiers (9/22)

Translate into English – Example1:


Express the statement “Every student in this class has studied calculus.

Solution 𝑃(𝑥): 𝑥 has studied calculus.


𝑆(𝑥): 𝑥 is in this class.
The statement can be expressed as  x ( S ( x ) →
P ( x ))

16
Predicates and Quantifiers (10/22)

Example2:

17
Predicates and Quantifiers (10/22)

Example2:

18
Predicates and Quantifiers (10/22)

Example3:

19
Predicates and Quantifiers (10/22)

Example3:

20
Predicates and Quantifiers (11/22)

Example3:

21
Predicates and Quantifiers (11/22)

Example3:

22
Predicates and Quantifiers (12/22)

Example4:

23
Predicates and Quantifiers (12/22)

Example5:

24
Predicates and Quantifiers (13/22)

Example6:

25
Predicates and Quantifiers (13/22)

Example6:

T T F
F T F

26
Predicates and Quantifiers (15/22)

Translate into English – Example2:

Translate the statement ∀𝑥(𝐶(𝑥) ∨ ∃𝑦(𝐶(𝑦) ∧ 𝐹(𝑥, 𝑦))) into


English, where 𝐶(𝑥) is "𝑥 has a computer", 𝐹(𝑥, 𝑦) is
"𝑥 and 𝑦 are friends," and both 𝑥 and 𝑦 is the set of all students
in your school.

Solution
Every student in your school has a computer or has a
friend who has a computer.

27
Predicates and Quantifiers (16/22)

Translate into English – Example3:

𝐀𝐧𝐬𝐰𝐞

28
Predicates and Quantifiers (16/22)

Translate into English – Example3:

𝐀𝐧𝐬𝐰𝐞

29
Predicates and Quantifiers (16/22)

Translate into English – Example3:

𝐀𝐧𝐬𝐰𝐞

30
Predicates and Quantifiers (16/22)

Translate into English – Example3:

𝐀𝐧𝐬𝐰𝐞

31
Predicates and Quantifiers (17/22)

Translate into Logical Expression – Example1:

𝐀𝐧𝐬𝐰𝐞

32
Predicates and Quantifiers (17/22)

Translate into Logical Expression – Example1:

𝐀𝐧𝐬𝐰𝐞

33
Predicates and Quantifiers (17/22)

Translate into Logical Expression – Example1:

𝐀𝐧𝐬𝐰𝐞

34
Predicates and Quantifiers (17/22)

Translate into Logical Expression – Example1:

𝐀𝐧𝐬𝐰𝐞

35
Predicates and Quantifiers (18/22)

Precedence of Quantifiers:

36
Predicates and Quantifiers (18/22)

Logical Equivalences Involving Quantifiers:

37
Predicates and Quantifiers (18/22)

Logical Equivalences Involving Quantifiers:

1) We assume that ∀𝑥 𝑃 𝑥 ∧ 𝑄 𝑥 is true for all values x in the domain.


2) Then, 𝑃 𝑥 is true for all values x in the domain. And 𝑄 𝑥 is true for all
values x in the domain.
3) Then, ∀𝑥𝑃 𝑥 is true. And ∀𝑥𝑄 𝑥 is true. ∀𝑥𝑃 𝑥 ∧ ∀𝑥𝑄 𝑥 is true.

1. We assume that ∀𝑥𝑃 𝑥 ∧ ∀𝑥𝑄 𝑥 is true for all values x in the domain.
2. Then,∀𝑥𝑃 𝑥 is true. And ∀𝑥𝑄 𝑥 is true. Then, 𝑃 𝑥 is true for all values x in
the domain. And 𝑥𝑄 𝑥 is true for all values x in the domain.
3. Then, 𝑃 𝑥 ∧ 𝑄 (𝑥) is true for all values x in the domain ∀𝑥 𝑃 𝑥 ∧ 𝑄 𝑥 is
true.

38
Predicates and Quantifiers (19/22)

Negating Quantified Expressions:


𝑃(𝑥) is the statement "𝑥 has taken a course in calculus" and
the domain consists of the students in your class.
∀𝒙𝑷(𝒙) :

39
Predicates and Quantifiers (19/22)

Negating Quantified Expressions:


𝑃(𝑥) is the statement "𝑥 has taken a course in calculus" and
the domain consists of the students in your class.
∀𝒙𝑷(𝒙) :
"Every student in your class has taken a course in calculus"

40
Predicates and Quantifiers (19/22)

Negating Quantified Expressions:


𝑃(𝑥) is the statement "𝑥 has taken a course in calculus" and
the domain consists of the students in your class.
∀𝒙𝑷(𝒙) :
"Every student in your class has taken a course in calculus"

The negation of this statement is

41
Predicates and Quantifiers (19/22)

Negating Quantified Expressions:


𝑃(𝑥) is the statement "𝑥 has taken a course in calculus" and
the domain consists of the students in your class.
∀𝒙𝑷(𝒙) :
"Every student in your class has taken a course in calculus"

The negation of this statement is


"There is at least one student in your class who has not taken a course
in calculus"

42
Predicates and Quantifiers (19/22)

Negating Quantified Expressions:


𝑃(𝑥) is the statement "𝑥 has taken a course in calculus" and
the domain consists of the students in your class.
∀𝒙𝑷(𝒙) :
"Every student in your class has taken a course in calculus"

The negation of this statement is


"There is at least one student in your class who has not taken a course
in calculus"
¬∀𝒙𝑷(𝒙)
43
Predicates and Quantifiers (19/22)

Negating Quantified Expressions:


𝑃(𝑥) is the statement "𝑥 has taken a course in calculus" and
the domain consists of the students in your class.
∀𝒙𝑷(𝒙) :
"Every student in your class has taken a course in calculus"

The negation of this statement is


"There is at least one student in your class who has not taken a course
in calculus"
¬∀𝒙𝑷(𝒙) ≡ ∃𝒙¬𝑷(𝒙)
44
Predicates and Quantifiers (20/22)

Negating Quantified Expressions:


𝑃(𝑥) is the statement "𝑥 has taken a course in calculus" and
the domain consists of the students in your class.
∃𝒙𝑷(𝒙) :

45
Predicates and Quantifiers (20/22)

Negating Quantified Expressions:


𝑃(𝑥) is the statement "𝑥 has taken a course in calculus" and
the domain consists of the students in your class.
∃𝒙𝑷(𝒙) :
“At least one student in your class has taken a course in calculus"

46
Predicates and Quantifiers (20/22)

Negating Quantified Expressions:


𝑃(𝑥) is the statement "𝑥 has taken a course in calculus" and
the domain consists of the students in your class.
∃𝒙𝑷(𝒙) :
“At least one student in your class has taken a course in calculus"

The negation of this statement is

47
Predicates and Quantifiers (20/22)

Negating Quantified Expressions:


𝑃(𝑥) is the statement "𝑥 has taken a course in calculus" and
the domain consists of the students in your class.
∃𝒙𝑷(𝒙) :
“At least one student in your class has taken a course in calculus"

The negation of this statement is


"Every student in this class has not taken calculus"

48
Predicates and Quantifiers (20/22)

Negating Quantified Expressions:


𝑃(𝑥) is the statement "𝑥 has taken a course in calculus" and
the domain consists of the students in your class.
∃𝒙𝑷(𝒙) :
“At least one student in your class has taken a course in calculus"

The negation of this statement is


"Every student in this class has not taken calculus"
¬∃𝒙𝑷(𝒙)

49
Predicates and Quantifiers (20/22)

Negating Quantified Expressions:


𝑃(𝑥) is the statement "𝑥 has taken a course in calculus" and
the domain consists of the students in your class.
∃𝒙𝑷(𝒙) :
“At least one student in your class has taken a course in calculus"

The negation of this statement is


"Every student in this class has not taken calculus"
¬∃𝒙𝑷(𝒙) ≡ ∀𝒙¬𝑷(𝒙)

50
Predicates and Quantifiers (21/22)

Example1:
What are the negations of the statements
∀𝒙(𝒙𝟐 > 𝒙)

51
Predicates and Quantifiers (21/22)

Example1:
What are the negations of the statements
∀𝒙(𝒙𝟐 > 𝒙)

¬∀𝒙(𝒙𝟐 > 𝒙) ≡ ∃𝒙¬(𝒙𝟐 > 𝒙)


∃ 𝒙 (𝒙𝟐 ≤ 𝒙)

52
Predicates and Quantifiers (22/22)

Example2:
What are the negations of the statements
∃𝒙(𝒙𝟐 = 𝟐)

53
Predicates and Quantifiers (22/22)

Example2:
What are the negations of the statements
∃𝒙(𝒙𝟐 = 𝟐)

¬∃𝒙(𝒙𝟐 = 𝟐) ≡ ∀𝒙¬(𝒙𝟐 = 𝟐)
∀ 𝒙 (𝒙𝟐 ≠ 𝟐)

54
1.5 Nested Quantifiers

55
Nested Quantifiers

❑ One quantifier is within the scope ofanother


Example: “Every real number has an inverse”is
 x  y(x + y = 0)
where the domains of x and y are the real
numbers.
❑ We can also think of nested propositional functions:
 x  y(x + y = 0) can be viewed as
 x Q(x) where Q(x) is  y P(x, y)
where P(x, y) is (x + y = 0)

56
❑ EXAMPLE : Assume that the domain for the variables x
and y consists of all real numbers.
The statement
∀x∀y(x + y = y + x)
says that x + y = y + x for all real numbers x and
y. (the commutative law for addition)
the statement
∀x∃y(x + y = 0)
says that for every real number x there is a real number y
such that x + y = 0.
(every real number has an additive inverse)

57
Order of Quantifiers

Examples:
1. Let P(x,y) be the statement “x + y = y + x.” Assume that
U is the real numbers.
x yP(x,y) and y xP(x,y) have the same truth value.
“For all real numbers x, for all real numbers y, x + y = y + x.”
2.Let Q(x,y) be the statement “x + y = 0.” Assume that U is the real
numbers. Then x yQ(x,y) is true,
“For every real number x there is a real number y such that Q(x, y).”
But ∃y∀xQ(x, y) is false
“Thereis areal numbery suchthat for every real numberx, Q(x,y).”
58
Question on Order of Quantifiers

Example 1: Let U be the real numbers,


Define P(x,y) : x . y = 0
What is the truth value of the following:
1.  x  y P(x,y)
Answer: False
2.  x  y P(x,y)
Answer: True
3.  x  y P(x,y)
Answer: True
4.  x  y P(x,y)
Answer: True
59
Nested Quantifiers

Example 2: Let Ube the real numbers,


Define P(x,y) : x / y = 0
What is the truth value of thefollowing:
1.  x  yP(x,y)
Answer: False
2.  x  yP(x,y)
Answer: False
3.  x  y P(x,y)
Answer: False
4.  x  y P(x,y)
Answer: True
60
Quantifications of two Variables

61

You might also like