Discrete Mathematics and its Applications (8th Edition)
2021/03/12 - Predicates and Quantifiers
Contents
1 The Foundations: Logic and Proofs
1.4 Predicates and Quantifiers
1.4.6 Precedence of Quantifiers
The quantifies ∀ \forall ∀ and ∃ \exists ∃ have higher precedence than all the logical operators.
1.4.7 Binding Variables
When a quantifier is used on the variable x x x, we say that this occurrence of the variable is bound. An occurrence of a variable that is not bound by a quantifier or set equal to a particular value is said to be free.
Example: “Every student in this class has taken a course in C++.”
Solution 1:
If U U U is all students in this class, define a proposition function C p p ( c ) Cpp(c) Cpp(c) denoting " x x x has taken a course in C++" and translate as ∀ x C p p ( x ) \forall x\ Cpp(x) ∀x Cpp(x).
Solution 2:
But is U U U is all people, also define a propositional function S ( x ) S(x) S(x) denoting " x x x is a student in this class" and translate as “ ∀ x ( S ( x ) → C p p ( x ) ) \forall x\ (S(x)\rightarrow Cpp(x)) ∀x (S(x)→Cpp(x))”.
Wrong Solution:
∀ x ( S ( x ) ∧ C p p ( x ) ) \forall x\ (S(x)\wedge Cpp(x)) ∀x (S(x)∧Cpp(x)).
Example: “Some students in this class has taken a course in Java.”
Solution 1:
∃ x J a v a ( x ) \exists x\ Java(x) ∃x Java(x).
Solution 2:
∃ x ( S ( x ) ∧ J a v a ( x ) ) \exists x\ (S(x) \wedge Java(x)) ∃x (S(x)∧Java(x)).
Wrong Solution:
∃ x ( S ( x ) → J a v a ( x ) ) \exists x\ (S(x)\rightarrow Java(x)) ∃x (S(x)→Java(x)).
Example: Introduce the propositional functions M a n ( x ) Man(x) Man(x) denoting " x x x is a man" and M o r t a l ( x ) Mortal(x) Mortal(x) denoteing " x x x is mortal".
The two premises are:
∀ x ( M a n ( x ) → M o r t a l ( x ) ) \forall x\ (Man(x)\rightarrow Mortal(x)) ∀x (Man(x)→Mortal(x)) M a n ( S o c r a t e s ) Man(Socrates) Man(Socrates)The conclusion is: M o r t a l ( S o c r a t e s ) Mortal(Socrates) Mortal(Socrates)
1.4.8 Logical Equivalences Involving Quantifiers
Statements involving predicates and quantifiers are logically equivalent if and only if they have the same truth value:
- for every predicate substituted into these statements
- for every domain of discourse used for the variables in the expressions
The notation S ≡ T S\equiv T S≡T indicates that S S S and T T T are logically equivalent.
Example:
- ∀ x ( P ( x ) ∧ Q ( x ) ) ≡ ∀ x P ( x ) ∧ ∀ x Q ( x ) \forall x\ (P(x)\wedge Q(x))\equiv \forall x\ P(x) \wedge \forall x\ Q(x) ∀x (P(x)∧Q(x))≡∀x P(x)∧∀x Q(x).
- ∃ x ( P ( x ) ∨ Q ( x ) ) ≡ ∃ P ( x ) ∨ ∃ x Q ( x ) \exists x\ (P(x)\vee Q(x))\equiv \exists P(x) \vee \exists x\ Q(x) ∃x (P(x)∨Q(x))≡∃P(x)∨∃x Q(x).
- ∀ x ¬ ¬ S ( x ) ≡ ∀ x S ( x ) \forall x\ \neg\neg S(x)\equiv \forall x\ S(x) ∀x ¬¬S(x)≡∀x S(x).
1.4.9 Negating Quantified Expressions
¬
∀
x
P
(
x
)
\neg\forall x\ P(x)
¬∀x P(x) is equivalent to
∃
x
¬
P
(
x
)
\exists x\ \neg P(x)
∃x ¬P(x) are equivalent.
¬
∃
x
P
(
x
)
\neg\exists x\ P(x)
¬∃x P(x) is equivalent to
∀
x
¬
P
(
x
)
\forall x\ \neg P(x)
∀x ¬P(x) are equivalent.
1.4.10 Translating from English into Logical Expressions
Example: “Some Students in this class has visited Mexico.”
Solution: Let M ( x ) M(x) M(x) denote " x x x has visited Mexico" and S ( c ) S(c) S(c) denote " x x x is a student in this class" and U U U be all people.
∃ x ( S ( x ) ∧ M ( x ) ) \exists x\ (S(x)\wedge M(x)) ∃x (S(x)∧M(x))
Example: “Every student in this class has visited Canada or Mexico.”
Solution: Add C ( x ) C(x) C(x) denoting " x x x has visited Canada".
∀ x ( S ( x ) → ( M ( x ) ∨ C ( x ) ) ) \forall x\ (S(x)\rightarrow (M(x)\vee C(x))) ∀x (S(x)→(M(x)∨C(x)))
Example: “Not all the students in this class have visited Mexico.”
Solution: ¬ ∀ x ( S ( x ) → M ( x ) ) \neg\forall x(S(x)\rightarrow M(x)) ¬∀x(S(x)→M(x)) ∃ x ( S ( x ) ∧ ¬ M ( x ) ) \exists x\ (S(x)\wedge\neg M(x)) ∃x (S(x)∧¬M(x))
1.4.11 Using Quantifies in System Specifications
1.4.12 Examples from Lewis Carroll
An assertion involving predicate is satisfiable if it is true
- for some domains
- some propositional functions that can be substituted for the predicates in the assertion
Otherwise it is unsatisfiable.
Example:
∀ x ( F ( x ) ↔ T ( x ) ) \forall x\ (F(x)\leftrightarrow T(x)) ∀x (F(x)↔T(x))not valid but satisfiable
∀ x ( F ( x ) ↔ ¬ F ( x ) ) \forall x\ (F(x)\leftrightarrow \neg F(x)) ∀x (F(x)↔¬F(x))unsatisfiable
1.5 Nested Quantifiers
1.5.1 Introduction
Example: “Every real number has an inverse.”
Solution: ∀ x ∃ y ( x + y = 0 ) \forall x\ \exists y\ (x+y=0) ∀x ∃y (x+y=0).
1.5.2 Understanding Statements Involving Nested Quantifiers
Nested Loops
Assignment
Section 1.4: 1. 5. 7. 13. 17. 25. 35.e) f) 39. 45.
SEU - Assignment 4 - 2021/03/12
ALL RIGHTS RESERVED © 2021 Teddy van Jerry
This blog is licensed under the CC 4.0 Licence.
See also
Teddy van Jerry’s CSDN Homepage
Teddy van Jerry’s GitHub Homepage