0% found this document useful (0 votes)
7 views

Lecture-2

The document covers applications of propositional logic, including translating English sentences into logical expressions and the importance of consistent system specifications in hardware and software engineering. It discusses the concepts of tautology, contradiction, and contingency, along with logical equivalences and De Morgan's laws. Additionally, it highlights the role of propositional logic in designing logic circuits and the basic components involved.

Uploaded by

dudepsycho321
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)
7 views

Lecture-2

The document covers applications of propositional logic, including translating English sentences into logical expressions and the importance of consistent system specifications in hardware and software engineering. It discusses the concepts of tautology, contradiction, and contingency, along with logical equivalences and De Morgan's laws. Additionally, it highlights the role of propositional logic in designing logic circuits and the basic components involved.

Uploaded by

dudepsycho321
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/ 19

Discrete Mathematics

Lecture - 2

Syeda Tamanna Alam Monisha


Lecturer, CSE, Leading University
E-mail: [email protected]
Discrete
Mathematics
and Its
Applications by
Rosen
7th Edition
1.2 APPLICATIONS OF
PROPOSITIONAL
LOGIC
Translating English Sentences
“ You can access the Internet from campus if you are a computer
science major or you are not a freshman.”

Step-1: Identify atomic propositions and represent using propositional variables.


p : “You can access the Internet from campus .”
q : “You are a computer science major.”
r : “You are not a freshman.”
Step-2: Determine appropriate logical connectives
Logical expression : = ( q ∨ ¬ r) → p
Translating English Sentences
“ You cannot ride the roller coaster if you are under 4 feet tall unless
you are older than 16 years old.”

Step-1: Identify atomic propositions and represent using propositional variables.


p : “You can ride the roller coaster.”
q : “You are under 4 feet tall.”
r : “You are older than 16 years old.”
Step-2: Determine appropriate logical connectives
Logical expression : = ( q ∧ ¬ r) → ¬ p
System Specifications
• Translating sentences in natural language (such as English) into logical
expressions is an essential part of specifying both hardware and
software systems.
• System and software engineers take requirements in natural language
and produce precise and unambiguous specifications that can be used
as the basis for system development.
System Specifications
Consistent System Specifications
• Definition: A list of propositions is consistent if it is possible to assign
truth values to the proposition variables so that each proposition is true.

Example: Determine whether these system specifications are consistent:


• “The diagnostic message is stored in the buffer or it is retransmitted.”
• “The diagnostic message is not stored in the buffer.”
• “If the diagnostic message is stored in the buffer, then it is retransmitted.”
Solution: Let p denote “The diagnostic message is stored in the buffer” and let q
denote “The diagnostic message is retransmitted”. The specifications can then be
written as: p ∨ q, ¬ p and p → q.

When p is false and q is true all three statements are true. So the specification
is true.
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.

• Complicated digital circuits can be constructed from three basic circuits,


called gates. They are the inverter, or NOT gate, the OR gate and the
AND gate.
Logic Circuits
Logic Circuits
Discrete
Mathematics
and Its
Applications by
Rosen
7th Edition
1.3 PROPOSITIONAL
EQUIVALENCES
Tautology, Contradiction & Contingency
• Tautology
A compound proposition that is always true, no matter what the truth
values of the propositions are.

• Contradiction
A compound proposition that is always false.

• Contingency
A compound proposition that is neither a tautology nor a contradiction.
Tautology, Contradiction & Contingency
• Example of a tautology and a contradiction

p ¬p p ∨ ¬p p ∧ ¬p

T F T F

F T T F
Logical Equivalences
• Compound propositions that have the same truth values in all possible
cases are called logically equivalent.
• The compound propositions p and q are called logically equivalent if
p ↔ q is a tautology.
• The notation p ≡ q denotes that p and q are logically equivalent.
Logical Equivalences
Key Logical Equivalences
Using De Morgan’s Laws
• The two logical equivalences known as De Morgan’s laws are particularly
important.
• They tell us how to negate conjunctions and how to negate disjunctions.
Using De Morgan’s Laws
• Example: Use De Morgan’s laws to express the negations of :
“Miguel has a cellphone and he has a laptop computer”

Let p be “Miguel has a cellphone” and q be “Miguel has a laptop computer.” Then
“Miguel has a cellphone and he has a laptop computer” can be written as p ∧ q.
Using De Morgan’s law, ¬ (p ∧ q) ≡ (¬ p ∨ ¬ q)

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


“Miguel does not have a cellphone or he does not have a laptop
computer.”
Equivalence Proofs

You might also like