You are on page 1of 37

DISCRETE MATHEMATICS

Gauranga C Samanta

Department of Mathematics
BITS PILANI K K Birla Goa Campus, Goa

August 7, 2019

Gauranga C Samanta (Dept. of Maths) Chapter-1 August 7, 2019 1 / 22


Basic Connectives

We can build other propositions using connectives. The resulting


proposition is called a compound proposition.
There are five basic connectives:
V
Conjunction (and) Symbol
W
Disjunction (or) Symbol
Negation Symbol ∼
Implication or conditional (If p then q)(p implies q) Symbol p → q
Double implication (– if and only if –) Symbol ↔

Gauranga C Samanta (Dept. of Maths) Chapter-1 August 7, 2019 2 / 22


Basic Connectives Continued

The negation of the proposition. Let us define the propostion p as


p: Einstein is a genius
The negation of p can be written as following different ways:
It is not the case that Einstein is a genius
or
It is false that Einstein is a genius
or
Einstein is not a genius

Gauranga C Samanta (Dept. of Maths) Chapter-1 August 7, 2019 3 / 22


Basic Connectives Continued

List of equivalence
Identity laws: p ∧ T ≡ p, p ∨ F ≡ p
Domination laws: p ∨ T ≡ T , p ∧ F ≡ F
Idompotent laws:p ∨ p ≡ p, p ∧ p ≡ p
Commutative laws: p ∨ q ≡ q ∨ p, p ∧ q ≡ q ∧ p
Associative laws: (p ∨ q) ∨ r ≡ p ∨ (q ∨ r ), (p ∧ q) ∧ r ≡ p ∧ (q ∧ r )
Distributive laws: p ∨ (q ∧ r ) ≡ (p ∨ q) ∧ (p ∨ r ),
p ∧ (q ∨ r ) ≡ (p ∧ q) ∨ (p ∧ r )
Absorption laws: p ∨ (p ∧ q) ≡ p, p ∧ (p ∨ q) ≡ p
Negation laws: p∨ ∼ p ≡ T , p∧ ∼ p ≡ F

Gauranga C Samanta (Dept. of Maths) Chapter-1 August 7, 2019 4 / 22


Basic Connectives Continued

List of equivalences:
∼ (p ∨ q) ≡ (∼ p) ∧ (∼ q) (DeMorgan’s laws)
∼ (p ∧ q) ≡ (∼ p) ∨ (∼ q) (DeMorgan’s laws)
p ≡∼ (∼ p) (Law of double negation)
(p → q) ≡ (∼ p) ∨ q (Law of implication)
(p → q) ≡ (∼ q →∼ p) (Law of contrapositive)

Gauranga C Samanta (Dept. of Maths) Chapter-1 August 7, 2019 5 / 22


Basic Connectives Continued

A propositional function is a function whose variables are propositions.


There are only 16 propositional functions of two variables
Two propositional functions are logically equivalent, if they have the
identical truth tables.
or
The compound propositions p and q are called logically equivalent if
p ↔ q is a tautology.
W
Example: p → q and (∼ p) q are equivalent
Example: Show that ∼ (p ∨ (∼ p ∧ q)) and ∼ p∧ ∼ q are logically
equivalent by developing a series of logical equivalences

Gauranga C Samanta (Dept. of Maths) Chapter-1 August 7, 2019 6 / 22


Basic Connectives Continued

A propositional function is a function whose variables are propositions.


There are only 16 propositional functions of two variables
Two propositional functions are logically equivalent, if they have the
identical truth tables.
or
The compound propositions p and q are called logically equivalent if
p ↔ q is a tautology.
W
Example: p → q and (∼ p) q are equivalent
Example: Show that ∼ (p ∨ (∼ p ∧ q)) and ∼ p∧ ∼ q are logically
equivalent by developing a series of logical equivalences
A tautology is a propositional function whose truth value is true for
all possible value.
W W
Example: p ∼ p, [(p∧ ∼ q) → r ] → [p → (q r )],
(p ∧ q) → (p ∨ q)

Gauranga C Samanta (Dept. of Maths) Chapter-1 August 7, 2019 6 / 22


Basic Connectives Continued

A contradiction or absurdity is a propositional function whose truth


value is always false.
Example: p∧ ∼ p

Gauranga C Samanta (Dept. of Maths) Chapter-1 August 7, 2019 7 / 22


Basic Connectives Continued

A contradiction or absurdity is a propositional function whose truth


value is always false.
Example: p∧ ∼ p
A propositional function that is neither tautology nor a
contradiction is called a coningency.

Gauranga C Samanta (Dept. of Maths) Chapter-1 August 7, 2019 7 / 22


Basic Connectives Continued

Summary:
1. Either p is true or ∼ p is true (not both)
2. It is not possible for both p and ∼ p to be true simultaneously.
3. If p ∧ q is true, then p must be true and q must be true.
4. If p ∧ q is false, then at least one of p, q must be false
5. If p ∨ q is false, then p must be false and so must q.
6. If p ∨ q is true, then at least one of p, q is true.
7. If p → q is true and p is true, then q must be true. (Note, however, if
p → q is true and q is true, p could be true or false.)
8. If p → q is true and q is false, then p must be false.
9. If p → q is true, then either p is false or q is true or both (Note that
we cannot in this case conclude explicitly that p is false and q is true.)

Gauranga C Samanta (Dept. of Maths) Chapter-1 August 7, 2019 8 / 22


Basic Connectives Continued

10. If p → q is false, then p must be true and q must be false.


11. If p ↔ q is true, p and q must have the same truth value.
12. If p ↔ q is false, then p and q have opposite truth values.

Gauranga C Samanta (Dept. of Maths) Chapter-1 August 7, 2019 9 / 22


Predicates and Quantifiers

Example 1.
Statements involving variables such as: ‘x > 3’, ‘x = y + 5’, ‘x + y = z’,
‘computer x is under attack by an intruder’

Gauranga C Samanta (Dept. of Maths) Chapter-1 August 7, 2019 10 / 22


Predicates and Quantifiers

Example 1.
Statements involving variables such as: ‘x > 3’, ‘x = y + 5’, ‘x + y = z’,
‘computer x is under attack by an intruder’

Example 2.
Let P(x) denote the Statement “x > 5”. What are the truth values of
P(7) and P(4)?

Gauranga C Samanta (Dept. of Maths) Chapter-1 August 7, 2019 10 / 22


Predicates and Quantifiers

Example 1.
Statements involving variables such as: ‘x > 3’, ‘x = y + 5’, ‘x + y = z’,
‘computer x is under attack by an intruder’

Example 2.
Let P(x) denote the Statement “x > 5”. What are the truth values of
P(7) and P(4)?

Example 3.
Let A(x) denote the Statement “computer x is under attack by an
intruder”. Suppose that of the computers on campus, only CS2 and
MATH1 are currently under attack by intruders. What are the truth values
of A(CS1), A(CS2) and A(MATH1)?

Gauranga C Samanta (Dept. of Maths) Chapter-1 August 7, 2019 10 / 22


Predicates and Quantifiers Continued

Example 4.
Let A(c, n) denote the Statement “computer c is conneted to network n”,
where c is variable representing a computer and n is a variable
representing a network. Suppose that the computer MATH1 is connected
to network CAMPUS2, but not to network CAMPUS1. What are the
truth values of A(MATH1, CAMPUS1) and A(MATH1, CAMPUS2)

Gauranga C Samanta (Dept. of Maths) Chapter-1 August 7, 2019 11 / 22


Predicates and Quantifiers Continued

Example 4.
Let A(c, n) denote the Statement “computer c is conneted to network n”,
where c is variable representing a computer and n is a variable
representing a network. Suppose that the computer MATH1 is connected
to network CAMPUS2, but not to network CAMPUS1. What are the
truth values of A(MATH1, CAMPUS1) and A(MATH1, CAMPUS2)

Example 5.
Let Q(x, y ) denote the Statement “x = y + 3”. What are the truth values
of the propositions Q(1, 2) and Q(3, 0)?

Gauranga C Samanta (Dept. of Maths) Chapter-1 August 7, 2019 11 / 22


Quantifiers

Description:
When the variables in a propositional function are assigned values, the
resulting Statement becomes a proposition with a certain truth value.
However there is another important way, called quantification, to
create a proposition from a propositional function.
Quantification express the extent to which a predicate is true over the
range of elements.
The following words are used in quantification
all, some, many , none, few .
However, we will focus on two types of quantification here: universal,
which tells us that a predicate is true for every element, and
existential, which tells us that there is one or more element for which
the predicate is true

Gauranga C Samanta (Dept. of Maths) Chapter-1 August 7, 2019 12 / 22


Quantifiers Continued

Definition 6.
The universal quantification of P(x) is the statement “P(x) for all values
of x in the domain”. The notation ∀xP(x) denote the universal
quantification of P(x). Here ∀ is called the universal quantifier. We can
read ∀xP(x) as “for all xP(x)” or “for every xP(x)”. An element for
which P(x) is false is called a counterexample of ∀xP(x).

Gauranga C Samanta (Dept. of Maths) Chapter-1 August 7, 2019 13 / 22


Quantifiers Continued

Definition 6.
The universal quantification of P(x) is the statement “P(x) for all values
of x in the domain”. The notation ∀xP(x) denote the universal
quantification of P(x). Here ∀ is called the universal quantifier. We can
read ∀xP(x) as “for all xP(x)” or “for every xP(x)”. An element for
which P(x) is false is called a counterexample of ∀xP(x).

Example 7.
Let P(x) be the statement “x + 1 > x”. What is the truth value of the
quantification ∀xP(x), where the domain consists of all real numbers?

Gauranga C Samanta (Dept. of Maths) Chapter-1 August 7, 2019 13 / 22


Quantifiers Continued

Example 8.
Let Q(x) be the statement “x < 2”. What is the truth value of the
quantification ∀xQ(x), where the domain consists of all real numbers?

Gauranga C Samanta (Dept. of Maths) Chapter-1 August 7, 2019 14 / 22


Quantifiers Continued

Example 8.
Let Q(x) be the statement “x < 2”. What is the truth value of the
quantification ∀xQ(x), where the domain consists of all real numbers?

ANS: Q(x) is not true for every real number x, because for instance, Q(3)
is false. That is x = 3 is a counterexample for the statement ∀xQ(x).
Thus ∀xQ(x) is false.

Gauranga C Samanta (Dept. of Maths) Chapter-1 August 7, 2019 14 / 22


Quantifiers Continued

Example 8.
Let Q(x) be the statement “x < 2”. What is the truth value of the
quantification ∀xQ(x), where the domain consists of all real numbers?

ANS: Q(x) is not true for every real number x, because for instance, Q(3)
is false. That is x = 3 is a counterexample for the statement ∀xQ(x).
Thus ∀xQ(x) is false.

Example 9.
Let P(x) is “x 2 > 0”. To show that the statement ∀xP(x) is false where
the universe of discourse consists of all integers, we give a counterexample.
We see that x = 0 is a counterexample.

Gauranga C Samanta (Dept. of Maths) Chapter-1 August 7, 2019 14 / 22


Quantifiers Continued
Discussion: When all the elements in the domain can be listed say
x!, x2 , · · · , xn , · · · , it follows that the universal quantification ∀xP(x) is the
same as the Conjunction P(x1 ) ∧ P(x2 ) ∧ · · · ∧ P(xn ) · · · , because this
Conjunction is true if and only if P(x1 ), · · · P(xn ), · · · are all true

Gauranga C Samanta (Dept. of Maths) Chapter-1 August 7, 2019 15 / 22


Quantifiers Continued
Discussion: When all the elements in the domain can be listed say
x!, x2 , · · · , xn , · · · , it follows that the universal quantification ∀xP(x) is the
same as the Conjunction P(x1 ) ∧ P(x2 ) ∧ · · · ∧ P(xn ) · · · , because this
Conjunction is true if and only if P(x1 ), · · · P(xn ), · · · are all true

Example 10.
What is the truth value of ∀xP(x), where P(x) is the statement “x 2 < 10”
and the domain consists of the positive integers not exceeding 4?

Gauranga C Samanta (Dept. of Maths) Chapter-1 August 7, 2019 15 / 22


Quantifiers Continued
Discussion: When all the elements in the domain can be listed say
x!, x2 , · · · , xn , · · · , it follows that the universal quantification ∀xP(x) is the
same as the Conjunction P(x1 ) ∧ P(x2 ) ∧ · · · ∧ P(xn ) · · · , because this
Conjunction is true if and only if P(x1 ), · · · P(xn ), · · · are all true

Example 10.
What is the truth value of ∀xP(x), where P(x) is the statement “x 2 < 10”
and the domain consists of the positive integers not exceeding 4?

ANS: the statement ∀xP(x) is the same as the Conjunction


P(1) ∧ P(2) ∧ P(3) ∧ P(4)

Gauranga C Samanta (Dept. of Maths) Chapter-1 August 7, 2019 15 / 22


Quantifiers Continued
Discussion: When all the elements in the domain can be listed say
x!, x2 , · · · , xn , · · · , it follows that the universal quantification ∀xP(x) is the
same as the Conjunction P(x1 ) ∧ P(x2 ) ∧ · · · ∧ P(xn ) · · · , because this
Conjunction is true if and only if P(x1 ), · · · P(xn ), · · · are all true

Example 10.
What is the truth value of ∀xP(x), where P(x) is the statement “x 2 < 10”
and the domain consists of the positive integers not exceeding 4?

ANS: the statement ∀xP(x) is the same as the Conjunction


P(1) ∧ P(2) ∧ P(3) ∧ P(4)

Example 11.
What does the statement ∀xN(x) mean if N(x) is “computer x is
connected to the network” and the domain consists of all computers on
campus?

Gauranga C Samanta (Dept. of Maths) Chapter-1 August 7, 2019 15 / 22


Quantifiers Continued

Example 12.
What is the truth value of ∀x(x 2 ≥ x), where the domain consists of all
real numbers? What is the truth value of this statement if the domain
consists of all integers?

Gauranga C Samanta (Dept. of Maths) Chapter-1 August 7, 2019 16 / 22


Existential Quantification

Definition 13.
The existential quantification of P(x) is the proposition
“there exists an element x in the domain such that P(x)”. We
use the notation ∃xP(x) for the existential quantification of P(x). Hence
∃ called the existential quantifier .

The existential quantification ∃xP(x) is read as “ There is an x such


that P(x)”, “There is at least one x such that P(x)” or “ For some
xP(x)”

Gauranga C Samanta (Dept. of Maths) Chapter-1 August 7, 2019 17 / 22


Existential Quantification

Example 14.
Let P(x) denote the statement “x > 3”. What is the truth value of the
quantification ∃xP(x), where the domain consists of all real numbers?

Gauranga C Samanta (Dept. of Maths) Chapter-1 August 7, 2019 18 / 22


Existential Quantification

Example 14.
Let P(x) denote the statement “x > 3”. What is the truth value of the
quantification ∃xP(x), where the domain consists of all real numbers?

Example 15.
Let P(x) denote the statement “x = x + 1”. What is the truth value of
the quantification ∃xP(x), where the domain consists of all real numbers?

Gauranga C Samanta (Dept. of Maths) Chapter-1 August 7, 2019 18 / 22


Existential Quantification

Example 14.
Let P(x) denote the statement “x > 3”. What is the truth value of the
quantification ∃xP(x), where the domain consists of all real numbers?

Example 15.
Let P(x) denote the statement “x = x + 1”. What is the truth value of
the quantification ∃xP(x), where the domain consists of all real numbers?

Remark: When all elements in the domain can be listed say x1 , x2 , · · · , xn


the existential quantification of ∃xP(x) is the same as the Disjunction
P(x1 ) ∨ · · · ∨ P(xn )
because this Disjunction is true if and only if at least one of
P(x1 ), P(x)2 , · · · , P(xn ) is true

Gauranga C Samanta (Dept. of Maths) Chapter-1 August 7, 2019 18 / 22


Existential Quantification

Example 16.
What is the truth value of ∃xP(x), where P(x) is the statement
“x 2 > 10” and the universe of discourse consists of the positive integers
not exceeding 4?

Gauranga C Samanta (Dept. of Maths) Chapter-1 August 7, 2019 19 / 22


Existential Quantification

Example 17.
What do the statements ∀x < 0(x 2 > 0), ∀y 6= 0(y 3 6= 0), and
∃z > 0(z 2 = 2), means where the domain in each case consists of the real
numbers?

Gauranga C Samanta (Dept. of Maths) Chapter-1 August 7, 2019 20 / 22


Existential Quantification

Example 17.
What do the statements ∀x < 0(x 2 > 0), ∀y 6= 0(y 3 6= 0), and
∃z > 0(z 2 = 2), means where the domain in each case consists of the real
numbers?

Example 18.
Show that ∀x(P(x) ∧ Q(x)) and ∀xP(x) ∧ ∀xQ(x) are logically equivalent
(where the same domain is used throughout). This logical equivalence
shows that we can distribute a universal quantifier over a conjunction.
Furthermore, we can also distribute an existential quantifier over a
disjunction. However, we cannot distribute a universal quantifier over a
disjunction, nor can we distribute an existential quantifier over a
conjunction

Gauranga C Samanta (Dept. of Maths) Chapter-1 August 7, 2019 20 / 22


Negating Quantified Expressions

“Every students in my class has taken a course DM”


This statement is universal quantification namely ∀xP(x)
P(x) is the statement “x is the taken a course in DM”
Domain consists of the students in the class
Negation of the statement is: it is not the case that every student in
my class has taken a course DM.
This is equivalent to there is a student in the class who has not taken
the course DM
that is ∃x ∼ P(x)
Therefore ∼ ∀xP(x) ≡ ∃x ∼ P(x)
Similarly ∼ ∃xQ(x) ≡ ∀x ∼ Q(x)

Gauranga C Samanta (Dept. of Maths) Chapter-1 August 7, 2019 21 / 22


Negating Quantified Expressions

Example 19.
What are the negations of the statements ∀x(x 2 > x) and ∃x(x 2 = 2)?

Example 20.
Show that ∼ ∀x(P(x) → Q(x)) and ∃x(P(x)∧ ∼ Q(x)) are logically
equivalent

Gauranga C Samanta (Dept. of Maths) Chapter-1 August 7, 2019 22 / 22


Thank you for your attention

Gauranga C Samanta (Dept. of Maths) Chapter-1 August 7, 2019 23 / 22

You might also like