LECTURE 6
Chapter 1.3
Predicates and Quantifiers
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University
QUANTIFIER
UNIVERSAL QUANTIFIER
1. Symbol: ∀xP(x)
2. Read as:
“for all 𝒙𝑷(𝒙)"
or
“ for every 𝒙𝑷(𝒙).’’
EXISTENTIAL QUANTIFIER
1. Symbol: ∃𝑥𝑃(𝑥)
2. Read as:
"There is an x such that
𝑷(𝒙) ,"
"There is at least one x such
that 𝑷(𝒙) ,"
or
"For some 𝒙𝑷(𝒙)"
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University
THE UNIQUENESS QUANTIFIER
Definition:
The uniqueness quantifier of P(x) is the proposition
“There exists a unique x such that P(x) is true.”
The uniqueness quantifier is denoted by ∃! 𝒙𝑷 𝒙 𝒐𝒓 ∃𝟏𝒙𝑷 𝒙
Here ∃! 𝒐𝒓 ∃𝟏 is called the uniqueness quantifier.
The uniqueness quantification ∃! 𝒙𝑷 𝒙 𝒐𝒓 ∃𝟏𝒙𝑷 𝒙 is read as
"There is exactly one x such that 𝑷(𝒙) is true ,"
"There is one and only one x such that 𝑷(𝒙) is true,"
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University
PRECEDENCE OF QUANTIFIER
The quantifiers ∀ and ∃ have higher precedence then all logical
operators from propositional calculus.
For example,
∀x P(x)  Q(x) is the disjunction of ∀x P(x) and Q(x).
In other words, it means (∀x P(x))  Q(x) ) rather than
∀x ( P(x)  Q(x))
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University
Logical Equivalences Involving Quantifiers
Definition:
Statements involving predicates and quantifiers are logically
equivalent if and only if they have the same truth value no
matter which predicates are substituted into these statements and
which domain of discourse is used for the variables in these
propositional functions.
We use the notation S ≡ T to indicate that two statements S and T
involving predicates and quantifiers are logically equivalent.
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University
EXAMPLE 1:
Show that ∀x (P(x)  Q(x)) and ∀x P(x)  ∀x Q(x) are logically
equivalent (where the same domain is used).
Solution: Suppose we have particular predicates P and Q, with a
common domain. We can show that ∀x (P(x)  Q(x)) and ∀x P(x) 
∀x Q(x) are logically equivalent by doing two things.
1. First, we show that if ∀x (P(x)  Q(x)) is true, then ∀x P(x) 
∀x Q(x) is true.
2. Second, we show that if ∀x P(x)  ∀x Q(x) is true, then ∀x
(P(x)  Q(x)) is true.
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University
Proof of 1st Part:
Suppose that ∀x (P(x)  Q(x)) is true. This means that if a is in the
domain, then P(a)  Q(a) is true. Hence, P(a) is true and Q(a) is true.
Because P(a) is true and Q(a) is true for every element in the
domain, we can conclude that ∀x P(x) and ∀x Q(x) are both true.
This means that ∀x P(x)  ∀x Q(x) is true.
Proof of 2nd Part:
Suppose that ∀x P(x)  ∀x Q(x) is true. It follows that ∀x P(x) is
true and ∀x Q(x) is true. Hence, if a is in the domain, then P(a) is
true and Q(a) is true [because P(x) and Q(x) are both true for all
elements in the domain, there is no conflict using the same value of a
here].
It follows that for all a, P(a)  Q(a) is true. It follows that ∀x (P(x)
 Q(x)) is true. We can now conclude that
∀x (P(x)  Q(x)) ≡ ∀x P(x)  ∀x Q(x)
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University
De Morgan's Laws for Quantifiers
1. ¬∀x P(x) ≡ ∃𝐱¬ P(x).
2. ¬∃ xP(x) ≡ ∀x¬ P(x).
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University
Negating Quantified Expressions
Example 1: Consider the statement:
"Every student in your class has taken a course in calculus.” This statement is
a universal quantification, namely, ∀x P(x) .
∀x P(x)= "Every student in your class has taken a course in calculus.” The
negation of this statement is
¬∀x P(x) ="It is not the case that every student in your class has taken a
course in calculus.” …..(1)
Where P(x) = "x has taken a course in calculus" and the domain consists of the
students in your class.
¬ P(x) = "x has not taken a course in calculus“
Above statement (1) equivalent to
"There is a student in your class who has not taken a course in calculus.”
And this is simply the existential quantification of the negation of the original
propositional function, namely, ∃𝐱¬ P(x).
∃𝐱¬ P(x)= "There is a student in your class who has not taken a course in
calculus.”
That is ¬∀x P(x) ≡ ∃𝐱¬ P(x).
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University
¬∀x P(x) ≡ ∃𝐱¬ P(x).
It is not the case that every student in
your class has taken a course in
calculus.
There is a student in your class who has
not taken a course in calculus
ব্যাপারটা এমন নয় যে আপনার ক্লাসের
প্রসযযক ছাত্রই কযালক
ু লাে যকাে সকসরসছ
আপনার ক্লাসে একজন ছাত্র আসছ যে
কযালক
ু লাসের যকাে সকসরনন
¬∃ xP(x) ≡ ∀x¬ P(x).
It is not the case that there is a student
in this class who has taken a course in
calculus.
Every student in this class has not taken
calculus.
ব্যাপারটা এমন নয় যে এই ক্লাসে একজন
ছাত্র আসছ যে কযালক
ু লাে যকাে সকসরসছ।
এই ক্লাসের প্রসযযক নিক্ষার্থী কযালক
ু লাে
যনয়নন।
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University
Example 2: Consider the statement:
" There is a student in this class who has taken a course in calculus.” This
statement is a existential quantification, namely, ∃ x P(x) .
∃ x P(x) = " There is a student in this class who has taken a course in
calculus.”
The negation of this statement is
¬∃xP(x)=“It is not the case that there is a student in this class who has taken
a course in calculus."…..(1)
Where P(x) = "x has taken a course in calculus" and the domain consists of the
students in your class.
¬ P(x) = "x has not taken a course in calculus“
Above statement (1) equivalent to
"Every student in this class has not taken calculus.”
And this is simply the universal quantification of the negation of the original
propositional function, namely, ∀x¬ P(x).
∀x¬ P(x)= "Every student in this class has not taken calculus”
That is ¬∃ xP(x) ≡ ∀x¬ P(x).
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University
¬∀x P(x) ≡ ∃𝐱¬ P(x).
It is not the case that every student in
your class has taken a course in
calculus.
There is a student in your class who has
not taken a course in calculus
ব্যাপারটা এমন নয় যে আপনার ক্লাসের
প্রসযযক ছাত্রই কযালক
ু লাে যকাে সকসরসছ
আপনার ক্লাসে একজন ছাত্র আসছ যে
কযালক
ু লাসের যকাে সকসরনন
¬∃ xP(x) ≡ ∀x¬ P(x).
It is not the case that there is a student
in this class who has taken a course in
calculus.
Every student in this class has not taken
calculus.
ব্যাপারটা এমন নয় যে এই ক্লাসে একজন
ছাত্র আসছ যে কযালক
ু লাে যকাে সকসরসছ।
এই ক্লাসের প্রসযযক নিক্ষার্থী কযালক
ু লাে
যনয়নন।
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University
Example 3: What are the negations of the statements "There is an honest
politician"
Solution: Consider the statement: “There is an honest politician.” This statement
is a existential quantification, namely, ∃ x P(x) .
∃ xP(x) = " There is an honest politician.”
The negation of this statement is
¬∃ 𝒙𝑷(𝒙) = “It is not the case that there is an honest politician."…..(1)
Where P(x) = “x is honest" and the domain consists of all politicians.
¬ P(x) = "x is dishonest“
Above statement (1) equivalent to
"Every politician is dishonest."
And this is simply the universal quantification of the negation of the original
propositional function, namely, ∀x¬ P(x).
∀x¬ P(x)= "Every politician is dishonest”
That is ¬∃ xP(x) ≡ ∀x¬ P(x).
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University
Example 4: What are the negations of the statements " All Americans eat
cheeseburgers " .
Solution: Consider the statement: "All Americans eat cheeseburgers.” This
statement is a universal quantification, namely, ∀x P(x) .
∀x P(x)= " All Americans eat cheeseburgers.”
The negation of this statement is
¬∀x P(x) ="It is not the case that All Americans eat cheeseburgers.” …..(1)
Where P(x) = “x eats cheeseburgers” and the domain consists of the students in
your class.
¬ P(x) = " x does not eat cheeseburgers“
Above statement (1) equivalent to
"There is an American who does not eat cheeseburgers.”
And this is simply the existential quantification of the negation of the original
propositional function, namely, ∃𝐱¬ P(x).
∃𝐱¬ P(x)= "There is an American who does not eat cheeseburgers.”
That is ¬∀x P(x) ≡ ∃𝐱¬ P(x).
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University
Example 5: What are the negations of the statements:
i. ∀x (𝒙𝟐
> 𝒙)
ii. ∃x 𝒙𝟐 = 𝟐
Solution: De Morgan's Laws for Quantifiers
1. ¬∀x P(x) ≡ ∃𝐱¬ P(x).
2. ¬∃ xP(x) ≡ ∀x¬ P(x).
i. Applying De Morgan's 1st Law:¬∀x P(x) ≡ ∃𝐱¬ P(x).
¬∀x (𝒙𝟐> 𝒙) ≡ ∃𝐱¬ 𝒙𝟐 > 𝒙
¬∀x (𝒙𝟐> 𝒙) ≡ ∃𝐱 𝒙𝟐 ≤ 𝒙
ii. Applying De Morgan's 2nd Law:¬∃ xP(x) ≡ ∀x¬ P(x).
¬∃ x 𝒙𝟐 = 𝟐 ≡ ∀x¬ 𝒙𝟐 = 𝟐
¬∃ x 𝒙𝟐
= 𝟐 ≡ ∀x 𝒙𝟐
≠ 𝟐
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University
Example 6:
Show that, ¬∀x (P(x)→ 𝐐(𝐱)) ≡ ∃𝐱 (P(x)¬𝑸(𝒙)).
Solution: According to De Morgan's 1st Law:
¬∀x P(x) ≡ ∃𝐱¬ P(x).
¬∀x (P(x)→ 𝐐(𝐱)) ≡ ∃𝐱¬ (P(x)→ 𝐐(𝐱))
≡ ∃𝐱 (P(x)¬𝐐(𝐱)) [¬(𝐴 → 𝐵) = 𝐴¬𝐵)]
[Proved]
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University
Problem 1: Let C(x) be the statement “x has a cat”, let D(x) be the statement
“x has a dog”, and let F(x) be the statement “x has a ferret”. Express each of
these statements in terms of C(x), D(x), F(x), quantifiers, and logical
connectives. Let the domain consist of all students in your class.
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University
Question Solution
a. A student in your class has a cat, a dog, and a
ferret.
∃𝐱 (𝐂(x)D(x) 𝑭(𝒙)).
b. All students in your class have a cat, a dog, or a
ferret.
∀𝐱 (𝐂(x)D(x)𝐅(𝒙)).
c. Some student in your class has a cat and a ferret,
but not a dog
∃𝐱 (𝐂(x)¬D(x) 𝑭(𝒙)).
d. No student in your class has a cat, a dog, and a
ferret.
¬∃𝐱 (𝐂(x)D(x) 𝑭(𝒙)).
e. For each of the three animals, cats, dogs, and
ferrets, there is a student in your class who has
one of these animals as a pet
∃𝐱 (𝐂(x)D(x)  𝑭(𝒙)).
Problem 2: Let Q(x) be the statement “𝑥 + 1 > 2𝑥”. If the domain consists of
all integers, what are the truth values?
a) Q(0) b) Q(−1) c) Q(1) d) ∃x Q(x)
e) ∀x Q(x) f) ∃x ¬Q(x) g) ∀x ¬Q(x)
Solution:
a) Since 0 + 1 > 0 · we know that Q(0) is true.
b) Since (−1) + 1 > 2 (−1) · we know that Q(−1) is true.
c) Since 1 + 1 > 2 · we know that Q(1) is false.
d) From part (a) we know that there is at least one x that makes Q(x) true, so
∃x Q(x) is true.
e) From part (c) we know that there is at least one x that makes Q(x) false, so
∀x Q(x) is false.
f) From part (c) we know that there is at least one x that makes Q(x) false, so
∃x ¬Q(x) is true.
g) From part (a) we know that there is at least one x that makes Q(x) true, so
∀x ¬Q(x) is false.
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University
Chapter 1.4
Nested Quantifiers
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University
The Order of Quantifiers
Example 1: Let P (x , y) be the statement "x + y = y + x ." What are the truth values of
the quantifications ∀x ∀y P(x , y) and ∀y ∀x P (x , y) where the domain for all
variables consists of all real numbers?
Solution: The quantification ∀x ∀y P(x , y) denotes the proposition
"For all real numbers x , for all real numbers y, x + y = y + x .“
Because P(x, y) is true for all real numbers x and y, then , the proposition ∀x ∀y P(x ,
y) is true.
The quantification ∀y ∀x P(x , y) denotes the proposition
"For all real numbers y , for all real numbers x, x + y = y + x .“
Because P(x, y) is true for all real numbers x and y, then , the proposition ∀y ∀x P(x ,
y) is true.
That is, ∀x ∀y P(x , y) and ∀y ∀x P(x , y) have the same meaning, and both are true.
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University
Example 2: Let Q (x , y) be the statement "x + y = 0." What are the truth
values of the quantifications ∃y∀x Q(x , y) and ∀x∃y Q (x , y) where the
domain for all variables consists of all real numbers?
Solution: The quantification ∃y∀x Q(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∀x Q(x , y) is false.
The quantification ∀x ∃y Q (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 ∃y Q (x , y) is true. The statements ∃y∀x Q(x ,
y) and ∀x∃y Q (x , y) are not logically equivalent.
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University
Example 3: Let Q (x , y, z) be the statement "x + y = z." What are the truth
values of the quantifications ∀x ∀y ∃z Q(x , y, z) and ∃y ∀x ∀y Q (x , y, z)
where the domain for all variables consists of all real numbers?
Solution: The quantification ∀x ∀y ∃z Q(x , y, z) denotes the proposition
"For all real numbers x and for all real numbers y there is a real
number z such that x + y = z.”
Suppose that x and y are assigned values. Then, there exists a real number z
such that x + y = z. then the quantification ∀x ∀y ∃z Q(x , y, z) is true.
The quantification ∃y ∀x ∀y Q(x, y, z) denotes the proposition
“There is a real number z such that for all real numbers x and for all
real numbers y it is true that x + y = z”
The quantification ∃y ∀x ∀y Q(x, y, z) is false, because there is no value of z
that satisfies the equation x + y = z for all values of x and y.
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University
Assignment 4
1. Let P(x) be the statement "x spends more than five hours every weekday in
class," where the domain for x consists of all students. Express each of
these quantifications in English.
i. ∃ x P(x) ii. ∀x P(x) iii. ∀x¬ P(x) iv. ∃𝐱¬ P(x).
2. Let P(x) be the statement "x can speak Russian" and let Q(x) be the
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 school.
a) There is a student at your school who can speak Russian and who knows
C++.
b) There is a student at your school who can speak Russian but who doesn't
know C++.
c) Every student at your school either can speak Russian or knows C++.
d) No student at your school can speak Russian or knows C++
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University
3.

Lecture_6_Chapter_1_Lesson_1.3-Lesson-1.4.pptx

  • 1.
    LECTURE 6 Chapter 1.3 Predicatesand Quantifiers Prepared by Khairun Nahar,Assistant Professor, Department of CSE, Comilla University
  • 2.
    QUANTIFIER UNIVERSAL QUANTIFIER 1. Symbol:∀xP(x) 2. Read as: “for all 𝒙𝑷(𝒙)" or “ for every 𝒙𝑷(𝒙).’’ EXISTENTIAL QUANTIFIER 1. Symbol: ∃𝑥𝑃(𝑥) 2. Read as: "There is an x such that 𝑷(𝒙) ," "There is at least one x such that 𝑷(𝒙) ," or "For some 𝒙𝑷(𝒙)" Prepared by Khairun Nahar,Assistant Professor, Department of CSE, Comilla University
  • 3.
    THE UNIQUENESS QUANTIFIER Definition: Theuniqueness quantifier of P(x) is the proposition “There exists a unique x such that P(x) is true.” The uniqueness quantifier is denoted by ∃! 𝒙𝑷 𝒙 𝒐𝒓 ∃𝟏𝒙𝑷 𝒙 Here ∃! 𝒐𝒓 ∃𝟏 is called the uniqueness quantifier. The uniqueness quantification ∃! 𝒙𝑷 𝒙 𝒐𝒓 ∃𝟏𝒙𝑷 𝒙 is read as "There is exactly one x such that 𝑷(𝒙) is true ," "There is one and only one x such that 𝑷(𝒙) is true," Prepared by Khairun Nahar,Assistant Professor, Department of CSE, Comilla University
  • 4.
    PRECEDENCE OF QUANTIFIER Thequantifiers ∀ and ∃ have higher precedence then all logical operators from propositional calculus. For example, ∀x P(x)  Q(x) is the disjunction of ∀x P(x) and Q(x). In other words, it means (∀x P(x))  Q(x) ) rather than ∀x ( P(x)  Q(x)) Prepared by Khairun Nahar,Assistant Professor, Department of CSE, Comilla University
  • 5.
    Logical Equivalences InvolvingQuantifiers Definition: Statements involving predicates and quantifiers are logically equivalent if and only if they have the same truth value no matter which predicates are substituted into these statements and which domain of discourse is used for the variables in these propositional functions. We use the notation S ≡ T to indicate that two statements S and T involving predicates and quantifiers are logically equivalent. Prepared by Khairun Nahar,Assistant Professor, Department of CSE, Comilla University
  • 6.
    EXAMPLE 1: Show that∀x (P(x)  Q(x)) and ∀x P(x)  ∀x Q(x) are logically equivalent (where the same domain is used). Solution: Suppose we have particular predicates P and Q, with a common domain. We can show that ∀x (P(x)  Q(x)) and ∀x P(x)  ∀x Q(x) are logically equivalent by doing two things. 1. First, we show that if ∀x (P(x)  Q(x)) is true, then ∀x P(x)  ∀x Q(x) is true. 2. Second, we show that if ∀x P(x)  ∀x Q(x) is true, then ∀x (P(x)  Q(x)) is true. Prepared by Khairun Nahar,Assistant Professor, Department of CSE, Comilla University
  • 7.
    Proof of 1stPart: Suppose that ∀x (P(x)  Q(x)) is true. This means that if a is in the domain, then P(a)  Q(a) is true. Hence, P(a) is true and Q(a) is true. Because P(a) is true and Q(a) is true for every element in the domain, we can conclude that ∀x P(x) and ∀x Q(x) are both true. This means that ∀x P(x)  ∀x Q(x) is true. Proof of 2nd Part: Suppose that ∀x P(x)  ∀x Q(x) is true. It follows that ∀x P(x) is true and ∀x Q(x) is true. Hence, if a is in the domain, then P(a) is true and Q(a) is true [because P(x) and Q(x) are both true for all elements in the domain, there is no conflict using the same value of a here]. It follows that for all a, P(a)  Q(a) is true. It follows that ∀x (P(x)  Q(x)) is true. We can now conclude that ∀x (P(x)  Q(x)) ≡ ∀x P(x)  ∀x Q(x) Prepared by Khairun Nahar,Assistant Professor, Department of CSE, Comilla University
  • 8.
    De Morgan's Lawsfor Quantifiers 1. ¬∀x P(x) ≡ ∃𝐱¬ P(x). 2. ¬∃ xP(x) ≡ ∀x¬ P(x). Prepared by Khairun Nahar,Assistant Professor, Department of CSE, Comilla University
  • 9.
    Negating Quantified Expressions Example1: Consider the statement: "Every student in your class has taken a course in calculus.” This statement is a universal quantification, namely, ∀x P(x) . ∀x P(x)= "Every student in your class has taken a course in calculus.” The negation of this statement is ¬∀x P(x) ="It is not the case that every student in your class has taken a course in calculus.” …..(1) Where P(x) = "x has taken a course in calculus" and the domain consists of the students in your class. ¬ P(x) = "x has not taken a course in calculus“ Above statement (1) equivalent to "There is a student in your class who has not taken a course in calculus.” And this is simply the existential quantification of the negation of the original propositional function, namely, ∃𝐱¬ P(x). ∃𝐱¬ P(x)= "There is a student in your class who has not taken a course in calculus.” That is ¬∀x P(x) ≡ ∃𝐱¬ P(x). Prepared by Khairun Nahar,Assistant Professor, Department of CSE, Comilla University
  • 10.
    ¬∀x P(x) ≡∃𝐱¬ P(x). It is not the case that every student in your class has taken a course in calculus. There is a student in your class who has not taken a course in calculus ব্যাপারটা এমন নয় যে আপনার ক্লাসের প্রসযযক ছাত্রই কযালক ু লাে যকাে সকসরসছ আপনার ক্লাসে একজন ছাত্র আসছ যে কযালক ু লাসের যকাে সকসরনন ¬∃ xP(x) ≡ ∀x¬ P(x). It is not the case that there is a student in this class who has taken a course in calculus. Every student in this class has not taken calculus. ব্যাপারটা এমন নয় যে এই ক্লাসে একজন ছাত্র আসছ যে কযালক ু লাে যকাে সকসরসছ। এই ক্লাসের প্রসযযক নিক্ষার্থী কযালক ু লাে যনয়নন। Prepared by Khairun Nahar,Assistant Professor, Department of CSE, Comilla University
  • 11.
    Example 2: Considerthe statement: " There is a student in this class who has taken a course in calculus.” This statement is a existential quantification, namely, ∃ x P(x) . ∃ x P(x) = " There is a student in this class who has taken a course in calculus.” The negation of this statement is ¬∃xP(x)=“It is not the case that there is a student in this class who has taken a course in calculus."…..(1) Where P(x) = "x has taken a course in calculus" and the domain consists of the students in your class. ¬ P(x) = "x has not taken a course in calculus“ Above statement (1) equivalent to "Every student in this class has not taken calculus.” And this is simply the universal quantification of the negation of the original propositional function, namely, ∀x¬ P(x). ∀x¬ P(x)= "Every student in this class has not taken calculus” That is ¬∃ xP(x) ≡ ∀x¬ P(x). Prepared by Khairun Nahar,Assistant Professor, Department of CSE, Comilla University
  • 12.
    ¬∀x P(x) ≡∃𝐱¬ P(x). It is not the case that every student in your class has taken a course in calculus. There is a student in your class who has not taken a course in calculus ব্যাপারটা এমন নয় যে আপনার ক্লাসের প্রসযযক ছাত্রই কযালক ু লাে যকাে সকসরসছ আপনার ক্লাসে একজন ছাত্র আসছ যে কযালক ু লাসের যকাে সকসরনন ¬∃ xP(x) ≡ ∀x¬ P(x). It is not the case that there is a student in this class who has taken a course in calculus. Every student in this class has not taken calculus. ব্যাপারটা এমন নয় যে এই ক্লাসে একজন ছাত্র আসছ যে কযালক ু লাে যকাে সকসরসছ। এই ক্লাসের প্রসযযক নিক্ষার্থী কযালক ু লাে যনয়নন। Prepared by Khairun Nahar,Assistant Professor, Department of CSE, Comilla University
  • 13.
    Example 3: Whatare the negations of the statements "There is an honest politician" Solution: Consider the statement: “There is an honest politician.” This statement is a existential quantification, namely, ∃ x P(x) . ∃ xP(x) = " There is an honest politician.” The negation of this statement is ¬∃ 𝒙𝑷(𝒙) = “It is not the case that there is an honest politician."…..(1) Where P(x) = “x is honest" and the domain consists of all politicians. ¬ P(x) = "x is dishonest“ Above statement (1) equivalent to "Every politician is dishonest." And this is simply the universal quantification of the negation of the original propositional function, namely, ∀x¬ P(x). ∀x¬ P(x)= "Every politician is dishonest” That is ¬∃ xP(x) ≡ ∀x¬ P(x). Prepared by Khairun Nahar,Assistant Professor, Department of CSE, Comilla University
  • 14.
    Example 4: Whatare the negations of the statements " All Americans eat cheeseburgers " . Solution: Consider the statement: "All Americans eat cheeseburgers.” This statement is a universal quantification, namely, ∀x P(x) . ∀x P(x)= " All Americans eat cheeseburgers.” The negation of this statement is ¬∀x P(x) ="It is not the case that All Americans eat cheeseburgers.” …..(1) Where P(x) = “x eats cheeseburgers” and the domain consists of the students in your class. ¬ P(x) = " x does not eat cheeseburgers“ Above statement (1) equivalent to "There is an American who does not eat cheeseburgers.” And this is simply the existential quantification of the negation of the original propositional function, namely, ∃𝐱¬ P(x). ∃𝐱¬ P(x)= "There is an American who does not eat cheeseburgers.” That is ¬∀x P(x) ≡ ∃𝐱¬ P(x). Prepared by Khairun Nahar,Assistant Professor, Department of CSE, Comilla University
  • 15.
    Example 5: Whatare the negations of the statements: i. ∀x (𝒙𝟐 > 𝒙) ii. ∃x 𝒙𝟐 = 𝟐 Solution: De Morgan's Laws for Quantifiers 1. ¬∀x P(x) ≡ ∃𝐱¬ P(x). 2. ¬∃ xP(x) ≡ ∀x¬ P(x). i. Applying De Morgan's 1st Law:¬∀x P(x) ≡ ∃𝐱¬ P(x). ¬∀x (𝒙𝟐> 𝒙) ≡ ∃𝐱¬ 𝒙𝟐 > 𝒙 ¬∀x (𝒙𝟐> 𝒙) ≡ ∃𝐱 𝒙𝟐 ≤ 𝒙 ii. Applying De Morgan's 2nd Law:¬∃ xP(x) ≡ ∀x¬ P(x). ¬∃ x 𝒙𝟐 = 𝟐 ≡ ∀x¬ 𝒙𝟐 = 𝟐 ¬∃ x 𝒙𝟐 = 𝟐 ≡ ∀x 𝒙𝟐 ≠ 𝟐 Prepared by Khairun Nahar,Assistant Professor, Department of CSE, Comilla University
  • 16.
    Example 6: Show that,¬∀x (P(x)→ 𝐐(𝐱)) ≡ ∃𝐱 (P(x)¬𝑸(𝒙)). Solution: According to De Morgan's 1st Law: ¬∀x P(x) ≡ ∃𝐱¬ P(x). ¬∀x (P(x)→ 𝐐(𝐱)) ≡ ∃𝐱¬ (P(x)→ 𝐐(𝐱)) ≡ ∃𝐱 (P(x)¬𝐐(𝐱)) [¬(𝐴 → 𝐵) = 𝐴¬𝐵)] [Proved] Prepared by Khairun Nahar,Assistant Professor, Department of CSE, Comilla University
  • 17.
    Problem 1: LetC(x) be the statement “x has a cat”, let D(x) be the statement “x has a dog”, and let F(x) be the statement “x has a ferret”. Express each of these statements in terms of C(x), D(x), F(x), quantifiers, and logical connectives. Let the domain consist of all students in your class. Prepared by Khairun Nahar,Assistant Professor, Department of CSE, Comilla University Question Solution a. A student in your class has a cat, a dog, and a ferret. ∃𝐱 (𝐂(x)D(x) 𝑭(𝒙)). b. All students in your class have a cat, a dog, or a ferret. ∀𝐱 (𝐂(x)D(x)𝐅(𝒙)). c. Some student in your class has a cat and a ferret, but not a dog ∃𝐱 (𝐂(x)¬D(x) 𝑭(𝒙)). d. No student in your class has a cat, a dog, and a ferret. ¬∃𝐱 (𝐂(x)D(x) 𝑭(𝒙)). e. For each of the three animals, cats, dogs, and ferrets, there is a student in your class who has one of these animals as a pet ∃𝐱 (𝐂(x)D(x)  𝑭(𝒙)).
  • 18.
    Problem 2: LetQ(x) be the statement “𝑥 + 1 > 2𝑥”. If the domain consists of all integers, what are the truth values? a) Q(0) b) Q(−1) c) Q(1) d) ∃x Q(x) e) ∀x Q(x) f) ∃x ¬Q(x) g) ∀x ¬Q(x) Solution: a) Since 0 + 1 > 0 · we know that Q(0) is true. b) Since (−1) + 1 > 2 (−1) · we know that Q(−1) is true. c) Since 1 + 1 > 2 · we know that Q(1) is false. d) From part (a) we know that there is at least one x that makes Q(x) true, so ∃x Q(x) is true. e) From part (c) we know that there is at least one x that makes Q(x) false, so ∀x Q(x) is false. f) From part (c) we know that there is at least one x that makes Q(x) false, so ∃x ¬Q(x) is true. g) From part (a) we know that there is at least one x that makes Q(x) true, so ∀x ¬Q(x) is false. Prepared by Khairun Nahar,Assistant Professor, Department of CSE, Comilla University
  • 19.
    Chapter 1.4 Nested Quantifiers Preparedby Khairun Nahar,Assistant Professor, Department of CSE, Comilla University
  • 20.
    The Order ofQuantifiers Example 1: Let P (x , y) be the statement "x + y = y + x ." What are the truth values of the quantifications ∀x ∀y P(x , y) and ∀y ∀x P (x , y) where the domain for all variables consists of all real numbers? Solution: The quantification ∀x ∀y P(x , y) denotes the proposition "For all real numbers x , for all real numbers y, x + y = y + x .“ Because P(x, y) is true for all real numbers x and y, then , the proposition ∀x ∀y P(x , y) is true. The quantification ∀y ∀x P(x , y) denotes the proposition "For all real numbers y , for all real numbers x, x + y = y + x .“ Because P(x, y) is true for all real numbers x and y, then , the proposition ∀y ∀x P(x , y) is true. That is, ∀x ∀y P(x , y) and ∀y ∀x P(x , y) have the same meaning, and both are true. Prepared by Khairun Nahar,Assistant Professor, Department of CSE, Comilla University
  • 21.
    Example 2: LetQ (x , y) be the statement "x + y = 0." What are the truth values of the quantifications ∃y∀x Q(x , y) and ∀x∃y Q (x , y) where the domain for all variables consists of all real numbers? Solution: The quantification ∃y∀x Q(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∀x Q(x , y) is false. The quantification ∀x ∃y Q (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 ∃y Q (x , y) is true. The statements ∃y∀x Q(x , y) and ∀x∃y Q (x , y) are not logically equivalent. Prepared by Khairun Nahar,Assistant Professor, Department of CSE, Comilla University
  • 22.
    Example 3: LetQ (x , y, z) be the statement "x + y = z." What are the truth values of the quantifications ∀x ∀y ∃z Q(x , y, z) and ∃y ∀x ∀y Q (x , y, z) where the domain for all variables consists of all real numbers? Solution: The quantification ∀x ∀y ∃z Q(x , y, z) denotes the proposition "For all real numbers x and for all real numbers y there is a real number z such that x + y = z.” Suppose that x and y are assigned values. Then, there exists a real number z such that x + y = z. then the quantification ∀x ∀y ∃z Q(x , y, z) is true. The quantification ∃y ∀x ∀y Q(x, y, z) denotes the proposition “There is a real number z such that for all real numbers x and for all real numbers y it is true that x + y = z” The quantification ∃y ∀x ∀y Q(x, y, z) is false, because there is no value of z that satisfies the equation x + y = z for all values of x and y. Prepared by Khairun Nahar,Assistant Professor, Department of CSE, Comilla University
  • 23.
    Assignment 4 1. LetP(x) be the statement "x spends more than five hours every weekday in class," where the domain for x consists of all students. Express each of these quantifications in English. i. ∃ x P(x) ii. ∀x P(x) iii. ∀x¬ P(x) iv. ∃𝐱¬ P(x). 2. Let P(x) be the statement "x can speak Russian" and let Q(x) be the 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 school. a) There is a student at your school who can speak Russian and who knows C++. b) There is a student at your school who can speak Russian but who doesn't know C++. c) Every student at your school either can speak Russian or knows C++. d) No student at your school can speak Russian or knows C++ Prepared by Khairun Nahar,Assistant Professor, Department of CSE, Comilla University
  • 24.
    Prepared by KhairunNahar,Assistant Professor, Department of CSE, Comilla University 3.