Module 2

You might also like

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

DISCRETE STRUCTURES I

Module 2 | Logic
MODULE 2
I. Logic
A. Propositional Logic 1
B. Propositional Logic 2

I. LOGIC
- Science of necessary inference or study of
reasoning
- Identifies valid mathematical argument.
A. PROPOSITIONAL LOGIC 1
Statement is a declarative sentence that is true or false
but not both. NEGATION OF PROPOSITION
Negation of p is denoted by ¬𝑝, “It is not the case that
Proposition is a statement that can be either true or
p.”
false.
- Read as “not p”.
Proposition is a specific type of statement that can be - Value in truth table is the opposite of its truth
evaluated as true or false, a statement is a broader term value.
that includes various types of linguistic expressions, o Let p: I like Facebook.
including propositions. o ¬𝑝 = I don’t like Facebook.
Examples: - Truth Table

1. QC was once a capital of the Philippines. (P) p ¬𝑝


2. 12 / 4 = 3 (S) T F
3. Sqrt of 3 is an integer. (P) F T

PROPOSITIONAL LOGIC
- Area of logic that deals with propositions. LOGICAL CONNECTIVE: AND "⋀"
- Logic of compound statements built from It is true only when both propositions are true.
simpler statements using Boolean connectives.
- Called Conjunction.
APPLICATIONS OF PROPOSITIONAL LOGIC IN COMP. - Conjunction 𝑝 ⋀ 𝑞 is only true when both are
SCI. true.
o Let p: It is raining.
- Design of digital electronic circuits o Let q: It is warm.
- Expressing conditions in programs o 𝑝 ⋀ 𝑞 = It is raining, and it is warm.
- Queries to databases and search engines - Truth Table

COMPOUND PROPOSITION p q 𝑝⋀𝑞


- Combination of one or more propositions T T T
- Formed by using logical operators or T F F
connectives. F T F
F F F
p = “Cruise ships only go on big rivers.”

q = “Cruise ships go on Hudson.”


LOGICAL CONNECTIVE: OR “⋁"
r = “The Hudson is a big river.” It is true if one or both propositions are true.

¬𝑟 = the Hudson is not a big river - Called Disjunction.


o Let p: You may have cake.
𝑝 ⋀ q = “Cruise ships only go on big rivers and go on the o Let q: You may have ice cream.
Hudson.” o 𝑝 ⋁ 𝑞 You may have cake, or you may
have ice cream.
𝑝 ⋀ q -> r = “If cruise ships only go on big rivers and go on
- Truth Table
the Hudson, then the Hudson is a big river.”
p q 𝑝 ⋁𝑞
T T T
T F T
F T T
F F F
DISCRETE STRUCTURES I
Module 2 | Logic
Exclusive OR: two propositions is true when exactly one Major Connective is the dominant statement. It is
of the propositions is true and the other one is false, shown using parenthesis.

- True and True is False B. PROPOSITIONAL LOGIC 2


- False and False is False
- False and True, Vice-Versa is True
TAUTOLOGY
LOGICAL CONNECTIVE: IMPLICATION “->” - Statement that is always true.
Is the proposition that is false when p is true, and q is - Symbol is “t”.
false, and true otherwise.
p q pvq
- “IF THEN” T T T
- P is the hypothesis, premise. T F T
- Q is the conclusion.

General Statement: if p the q CONTRADICTION


Converse: if q then p - Statement is always false.
- Symbol is “c”.
Inverse: if not p then not q
p q p^q
Contrapositive: if not q then not p F T F
F T F
- Truth Table

p q 𝑝→𝑞 CONTINGENCY
T T T - Statement is neither a tautology nor
T F F contradiction.
F T T
F F T p q p^q
T T T
F T F
LOGICAL CONNECTIVE: BICONDITIONAL “<->”
Proposition that is true when p and q have the same
truth values, otherwise it is false.

- “IF AND ONLY IF”


- Truth Table

p q 𝑝→𝑞
T T T
T F F
F T F
F F T

HIERARCHY OF LOGICAL OPERATORS


Precedence of Logical Ops and Major Connectives

You might also like