0% found this document useful (0 votes)
113 views24 pages

Discrete Math Module 1 Propositional Logic

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 24

Module 1

Propositional
Logic
1. Propositional Logic
Connectives
2. Translation of Propositional
Statements
3. Operations on propositions
4. Precedence
5. Construction of Truth Table
Logic
 Study of reasoning
 Focuses on the relationship among
statement as opposed to the
content of any particular
statement.
 Any statement that is either true or
false.
Propositions
statement that is either true or
false but not both.
A declarative statement
Propositions
 Manila is NCR.
 A giraffe is a herbivore.
 1+1=2.
 2+2=3.
 What time is it?
 Read carefully.
 X+1=2
 X+Y=5.
Definition of Terms
Truth value
The truth or falsity of a
statement.
T/F denotes true propositions
and latter denotes false
propositions.
Decision for accepting or
rejecting a statement.
Definition of Terms
Truth table
 Displaysthe relationships between the
truth values of propositions.
Definition of Terms
letters
 Used to denote propositional variables or
also known as statement variables
 Used to present propositions
 Lower case letters as a singular
propositions
 Upper case letters are used to name
compound Propositions
Definition of Terms
Operations on statement
 Statement that can be classified as either
simple or compound.

Compound propositions
 New propositions formed from existing propositions
using logical operators (connectives).

Connectives
 Used to form new propositions.
Operations on Propositions
(Connectives)
Negation of p
 Denoted by ~p/¬p/p’
 Uses “not operator”
MEANS:
Truth Table
 This is not the case that p
 Not p p ~p

T F
Example: F T
1. All reptiles are snakes.
2. All men are boys.
3. Today is Tuesday.
Operations on Propositions
(Connectives)
Conjunction of p and q
 Denoted by Λ
 Uses “and” operator
MEANS
 “and”, “but”
Truth Table
 p and q must be both
true otherwise false p q pΛq
Examples:
T T T
1. Today is Monday and
raining. T F T
2. I am unlucky but still F T F
happy.
F F F
Operations on Propositions
(Connectives)
Disjunction of p and q
 Denoted by V
 Uses “or” operator
 p or q must be both
Truth Table
true otherwise false
 An inclusive
p q pVq
disjunction T T T

Examples: T F T
F T T
1. True or false is your
choice. F F F
Operations on Propositions
(Connectives)
Disjunction of p and q
 Denoted by V
 Uses “or” operator
 p or q must be both
Truth Table
true otherwise false
 An inclusive
p q pVq
disjunction T T T

Examples: T F T
F T T
1. True or false is your
choice. F F F
Operations on Propositions
(Connectives)
2 types of disjunction
 Inclusive Disjunction -denoted by pVq
Operations on Propositions
(Connectives)
2 types of disjunction
 Exclusive Disjunction - also
read as p or q (but not
both), or“either p or q”
Truth Table
 True if exactly one
proposition is true otherwise p q p+q
false. T T F
pVq= (pVq) Λ ~(p Λq) T F T
Unless indicated, a disjunction F T T
is to be used in inclusive sense. F F F
Operations on Propositions
(Connectives)
Conditional propositions
 Implication (p→q)
 p is the hypothesis and q is the EXAMPLE:
conclusion
MEANS
If you graduate with flying colors,
 p implies q then you will get a good paying
 p then q job.
 If p ,q
 p only if q
Truth Table
 p is sufficient for q
 q if p
 q whenever p
p q p→q
 q is necessary for p T T T
 q when p
 A necessary condition for p is q T F F
 q unless not p
 A sufficient condition of q is p
F T T
 q follows from p F F T
Variants of the conditional
 Converse q→p
 Inverse ~p → ~q
 Contrapositive ~q→ ~p

 Example: If you graduate with flying


colors, then you will get a good paying
job.
Operations on Propositions
(Connectives)
biconditional  If you
graduate
 Denoted by p↔q with flying
colors, then
 p if any only if q you will get
a good
 p is sufficient and paying job.
necessary for q p q p↔q
 If p then q and T T T
conversely T F F
F T F
F F T
Precedence of Logical
Operators

 We also use operator precedence


grouping symbols, negation 1
which is performed Disjunction/ 2
in this manner: conjunction 3
parenthesis ( ), Conditional 4
followed by Biconditional 5

brackets [ ], and the


outermost braces { }
Precedence of Logical
Operators
 Let’s solve this

 pv {[¬p∧(p∨q)]→q }
LOGIC AND BIT OPERATIONS
 Bithas 2 values 1 and 0
 Corresponds to logical connectives
 Find the bitwise or, and, xor of bitstrings
101011 0110 & 110001 1101.
Logical equivalence
2 different compound propositions have
the same truth values their constituent
propositions have such propositions are
said to be logically equivalent.
Types of propositions
 Tautology- compound propositions that
are always true no matter what the truth
values of propositions occurs in it.
 Contradiction- no matter what the truth
values of propositions the compound
propositions is always true.
 Contigency- propositions that is neither a
tautology nor a contradiction
Laws on Equivalence
 Transposition
𝑝 → 𝑞 ≡ ~𝑞 → ~𝑝
 Material implication
𝑝 → 𝑞 ≡ ~𝑝𝑉𝑞
 De Morgan’s laws
~ 𝑝Λ𝑞 ≡ ~𝑝𝑉~𝑞
~ 𝑝𝑉𝑞 ≡ ~𝑝Λ~𝑞
 Double negation
~ ~𝑝 ≡ 𝑝
 Double negation
~ ~𝑝 ≡ 𝑝
 Commutativity
𝑝Λ𝑞 ≡ 𝑞Λ𝑝
𝑝𝑉𝑞 ≡ 𝑞𝑉𝑝
Laws on Equivalence
 associativity
𝑝Λ𝑞 Λ𝑟 ≡ 𝑝Λ(𝑞Λ𝑟)
𝑝𝑉𝑞 𝑉𝑟 ≡ 𝑝𝑉(𝑞𝑉𝑟)
 distributivity
𝑝Λ(𝑞𝑉𝑟) ≡ 𝑝Λ 𝑉(𝑝Λ𝑟)
𝑝𝑉(𝑞Λ𝑟) ≡ (𝑝𝑉𝑞)Λ(𝑝𝑉𝑟)
 dominationlaws
𝑝𝑉𝑇 ≡ 𝑇
𝑝Λ𝐹 ≡ p
 Idempotent laws
𝑝𝑉𝑝 ≡ 𝑝
𝑝Λ𝑝 ≡ p
 Identity laws
𝑝𝑉𝐹 ≡ 𝑝
𝑝Λ𝑇 ≡ p

You might also like