Download as pdf or txt
Download as pdf or txt
You are on page 1of 194

Discrete Mathematics

Lecture 1- Logics

Nurlan Ismailov
nurlan.ismailov@astanait.edu.kz

Astana IT University

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 1 / 34
Main textbook

Our main textbook is

E. Goodaire and M. Parmenter


Discrete Mathematics with Graph Theory
(third edition)

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 2 / 34
What is Lecture 1 about?

Definition of Statement and Examples


Logical Operations and Truth Table
Logical Equivalences. Tautology and Contradiction
The Algebra of Statements and Examples
Disjunctive Normal Form (DNF)

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 3 / 34
1. Definition of Statement and Examples

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 4 / 34
Statement

Definition
A statement is an ordinary declarative English sentence of fact that can be
assigned a truth value; that is, it can be classified as being either true or false
(but not both).

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 5 / 34
Statement

Definition
A statement is an ordinary declarative English sentence of fact that can be
assigned a truth value; that is, it can be classified as being either true or false
(but not both).

Examples
There are 168 primes less than 1000

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 5 / 34
Statement

Definition
A statement is an ordinary declarative English sentence of fact that can be
assigned a truth value; that is, it can be classified as being either true or false
(but not both).

Examples
There are 168 primes less than 1000 statement

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 5 / 34
Statement

Definition
A statement is an ordinary declarative English sentence of fact that can be
assigned a truth value; that is, it can be classified as being either true or false
(but not both).

Examples
There are 168 primes less than 1000 statement
Seventeen is an even number

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 5 / 34
Statement

Definition
A statement is an ordinary declarative English sentence of fact that can be
assigned a truth value; that is, it can be classified as being either true or false
(but not both).

Examples
There are 168 primes less than 1000 statement
Seventeen is an even number statement

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 5 / 34
Statement

Definition
A statement is an ordinary declarative English sentence of fact that can be
assigned a truth value; that is, it can be classified as being either true or false
(but not both).

Examples
There are 168 primes less than 1000 statement
Seventeen is an even number statement
√ √3
3 is a rational number

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 5 / 34
Statement

Definition
A statement is an ordinary declarative English sentence of fact that can be
assigned a truth value; that is, it can be classified as being either true or false
(but not both).

Examples
There are 168 primes less than 1000 statement
Seventeen is an even number statement
√ √3
3 is a rational number statement

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 5 / 34
Statement

Definition
A statement is an ordinary declarative English sentence of fact that can be
assigned a truth value; that is, it can be classified as being either true or false
(but not both).

Examples
There are 168 primes less than 1000 statement
Seventeen is an even number statement
√ √3
3 is a rational number statement
Zero is not a negative number

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 5 / 34
Statement

Definition
A statement is an ordinary declarative English sentence of fact that can be
assigned a truth value; that is, it can be classified as being either true or false
(but not both).

Examples
There are 168 primes less than 1000 statement
Seventeen is an even number statement
√ √3
3 is a rational number statement
Zero is not a negative number statement

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 5 / 34
Statement

Definition
A statement is an ordinary declarative English sentence of fact that can be
assigned a truth value; that is, it can be classified as being either true or false
(but not both).

Examples
There are 168 primes less than 1000 statement
Seventeen is an even number statement
√ √3
3 is a rational number statement
Zero is not a negative number statement
What are irrational numbers?

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 5 / 34
Statement

Definition
A statement is an ordinary declarative English sentence of fact that can be
assigned a truth value; that is, it can be classified as being either true or false
(but not both).

Examples
There are 168 primes less than 1000 statement
Seventeen is an even number statement
√ √3
3 is a rational number statement
Zero is not a negative number statement
What are irrational numbers? not statement, because it is not declarative

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 5 / 34
Statement

Definition
A statement is an ordinary declarative English sentence of fact that can be
assigned a truth value; that is, it can be classified as being either true or false
(but not both).

Examples
There are 168 primes less than 1000 statement
Seventeen is an even number statement
√ √3
3 is a rational number statement
Zero is not a negative number statement
What are irrational numbers? not statement, because it is not declarative
Suppose every positive integer is the sum of three squares

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 5 / 34
Statement

Definition
A statement is an ordinary declarative English sentence of fact that can be
assigned a truth value; that is, it can be classified as being either true or false
(but not both).

Examples
There are 168 primes less than 1000 statement
Seventeen is an even number statement
√ √3
3 is a rational number statement
Zero is not a negative number statement
What are irrational numbers? not statement, because it is not declarative
Suppose every positive integer is the sum of three squares
not statement, because it has no truth value

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 5 / 34
Statement

Definition
A statement is an ordinary declarative English sentence of fact that can be
assigned a truth value; that is, it can be classified as being either true or false
(but not both).

Examples
There are 168 primes less than 1000 statement
Seventeen is an even number statement
√ √3
3 is a rational number statement
Zero is not a negative number statement
What are irrational numbers? not statement, because it is not declarative
Suppose every positive integer is the sum of three squares
not statement, because it has no truth value
x+1=2

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 5 / 34
Statement

Definition
A statement is an ordinary declarative English sentence of fact that can be
assigned a truth value; that is, it can be classified as being either true or false
(but not both).

Examples
There are 168 primes less than 1000 statement
Seventeen is an even number statement
√ √3
3 is a rational number statement
Zero is not a negative number statement
What are irrational numbers? not statement, because it is not declarative
Suppose every positive integer is the sum of three squares
not statement, because it has no truth value
x + 1 = 2 not statement, because it has no unique truth value

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 5 / 34
2. Logical Operations and Truth Table

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 6 / 34
Compound statements. “and” ∧ and “or” ∨

Using the words “and” and “or” one can form new statements from other
statements. These new statements are said to be compound statements.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 7 / 34
Compound statements. “and” ∧ and “or” ∨

Using the words “and” and “or” one can form new statements from other
statements. These new statements are said to be compound statements.

Examples
32 = 9 and 3.14 < π

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 7 / 34
Compound statements. “and” ∧ and “or” ∨

Using the words “and” and “or” one can form new statements from other
statements. These new statements are said to be compound statements.

Examples
32 = 9 and 3.14 < π
−22 = −4 and 5 < 100

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 7 / 34
Compound statements. “and” ∧ and “or” ∨

Using the words “and” and “or” one can form new statements from other
statements. These new statements are said to be compound statements.

Examples
32 = 9 and 3.14 < π
−22 = −4 and 5 < 100
7 + 5 = 12 or 571 is the 123th prime

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 7 / 34
Compound statements. “and” ∧ and “or” ∨

Using the words “and” and “or” one can form new statements from other
statements. These new statements are said to be compound statements.

Examples
32 = 9 and 3.14 < π
−22 = −4 and 5 < 100
7 + 5 = 12 or 571 is the 123th prime
25 is less than 25 or equal to 25

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 7 / 34
Compound statements. “and” ∧ and “or” ∨

Using the words “and” and “or” one can form new statements from other
statements. These new statements are said to be compound statements.

Examples
32 = 9 and 3.14 < π
−22 = −4 and 5 < 100
7 + 5 = 12 or 571 is the 123th prime
25 is less than 25 or equal to 25

5 is an even number or 8 > 3

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 7 / 34
Compound statements. “and” ∧ and “or” ∨

Using the words “and” and “or” one can form new statements from other
statements. These new statements are said to be compound statements.

Examples
32 = 9 and 3.14 < π
−22 = −4 and 5 < 100
7 + 5 = 12 or 571 is the 123th prime
25 is less than 25 or equal to 25

5 is an even number or 8 > 3

Question
How does the truth of “and” and “or” compound statements depend on truth
of its parts?

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 7 / 34
We use lowercase letters of the alphabet to represent statements, such as

p, q, r, ....

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 8 / 34
We use lowercase letters of the alphabet to represent statements, such as

p, q, r, ....

Let p and q be statements.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 8 / 34
We use lowercase letters of the alphabet to represent statements, such as

p, q, r, ....

Let p and q be statements.


p and q will be written as p ∧ q (conjunction of p and q)
we read it as “p and q”.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 8 / 34
We use lowercase letters of the alphabet to represent statements, such as

p, q, r, ....

Let p and q be statements.


p and q will be written as p ∧ q (conjunction of p and q)
we read it as “p and q”.

Definition
p ∧ q is true if both p and q are true; it is false if either p is false or q is false.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 8 / 34
We use lowercase letters of the alphabet to represent statements, such as

p, q, r, ....

Let p and q be statements.


p and q will be written as p ∧ q (conjunction of p and q)
we read it as “p and q”.

Definition
p ∧ q is true if both p and q are true; it is false if either p is false or q is false.

The definition above can be neatly summarized by tables so-called truth


tables. The truth table for p ∧ q is the following.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 8 / 34
We use lowercase letters of the alphabet to represent statements, such as

p, q, r, ....

Let p and q be statements.


p and q will be written as p ∧ q (conjunction of p and q)
we read it as “p and q”.

Definition
p ∧ q is true if both p and q are true; it is false if either p is false or q is false.

The definition above can be neatly summarized by tables so-called truth


tables. The truth table for p ∧ q is the following.
p q

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 8 / 34
We use lowercase letters of the alphabet to represent statements, such as

p, q, r, ....

Let p and q be statements.


p and q will be written as p ∧ q (conjunction of p and q)
we read it as “p and q”.

Definition
p ∧ q is true if both p and q are true; it is false if either p is false or q is false.

The definition above can be neatly summarized by tables so-called truth


tables. The truth table for p ∧ q is the following.
p q
F F

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 8 / 34
We use lowercase letters of the alphabet to represent statements, such as

p, q, r, ....

Let p and q be statements.


p and q will be written as p ∧ q (conjunction of p and q)
we read it as “p and q”.

Definition
p ∧ q is true if both p and q are true; it is false if either p is false or q is false.

The definition above can be neatly summarized by tables so-called truth


tables. The truth table for p ∧ q is the following.
p q
F F
F T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 8 / 34
We use lowercase letters of the alphabet to represent statements, such as

p, q, r, ....

Let p and q be statements.


p and q will be written as p ∧ q (conjunction of p and q)
we read it as “p and q”.

Definition
p ∧ q is true if both p and q are true; it is false if either p is false or q is false.

The definition above can be neatly summarized by tables so-called truth


tables. The truth table for p ∧ q is the following.
p q
F F
F T
T F

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 8 / 34
We use lowercase letters of the alphabet to represent statements, such as

p, q, r, ....

Let p and q be statements.


p and q will be written as p ∧ q (conjunction of p and q)
we read it as “p and q”.

Definition
p ∧ q is true if both p and q are true; it is false if either p is false or q is false.

The definition above can be neatly summarized by tables so-called truth


tables. The truth table for p ∧ q is the following.
p q
F F
F T
T F
T T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 8 / 34
We use lowercase letters of the alphabet to represent statements, such as

p, q, r, ....

Let p and q be statements.


p and q will be written as p ∧ q (conjunction of p and q)
we read it as “p and q”.

Definition
p ∧ q is true if both p and q are true; it is false if either p is false or q is false.

The definition above can be neatly summarized by tables so-called truth


tables. The truth table for p ∧ q is the following.
p q p∧q
F F
F T
T F
T T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 8 / 34
We use lowercase letters of the alphabet to represent statements, such as

p, q, r, ....

Let p and q be statements.


p and q will be written as p ∧ q (conjunction of p and q)
we read it as “p and q”.

Definition
p ∧ q is true if both p and q are true; it is false if either p is false or q is false.

The definition above can be neatly summarized by tables so-called truth


tables. The truth table for p ∧ q is the following.
p q p∧q
F F F
F T
T F
T T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 8 / 34
We use lowercase letters of the alphabet to represent statements, such as

p, q, r, ....

Let p and q be statements.


p and q will be written as p ∧ q (conjunction of p and q)
we read it as “p and q”.

Definition
p ∧ q is true if both p and q are true; it is false if either p is false or q is false.

The definition above can be neatly summarized by tables so-called truth


tables. The truth table for p ∧ q is the following.
p q p∧q
F F F
F T F
T F
T T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 8 / 34
We use lowercase letters of the alphabet to represent statements, such as

p, q, r, ....

Let p and q be statements.


p and q will be written as p ∧ q (conjunction of p and q)
we read it as “p and q”.

Definition
p ∧ q is true if both p and q are true; it is false if either p is false or q is false.

The definition above can be neatly summarized by tables so-called truth


tables. The truth table for p ∧ q is the following.
p q p∧q
F F F
F T F
T F F
T T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 8 / 34
We use lowercase letters of the alphabet to represent statements, such as

p, q, r, ....

Let p and q be statements.


p and q will be written as p ∧ q (conjunction of p and q)
we read it as “p and q”.

Definition
p ∧ q is true if both p and q are true; it is false if either p is false or q is false.

The definition above can be neatly summarized by tables so-called truth


tables. The truth table for p ∧ q is the following.
p q p∧q
F F F
F T F
T F F
T T T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 8 / 34
p or q will be written as p ∨ q (disjunction of p and q)

we read it as “p or q”.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 9 / 34
p or q will be written as p ∨ q (disjunction of p and q)

we read it as “p or q”.

Definition
p ∨ q is true if p is true or q is true or both p and q are true; it is false only
when both p and q are false.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 9 / 34
p or q will be written as p ∨ q (disjunction of p and q)

we read it as “p or q”.

Definition
p ∨ q is true if p is true or q is true or both p and q are true; it is false only
when both p and q are false.

Truth table for p ∨ q is the following.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 9 / 34
p or q will be written as p ∨ q (disjunction of p and q)

we read it as “p or q”.

Definition
p ∨ q is true if p is true or q is true or both p and q are true; it is false only
when both p and q are false.

Truth table for p ∨ q is the following.


p q p∨q
F F
F T
T F
T T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 9 / 34
p or q will be written as p ∨ q (disjunction of p and q)

we read it as “p or q”.

Definition
p ∨ q is true if p is true or q is true or both p and q are true; it is false only
when both p and q are false.

Truth table for p ∨ q is the following.


p q p∨q
F F F
F T
T F
T T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 9 / 34
p or q will be written as p ∨ q (disjunction of p and q)

we read it as “p or q”.

Definition
p ∨ q is true if p is true or q is true or both p and q are true; it is false only
when both p and q are false.

Truth table for p ∨ q is the following.


p q p∨q
F F F
F T T
T F
T T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 9 / 34
p or q will be written as p ∨ q (disjunction of p and q)

we read it as “p or q”.

Definition
p ∨ q is true if p is true or q is true or both p and q are true; it is false only
when both p and q are false.

Truth table for p ∨ q is the following.


p q p∨q
F F F
F T T
T F T
T T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 9 / 34
p or q will be written as p ∨ q (disjunction of p and q)

we read it as “p or q”.

Definition
p ∨ q is true if p is true or q is true or both p and q are true; it is false only
when both p and q are false.

Truth table for p ∨ q is the following.


p q p∨q
F F F
F T T
T F T
T T T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 9 / 34
Now let us determine truth values of above considered examples

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 10 / 34
Now let us determine truth values of above considered examples

Examples
32 = 9 and 3.14 < π

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 10 / 34
Now let us determine truth values of above considered examples

Examples
32 = 9 and 3.14 < π True

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 10 / 34
Now let us determine truth values of above considered examples

Examples
32 = 9 and 3.14 < π True
−22 = −4 and 5 < 100

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 10 / 34
Now let us determine truth values of above considered examples

Examples
32 = 9 and 3.14 < π True
−22 = −4 and 5 < 100 True

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 10 / 34
Now let us determine truth values of above considered examples

Examples
32 = 9 and 3.14 < π True
−22 = −4 and 5 < 100 True
7 + 5 = 12 or 571 is the 123th prime

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 10 / 34
Now let us determine truth values of above considered examples

Examples
32 = 9 and 3.14 < π True
−22 = −4 and 5 < 100 True
7 + 5 = 12 or 571 is the 123th prime True

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 10 / 34
Now let us determine truth values of above considered examples

Examples
32 = 9 and 3.14 < π True
−22 = −4 and 5 < 100 True
7 + 5 = 12 or 571 is the 123th prime True
25 is less than 25 or equal to 25

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 10 / 34
Now let us determine truth values of above considered examples

Examples
32 = 9 and 3.14 < π True
−22 = −4 and 5 < 100 True
7 + 5 = 12 or 571 is the 123th prime True
25 is less than 25 or equal to 25 True

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 10 / 34
Now let us determine truth values of above considered examples

Examples
32 = 9 and 3.14 < π True
−22 = −4 and 5 < 100 True
7 + 5 = 12 or 571 is the 123th prime True
25 is less than 25 or equal to 25 True

5 is an even number or 8 > 3

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 10 / 34
Now let us determine truth values of above considered examples

Examples
32 = 9 and 3.14 < π True
−22 = −4 and 5 < 100 True
7 + 5 = 12 or 571 is the 123th prime True
25 is less than 25 or equal to 25 True

5 is an even number or 8 > 3 False

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 10 / 34
Compound statements with Implication →

Many mathematical statements are implications, that is, “p implies q” or “if p


then q”, where p is called the hypothesis and q is called conclusion.
p implies q will be written as p → q

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 11 / 34
Compound statements with Implication →

Many mathematical statements are implications, that is, “p implies q” or “if p


then q”, where p is called the hypothesis and q is called conclusion.
p implies q will be written as p → q

Examples
2 is an even integer implies 4 is an even integer.
If it is sunny tomorrow, then you may go swimming

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 11 / 34
Compound statements with Implication →

Many mathematical statements are implications, that is, “p implies q” or “if p


then q”, where p is called the hypothesis and q is called conclusion.
p implies q will be written as p → q

Examples
2 is an even integer implies 4 is an even integer.
If it is sunny tomorrow, then you may go swimming

Definition
The implication p → q is false only when the hypothesis p is true and the
conclusion q is false. In all other situations, it is true.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 11 / 34
Truth table for p → q is the following.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 12 / 34
Truth table for p → q is the following.
p q p→q
F F
F T
T F
T T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 12 / 34
Truth table for p → q is the following.
p q p→q
F F T
F T
T F
T T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 12 / 34
Truth table for p → q is the following.
p q p→q
F F T
F T T
T F
T T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 12 / 34
Truth table for p → q is the following.
p q p→q
F F T
F T T
T F F
T T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 12 / 34
Truth table for p → q is the following.
p q p→q
F F T
F T T
T F F
T T T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 12 / 34
Truth table for p → q is the following.
p q p→q
F F T Why?
F T T
T F F
T T T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 12 / 34
Truth table for p → q is the following.
p q p→q
F F T Why? The false implies anything!
F T T
T F F
T T T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 12 / 34
Truth table for p → q is the following.
p q p→q
F F T Why? The false implies anything!
F T T Why?
T F F
T T T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 12 / 34
Truth table for p → q is the following.
p q p→q
F F T Why? The false implies anything!
F T T Why? By the same reason
T F F
T T T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 12 / 34
Another compound statement: Double Implication ↔

Another compound statement that we will use is the double implication p ↔ q


read “p if and only if q”.
As the notation suggests, the statement p ↔ q is simply a convenient way to
express p → q and q → p.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 13 / 34
Another compound statement: Double Implication ↔

Another compound statement that we will use is the double implication p ↔ q


read “p if and only if q”.
As the notation suggests, the statement p ↔ q is simply a convenient way to
express p → q and q → p.

Examples
2 is an even number if and only if 4 is an even number.
2 is an even number if and only if 5 is an even number.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 13 / 34
Definition
The double implication p ↔ q is true if p and q have the same truth values; it
is false if p and q have different truth values.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 14 / 34
Definition
The double implication p ↔ q is true if p and q have the same truth values; it
is false if p and q have different truth values.

The truth table for p ↔ q is the following.


p q p↔q
F F
F T
T F
T T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 14 / 34
Definition
The double implication p ↔ q is true if p and q have the same truth values; it
is false if p and q have different truth values.

The truth table for p ↔ q is the following.


p q p↔q
F F T
F T
T F
T T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 14 / 34
Definition
The double implication p ↔ q is true if p and q have the same truth values; it
is false if p and q have different truth values.

The truth table for p ↔ q is the following.


p q p↔q
F F T
F T F
T F
T T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 14 / 34
Definition
The double implication p ↔ q is true if p and q have the same truth values; it
is false if p and q have different truth values.

The truth table for p ↔ q is the following.


p q p↔q
F F T
F T F
T F F
T T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 14 / 34
Definition
The double implication p ↔ q is true if p and q have the same truth values; it
is false if p and q have different truth values.

The truth table for p ↔ q is the following.


p q p↔q
F F T
F T F
T F F
T T T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 14 / 34
Negation of a statement: p̄

The negation of a statement p is the statement that asserts that p is not true.
We denote the negation of p by p̄ and say “not p”.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 15 / 34
Negation of a statement: p̄

The negation of a statement p is the statement that asserts that p is not true.
We denote the negation of p by p̄ and say “not p”.

Example
The negation of “x equals 4” is the statement “x does not equal 4” or x ̸= 4.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 15 / 34
Negation of a statement: p̄

The negation of a statement p is the statement that asserts that p is not true.
We denote the negation of p by p̄ and say “not p”.

Example
The negation of “x equals 4” is the statement “x does not equal 4” or x ̸= 4.

The truth table for p̄ is the following.


p p̄
F
T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 15 / 34
Negation of a statement: p̄

The negation of a statement p is the statement that asserts that p is not true.
We denote the negation of p by p̄ and say “not p”.

Example
The negation of “x equals 4” is the statement “x does not equal 4” or x ̸= 4.

The truth table for p̄ is the following.


p p̄
F T
T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 15 / 34
Negation of a statement: p̄

The negation of a statement p is the statement that asserts that p is not true.
We denote the negation of p by p̄ and say “not p”.

Example
The negation of “x equals 4” is the statement “x does not equal 4” or x ̸= 4.

The truth table for p̄ is the following.


p p̄
F T
T F

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 15 / 34
Complicated compound statements

The truth tables for more complicated compound statements can be


constructed using the truth tables we have seen so far.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 16 / 34
Complicated compound statements

The truth tables for more complicated compound statements can be


constructed using the truth tables we have seen so far.

Example
Suppose we want the truth table for p → (p ∨ q).

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 16 / 34
Complicated compound statements

The truth tables for more complicated compound statements can be


constructed using the truth tables we have seen so far.

Example
Suppose we want the truth table for p → (p ∨ q).
p q
F F
F T
T F
T T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 16 / 34
Complicated compound statements

The truth tables for more complicated compound statements can be


constructed using the truth tables we have seen so far.

Example
Suppose we want the truth table for p → (p ∨ q).
p q p∨q
F F
F T
T F
T T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 16 / 34
Complicated compound statements

The truth tables for more complicated compound statements can be


constructed using the truth tables we have seen so far.

Example
Suppose we want the truth table for p → (p ∨ q).
p q p∨q
F F F
F T
T F
T T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 16 / 34
Complicated compound statements

The truth tables for more complicated compound statements can be


constructed using the truth tables we have seen so far.

Example
Suppose we want the truth table for p → (p ∨ q).
p q p∨q
F F F
F T T
T F
T T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 16 / 34
Complicated compound statements

The truth tables for more complicated compound statements can be


constructed using the truth tables we have seen so far.

Example
Suppose we want the truth table for p → (p ∨ q).
p q p∨q
F F F
F T T
T F T
T T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 16 / 34
Complicated compound statements

The truth tables for more complicated compound statements can be


constructed using the truth tables we have seen so far.

Example
Suppose we want the truth table for p → (p ∨ q).
p q p∨q
F F F
F T T
T F T
T T T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 16 / 34
Complicated compound statements

The truth tables for more complicated compound statements can be


constructed using the truth tables we have seen so far.

Example
Suppose we want the truth table for p → (p ∨ q).
p q p∨q p∨q
F F F
F T T
T F T
T T T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 16 / 34
Complicated compound statements

The truth tables for more complicated compound statements can be


constructed using the truth tables we have seen so far.

Example
Suppose we want the truth table for p → (p ∨ q).
p q p∨q p∨q
F F F T
F T T
T F T
T T T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 16 / 34
Complicated compound statements

The truth tables for more complicated compound statements can be


constructed using the truth tables we have seen so far.

Example
Suppose we want the truth table for p → (p ∨ q).
p q p∨q p∨q
F F F T
F T T F
T F T
T T T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 16 / 34
Complicated compound statements

The truth tables for more complicated compound statements can be


constructed using the truth tables we have seen so far.

Example
Suppose we want the truth table for p → (p ∨ q).
p q p∨q p∨q
F F F T
F T T F
T F T F
T T T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 16 / 34
Complicated compound statements

The truth tables for more complicated compound statements can be


constructed using the truth tables we have seen so far.

Example
Suppose we want the truth table for p → (p ∨ q).
p q p∨q p∨q
F F F T
F T T F
T F T F
T T T F

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 16 / 34
Complicated compound statements

The truth tables for more complicated compound statements can be


constructed using the truth tables we have seen so far.

Example
Suppose we want the truth table for p → (p ∨ q).
p q p ∨ q p ∨ q p → (p ∨ q)
F F F T
F T T F
T F T F
T T T F

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 16 / 34
Complicated compound statements

The truth tables for more complicated compound statements can be


constructed using the truth tables we have seen so far.

Example
Suppose we want the truth table for p → (p ∨ q).
p q p ∨ q p ∨ q p → (p ∨ q)
F F F T T
F T T F
T F T F
T T T F

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 16 / 34
Complicated compound statements

The truth tables for more complicated compound statements can be


constructed using the truth tables we have seen so far.

Example
Suppose we want the truth table for p → (p ∨ q).
p q p ∨ q p ∨ q p → (p ∨ q)
F F F T T
F T T F T
T F T F
T T T F

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 16 / 34
Complicated compound statements

The truth tables for more complicated compound statements can be


constructed using the truth tables we have seen so far.

Example
Suppose we want the truth table for p → (p ∨ q).
p q p ∨ q p ∨ q p → (p ∨ q)
F F F T T
F T T F T
T F T F F
T T T F

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 16 / 34
Complicated compound statements

The truth tables for more complicated compound statements can be


constructed using the truth tables we have seen so far.

Example
Suppose we want the truth table for p → (p ∨ q).
p q p ∨ q p ∨ q p → (p ∨ q)
F F F T T
F T T F T
T F T F F
T T T F F

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 16 / 34
Complicated compound statements

The truth tables for more complicated compound statements can be


constructed using the truth tables we have seen so far.

Example
Suppose we want the truth table for p → (p ∨ q).
p q p ∨ q p ∨ q p → (p ∨ q)
F F F T T
F T T F T
T F T F F
T T T F F

When three statements say p, q and r are involved, 8 rows are required in a
truth table since it is necessary to consider the two possible truth values for r
for each of the four possible truth values of p and q.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 16 / 34
Example
A = (p ∨ q) ↔ ((p̄ ∧ r) → (q ∧ r))
p q r

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 17 / 34
Example
A = (p ∨ q) ↔ ((p̄ ∧ r) → (q ∧ r))
p q r p̄ p̄ ∧ r q∧r (p̄ ∧ r) → (q ∧ r) p∨q A
T T T
T F T
F T T
F F T
T T F
T F F
F T F
F F F

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 17 / 34
Example
A = (p ∨ q) ↔ ((p̄ ∧ r) → (q ∧ r))
p q r p̄ p̄ ∧ r q∧r (p̄ ∧ r) → (q ∧ r) p∨q A
T T T F
T F T F
F T T T
F F T T
T T F F
T F F F
F T F T
F F F T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 17 / 34
Example
A = (p ∨ q) ↔ ((p̄ ∧ r) → (q ∧ r))
p q r p̄ p̄ ∧ r q∧r (p̄ ∧ r) → (q ∧ r) p∨q A
T T T F F
T F T F F
F T T T T
F F T T T
T T F F F
T F F F F
F T F T F
F F F T F

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 17 / 34
Example
A = (p ∨ q) ↔ ((p̄ ∧ r) → (q ∧ r))
p q r p̄ p̄ ∧ r q∧r (p̄ ∧ r) → (q ∧ r) p∨q A
T T T F F T
T F T F F F
F T T T T T
F F T T T F
T T F F F F
T F F F F F
F T F T F F
F F F T F F

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 17 / 34
Example
A = (p ∨ q) ↔ ((p̄ ∧ r) → (q ∧ r))
p q r p̄ p̄ ∧ r q∧r (p̄ ∧ r) → (q ∧ r) p∨q A
T T T F F T T
T F T F F F T
F T T T T T T
F F T T T F F
T T F F F F T
T F F F F F T
F T F T F F T
F F F T F F T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 17 / 34
Example
A = (p ∨ q) ↔ ((p̄ ∧ r) → (q ∧ r))
p q r p̄ p̄ ∧ r q∧r (p̄ ∧ r) → (q ∧ r) p∨q A
T T T F F T T T
T F T F F F T T
F T T T T T T T
F F T T T F F F
T T F F F F T T
T F F F F F T T
F T F T F F T T
F F F T F F T F

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 17 / 34
Example
A = (p ∨ q) ↔ ((p̄ ∧ r) → (q ∧ r))
p q r p̄ p̄ ∧ r q∧r (p̄ ∧ r) → (q ∧ r) p∨q A
T T T F F T T T T
T F T F F F T T T
F T T T T T T T T
F F T T T F F F T
T T F F F F T T T
T F F F F F T T T
F T F T F F T T T
F F F T F F T F F

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 17 / 34
3. Logical Equivalences. Tautology and Contradiction

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 18 / 34
Logical Equivalence

Definition
Statements p and q are are said to be logically equivalent if they have identical
truth tables.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 19 / 34
Logical Equivalence

Definition
Statements p and q are are said to be logically equivalent if they have identical
truth tables.

Example
p → q and q̄ → p̄ are logically equivalent.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 19 / 34
Logical Equivalence

Definition
Statements p and q are are said to be logically equivalent if they have identical
truth tables.

Example
p → q and q̄ → p̄ are logically equivalent.
p q p→q p q q̄ p̄ q̄ → p̄
F F T F F T T T
F T T F T F T T
T F F T F T F F
T T T T T F F T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 19 / 34
Tautology and Contradiction

Definition
A compound statement that is always true, regardless of the truth values
assigned to its variables, is a tautology. A compound statement that is always
false is a contradiction.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 20 / 34
Tautology and Contradiction

Definition
A compound statement that is always true, regardless of the truth values
assigned to its variables, is a tautology. A compound statement that is always
false is a contradiction.

Examples
p ∨ p̄ is a tautology.
p ∧ p̄ is a contradiction.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 20 / 34
Tautology and Contradiction

Definition
A compound statement that is always true, regardless of the truth values
assigned to its variables, is a tautology. A compound statement that is always
false is a contradiction.

Examples
p ∨ p̄ is a tautology.
p ∧ p̄ is a contradiction.
p p̄ p ∨ p̄ p p̄ p ∧ p̄
F T T F T F
T F T T F F

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 20 / 34
Example
Show that (p ∧ q) → (p ∨ q) is a tautology.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 21 / 34
Example
Show that (p ∧ q) → (p ∨ q) is a tautology.

Proof:

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 21 / 34
Example
Show that (p ∧ q) → (p ∨ q) is a tautology.

Proof:
Suppose that (p ∧ q) → (p ∨ q) is not a tautology.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 21 / 34
Example
Show that (p ∧ q) → (p ∨ q) is a tautology.

Proof:
Suppose that (p ∧ q) → (p ∨ q) is not a tautology.

Then for some p and q our statement has the false value.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 21 / 34
Example
Show that (p ∧ q) → (p ∨ q) is a tautology.

Proof:
Suppose that (p ∧ q) → (p ∨ q) is not a tautology.

Then for some p and q our statement has the false value.

By the truth table of implication (p ∧ q) → (p ∨ q) is false only when

p ∧ q is true and p ∨ q is false.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 21 / 34
Example
Show that (p ∧ q) → (p ∨ q) is a tautology.

Proof:
Suppose that (p ∧ q) → (p ∨ q) is not a tautology.

Then for some p and q our statement has the false value.

By the truth table of implication (p ∧ q) → (p ∨ q) is false only when

p ∧ q is true and p ∨ q is false.

p ∧ q is true if and only if both p and q are true.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 21 / 34
Example
Show that (p ∧ q) → (p ∨ q) is a tautology.

Proof:
Suppose that (p ∧ q) → (p ∨ q) is not a tautology.

Then for some p and q our statement has the false value.

By the truth table of implication (p ∧ q) → (p ∨ q) is false only when

p ∧ q is true and p ∨ q is false.

p ∧ q is true if and only if both p and q are true.

On the other hand, p ∨ q is false if and only if both p and q is false.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 21 / 34
Example
Show that (p ∧ q) → (p ∨ q) is a tautology.

Proof:
Suppose that (p ∧ q) → (p ∨ q) is not a tautology.

Then for some p and q our statement has the false value.

By the truth table of implication (p ∧ q) → (p ∨ q) is false only when

p ∧ q is true and p ∨ q is false.

p ∧ q is true if and only if both p and q are true.

On the other hand, p ∨ q is false if and only if both p and q is false.

However, it is impossible. So we can not suppose that (p ∧ q) → (p ∨ q) is not


a tautology.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 21 / 34
Example
Show that (p ∧ q) → (p ∨ q) is a tautology.

Proof:
Suppose that (p ∧ q) → (p ∨ q) is not a tautology.

Then for some p and q our statement has the false value.

By the truth table of implication (p ∧ q) → (p ∨ q) is false only when

p ∧ q is true and p ∨ q is false.

p ∧ q is true if and only if both p and q are true.

On the other hand, p ∨ q is false if and only if both p and q is false.

However, it is impossible. So we can not suppose that (p ∧ q) → (p ∨ q) is not


a tautology.

Therefore, (p ∧ q) → (p ∨ q) is a tautology. □
Nurlan Ismailov nurlan.ismailov@astanait.edu.kz
Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 21 / 34
Example
Show that (p̄ ∧ q) ∧ (p ∨ q̄) is a contradiction.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 22 / 34
Example
Show that (p̄ ∧ q) ∧ (p ∨ q̄) is a contradiction.

Proof:

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 22 / 34
Example
Show that (p̄ ∧ q) ∧ (p ∨ q̄) is a contradiction.

Proof:
Suppose that (p̄ ∧ q) ∧ (p ∨ q̄) is not a contradiction.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 22 / 34
Example
Show that (p̄ ∧ q) ∧ (p ∨ q̄) is a contradiction.

Proof:
Suppose that (p̄ ∧ q) ∧ (p ∨ q̄) is not a contradiction.

Then for some p and q our statement has the true value.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 22 / 34
Example
Show that (p̄ ∧ q) ∧ (p ∨ q̄) is a contradiction.

Proof:
Suppose that (p̄ ∧ q) ∧ (p ∨ q̄) is not a contradiction.

Then for some p and q our statement has the true value.

By by the truth table of “And” (p̄ ∧ q) ∧ (p ∨ q̄) is true only when

both p̄ ∧ q and p ∨ q̄ are true.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 22 / 34
Example
Show that (p̄ ∧ q) ∧ (p ∨ q̄) is a contradiction.

Proof:
Suppose that (p̄ ∧ q) ∧ (p ∨ q̄) is not a contradiction.

Then for some p and q our statement has the true value.

By by the truth table of “And” (p̄ ∧ q) ∧ (p ∨ q̄) is true only when

both p̄ ∧ q and p ∨ q̄ are true.

p̄ ∧ q is true if and only if p is false and q is true.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 22 / 34
Example
Show that (p̄ ∧ q) ∧ (p ∨ q̄) is a contradiction.

Proof:
Suppose that (p̄ ∧ q) ∧ (p ∨ q̄) is not a contradiction.

Then for some p and q our statement has the true value.

By by the truth table of “And” (p̄ ∧ q) ∧ (p ∨ q̄) is true only when

both p̄ ∧ q and p ∨ q̄ are true.

p̄ ∧ q is true if and only if p is false and q is true.

Then p ∨ q̄ will be false, which is impossible.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 22 / 34
Example
Show that (p̄ ∧ q) ∧ (p ∨ q̄) is a contradiction.

Proof:
Suppose that (p̄ ∧ q) ∧ (p ∨ q̄) is not a contradiction.

Then for some p and q our statement has the true value.

By by the truth table of “And” (p̄ ∧ q) ∧ (p ∨ q̄) is true only when

both p̄ ∧ q and p ∨ q̄ are true.

p̄ ∧ q is true if and only if p is false and q is true.

Then p ∨ q̄ will be false, which is impossible.

So, we can not suppose that (p̄ ∧ q) ∧ (p ∨ q̄) is not a contradiction.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 22 / 34
Example
Show that (p̄ ∧ q) ∧ (p ∨ q̄) is a contradiction.

Proof:
Suppose that (p̄ ∧ q) ∧ (p ∨ q̄) is not a contradiction.

Then for some p and q our statement has the true value.

By by the truth table of “And” (p̄ ∧ q) ∧ (p ∨ q̄) is true only when

both p̄ ∧ q and p ∨ q̄ are true.

p̄ ∧ q is true if and only if p is false and q is true.

Then p ∨ q̄ will be false, which is impossible.

So, we can not suppose that (p̄ ∧ q) ∧ (p ∨ q̄) is not a contradiction.

Therefore, (p̄ ∧ q) ∧ (p ∨ q̄) is a contradiction. □

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 22 / 34
4. The Algebra of Statements and Examples

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 23 / 34
The Algebra of Statements and ⇔

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 24 / 34
The Algebra of Statements and ⇔

Let A and B be some statements.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 24 / 34
The Algebra of Statements and ⇔

Let A and B be some statements.

If A and B are logically equivalent, then A ↔ B is a tautology.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 24 / 34
The Algebra of Statements and ⇔

Let A and B be some statements.

If A and B are logically equivalent, then A ↔ B is a tautology.

We use the notation A ⇔ B to denote the fact that A and B are logically
equivalent.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 24 / 34
Some Basic Logical Equivalences

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 25 / 34
Some Basic Logical Equivalences

1. Idempotence: 4. Distributivity:
p∨p⇔p (p ∨ (q ∧ r)) ⇔ ((p ∨ q) ∧ (p ∨ r))
p∧p⇔p (p ∧ (q ∨ r)) ⇔ ((p ∧ q) ∨ (p ∧ r))
2. Commutativity:
5. Double Negation:
(p ∨ q) ⇔ (q ∨ p)
p⇔p
(p ∧ q) ⇔ (q ∧ p)
3. Associativity: 6. De Morgan’s Laws:
((p ∨ q) ∨ r) ⇔ (p ∨ (q ∨ r)) p∨q ⇔p∧q
((p ∧ q) ∧ r) ⇔ (p ∧ (q ∧ r)) p∧q ⇔p∨q

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 25 / 34
1 and 0
By 1 we denote a tautology and by 0 a contradiction.
Then we add the following properties to our list:

7. 9.
(p ∨ 1) ⇔ 1 (p ∨ p) ⇔ 1
(p ∧ 1) ⇔ p (p ∧ p) ⇔ 0
8. 10.
(p ∨ 0) ⇔ p 1⇔0
(p ∧ 0) ⇔ 0 0⇔1

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 26 / 34
1 and 0
By 1 we denote a tautology and by 0 a contradiction.
Then we add the following properties to our list:

7. 9.
(p ∨ 1) ⇔ 1 (p ∨ p) ⇔ 1
(p ∧ 1) ⇔ p (p ∧ p) ⇔ 0
8. 10.
(p ∨ 0) ⇔ p 1⇔0
(p ∧ 0) ⇔ 0 0⇔1

We add three more properties


11. (p → q) ⇔ (q → p)
12. (p → q) ⇔ (p ∨ q)

13. (p ↔ q) ⇔ ((p → q) ∧ (q → p))

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 26 / 34
1 and 0
By 1 we denote a tautology and by 0 a contradiction.
Then we add the following properties to our list:

7. 9.
(p ∨ 1) ⇔ 1 (p ∨ p) ⇔ 1
(p ∧ 1) ⇔ p (p ∧ p) ⇔ 0
8. 10.
(p ∨ 0) ⇔ p 1⇔0
(p ∧ 0) ⇔ 0 0⇔1

We add three more properties


11. (p → q) ⇔ (q → p)
12. (p → q) ⇔ (p ∨ q)

13. (p ↔ q) ⇔ ((p → q) ∧ (q → p))


Proof of all these properties: Just construct the truth table of each
statement and then apply to them the definition of logically equivalent
statements □
Nurlan Ismailov nurlan.ismailov@astanait.edu.kz
Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 26 / 34
Example
Show that p → (p → q) is tautology.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 27 / 34
Example
Show that p → (p → q) is tautology.
Proof. By Property 12 we have

p → (p → q) ⇔ p → (p ∨ q)

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 27 / 34
Example
Show that p → (p → q) is tautology.
Proof. By Property 12 we have

p → (p → q) ⇔ p → (p ∨ q)
⇔ p ∨ (p ∨ q)

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 27 / 34
Example
Show that p → (p → q) is tautology.
Proof. By Property 12 we have

p → (p → q) ⇔ p → (p ∨ q)
⇔ p ∨ (p ∨ q) ⇔ p ∨ (p ∨ q)

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 27 / 34
Example
Show that p → (p → q) is tautology.
Proof. By Property 12 we have

p → (p → q) ⇔ p → (p ∨ q)
⇔ p ∨ (p ∨ q) ⇔ p ∨ (p ∨ q)
⇔ (p ∨ p) ∨ q

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 27 / 34
Example
Show that p → (p → q) is tautology.
Proof. By Property 12 we have

p → (p → q) ⇔ p → (p ∨ q)
⇔ p ∨ (p ∨ q) ⇔ p ∨ (p ∨ q)
⇔ (p ∨ p) ∨ q ⇔ (1 ∨ q)

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 27 / 34
Example
Show that p → (p → q) is tautology.
Proof. By Property 12 we have

p → (p → q) ⇔ p → (p ∨ q)
⇔ p ∨ (p ∨ q) ⇔ p ∨ (p ∨ q)
⇔ (p ∨ p) ∨ q ⇔ (1 ∨ q) ⇔ 1 □

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 27 / 34
Example
Show that p → (p → q) is tautology.
Proof. By Property 12 we have

p → (p → q) ⇔ p → (p ∨ q)
⇔ p ∨ (p ∨ q) ⇔ p ∨ (p ∨ q)
⇔ (p ∨ p) ∨ q ⇔ (1 ∨ q) ⇔ 1 □

Example
Simplify the statement p ∨ q ∨ (p ∧ q)

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 27 / 34
Example
Show that p → (p → q) is tautology.
Proof. By Property 12 we have

p → (p → q) ⇔ p → (p ∨ q)
⇔ p ∨ (p ∨ q) ⇔ p ∨ (p ∨ q)
⇔ (p ∨ p) ∨ q ⇔ (1 ∨ q) ⇔ 1 □

Example
Simplify the statement p ∨ q ∨ (p ∧ q)
Solution. By De Morgan’s Law
p ∨ q ∨ (p ∧ q) ⇔ (p ∧ q) ∨ (p ∧ q)

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 27 / 34
Example
Show that p → (p → q) is tautology.
Proof. By Property 12 we have

p → (p → q) ⇔ p → (p ∨ q)
⇔ p ∨ (p ∨ q) ⇔ p ∨ (p ∨ q)
⇔ (p ∨ p) ∨ q ⇔ (1 ∨ q) ⇔ 1 □

Example
Simplify the statement p ∨ q ∨ (p ∧ q)
Solution. By De Morgan’s Law
p ∨ q ∨ (p ∧ q) ⇔ (p ∧ q) ∨ (p ∧ q)
⇔ p ∧ (q ∨ q)

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 27 / 34
Example
Show that p → (p → q) is tautology.
Proof. By Property 12 we have

p → (p → q) ⇔ p → (p ∨ q)
⇔ p ∨ (p ∨ q) ⇔ p ∨ (p ∨ q)
⇔ (p ∨ p) ∨ q ⇔ (1 ∨ q) ⇔ 1 □

Example
Simplify the statement p ∨ q ∨ (p ∧ q)
Solution. By De Morgan’s Law
p ∨ q ∨ (p ∧ q) ⇔ (p ∧ q) ∨ (p ∧ q)
⇔ p ∧ (q ∨ q) ⇔ p ∧ 1

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 27 / 34
Example
Show that p → (p → q) is tautology.
Proof. By Property 12 we have

p → (p → q) ⇔ p → (p ∨ q)
⇔ p ∨ (p ∨ q) ⇔ p ∨ (p ∨ q)
⇔ (p ∨ p) ∨ q ⇔ (1 ∨ q) ⇔ 1 □

Example
Simplify the statement p ∨ q ∨ (p ∧ q)
Solution. By De Morgan’s Law
p ∨ q ∨ (p ∧ q) ⇔ (p ∧ q) ∨ (p ∧ q)
⇔ p ∧ (q ∨ q) ⇔ p ∧ 1 ⇔ p □

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 27 / 34
Example
Show that p → (p → q) is tautology.
Proof. By Property 12 we have

p → (p → q) ⇔ p → (p ∨ q)
⇔ p ∨ (p ∨ q) ⇔ p ∨ (p ∨ q)
⇔ (p ∨ p) ∨ q ⇔ (1 ∨ q) ⇔ 1 □

Example
Simplify the statement p ∨ q ∨ (p ∧ q)
Solution. By De Morgan’s Law
p ∨ q ∨ (p ∧ q) ⇔ (p ∧ q) ∨ (p ∧ q)
⇔ p ∧ (q ∨ q) ⇔ p ∧ 1 ⇔ p □
So, the given statement is logically equivalent simply to p.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 27 / 34
5. Disjunctive Normal Form (DNF)

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 28 / 34
Disjunctive normal form (DNF)

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 29 / 34
Disjunctive normal form (DNF)

Definition (minterm)
Let n ≥ 1 be an integer and let x1 , x2 , . . . , xn be variables. A minterm based
on these variables is a compound statement of the form

a1 ∧ a2 ∧ · · · ∧ an ,

where each ai is xi or xi .

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 29 / 34
Disjunctive normal form (DNF)

Definition (minterm)
Let n ≥ 1 be an integer and let x1 , x2 , . . . , xn be variables. A minterm based
on these variables is a compound statement of the form

a1 ∧ a2 ∧ · · · ∧ an ,

where each ai is xi or xi .

Definition (Disjunctive normal form)


A compound statement in x1 , x2 , . . . , xn is said to be in disjunctive normal
form or just (DNF) if it looks like

y1 ∨ y2 ∨ · · · ∨ ym

where the statements y1 , y2 , . . . , ym are different minterms.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 29 / 34
Examples
x1 ∧ x2 ∧ x3 is a minterm on variables x1 , x2 , x3 .
(x1 ∧ x2 ∧ x3 ) ∨ (x1 ∧ x2 ∧ x3 ) is a DNF.
(p ∧ q) ∨ (p ∧ q) is in disjunctive normal form on variables p, q.
(p ∧ q) ∨ (p ∧ q) ∨ (p ∧ q) is not a DNF (because two minterms are the
same).
p ∧ (q ∨ r) is not a minterm (because it involes the symbol ∨).
((p ∧ q) ∨ r) ∧ ((p ∧ q) ∨ q) is not a DNF, one reason being that the
minterms (p ∧ q) ∨ r and (p ∧ q) ∨ q involve the symbol ∨.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 30 / 34
Examples
x1 ∧ x2 ∧ x3 is a minterm on variables x1 , x2 , x3 .
(x1 ∧ x2 ∧ x3 ) ∨ (x1 ∧ x2 ∧ x3 ) is a DNF.
(p ∧ q) ∨ (p ∧ q) is in disjunctive normal form on variables p, q.
(p ∧ q) ∨ (p ∧ q) ∨ (p ∧ q) is not a DNF (because two minterms are the
same).
p ∧ (q ∨ r) is not a minterm (because it involes the symbol ∨).
((p ∧ q) ∨ r) ∧ ((p ∧ q) ∨ q) is not a DNF, one reason being that the
minterms (p ∧ q) ∨ r and (p ∧ q) ∨ q involve the symbol ∨.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 30 / 34
Examples
x1 ∧ x2 ∧ x3 is a minterm on variables x1 , x2 , x3 .
(x1 ∧ x2 ∧ x3 ) ∨ (x1 ∧ x2 ∧ x3 ) is a DNF.
(p ∧ q) ∨ (p ∧ q) is in disjunctive normal form on variables p, q.
(p ∧ q) ∨ (p ∧ q) ∨ (p ∧ q) is not a DNF (because two minterms are the
same).
p ∧ (q ∨ r) is not a minterm (because it involes the symbol ∨).
((p ∧ q) ∨ r) ∧ ((p ∧ q) ∨ q) is not a DNF, one reason being that the
minterms (p ∧ q) ∨ r and (p ∧ q) ∨ q involve the symbol ∨.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 30 / 34
Examples
x1 ∧ x2 ∧ x3 is a minterm on variables x1 , x2 , x3 .
(x1 ∧ x2 ∧ x3 ) ∨ (x1 ∧ x2 ∧ x3 ) is a DNF.
(p ∧ q) ∨ (p ∧ q) is in disjunctive normal form on variables p, q.
(p ∧ q) ∨ (p ∧ q) ∨ (p ∧ q) is not a DNF (because two minterms are the
same).
p ∧ (q ∨ r) is not a minterm (because it involes the symbol ∨).
((p ∧ q) ∨ r) ∧ ((p ∧ q) ∨ q) is not a DNF, one reason being that the
minterms (p ∧ q) ∨ r and (p ∧ q) ∨ q involve the symbol ∨.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 30 / 34
Examples
x1 ∧ x2 ∧ x3 is a minterm on variables x1 , x2 , x3 .
(x1 ∧ x2 ∧ x3 ) ∨ (x1 ∧ x2 ∧ x3 ) is a DNF.
(p ∧ q) ∨ (p ∧ q) is in disjunctive normal form on variables p, q.
(p ∧ q) ∨ (p ∧ q) ∨ (p ∧ q) is not a DNF (because two minterms are the
same).
p ∧ (q ∨ r) is not a minterm (because it involes the symbol ∨).
((p ∧ q) ∨ r) ∧ ((p ∧ q) ∨ q) is not a DNF, one reason being that the
minterms (p ∧ q) ∨ r and (p ∧ q) ∨ q involve the symbol ∨.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 30 / 34
Examples
x1 ∧ x2 ∧ x3 is a minterm on variables x1 , x2 , x3 .
(x1 ∧ x2 ∧ x3 ) ∨ (x1 ∧ x2 ∧ x3 ) is a DNF.
(p ∧ q) ∨ (p ∧ q) is in disjunctive normal form on variables p, q.
(p ∧ q) ∨ (p ∧ q) ∨ (p ∧ q) is not a DNF (because two minterms are the
same).
p ∧ (q ∨ r) is not a minterm (because it involes the symbol ∨).
((p ∧ q) ∨ r) ∧ ((p ∧ q) ∨ q) is not a DNF, one reason being that the
minterms (p ∧ q) ∨ r and (p ∧ q) ∨ q involve the symbol ∨.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 30 / 34
Examples
x1 ∧ x2 ∧ x3 is a minterm on variables x1 , x2 , x3 .
(x1 ∧ x2 ∧ x3 ) ∨ (x1 ∧ x2 ∧ x3 ) is a DNF.
(p ∧ q) ∨ (p ∧ q) is in disjunctive normal form on variables p, q.
(p ∧ q) ∨ (p ∧ q) ∨ (p ∧ q) is not a DNF (because two minterms are the
same).
p ∧ (q ∨ r) is not a minterm (because it involes the symbol ∨).
((p ∧ q) ∨ r) ∧ ((p ∧ q) ∨ q) is not a DNF, one reason being that the
minterms (p ∧ q) ∨ r and (p ∧ q) ∨ q involve the symbol ∨.

In fact, we can construct DNF of any (compound) statement which is not a


contradiction. There are two main methods to do that. The first method by
logical equivalences and the second method through truth table. Below we will
demonstrate both of them.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 30 / 34
Method 1 (By Logical Equivalences)

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 31 / 34
Method 1 (By Logical Equivalences)

Proposition
x ⇔ (x ∧ y) ∨ (x ∧ y) for any statements x and y.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 31 / 34
Method 1 (By Logical Equivalences)

Proposition
x ⇔ (x ∧ y) ∨ (x ∧ y) for any statements x and y.

Proof
x ⇔ (x ∧ 1)

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 31 / 34
Method 1 (By Logical Equivalences)

Proposition
x ⇔ (x ∧ y) ∨ (x ∧ y) for any statements x and y.

Proof
x ⇔ (x ∧ 1) ⇔ (x ∧ (y ∨ y))

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 31 / 34
Method 1 (By Logical Equivalences)

Proposition
x ⇔ (x ∧ y) ∨ (x ∧ y) for any statements x and y.

Proof
x ⇔ (x ∧ 1) ⇔ (x ∧ (y ∨ y)) ⇔ (x ∧ y) ∨ (x ∧ y) □

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 31 / 34
Method 1 (By Logical Equivalences)

Proposition
x ⇔ (x ∧ y) ∨ (x ∧ y) for any statements x and y.

Proof
x ⇔ (x ∧ 1) ⇔ (x ∧ (y ∨ y)) ⇔ (x ∧ y) ∨ (x ∧ y) □

This proposition is simple but important in finding DNF.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 31 / 34
Method 1 (By Logical Equivalences)

Proposition
x ⇔ (x ∧ y) ∨ (x ∧ y) for any statements x and y.

Proof
x ⇔ (x ∧ 1) ⇔ (x ∧ (y ∨ y)) ⇔ (x ∧ y) ∨ (x ∧ y) □

This proposition is simple but important in finding DNF.

Example
Express p → (q ∧ r) in disjunctive normal form.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 31 / 34
Method 1 (By Logical Equivalences)

Proposition
x ⇔ (x ∧ y) ∨ (x ∧ y) for any statements x and y.

Proof
x ⇔ (x ∧ 1) ⇔ (x ∧ (y ∨ y)) ⇔ (x ∧ y) ∨ (x ∧ y) □

This proposition is simple but important in finding DNF.

Example
Express p → (q ∧ r) in disjunctive normal form.
Solution.
p → (q ∧ r) ⇔ p ∨ (q ∧ r)

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 31 / 34
Method 1 (By Logical Equivalences)

Proposition
x ⇔ (x ∧ y) ∨ (x ∧ y) for any statements x and y.

Proof
x ⇔ (x ∧ 1) ⇔ (x ∧ (y ∨ y)) ⇔ (x ∧ y) ∨ (x ∧ y) □

This proposition is simple but important in finding DNF.

Example
Express p → (q ∧ r) in disjunctive normal form.
Solution.
p → (q ∧ r) ⇔ p ∨ (q ∧ r) ⇔ ((p ∧ q) ∨ (p ∧ q)) ∨ (q ∧ r)

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 31 / 34
Method 1 (By Logical Equivalences)

Proposition
x ⇔ (x ∧ y) ∨ (x ∧ y) for any statements x and y.

Proof
x ⇔ (x ∧ 1) ⇔ (x ∧ (y ∨ y)) ⇔ (x ∧ y) ∨ (x ∧ y) □

This proposition is simple but important in finding DNF.

Example
Express p → (q ∧ r) in disjunctive normal form.
Solution.
p → (q ∧ r) ⇔ p ∨ (q ∧ r) ⇔ ((p ∧ q) ∨ (p ∧ q)) ∨ (q ∧ r)

⇔ (p ∧ q ∧ r) ∨ (p ∧ q ∧ r) ∨ (p ∧ q ∧ r) ∨ (p ∧ q ∧ r) ∨ (p ∧ q ∧ r) ∨ (p ∧ q ∧ r)

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 31 / 34
Method 1 (By Logical Equivalences)

Proposition
x ⇔ (x ∧ y) ∨ (x ∧ y) for any statements x and y.

Proof
x ⇔ (x ∧ 1) ⇔ (x ∧ (y ∨ y)) ⇔ (x ∧ y) ∨ (x ∧ y) □

This proposition is simple but important in finding DNF.

Example
Express p → (q ∧ r) in disjunctive normal form.
Solution.
p → (q ∧ r) ⇔ p ∨ (q ∧ r) ⇔ ((p ∧ q) ∨ (p ∧ q)) ∨ (q ∧ r)

⇔ (p ∧ q ∧ r) ∨ (p ∧ q ∧ r) ∨ (p ∧ q ∧ r) ∨ (p ∧ q ∧ r) ∨ (p ∧ q ∧ r) ∨ (p ∧ q ∧ r)
⇔ (p ∧ q ∧ r) ∨ (p ∧ q ∧ r) ∨ (p ∧ q ∧ r) ∨ (p ∧ q ∧ r) ∨ (p ∧ q ∧ r) □

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 31 / 34
Method 2 (By Truth Table)

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 32 / 34
Method 2 (By Truth Table)
Example
We construct a truth table for p → (q ∧ r)
p q r q∧r p → (q ∧ r)
T T T T T
T F T F F
F T T T T
F F T F T
T T F F F
T F F F F
F T F F T
F F F F T

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 32 / 34
Method 2 (By Truth Table)
Example
We construct a truth table for p → (q ∧ r)
p q r q∧r p → (q ∧ r)
T T T T T ←
T F T F F
F T T T T ←
F F T F T ←
T T F F F
T F F F F
F T F F T ←
F F F F T ←
Now focus on the rows for which the statement is true.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 32 / 34
Method 2 (By Truth Table)
Example
We construct a truth table for p → (q ∧ r)
p q r q∧r p → (q ∧ r)
T T T T T ←
T F T F F
F T T T T ←
F F T F T ←
T T F F F
T F F F F
F T F F T ←
F F F F T ←
Now focus on the rows for which the statement is true. Each of these will
contribute a minterm to our answer.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 32 / 34
Method 2 (By Truth Table)
Example
We construct a truth table for p → (q ∧ r)
p q r q∧r p → (q ∧ r)
T T T T T ←
T F T F F
F T T T T ←
F F T F T ←
T T F F F
T F F F F
F T F F T ←
F F F F T ←
Now focus on the rows for which the statement is true. Each of these will
contribute a minterm to our answer.

Row 1 gives the minterm p ∧ q ∧ r. Row 7 gives the minterm p ∧ q ∧ r.


Row 3 row gives the minterm p ∧ q ∧ r. Row 8 gives the minterm p ∧ q ∧ r.
Row 4 gives the minterm p ∧ q ∧ r.
Nurlan Ismailov nurlan.ismailov@astanait.edu.kz
Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 32 / 34
Then we join all the minterms with disjunction ∨ as follows

(p ∧ q ∧ r) ∨ (p ∧ q ∧ r) ∨ (p ∧ q ∧ r) ∨ (p ∧ q ∧ r) ∨ (p ∧ q ∧ r).

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 33 / 34
Then we join all the minterms with disjunction ∨ as follows

(p ∧ q ∧ r) ∨ (p ∧ q ∧ r) ∨ (p ∧ q ∧ r) ∨ (p ∧ q ∧ r) ∨ (p ∧ q ∧ r).

Observations:
We see that the obtained expression is a DNF on variables p, q and r.
We note that it is logically equivalent to p → (q ∧ r). (Why?)

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 33 / 34
Then we join all the minterms with disjunction ∨ as follows

(p ∧ q ∧ r) ∨ (p ∧ q ∧ r) ∨ (p ∧ q ∧ r) ∨ (p ∧ q ∧ r) ∨ (p ∧ q ∧ r).

Observations:
We see that the obtained expression is a DNF on variables p, q and r.
We note that it is logically equivalent to p → (q ∧ r). (Why?)
Hence,

(p ∧ q ∧ r) ∨ (p ∧ q ∧ r) ∨ (p ∧ q ∧ r) ∨ (p ∧ q ∧ r) ∨ (p ∧ q ∧ r)

is a DNF of p → (q ∧ r) □

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 33 / 34
Then we join all the minterms with disjunction ∨ as follows

(p ∧ q ∧ r) ∨ (p ∧ q ∧ r) ∨ (p ∧ q ∧ r) ∨ (p ∧ q ∧ r) ∨ (p ∧ q ∧ r).

Observations:
We see that the obtained expression is a DNF on variables p, q and r.
We note that it is logically equivalent to p → (q ∧ r). (Why?)
Hence,

(p ∧ q ∧ r) ∨ (p ∧ q ∧ r) ∨ (p ∧ q ∧ r) ∨ (p ∧ q ∧ r) ∨ (p ∧ q ∧ r)

is a DNF of p → (q ∧ r) □

We leave it to you to decide for yourself which method you prefer.

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 33 / 34
The End of Lecture 1

Nurlan Ismailov nurlan.ismailov@astanait.edu.kz


Discrete Mathematics
(Astana IT University)
Lecture 1- Logics 34 / 34

You might also like