Chapter 1 (Part 2) - Stud
Chapter 1 (Part 2) - Stud
1
Differentiate and write the Predicates and
Quantifiers .
Write Proposition Equivalences; Truth tables;
Implication and equivalence; Tautology;
Contradiction and Contigency;
Write the Negation Quantifiers Expressions and
determine its truth values
DSP5221
2
A compound proposition may have many
component parts, each of which is itself a
proposition, represented by some propositional
variable.
The proposition s: p⋁ (q ⋀ r) involves three
propositions, p,q and r.
If a compound statement s contains n proposition
variables, there will need to be 2n rows in the truth
table for s.
DSP5221
3
s: p⋁ (q ⋀ r)
3 variables, therefore need 23 = 8 rows
p q r q ⋀r p⋁ (q ⋀ r)
T T T T T
T T F F T
T F T F T
T F F F T
F T T T T
F T F F F
F F T F F
F F F F F
DSP5221
4
Make a truth table for the proposition
(p⋀ q)⋁ (~p)
Answer:
DSP5221
5
Propositional Equivalences
Propositional Equivalence consist of three
types;
Tautology
Contradiction
Contingency
DSP5221
6
A tautology occurs when a compound proposition that
is true for all possible values of its proposition
variables.
Example:
(p q ) p
DSP5221
7
(p q ) p
p q pq (p q ) p
T T T T
T F F T
F T F T
F F F T
DSP5221
8
A contradiction occurs when a compound
proposition is always false.
Example:
((p q)q)p
DSP5221
9
((p q)q)p
DSP5221
10
A contingency occurs when a compound
proposition is neither a Tautology nor a
Contradiction (consists both true and false value
for different combination of propositions that
involve)
Example
(( p q ) q ) p
DSP5221
11
(( p q ) q ) p
p q pq (pq)q ((pq)q)p
T T T T T
T F F F T
F T T T F
F F T F T
DSP5221
12
State whether the proposition below is
tautology, contradiction or contingency.
( p q ) ( p q )
DSP5221
13
( p q ) ( p q )
p q
DSP5221
14
Logical Equivalence
Two different compound propositions are
logically equivalent if they have the same truth-
values no matter what truth-values their
constituent propositions have.
The notation p q denotes that p and q are
logically equivalent if p ↔ q is tautology.
DSP5221
15
Example
Prove or disprove that (q ( p qand
))
(p ( p q))
is a logical equivalence.
DSP5221
18
The implication operation also has a number of
important properties.
Properties for implication operation
1. p → q ≡ ( (~ p) ⋁ q )
2. p → q ≡ (~ q → ~p )
3. (p ↔q) ≡ ((p → q) ⋀ (q →p))
4. ~ (p → q) ≡ (p ⋀~q )
4. ~ (p ↔q) ≡ ((p ⋀~q ) ⋁ (q ⋀~p))
DSP5221
19
Exercise:
1. Show the following De morgan’s Law for Logic
are logically equivalence.
( p q) p q ( p q) p q
DSP5221
20
Predicates and Quantifiers
Predicate and quantifiers are usually used when
involved in mathematical equation in computer
programs such as “x> 3,” “x=y+3” and “x +
y=z”.
This is usually involved one variable (or more
variables).
These statements are either true or false as it
depends on the values of variables.
DSP5221
21
An element of {x | P(x)} is an object t for which
the statement P(t) is true.
Such a sentence P(x) is called a predicate.
P(x) is also called a propositional function
because each choice of x produces a proposition
P(x) that is either true or false.
DSP5221
22
Let A = {x | x is an integer less than 8}.
P(x) is the sentence “ x is an integer less than 8”
The common property is “is an integer less than 8”
x =1, P(1) is the statement “1 is an integer less than
8”which is true.
DSP5221
23
A. Single Variable
Let P(m) denote the statement “(m + 80 * m) / m =
81”. What are the truth values of P(8) and P(6)?
Solution:
P(8), replace m with 8 in the “(8 + 80 * 8) / 8 = 81”
statement. TRUE
P(6), replace m with 6 in the “(6 + 80 * 6) / 6 = 81”
statement. TRUE
DSP5221
24
B. Multiple Variables
Let Q(x,y) denote the statement “ x = y + 8”
What are the truth values of the propositions
Q(15,7) and Q(20,8)?
DSP5221
25
DSP5221
26
C. ‘n’ variables
Let R(x,y,z) denote the statement “(y + 2) - (x *
6) = z” what are the truth values of the
propositions R(1,2,3) and R(5,32,4).
DSP5221
27
DSP5221
28
When all variables assigned with values, the
resulting statement becomes a proposition with
certain truth-value.
DSP5221
29
There are two types of quantifiers;
A. Universal Quantifier
B. Existential Quantifier
DSP5221
30
A logical quantifier(operator containing a variable)
of a proposition that asserts that the proposition is true
for every element in a domain of discourse or of a
type.
DSP5221
31
The notation xP(x) denotes the universal
quantification of P (x).
-Called universal quantifier
DSP5221
32
Example 1:
Let P(x) be the statement “x likes Discrete
Structure” where the universe of discourse
consists of a set of students. Write x P(x) in
words:
Answer:
All students like Discrete Structure
DSP5221
33
Example 2:
Let P(x) be the statement “x2+1>x.” What is the
truth value of the quantification x P(x), where
the universe of discourse consists of all positive
integers
Answer
Since P(x) is true for all positive integers x, the
quantification x P(x) is TRUE.
DSP5221
34
A logical quantifier of a proposition that asserts the
existence of at least one thing for which the proposition
is true
DSP5221
35
We use the notation xP(x) for the existential
qualification of P(x).
is called existential quantifier.
DSP5221
36
Example 1:
Let P(y) be the statement “y likes Discrete
Structure” where the universe of discourse
consists of a set of students. Write y P(y) in
words:
Answer
Some students like Discrete Structure
Or
Not all Students like Discrete Structure
DSP5221
37
Example 2:
Let P(x) be the statement “x > 5 .” What is the
truth value of the quantification x P(x),
where the universe of discourse consists of a
set of positive integers
Answer
Since P(6) is true, the quantification x P(x) is
TRUE.
DSP5221
38
Quantifiers
Statement When True? When False?
DSP5221
39
Let P(x) be “x has taken a course in Program
Design” and the domain of discourse consist of
the students in the class. Write the universal
quantifiers and existential quantifiers for the P(x).
What is the truth value of the statement for
Universal Quantifier and Existential Quantifier in
your class?
DSP5221
40
x P(x) = All student in the class has taken a
course in Program Design, FALSE/ TRUE
xP(x) = Some students in the class has taken a
course in Program Design, TRUE
DSP5221
41
Negation Quantifiers Expressions
Sometimes we need to negate a quantified
expression. Let us look at the effect of negation
to the Universal and Existential Quantifiers.
42
Example:
“Every student in the class wear black colour T-Shirt ”
This statement is a universal quantification,
named with x P(x), where P(x)- “ x wear
black colour T-Shirt ”
Question:
What is the negation quantifier expression?
43
Solution:
Negation to the Universal Quantification:
Question:
What is the negation quantifier expression?
45
Solution:
Negation to the Existential Quantification:
( x P(x)) = x P(x)
“Every student in Discrete Structures class has
not taken Mathematical Techniques 1”
OR
“All student in Discrete Structures class has not
taken Mathematical Techniques 1”.
46
• The rules for negations for quantifiers are called De
Morgan’s Law for Quantifiers.
47
Counterexample
To conclude that a statement of the form x P(x) is
false, where P(x) is a propositional function, we
need only to find a value of x in the universe of
discourse for which P(x) is false.
Such a value of x is called the counterexample to
the statement x P(x).
For example, the prime number 2 is a
counterexample to the statement "All prime
numbers are odd."
48
Let q(x) denotes “x2 ≤ 10”. What are the truth
values of the quantifications x q(x) and x q(x),
where the domain of discourse consists of 0, 1, 2,
3 and 4?
49
When the domain of discourse is {0, 1, 2, 3, 4}, a
counterexample to the statement x (x2 ≤ 10) is
4, since 42 = 16 is not ≤ 10.
Hence the statement x (x2 ≤ 10) is false.
But the statement x q(x), is true.
50
Propositional Equivalence consist of three types;
Tautology
Contradiction
Contingency
DSP5221
51
Review Questions
1. Build a truth table to verify that the proposition
( p q ) ( p q ) is a contradiction.
2. Show that ( p q ) ( q p ) is logically
equivalent to p q
3. Let P(x) denote the statement “x + 1 > 7”. What are
the truth values for these propositions?
P(1)
P(8)
P(6)
DSP5221
52
Review Questions
4. Let P(n) be the propositional function “n < 66”. Write each
proposition below in words and tell whether it’s true or false. The
domain of discourse is a set of positive integers.
n P(n)
n P(n)
DSP5221
54
Review Questions
55
Review Questions
9. Let P(y) be the propositional function y+1 > y. The domain of discourse is
the set = {y | 0 < y < 5}
Write each proposition below in words and tell whether each proposition
below is true or false.
(a) y P(y)
(b) y P(y)
(c) (yP(y))
(d) (y P(y))
56