0% found this document useful (0 votes)
17 views29 pages

Discrete Mathematics - L05

The document discusses predicates, quantified statements, and their negations. It defines predicates, truth sets, and quantified statements using universal and existential quantifiers. It also provides examples of translating statements between informal and formal languages using quantifiers and variables.

Uploaded by

Mahmoud Hashem
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)
17 views29 pages

Discrete Mathematics - L05

The document discusses predicates, quantified statements, and their negations. It defines predicates, truth sets, and quantified statements using universal and existential quantifiers. It also provides examples of translating statements between informal and formal languages using quantifiers and variables.

Uploaded by

Mahmoud Hashem
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/ 29

Faculty of Engineering

Computer Engineering Department

CE171 : Discrete Mathematics

Lecture 5
Date: 4/11/2020

3-Nov-20 Discrete Mathematics 1


PREVIOUSLY:
The Logic of Compound Statements
Conditional Statements →
❑Negation
❑ Contrapositive
❑ Converse and Inverse
❑ The Biconditional ↔
❑ Necessary and Sufficient Conditions
Valid and Invalid Arguments
❑ Test arguments for validity
❑ Valid Argument Forms

3-Nov-20 Discrete Mathematics 2


II- THE LOGIC OF
QUANTIFIED
STATEMENTS
1. PREDICATES AND
QUANTIFIED
STATEMENTS

3-Nov-20 PUA - CE171 - Discrete Mathematics 3


PREDICATES
DEFINITION
The predicate is the part of the sentence from which the subject has been
removed.
Example:
Sentence “Aly is a student at PUA”
Predicate “is a student at PUA”
Formally:
Let P ≡ “is a student at PUA”
P is a predicate symbol

P(x) = “ x is a student at PUA ”


Where x is a predicate variable

3-Nov-20 PUA - CE171 - Discrete Mathematics 4


PREDICATES
DEFINITION
A predicate is a sentence that contains a finite number of variables and
becomes a statement when specific values are substituted for the
variables.

Example:

P(x) = “ x is a student at PUA ”

P(Aly) = “Aly is a student at PUA”

3-Nov-20 PUA - CE171 - Discrete Mathematics 5


PREDICATES
Note:
Predicates can be obtained by removing some or all the
nouns from statements.
Example:
Let Q ≡ “is a student at”
Q is a predicate symbol

Q(x , y) = “ x is a student at y ”
Where x and y are predicate variables

Q(Aly , PUA) = “Aly is a student at PUA”

3-Nov-20 PUA - CE171 - Discrete Mathematics 6


PREDICATES
DEFINITION
The domain of a predicate variable is the set of all values that may be
substituted in place of the variable.

Example:
P(x) = “ x is a student at PUA ”
Domain : set of all students

3-Nov-20 PUA - CE171 - Discrete Mathematics 7


Common Sets
Z -- set of integers {… -2, -1, 0, 1, 2, …}
Z+ -- set of positive integers {1, 2, 3, …}
N -- set of natural numbers {0, 1, 2, …}
R -- set of real numbers {any number on an infinitely
long number line}
Q -- set of rational numbers (integer fractions)
{x / y | x,y є Z, y ≠ 0}

3-Nov-20 PUA - CE171 - Discrete Mathematics 8


TRUTH SET
DEFINITION
If P(x) is a predicate
and x has domain D,
the truth set of P(x)
is the set of all elements of D
that make P(x) true when substituted for x
Formally:
The truth set of P(x) is denoted:
{ x ∊ D | P(x) }
which is read “ the set of all x in D such that P(x) is true”
3-Nov-20 PUA - CE171 - Discrete Mathematics 9
TRUTH SET
Example1:
Let P(x) = “x is a factor of 8”
Domain of x is Z+ = { 1, 2, 3, 4, ... }
Truth set of P(x) = { 1, 2, 4, 8 }

Example2:
Let R(x) = “x < 5 and x  3”
Domain of x is Z+ = { 1, 2, 3, 4, ... }
Truth set of R(x) = { 1, 2, 4 }

3-Nov-20 Discrete Mathematics 10


TRUTH SET
NOTATION
Let P(x) and Q(x) be predicates and suppose the common domain of x is D

The notation P(x)  Q(x)


means that every element in the truth set of P(x)
is in the truth set of Q(x).

The notation P(x)  Q(x)


means that P(x) and Q(x) have identical truth sets.

3-Nov-20 PUA - CE171 - Discrete Mathematics 11


TRUTH SET
Example: Let P(x) = “x is a factor of 8”
Q(x) = “x is a factor of 4”
Suppose the domain of x is Z+
Use the  symbol to indicate the relationships
between P(x) and Q(x)

Solution:
The truth set of P(x) = { 1, 2, 4, 8 }
The truth set of Q(x) = { 1, 2, 4 }
then Q(x)  P(x)

3-Nov-20 PUA - CE171 - Discrete Mathematics 12


TRUTH SET
Example: Let P(x) = “x is a factor of 8” ,
Q(x) = “x is a factor of 4”
R(x) = “x < 5 and x  3”
Suppose the domain of x is Z+
Use the  and  symbols to indicate the true
relationships among P(x), Q(x), and R(x)
Solution:
The truth set of P(x) = { 1, 2, 4, 8 }
The truth set of Q(x) = { 1, 2, 4 }
The truth set of R(x) = { 1, 2, 4 }
then Q(x)  P(x), R(x)  P(x), R(x)  Q(x)

3-Nov-20 PUA - CE171 - Discrete Mathematics 13


QUANTIFIER:
Example predicate:

Let P(x) = “x is evenly divisible by 5”

If x represents the number 35, then P(x) is a true.

P(35) = “35 is evenly divisible by 5”

Quantifier is a way to obtain statements from predicates

Quantifiers can be words that refer to quantities such as


“some” or “all”

3-Nov-20 PUA - CE171 - Discrete Mathematics 14


QUANTIFIER: ∀
The symbol ∀ denotes “for all” and is called the universal quantifier
Example:
All human beings are mortal
∀ human beings x, x is mortal

Formally:
∀ x  H, x is mortal
where H is the set of all human

3-Nov-20 PUA - CE171 - Discrete Mathematics 15


UNIVERSAL STATEMENT
Definition:
Let Q(x) be a predicate
and D be the domain of x
A universal statement is a statement of the form:
“∀ x ∊ D, Q(x)”
It is defined to be true iff Q(x) is true for every x in D
It is defined to be false iff Q(x) is false for at least one x in D
Note: a value for which Q(x) is false is called a counterexample to the universal
statement.
3-Nov-20 PUA - CE171 - Discrete Mathematics 16
UNIVERSAL STATEMENT EXAMPLE 1
Let D = {1, 2, 3, 4, 5}
Consider the statement
∀ x  D, x2  x
Show that this statement is true.

Solution:
Check that “x2  x” is true for each individual x in D.
12  1, 22  2, 32  3, 42  4, 52  5
Hence “∀ x  D, x2  x” is true.

3-Nov-20 PUA - CE171 - Discrete Mathematics 17


UNIVERSAL STATEMENT EXAMPLE 2
Let D = R (real numbers)
Consider the statement
∀ x  R, x2  x
Find a counterexample to show that this statement is
false.
Solution:
Take counterexample: x = ½
Then x is in R (a real number) and
(½)2 = ¼
¼ not  ½
Hence “∀ x  R, x2  x” is false

3-Nov-20 PUA - CE171 - Discrete Mathematics 18


QUANTIFIER: ∃
The symbol ∃ denotes “there exists” and is called the existential quantifier

Example:
There is a student in PUA
∃ a person s such that s is a student in PUA

Formally:
∃ s  S such that s is a student in PUA
where S is the set of all Students

3-Nov-20 PUA - CE171 - Discrete Mathematics 19


EXISTENTIAL STATEMENT
Definition:
Let Q(x) be a predicate
and D be the domain of x
An existential statement is a statement of the form:
“∃ x ∊ D such that Q(x)”

It is defined to be true iff Q(x) is true for at least one x in D.

It is defined to be false iff Q(x) is false for all x in D.

3-Nov-20 PUA - CE171 - Discrete Mathematics 20


EXAMPLE
a. Consider the statement ∃ m  Z, such that m2 = m.
Show that this statement is true.
b. Let E = { 5, 6, 7, 8, 9, 10} and consider the statement
∃ m  E, such that m2 = m. Show that this statement is false.
Solution:
a. Observe that 12 = 1. Thus “m2 = m” is true for at least one
integer m. Hence “∃ m  Z, such that m2 = m” is true.
b. Note that m2 = m is not true for any integer m from 5 to 10:
52 = 25  5, 62 = 36  6, 72 = 49  7, 82 = 64  8,
92=81  9, 102=100  10.
Thus “∃ m  E, such that m2 = m” is false

3-Nov-20 PUA - CE171 - Discrete Mathematics 21


EXAMPLE:
Translating from Informal to Formal Language.
Rewrite each of the following statements formally. Use
quantifiers and variables.
1. All triangles have three sides.
2. Some programs are structured.

Solution:
1. ∀ triangles t, t has three sides
∀ t ∈ T, t has three sides
where T is the set of all triangles
2. ∃ a program p such that p is structured
∃ p ∈ P, such that p is structured
where P is the set of all programs

3-Nov-20 PUA - CE171 - Discrete Mathematics 22


II- THE LOGIC OF
QUANTIFIED
STATEMENTS
2. NEGATIONS OF
QUANTIFIED
STATEMENTS

3-Nov-20 PUA - CE171 - Discrete Mathematics 23


THEOREM: NEGATIONS OF
UNIVERSAL STATEMENTS
The negation of a statement of the form
∀ x in D, Q(x)
is logically equivalent to a statement of the form
∃ x in D such that ~Q(x)
Symbolically:
~ (∀ x in D, Q(x)) ≡ ∃ x in D such that ~Q(x)
Thus:
The negation of a universal statement (“all are”) is logically equivalent to an
existential statement (“some are not”).

3-Nov-20 PUA - CE171 - Discrete Mathematics 24


THEOREM: NEGATIONS OF
EXISTENTIAL STATEMENTS
The negation of a statement of the form
∃ x in D such that Q(x)
is logically equivalent to a statement of the form
∀ x in D, ~Q(x)
Symbolically:
~ (∃ x in D such that Q(x)) ≡ ∀ x in D, ~Q(x)
Thus:
The negation of an existential statement (“some are”) is logically equivalent to an
universal statement (“all are not”).

3-Nov-20 PUA - CE171 - Discrete Mathematics 25


EXAMPLE:
Write the formal negations for each of the following statements:
a. ∀ primes p, p is odd.
b. ∃ a triangle T such that the sum of the angles of T equals 200o.
Solution:
a. By applying the rule for the negation of a ∀ statement, the
answer is:
∃ a prime p such that p is not odd.
b. By applying the rule for the negation of a ∃ statement, the
answer is:
∀ triangles T, the sum of the angles of T does not equal 200o.

3-Nov-20 PUA - CE171 - Discrete Mathematics 26


NEGATIONS OF UNIVERSAL
CONDITIONAL STATEMENTS
By definition of the negation of a for all statement,
~ (∀ x, P(x)) ≡ ∃ x such that ~P(x)

~(∀ x, P(x)→Q(x)) ≡ ∃ x such that ~(P(x)→Q(x))


But the negation of an if-then statement is logically equivalent to AND statement.
Formally: ~(P(x)→Q(x)) ≡ P(x) Λ ~Q(x)
By substitution:
~(∀ x, P(x)→Q(x)) ≡ ∃ x such that P(x) Λ~Q(x)

3-Nov-20 PUA - CE171 - Discrete Mathematics 27


UNIVERSAL CONDITIONAL STATEMENTS
Example1:
∀ people p, if p is blond then p has blue eyes.
Negation:
∃ a person p, such that p is blond and p does not
have blue eyes.
Example2:
If a computer program has more than 100,000
lines then it contains a bug.
Negation: There is at least one computer program
that has more than 100,000 lines and does not
contain a bug.
3-Nov-20 Discrete Mathematics 28
NEXT LECTURE:

❑ Elementary Number Theory and


Methods of Proof
❑ Even and Odd numbers
❑ Prime Numbers
❑ Methods of Proof

3-Nov-20 Discrete Mathematics 39

You might also like