0% found this document useful (0 votes)
18 views72 pages

Chapter-2 Foundation Logic

Uploaded by

jisoowifu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views72 pages

Chapter-2 Foundation Logic

Uploaded by

jisoowifu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 72

EMATH 1105

DISCRETE MATHEMATICS I for SE

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


THE FOUNDATIONS

Logic
Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department
LOGIC
❖Proposition – basic building blocks of logic
– a declarative sentence that is either TRUE or FALSE, but not both.

❖Example:
1. Manila is the capital of the Philippines.
2. Toronto is the capital of Canada.
3. 1 + 1 = 2.
4. 2 + 2 = 3.

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


LOGIC
Example: Consider the following sentences.

1. What time is it?


2. Read this carefully.
3. 𝑥 + 1 = 2.
4. 𝑥 + 𝑦 = 𝑧.

❖ Sentences 1 and 2 are not propositions because they are not declarative sentences.

❖ Sentences 3 and 4 are not propositions because they are neither true nor false.

❖ Note that each of sentences 3 and 4 can be turned into a proposition if we assign values to the
variables.

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


LOGIC
❖Letters are used to denote propositional variables (or statement variables), that
is, variables that represent propositions, just as letters are used to denote
numerical variables.

p, q, r, s - conventional letters used for propositional variables

❖The truth value of a proposition is TRUE, denoted by T, if it is a true


proposition.

❖The truth value of a proposition is FALSE, denoted by F, if it is a false


proposition.

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


LOGIC: SAMPLE PROBLEM

Which of these sentences are propositions? What are the truth values of those that are propositions?

a) Manila is the capital of the Philippines. T

b) Osaka is the capital of Japan. F

c) 2 + 3 = 5. T

d) 5 + 7 = 10. F

e) x + 2 = 11. Not a Proposition

f) Answer this question. Not a Proposition


Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department
LOGIC
❖The area of logic that deals with propositions is called the
propositional calculus or propositional logic. It was first
developed systematically by the Greek philosopher Aristotle more than
2300 years ago.

❖New propositions, called compound propositions, are formed from


existing propositions using logical operators or connectives.

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


LOGICAL OPERATORS
Operators or connectives are used to create a
compound proposition from two or more propositions.

1. Negation (denote  or !)
2. “And” or logical conjunction (denoted )
3. “Or” or logical disjunction (denoted )
4. “XOR” or exclusive or (denoted )
5. Conditional/Implication (denoted  or →)
6. Biconditional (denoted  or )

We define the meaning (semantics) of the logical


operators using truth tables.

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


LOGICAL OPERATORS
NEGATION
Definition. Let 𝒑 be a proposition. The negation of 𝒑, denoted by ¬𝒑
(also denoted by 𝒑 ഥ ), is the statement

“It is not the case that 𝒑.”

The proposition ¬𝒑 is read “not p”. The truth value of the


negation of 𝒑, ¬𝒑, is the opposite of the truth value of 𝒑.

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


LOGICAL OPERATORS

Example: Find the negation of the proposition and express this in simple English.

1. “Michael’s PC runs Linux.”


Negation➔ “Michael’s PC does not run Linux”

2. “Julienne’s smartphone has at least 32GB of memory.”


Negation ➔ “Julienne’s smartphone does not have at least 32GB of memory”

➔ “Julienne’s smartphone has less than 32GB of memory”

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


LOGICAL OPERATORS
EXERCISES: What is the negation of each propositions?

1. Leo has a girlfriend.


Ans: Leo does not have a girlfriend.
2. There is no pollution in Iloilo.
Ans: There is pollution in Iloilo.
3. 2+1=3
Ans: 2 + 1 ≠ 3
4. The summer in Boracay is hot and sunny.
Ans: The summer in Boracay is not hot and it is not sunny.

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


LOGICAL OPERATORS
TRUTH TABLE FOR
CONJUNCTION THE CONJUNCTION
OF TWO
Definition. Let 𝑝 and 𝑞 be propositions. PROPOSITIONS
The 𝑐𝑜𝑛𝑗𝑢𝑛𝑐𝑡𝑖𝑜𝑛 𝑜𝑓 𝑝 and 𝑞,
𝒑 𝒒 𝒑 ∧ 𝒒
denoted by 𝑝 ∧ 𝑞, is the proposition
"𝑝 𝑎𝑛𝑑 𝑞". The 𝑐𝑜𝑛𝑗𝑢𝑛𝑐𝑡𝑖𝑜𝑛 𝑝 ∧ T T T
𝑞 is true when both 𝑝 and 𝑞 are
T F F
true and is false otherwise.
F T F
F F F
Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department
LOGICAL OPERATORS: Conjunction

Construct a truth table for each conjunction below:


1. 𝑥 ∧ 𝑦
2. ~𝑥 ∧ 𝑦
3. ~𝑦 ∧ 𝑥

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


LOGICAL OPERATORS: Conjunction

1. 𝑥 ∧ 𝑦 1. 𝑥 ∧ 𝑦
𝒙 𝒚 𝒙 ∧𝒚 𝒙 𝒚 𝒙 ∧𝒚

T T T T T

T F T F F

F T F T F

F F F F F
Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department
LOGICAL OPERATORS: Conjunction

2. ~𝑥 ∧ 𝑦 2. ~𝑥 ∧ 𝑦
𝒙 𝒚 ~𝒙 ~𝒙 ∧ 𝒚 𝒙 𝒚 ~𝒙 ~𝒙 ∧ 𝒚

T T T T F F

T F T F F F

F T F T T T

F F F F T F
Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department
LOGICAL OPERATORS: Conjunction

3. ~𝑦 ∧ 𝑥 3. ~𝑦 ∧ 𝑥
𝒙 𝒚 ~𝒚 ~𝒚 ∧ 𝒙 𝒙 𝒚 ~𝒚 ~𝒚 ∧ 𝒙

T T T T F F

T F T F T T

F T F T F F

F F F F T F
Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department
LOGICAL OPERATORS
DISJUNCTION TRUTH TABLE FOR
THE DISJUNCTION OF
Definition. Let 𝑝and 𝑞 be propositions. TWO PROPOSITIONS
The 𝑑𝑖𝑠𝑗𝑢𝑛𝑐𝑡𝑖𝑜𝑛 𝑜𝑓 𝑝 and 𝑞,
denoted by 𝑝 ∨ 𝑞, is the proposition
𝒑 𝒒 𝒑∨𝒒
"𝑝 𝑜𝑟 𝑞". The T T T
𝑑𝑖𝑠𝑗𝑢𝑛𝑐𝑡𝑖𝑜𝑛 𝑝 ∨ 𝑞 is false when
both 𝑝 and 𝑞 are false and is true T F T
otherwise. F T T
F F F
Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department
LOGICAL OPERATORS: Disjunction

Construct a truth table for each disjunction below:


1. 𝑎 ∨ 𝑏
2. 𝑎 ∨ ~𝑏
3. ~𝑎 ∨ 𝑏

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


LOGICAL OPERATORS: Disjunction

1. 𝑎 ∨ 𝑏 2. 𝑎 ∨ ~𝑏
𝒂 𝒃 𝒂∨𝒃 𝒂 𝒃 ~𝒃 𝒂 ∨ ~𝒃

T T T T

T F T F

F T F T

F F F F
Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department
LOGICAL OPERATORS: Disjunction

3. ~𝑎 ∨ 𝑏
𝒂 𝒃 ~𝒂 ~𝒂 ∨ 𝒃

T T

T F

F T

F F
Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department
LOGICAL OPERATORS
EXCLUSIVE OR TRUTH TABLE FOR
THE EXCLUSIVE OR
Definition. Let 𝑝and 𝑞 be propositions. OF TWO
PROPOSITIONS
The 𝑒𝑥𝑐𝑙𝑢𝑠𝑖𝑣𝑒 𝑜𝑟 of 𝑝 and 𝑞,
denoted by "𝑝 ⊕ 𝑞", is the 𝒑 𝒒 𝒑⊕𝒒
proposition that is true when exactly
T T F
one of 𝑝 and 𝑞 is true and is false
otherwise. T F T
F T T
F F F
Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department
LOGICAL OPERATORS: XOR

Example
1. The circuit is either ON or OFF but not both
2. Let ab < 0, then either a < 0 or b < 0 but not both
3. You may have cake or ice cream, but not both

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


LOGICAL OPERATORS
CONDITIONAL STATEMENT TRUTH TABLE FOR
Definition. Let 𝑝and 𝑞 be propositions. THE CONDITIONAL
STATEMENT
The 𝑐𝑜𝑛𝑑𝑖𝑡𝑖𝑜𝑛𝑎𝑙 𝑠𝑡𝑎𝑡𝑒𝑚𝑒𝑛𝑡,
denoted by "𝑝 → 𝑞", is the 𝒑 𝒒 𝒑→𝒒
proposition “ if 𝑝, then 𝑞.” The T T T
conditional statement 𝑝 → 𝑞 is false
when 𝑝 is true and 𝑞 is false, and T F F
true otherwise. F T T
F F T

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


LOGICAL OPERATORS: CONDITIONAL STATEMENT

PRACTICE:
Let 𝑝 be the statement “Maria learns discrete mathematics” and 𝑞 the statement “Maria
will find a good job”. Express the statement 𝑝 → 𝑞 as a statement in English.

Answers:
“If Maria learns discrete mathematics, then she will find a good job.”
“Maria will find a good job when she learns discrete mathematics.”
“For Maria to get a good job, it is sufficient for her to learn discrete mathematics.
“Maria will find a good job unless she does not learn discrete mathematics.”

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


LOGICAL OPERATORS: CONDITIONAL STATEMENT
❖The if-then construction used in many programming languages is different
from that used in logic.

❖Most programming languages contain statements such as if p then S, where p


is a proposition and S is a program segment (one or more statements to be
executed).

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


LOGICAL OPERATORS: CONDITIONAL STATEMENT
The implication of 𝑝 → 𝑞 can be also read as:
▪ If p then q
▪ p implies q
▪ If p, q
▪ p only if q
▪ q if p
▪ q when p
▪ q whenever p
▪ q follows from p
▪ p is a sufficient condition for q (p is sufficient for q)
▪ q is a necessary condition for p (q is necessary for p)
Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department
LOGICAL OPERATORS: CONDITIONAL STATEMENT

Exercise: Which of the following conditional statement is true?

1. If -1 is a positive number, then 2 + 2 = 5.


True. The premise is obviously false, thus no matter what the conclusion is, the
implication holds.

2. If -1 is a positive number, then 2+2=4


True. Same as above.

3. If sin x = 0, then x = 0.
False. x can be a multiple of . If we let x=2, then sin x=0 but x 0. The implication “if
sin x = 0, then x = k, for some k” is true.

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


LOGICAL OPERATORS
BICONDITIONAL STATEMENT TRUTH TABLE FOR THE
Definition. Let 𝑝and 𝑞 be propositions. BICONDITIONAL
STATEMENT
The 𝑏𝑖𝑐𝑜𝑛𝑑𝑖𝑡𝑖𝑜𝑛𝑎𝑙 𝑠𝑡𝑎𝑡𝑒𝑚𝑒𝑛𝑡,
denoted by "𝑝 𝑞", is the 𝒑 𝒒 𝒑 𝒒
proposition “ 𝑝, if and only if 𝑞.” The T T T
conditional statement 𝑝 𝑞 is true
when 𝑝 and 𝑞 have the same truth T F F
values, and is false otherwise. F T F
F F T

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department
LOGICAL OPERATORS: BICONDITIONAL STATEMENT

EXAMPLE:
LET 𝑝 BE THE STATEMENT “YOU CAN TAKE
THE FLIGHT,” AND LET 𝑞 BE THE STATEMENT
“YOU BUY A TICKET.” THEN 𝑝 𝑞
Answer:
“You can take the flight if and only if you buy a
ticket.”

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


LOGICAL OPERATORS: BICONDITIONAL STATEMENT
EXERCISE: WHICH OF THE FOLLOWING BICONDITIONALS IS TRUE?

1. 𝑥2 + 𝑦2 = 0 IF AND ONLY IF 𝑥 = 0 𝑎𝑛𝑑 𝑦 = 0.


True. Both implications holds true.

2. X 2  0 IF AND ONLY IF X  0.
False. The implication “if x2  0 then x  0” is false. Consider x=-1.
The hypothesis (-1)2=1  0 but the conclusion fails.

3. 2 + 2 = 4 IF AND ONLY IF 2 < 2


True. Both implications holds true.

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


LOGICAL OPERATORS: TRUTH TABLE
REVIEW: COMPLETE THE TRUTH TABLE.

𝒑 𝒒 𝒑  𝒒 𝒑𝒒 𝒑𝒒 𝒑𝒒 𝒑𝒒


F F
F T
T F
T T

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


INVERSE, CONVERSE, CONTRAPOSITIVE

The inverse is formed by negating the hypothesis and negating


the conclusion

Example:
𝑝 → 𝑞: If you have a Sprite, then you have a root beer.

¬𝑝 → ¬𝑞: If you do not have Sprite, then you do not have a


root beer.

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


INVERSE, CONVERSE, CONTRAPOSITIVE
The converse is formed by interchanging the hypothesis and the
conclusion.

Example:
𝑝 → 𝑞: If it rains, then the ground gets wet.
𝑞 → 𝑝: If the ground gets wet, then it rained.

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


INVERSE, CONVERSE, CONTRAPOSITIVE
The contrapositive is formed by negating both the hypothesis and
the conclusion, and then interchanging the resulting negations.

Example:
𝑝 → 𝑞: If 15 is an odd number, then15 is a prime number.
¬𝑞 → ¬𝑝: If 15 is not a prime number, then 15 is not an odd
number.

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


INVERSE, CONVERSE, CONTRAPOSITIVE

❖ The proposition ¬𝒑 → ¬𝒒 is called the inverse of 𝑝 → 𝑞.

❖ The proposition 𝒒 → 𝒑 is called the converse of 𝑝 → 𝑞.

❖ The proposition ¬𝒒 → ¬𝒑 is called the contrapositive of 𝑝 → 𝑞.

Note: Of these three conditional statements formed from 𝑝 → 𝑞, only the contrapositive always
has the same truth value as 𝑝 → 𝑞.

When two compound propositions always have the same truth value we call them equivalent,
so that a conditional statement and its contrapositive are equivalent.

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


INVERSE, CONVERSE, CONTRAPOSITIVE
SAMPLE PROBLEMS.

Find the converse, inverse and the contrapositive of the implication:

“If today is Friday, then I have a test today.”

Converse:
“If I have a test today, then today is Friday.”

Inverse:
“If today isn’t Friday, then I don’t have a test today.”

Contrapositive:
“If I don’t have a test today, then today isn’t Friday.”

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


INVERSE, CONVERSE, CONTRAPOSITIVE

SAMPLE PROBLEMS.

Find the converse, inverse and the contrapositive of the implication:

“The home team wins whenever it is raining.”

Converse:
“If the home team wins, then it is raining.”

Inverse:
“If it is not raining, then the home team does not win.”

Contrapositive:
“If the home team does not win, then it is not raining.”

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


PROPOSITIONAL LOGIC

Truth Tables of Compound Propositions

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


PROPOSITIONAL LOGIC
Precedence of Logical Operators
Logic and Bit Operations

❖ A bit is a symbol with two possible values, namely, 0 (zero) and 1 (one).
❖ The well-known statistician John Tukey introduced this terminology in 1946.
❖ 1 represents T (true), 0 represents F (false).
❖ A variable is called a Boolean variable if its value is either true or false.
❖ Consequently, a Boolean variable can be represented using a bit.

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


PROPOSITIONAL LOGIC
EXERCISE:
Construct a truth table for each of these compound
propositions.

a) (p∨q)→(p⊕q)

b) (p⊕q)→(p∧q)

c) (p∨q)⊕(p∧q)

d) (p q)⊕(¬p q)

e) (p q)⊕(¬p ¬r)

f) (p⊕q)→(p⊕¬q)

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


PROPOSITIONAL LOGIC

ANSWER TO EXERCISE:
For questions a, b, c, d and f

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


PROPOSITIONAL LOGIC

ANSWER TO EXERCISE:
For question e,

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


PROPOSITIONAL LOGIC

Truth table for the bit operators OR, AND, XOR.

❖ Information is often represented using bit strings, which are lists of zeros
and ones.
❖ When this is done, operations on the bit strings can be used to manipulate
this information.

Definition: A bit string is a sequence of zero or more bits. The length of this string is the number of
bits in the string.

Example: 101010011 is a bit string of length nine.


Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department
PROPOSITIONAL LOGIC
❖ We define the bitwise OR, bitwise AND, and bitwise XOR of two strings of the same length to be the
strings that have as their bits the OR, AND, and XOR of the corresponding bits in the two strings,
respectively.

❖ We use the symbols ∨, ∧, and ⊕ to represent the bitwise OR, bitwise AND, and bitwise XOR
operations, respectively.

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


PROPOSITIONAL LOGIC
PRACTICE:

Find the bitwise OR, bitwise AND, and bitwise XOR of each of these pairs of bit strings.

a) 101 1110, 010 0001


b) 1111 0000, 1010 1010
c) 00 0111 0001, 10 0100 1000
d) 11 1111 1111, 00 0000 0000

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


APPLICATIONS OF PROPOSITIONAL LOGIC
Logic has many important applications to mathematics, computer science, and
numerous other disciplines.

Logic is used in the specification of software and hardware, because these


specifications need to be precise before development begins.

Propositional logic and its rules can be used to design computer circuits, to
construct computer programs, to verify the correctness of programs, and to build
expert systems.

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


APPLICATIONS OF
PROPOSITIONAL LOGIC

❖ System specifications should be consistent, that is, they should not contain
conflicting requirements that could be used to derive a contradiction.

❖ When specifications are not consistent, there would be no way to develop


a system that satisfies all specifications.

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


APPLICATIONS OF
PROPOSITIONAL LOGIC

LOGIC PUZZLES
❖ Puzzles that can be solved using logical reasoning.
❖ Solving logic puzzles is an excellent way to practice working with the rules of
logic. Also, computer programs designed to carry out logical reasoning often use
well- known logic puzzles to illustrate their capabilities.

LOGIC CIRCUITS
❖ Propositional logic can be applied to the design of computer hardware.
❖ A logic circuit (or digital circuit) receives input signals p1,p2,...,pn, each a bit
[either 0 (off) or 1 (on)], and produces output signals s1,s2,...,sn, each a bit.

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


APPLICATIONS OF
PROPOSITIONAL LOGIC
LOGIC CIRCUITS

❖ The inverter, or NOT gate, takes an input bit p, and produces as output ¬𝑝.
❖ The OR gate takes two input signals p and q, each a bit, and produces as output
the signal 𝑝 ∨ 𝑞.
❖ The AND gate takes two input signals p and q , each a bit, and produces as
output the signal 𝑝 ∧ 𝑞.

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


APPLICATIONS OF
PROPOSITIONAL LOGIC
LOGIC CIRCUITS

❖ Complicated digital circuits can be constructed from three basic circuits, called
gates.

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


APPLICATIONS OF
PROPOSITIONAL LOGIC

Example:
A digital circuit that produces the output (𝑝 ∨ ¬𝑟) ∧ (¬𝑝 ∨ (𝑞 ∨ ¬𝑟)) when
given input bits p, q, and r.

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


LOGICAL EQUIVALENCES
➢ An important type of step used in a mathematical argument is the
replacement of a statement with another statement with the same truth
value.

➢ Because of this, methods that produce propositions with the same truth
value as a given compound proposition are used extensively in the
construction of mathematical arguments.

➢ Note that we will use the term “compound proposition” to refer to an


expression formed from propositional variables using logical operators, such
as p ∧ q.

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


LOGICAL EQUIVALENCES

Classification of compound propositions according to their possible truth values:

TAUTOLOGY – a compound proposition that is always true, no matter what


the truth values of the propositional variables that occur in it

CONTRADICTION – a compound proposition that is always false

CONTINGENCY – a compound proposition that is neither a tautology nor a


contradiction

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


LOGICAL EQUIVALENCES
Example of a Tautology and a Contradiction

Logical Equivalences:
➢ Compound propositions that have the same truth values in all possible cases are
called logically equivalent.

➢ One way to determine whether two compound propositions are equivalent is to use a
truth table.
Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department
LOGICAL EQUIVALENCES
➢ The compound propositions 𝑝 and 𝑞 are called logically equivalent if 𝑝 𝑞 is a
tautology.

➢ The notation 𝑝 ≡ 𝑞 denotes that 𝑝 and 𝑞 are logically equivalent

*Remark: The symbol ≡ is not a logical connective, and 𝑝 ≡ 𝑞 is not a compound proposition
but rather is the statement that 𝑝 𝑞 is a tautology. The symbol ⟺ is sometimes used
instead ≡ to denote logical equivalence.

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


LOGICAL EQUIVALENCES
➢ Example below illustrates this method to establish an extremely important and useful
logical equivalence, namely, that of ¬(𝑝 ∨ 𝑞) with ¬𝑝 ∧ ¬𝑞 .
➢ This logical equivalence is the De Morgan laws, named after the English
mathematician Augustus De Morgan, of the mid-nineteenth century.

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


LOGICAL EQUIVALENCES
Example: Show that ¬(𝑝 ∨ 𝑞) and (¬𝑝 ∧ ¬𝑞) are logically equivalent.

➢ Because the truth values of the compound propositions


¬(𝑝 ∨ 𝑞) and ¬𝑝 ∧ ¬𝑞 agree for all possible combinations of the
truth values of p and q, it follows that (𝑝 ∨ 𝑞) (¬𝑝 ∧ ¬𝑞) is a
tautology and that these compound propositions are logically
equivalent.

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


LOGICAL EQUIVALENCES
Exercise: Show that 𝑝 → 𝑞 and ¬𝑝 ∨ 𝑞 are logically equivalent.

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


LOGICAL EQUIVALENCES
Seatwork: Show that 𝑝 ∨ ( 𝑞 ∧ 𝑟) and( 𝑝 ∨ 𝑞 ) ∧ (𝑝 ∨ 𝑟) are logically
equivalent.

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


LOGICAL EQUIVALENCES

Logical Equivalences:

➢ Table shown contains


some important equivalences.

➢ In these equivalences,

T denotes the compound proposition


that is always true

F denotes the compound proposition


that is always false.

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


LOGICAL EQUIVALENCES
Logical Equivalences Involving Conditional
Statements

Logical Equivalences Involving Biconditional


Statements

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


LOGICAL EQUIVALENCES

Furthermore, note that De Morgan’s laws extend to

and

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


LOGICAL EQUIVALENCES
EXAMPLE :
Use De Morgan’s laws to express the negations of
“Von has a cellphone and he has a laptop computer”

Solution:
Let p: “Von has a cellphone”
q: “Von has a laptop computer.”

“Von has a cellphone and he has a laptop computer” → 𝑝 ∧ 𝑞

➢ By the first of De Morgan’s laws, ¬( 𝑝 ∧ 𝑞 ) is equivalent to


¬𝑝 ∨ ¬𝑞.

➢ Consequently, we can express the negation of our original statement as “Von does not have a
cellphone or he does not have a laptop computer.”

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


LOGICAL EQUIVALENCES
EXAMPLE :
Use De Morgan’s laws to express the negations of
“James will go to the concert or Wilfred will go to the concert.”

Solution:
Let r: “James will go to the concert.”
s: “Wilfred will go to the concert.”

“James will go to the concert or Wilfred will go to the concert”→ 𝑟 ∨ 𝑠.

➢ By the second of De Morgan’s laws, ¬ ( 𝑟 ∨ 𝑠) is equivalent to


¬𝑟 ∧ ¬𝑠.

➢ Consequently, we can express the negation of our original statement as:


“James will not go to the concert and Wilfred will not go to the concert.”

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


CONSTRUCTING NEW LOGICAL EQUIVALENCES
EXAMPLE : Show that ¬(𝑝 ∨ (¬ 𝑝 ∧ 𝑞)) and ¬𝑝 ∧ ¬𝑞 are logically
equivalent by developing a series of logical equivalences.

➢ We could use a truth table to show that these compound propositions are
equivalent. Indeed, it would not be hard to do so.

➢ However, we want to illustrate how to use logical identities that we already


know to establish new logical identities, something that is of practical importance
for establishing equivalences of compound propositions with a large number of
variables.

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


CONSTRUCTING NEW LOGICAL EQUIVALENCES
EXAMPLE : Show that ¬( 𝑝 ∨ (¬ 𝑝 ∧ 𝑞 )) and ¬𝑝 ∧ ¬𝑞 are logically equivalent
by developing a series of logical equivalences.

¬ 𝑝 ∨ ¬𝑝 ∧ 𝑞 ≡ ¬𝑝 ∧ ¬( ¬ 𝑝 ∧ 𝑞) by the second De Morgan law


≡ ¬𝑝 ∧ [¬(¬𝑝) ∨ ¬𝑞] by the first De Morgan law
≡ ¬𝑝 ∧ (𝑝 ∨ ¬𝑞) by the double negation law
≡ (¬𝑝 ∧ 𝑝) ∨ (¬𝑝 ∧ ¬𝑞) by the second distributive law
≡ 𝐹 ∨ (¬𝑝 ∧ ¬𝑞) because ¬𝑝 ∧ 𝑝 ≡ 𝐹
≡ (¬𝑝 ∧ ¬𝑞) ∨ 𝐹 by the commutative law for
disjunction
≡ ¬𝑝 ∧ ¬𝑞 by the identity law for F

Consequently, ¬(𝑝 ∨ (¬𝑝 ∧ 𝑞)) and ¬𝑝 ∧ ¬𝑞 are logically equivalent.

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


CONSTRUCTING NEW LOGICAL EQUIVALENCES
EXAMPLE : Show that ¬ ¬𝑝 ∧ 𝑞 ∧ (𝑝 ∨ 𝑞 ) ≡ 𝑝 are logically equivalent by
developing a series of logical equivalences.

¬ ¬𝑝 ∧ 𝑞 ∧ 𝑝 ∨ 𝑞 ≡ ¬ ¬𝑝 ∨ ¬𝑞 ∧ (𝑝 ∨ 𝑞) (De Morgan law)


≡ 𝑝 ∨ ¬𝑞 ∧ (𝑝 ∨ 𝑞) (Double negation)
≡ 𝑝 ∨ (¬𝑞 ∧ 𝑞) (Distributive)
≡ 𝑝 ∨ (𝑞 ∧ ¬𝑞) (Commutative)
≡𝑝∨𝐹 (Negation)
≡𝑝 by the identity law for F

Consequently,¬ ¬𝑝 ∧ 𝑞 ∧ (𝑝 ∨ 𝑞 ) ≡ 𝑝 are logically equivalent.

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


PROPOSITIONAL SATISFIABILITY
➢ A compound proposition is satisfiable if there is an assignment of truth values to its
variables that makes it true.

➢ When no such assignments exists, that is, when the compound proposition is false for
all assignments of truth values to its variables, the compound proposition is
unsatisfiable.

➢ Note that a compound proposition is unsatisfiable if and only if its negation is true
for all assignments of truth values to the variables, that is, if and only if its
negation is a tautology.

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


PROPOSITIONAL SATISFIABILITY
➢ When we find a particular assignment of truth values that makes a compound
proposition true, we have shown that it is satisfiable; such an assignment is called a
solution of this particular satisfiability problem.

➢ However, to show that a compound proposition is unsatisfiable, we need to show that


every assignment of truth values to its variables makes it false.

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


REFERENCE:
Rosen, K. H. (2012). Discrete Mathematics and Its
Applications, 8th Edition: McGrawHill

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department


END OF DISCUSSION

Prepared by: Engr. Alimo-ot & Engr. Sacramento, ECE Department

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy