SlideShare une entreprise Scribd logo
1  sur  102
Propositional Logic
Lecture 1, CMSC 56
Allyn Joy D. Calcaben
LOGIC
• the basis of all mathematical reasoning, and of all automated
reasoning.
• Rules of logic are used to distinguish between valid and
invalid mathematical arguments.
Propositions
• basic building blocks of logic
• A declarative sentence that is either true or false, but not
both.
Which are propositions?
Miagao is the capital of Iloilo Province.
Which are propositions?
Miagao is the capital of Iloilo Province.
Which are propositions?
Miagao is the capital of Iloilo Province.
What time is it?
Which are propositions?
Miagao is the capital of Iloilo Province.
What time is it?
Which are propositions?
Miagao is the capital of Iloilo Province.
What time is it?
2 + 5 = 9
Which are propositions?
Miagao is the capital of Iloilo Province.
What time is it?
2 + 5 = 9
Which are propositions?
Miagao is the capital of Iloilo Province.
What time is it?
2 + 5 = 9
x – 6 = 23
Which are propositions?
Miagao is the capital of Iloilo Province.
What time is it?
2 + 5 = 9
x – 6 = 23
Which are propositions?
Miagao is the capital of Iloilo Province.
What time is it? A + B – C = D
2 + 5 = 9
x – 6 = 23
Which are propositions?
Miagao is the capital of Iloilo Province.
What time is it? A + B – C = D
2 + 5 = 9
x – 6 = 23
Which are propositions?
Miagao is the capital of Iloilo Province.
What time is it? A + B – C = D
2 + 5 = 9 Read this carefully.
x – 6 = 23
Which are propositions?
Miagao is the capital of Iloilo Province.
What time is it? A + B – C = D
2 + 5 = 9 Read this carefully.
x – 6 = 23
Which are propositions?
Miagao is the capital of Iloilo Province.
What time is it? A + B – C = D
2 + 5 = 9 Read this carefully.
x – 6 = 23 Miami is the capital of Florida
Which are propositions?
Miagao is the capital of Iloilo Province.
What time is it? A + B – C = D
2 + 5 = 9 Read this carefully.
x – 6 = 23 Miami is the capital of Florida
How do we represent propositions?
• We use letters to denote propositional variables (or
statement variables), that is , variables that represent
propositions, just as letter are used to denote numerical
variables.
• It uses conventional letters such as p, q, r, s, . . . .
How do we represent propositions?
• We use letters to denote propositional variables (or
statement variables), that is , variables that represent
propositions, just as letter are used to denote numerical
variables.
• It uses conventional letters such as p, q, r, s, . . . .
• Truth values is denoted by T, if it’s a true proposition, and
denoted by F, if it’s a false proposition.
How do we represent propositions?
• Area of logic that deals with propositions
• First developed systematically by the Greek Philosopher
Aristotle more than 2300 years ago.
Propositional Calculus /
Propositional Logic
• New propositions formed from existing propositions using
logical operators.
Compound Propositions
Negation
Definition 1
Let p be a proposition. The negation of p, denoted by
¬p (also denoted by p ), is the statement
“It is not the case that p.”
The truth value of the negation of p, ¬p, is the opposite of
the truth value of p.
Propositions
Find the negation of the proposition
“Michelle’s PC runs Linux”
and express this in simple English.
Example
Negation:
“It is not the case that Michelle’s PC runs Linux.”
more simply expressed negation:
“Michelle’s PC does not run Linux.”
Solution
Find the negation of the proposition
“Vanessa’s smartphone has at least 32GB of memory.”
and express this in simple English.
Example
Negation:
“It is not the case that Vanessa’s smartphone has at least
32GB of memory.”
Solution
Negation:
“It is not the case that Vanessa’s smartphone has at least
32GB of memory.”
can also be expressed as:
“Vanessa’s smartphone does not have at least 32GB of
memory.”
Solution
Negation:
“It is not the case that Vanessa’s smartphone has at least
32GB of memory.”
can also be expressed as:
“Vanessa’s smartphone does not have at least 32GB of
memory.”
even more simply as:
“Vanessa’s smartphone has less than 32GB of memory.”
Solution
Truth Table for the negation of a proposition p.
Truth Table
p ¬p
T
F
Truth Table for the negation of a proposition p.
Truth Table
p ¬p
T F
F
Truth Table for the negation of a proposition p.
Truth Table
p ¬p
T F
F T
Conjunction
Definition 2
Let p and q be propositions. The conjunction of p and q,
denoted by p ∧ q, is the proposition
“p and q.”
The conjunction p ∧ q is true when both p and q are true and
is false otherwise.
Propositions
Find the conjunction of the propositions p and q where p is
the proposition:
“Rachel’s PC has more than 500 GB free hard disk space.”
and q is the proposition:
“The processor in Rachel’s PC runs faster than 2 GHz.”
Example
The conjunction of these propositions, p ∧ q, is the
proposition:
“Rachel’s PC has more than 500 GB free hard disk space, and
the processor is Rachel’s PC runs faster than 2 GHz.”
Solution
The conjunction of these propositions, p ∧ q, is the
proposition:
“Rachel’s PC has more than 500 GB free hard disk space, and
the processor is Rachel’s PC runs faster than 2 GHz.”
Solution
This conjunction can be expressed more simply as:
“Rachel’s PC has more than 500 GB free hard disk space, and
its processor runs faster than 2 GHz.”
Solution
• Note that in logic the word “but” sometimes is used instead
of “and” in a conjunction.
• Example:
“The sun is shining, but it is raining.”
“The sun is shining and it is raining.”
Note
Truth Table for the Conjunction of Two Propositions.
Truth Table
p q p ∧ q
T T
T F
F T
F F
Truth Table for the Conjunction of Two Propositions.
Truth Table
p q p ∧ q
T T T
T F
F T
F F
Truth Table for the Conjunction of Two Propositions.
Truth Table
p q p ∧ q
T T T
T F F
F T
F F
Truth Table for the Conjunction of Two Propositions.
Truth Table
p q p ∧ q
T T T
T F F
F T F
F F
Truth Table for the Conjunction of Two Propositions.
Truth Table
p q p ∧ q
T T T
T F F
F T F
F F F
Disjunction
Definition 3
Let p and q be propositions. The disjunction of p and q,
denoted by p V q, is the proposition
“p or q.”
The disjunction p V q is false when both p and q are false and
is true otherwise.
Propositions
Find the conjunction of the propositions p and q where p is
the proposition:
“Rachel’s PC has more than 500 GB free hard disk space.”
and q is the proposition:
“The processor in Rachel’s PC runs faster than 2 GHz.”
Example
The disjunction of p and q, p V q, is the proposition:
“Rachel’s PC has at least 500 GB free hard disk space, or the
processor in Rachel’s PC runs faster than 2 GHz.”
Solution
Truth Table for the Disjunction of Two Propositions.
Truth Table
p q p V q
T T
T F
F T
F F
Truth Table for the Disjunction of Two Propositions.
Truth Table
p q p V q
T T T
T F
F T
F F
Truth Table for the Disjunction of Two Propositions.
Truth Table
p q p V q
T T T
T F T
F T
F F
Truth Table for the Disjunction of Two Propositions.
Truth Table
p q p V q
T T T
T F T
F T T
F F
Truth Table for the Disjunction of Two Propositions.
Truth Table
p q p V q
T T T
T F T
F T T
F F F
Exclusive Or
Definition 4
Let p and q be propositions. The exclusive or of p and q,
denoted by p ⊕ q, is the proposition that is true when exactly
one of p and q is true and is false otherwise.
Propositions
Find the conjunction of the propositions p and q where p is
the proposition:
“Rachel’s PC has more than 500 GB free hard disk space.”
and q is the proposition:
“The processor in Rachel’s PC runs faster than 2 GHz.”
Example
The exclusive or of p and q, p ⊕ q, is the proposition:
“Rachel’s PC has at least 500 GB free hard disk space, or the
processor is Rachel’s PC runs faster than 2 GHz, but not
both.”
Solution
Truth Table for the Exclusive or of Two Propositions.
Truth Table
p q p ⊕ q
T T
T F
F T
F F
Truth Table for the Exclusive or of Two Propositions.
Truth Table
p q p ⊕ q
T T F
T F
F T
F F
Truth Table for the Exclusive or of Two Propositions.
Truth Table
p q p ⊕ q
T T F
T F T
F T
F F
Truth Table for the Exclusive or of Two Propositions.
Truth Table
p q p ⊕ q
T T F
T F T
F T T
F F
Truth Table for the Exclusive or of Two Propositions.
Truth Table
p q p ⊕ q
T T F
T F T
F T T
F F F
Conditional
Statements
Definition 5
Let p and q be propositions. The conditional statement p →
q, is the proposition “if p, then q.”
The conditional statement p → q is false when p is true and q
is false, and true otherwise.
In the conditional statement p → q, p is called the
hypothesis (or antecedent or premise) and q is called the
conclusion (or consequence).
Propositions
“if p, then q” “p implies q”
“if p, q” “p only if q”
“q if p” “q whenever p”
“q when p” “q is necessary for p”
“q follows from p” “p is sufficient for q”
“a necessary condition for p is q” “q unless ¬p”
“a sufficient condition for q is p”
p → q
“if p, then q” “p implies q”
“if p, q” “p only if q”
“q if p” “q whenever p”
“q when p” “q is necessary for p”
“q follows from p” “p is sufficient for q”
“a necessary condition for p is q” “q unless ¬p”
“a sufficient condition for q is p”
p → q
Let p be the statement:
“Joy learns discrete mathematics.”
and q the statement:
“Joy will find a good job.”
Express the statement p → q as a statement in English.
Example
p → q is:
“If Joy learns discrete mathematics,
then she will find a good job.”
Solution
Express the statement p → q as a statement in English.
Given p is the proposition:
“I am elected.”
and q is the proposition:
“I will lower taxes.”
using “if p, then q”.
Example
p → q is:
“If I am elected, then I will lower taxes.”
Solution
Truth Table for the Conditional Statement p → q .
Truth Table
p q p → q
T T
T F
F T
F F
Truth Table for the Conditional Statement p → q .
Truth Table
p q p → q
T T T
T F
F T
F F
Truth Table for the Conditional Statement p → q .
Truth Table
p q p → q
T T T
T F F
F T
F F
Truth Table for the Conditional Statement p → q .
Truth Table
p q p → q
T T T
T F F
F T T
F F
Truth Table for the Conditional Statement p → q .
Truth Table
p q p → q
T T T
T F F
F T T
F F T
p → q is:
“If you get 100 on the exam, then I will give you 1.0.”
Another Example
Converse,
Contrapositive,
and Inverse
Given p → q
Converse: q → p
Contrapositive: ¬q → ¬p
Inverse: ¬p → ¬q
Propositions
Because “q wherever p” is one of the ways to express the
conditional statement p → q, the original statement,
“The home team wins whenever it is raining.”
can be rewritten as
“If it is raining, then the home team wins.”
Example
p → q: “If it is raining, then the home team wins.”
Converse: q → p
Contrapositive: ¬q → ¬p
Inverse: ¬p → ¬q
Solution
p → q: “If it is raining, then the home team wins.”
Converse: q → p
“If the home team wins, then it is raining.”
Contrapositive: ¬q → ¬p
Inverse: ¬p → ¬q
Solution
p → q: “If it is raining, then the home team wins.”
Converse: q → p
“If the home team wins, then it is raining.”
Contrapositive: ¬q → ¬p
“If the home team does not win, then it is not raining.”
Inverse: ¬p → ¬q
Solution
p → q: “If it is raining, then the home team wins.”
Converse: q → p
“If the home team wins, then it is raining.”
Contrapositive: ¬q → ¬p
“If the home team does not win, then it is not raining.”
Inverse: ¬p → ¬q
“If it is not raining, then the home team does not win.”
Solution
Which among the three
is equivalent to the
original statement?
Which among the three
is equivalent to the
original statement?
Answer: CONTRAPOSITIVE
Biconditionals
Definition 6
Let p and q be propositions. The biconditional statement
p ↔ q, is the proposition “p if and only if q.”
The biconditional statement p ↔ q is true when p is and
q has the same truth values, and false otherwise.
Biconditional statements are also called bi–implications.
Propositions
There are some other common ways to express p ↔ q:
“p is necessary and sufficient for q”
“if p and q, and conversely”
“p iff q”
Propositions
Let p be the statement
“You can take the flight.”
and let q be the statement
“You buy a ticket.”
What is the p ↔ q statement using iff?
Example
Let p be the statement
“You can take the flight.”
and let q be the statement
“You buy a ticket.”
Then p ↔ q is the statement
“You can take the flight if and only if you buy a ticket.”
Example
Truth Table for the Biconditional Statement p ↔ q.
Note that p ↔ q has exactly the same truth value as
(p → q) ∧ (q → p)
Truth Table
p q p ↔ q
T T
T F
F T
F F
Truth Table for the Biconditional Statement p ↔ q.
Note that p ↔ q has exactly the same truth value as
(p → q) ∧ (q → p)
Truth Table
p q p ↔ q
T T T
T F
F T
F F
Truth Table for the Biconditional Statement p ↔ q.
Note that p ↔ q has exactly the same truth value as
(p → q) ∧ (q → p)
Truth Table
p q p ↔ q
T T T
T F F
F T
F F
Truth Table for the Biconditional Statement p ↔ q.
Note that p ↔ q has exactly the same truth value as
(p → q) ∧ (q → p)
Truth Table
p q p ↔ q
T T T
T F F
F T F
F F
Truth Table for the Biconditional Statement p ↔ q.
Note that p ↔ q has exactly the same truth value as
(p → q) ∧ (q → p)
Truth Table
p q p ↔ q
T T T
T F F
F T F
F F T
Truth Tables of
Compound Proposition
Precedence of Logical Operators
Operator Precedence
1
2
3
4
5
Precedence of Logical Operators
Operator Precedence
¬ 1
∧
∨
2
3
→
↔
4
5
Construct the truth table of the compound
proposition (p ∨ ¬q) → (p ∧ q)
p q ¬q p ∨ ¬q p ∧ q (p ∨ ¬q) → (p ∧ q)
T T
T F
F T
F F
Construct the truth table of the compound
proposition (p ∨ ¬q) → (p ∧ q)
p q ¬q p ∨ ¬q p ∧ q (p ∨ ¬q) → (p ∧ q)
T T F T T T
T F T T F F
F T F F F T
F F T T F F
Reference
CHAPTER 1. Rosen, Kenneth H.,Discrete Mathematics and Its
Applications, 7th edition, 2012.

Contenu connexe

Tendances

5.4 mathematical induction
5.4 mathematical induction5.4 mathematical induction
5.4 mathematical induction
math260
 
Conditional Statements
Conditional StatementsConditional Statements
Conditional Statements
micdsram
 
Mathematical Induction
Mathematical InductionMathematical Induction
Mathematical Induction
Edelyn Cagas
 
1st Test - If then, converse, inverse and contrapositive
1st Test - If then, converse, inverse and contrapositive1st Test - If then, converse, inverse and contrapositive
1st Test - If then, converse, inverse and contrapositive
Brandeis High School
 

Tendances (20)

Mathematical induction
Mathematical inductionMathematical induction
Mathematical induction
 
Mathematical induction by Animesh Sarkar
Mathematical induction by Animesh SarkarMathematical induction by Animesh Sarkar
Mathematical induction by Animesh Sarkar
 
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكروDiscrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
 
Formal Logic - Lesson 5 - Logical Equivalence
Formal Logic - Lesson 5 - Logical EquivalenceFormal Logic - Lesson 5 - Logical Equivalence
Formal Logic - Lesson 5 - Logical Equivalence
 
Mathematical Logic
Mathematical LogicMathematical Logic
Mathematical Logic
 
Mathematical Logic - Part 1
Mathematical Logic - Part 1Mathematical Logic - Part 1
Mathematical Logic - Part 1
 
5.4 mathematical induction
5.4 mathematical induction5.4 mathematical induction
5.4 mathematical induction
 
CMSC 56 | Lecture 2: Propositional Equivalences
CMSC 56 | Lecture 2: Propositional EquivalencesCMSC 56 | Lecture 2: Propositional Equivalences
CMSC 56 | Lecture 2: Propositional Equivalences
 
Conditional Statements
Conditional StatementsConditional Statements
Conditional Statements
 
Proposition (Logic)
Proposition (Logic)Proposition (Logic)
Proposition (Logic)
 
Logic (PROPOSITIONS)
Logic (PROPOSITIONS)Logic (PROPOSITIONS)
Logic (PROPOSITIONS)
 
Mathematical Induction
Mathematical InductionMathematical Induction
Mathematical Induction
 
Logic&proof
Logic&proofLogic&proof
Logic&proof
 
CMSC 56 | Lecture 4: Rules of Inference
CMSC 56 | Lecture 4: Rules of InferenceCMSC 56 | Lecture 4: Rules of Inference
CMSC 56 | Lecture 4: Rules of Inference
 
Mathematical Logic Part 2
Mathematical Logic Part 2Mathematical Logic Part 2
Mathematical Logic Part 2
 
Discrete math Truth Table
Discrete math Truth TableDiscrete math Truth Table
Discrete math Truth Table
 
Logic, contrapositive, converse, Discrete Mathematics, conjunction, negation
Logic, contrapositive, converse, Discrete Mathematics, conjunction, negationLogic, contrapositive, converse, Discrete Mathematics, conjunction, negation
Logic, contrapositive, converse, Discrete Mathematics, conjunction, negation
 
Formal Logic - Lesson 8 - Predicates and Quantifiers
Formal Logic - Lesson 8 - Predicates and QuantifiersFormal Logic - Lesson 8 - Predicates and Quantifiers
Formal Logic - Lesson 8 - Predicates and Quantifiers
 
Formal Logic - Lesson 7 - Rules of Inference
Formal Logic - Lesson 7 - Rules of InferenceFormal Logic - Lesson 7 - Rules of Inference
Formal Logic - Lesson 7 - Rules of Inference
 
1st Test - If then, converse, inverse and contrapositive
1st Test - If then, converse, inverse and contrapositive1st Test - If then, converse, inverse and contrapositive
1st Test - If then, converse, inverse and contrapositive
 

Similaire à CMSC 56 | Lecture 1: Propositional Logic

DisMath-lecture-2-Logic-and-Proofs-08032022-115009am.pptx
DisMath-lecture-2-Logic-and-Proofs-08032022-115009am.pptxDisMath-lecture-2-Logic-and-Proofs-08032022-115009am.pptx
DisMath-lecture-2-Logic-and-Proofs-08032022-115009am.pptx
Adeel Saifee
 

Similaire à CMSC 56 | Lecture 1: Propositional Logic (20)

Lecture 1 Propositional logic
Lecture 1   Propositional logicLecture 1   Propositional logic
Lecture 1 Propositional logic
 
Unit I discrete mathematics lecture notes
Unit I  discrete mathematics lecture notesUnit I  discrete mathematics lecture notes
Unit I discrete mathematics lecture notes
 
Drinkfromme.pptx
Drinkfromme.pptxDrinkfromme.pptx
Drinkfromme.pptx
 
LECTURE 1: LOGIC
LECTURE 1: LOGICLECTURE 1: LOGIC
LECTURE 1: LOGIC
 
Chapter1p1.pdf
Chapter1p1.pdfChapter1p1.pdf
Chapter1p1.pdf
 
Chapter 01 - p1.pdf
Chapter 01 - p1.pdfChapter 01 - p1.pdf
Chapter 01 - p1.pdf
 
CSE-203 Lec_1.pptx
CSE-203 Lec_1.pptxCSE-203 Lec_1.pptx
CSE-203 Lec_1.pptx
 
logicj-160412050513.pptx
logicj-160412050513.pptxlogicj-160412050513.pptx
logicj-160412050513.pptx
 
Knowledge representation and Predicate logic
Knowledge representation and Predicate logicKnowledge representation and Predicate logic
Knowledge representation and Predicate logic
 
DisMath-lecture-2-Logic-and-Proofs-08032022-115009am.pptx
DisMath-lecture-2-Logic-and-Proofs-08032022-115009am.pptxDisMath-lecture-2-Logic-and-Proofs-08032022-115009am.pptx
DisMath-lecture-2-Logic-and-Proofs-08032022-115009am.pptx
 
Dscrete structure
Dscrete  structureDscrete  structure
Dscrete structure
 
L01.ppt
L01.pptL01.ppt
L01.ppt
 
DMS UNIT-1 ppt.pptx
DMS UNIT-1 ppt.pptxDMS UNIT-1 ppt.pptx
DMS UNIT-1 ppt.pptx
 
DISMATH_Part1
DISMATH_Part1DISMATH_Part1
DISMATH_Part1
 
chapter 1 (part 2)
chapter 1 (part 2)chapter 1 (part 2)
chapter 1 (part 2)
 
logic, preposition etc
logic, preposition etclogic, preposition etc
logic, preposition etc
 
Laws of Logic in Discrete Structures and their applications
Laws of Logic in Discrete Structures and their applicationsLaws of Logic in Discrete Structures and their applications
Laws of Logic in Discrete Structures and their applications
 
Discrete Math Chapter 1 :The Foundations: Logic and Proofs
Discrete Math Chapter 1 :The Foundations: Logic and ProofsDiscrete Math Chapter 1 :The Foundations: Logic and Proofs
Discrete Math Chapter 1 :The Foundations: Logic and Proofs
 
Discrete mathematics Chapter1 presentation.ppt
Discrete mathematics Chapter1 presentation.pptDiscrete mathematics Chapter1 presentation.ppt
Discrete mathematics Chapter1 presentation.ppt
 
Chapter 1: The Foundations: Logic and Proofs
Chapter 1: The Foundations: Logic and ProofsChapter 1: The Foundations: Logic and Proofs
Chapter 1: The Foundations: Logic and Proofs
 

Plus de allyn joy calcaben

Plus de allyn joy calcaben (17)

CMSC 56 | Lecture 17: Matrices
CMSC 56 | Lecture 17: MatricesCMSC 56 | Lecture 17: Matrices
CMSC 56 | Lecture 17: Matrices
 
CMSC 56 | Lecture 16: Equivalence of Relations & Partial Ordering
CMSC 56 | Lecture 16: Equivalence of Relations & Partial OrderingCMSC 56 | Lecture 16: Equivalence of Relations & Partial Ordering
CMSC 56 | Lecture 16: Equivalence of Relations & Partial Ordering
 
CMSC 56 | Lecture 15: Closures of Relations
CMSC 56 | Lecture 15: Closures of RelationsCMSC 56 | Lecture 15: Closures of Relations
CMSC 56 | Lecture 15: Closures of Relations
 
CMSC 56 | Lecture 14: Representing Relations
CMSC 56 | Lecture 14: Representing RelationsCMSC 56 | Lecture 14: Representing Relations
CMSC 56 | Lecture 14: Representing Relations
 
CMSC 56 | Lecture 13: Relations and their Properties
CMSC 56 | Lecture 13: Relations and their PropertiesCMSC 56 | Lecture 13: Relations and their Properties
CMSC 56 | Lecture 13: Relations and their Properties
 
CMSC 56 | Lecture 12: Recursive Definition & Algorithms, and Program Correctness
CMSC 56 | Lecture 12: Recursive Definition & Algorithms, and Program CorrectnessCMSC 56 | Lecture 12: Recursive Definition & Algorithms, and Program Correctness
CMSC 56 | Lecture 12: Recursive Definition & Algorithms, and Program Correctness
 
CMSC 56 | Lecture 11: Mathematical Induction
CMSC 56 | Lecture 11: Mathematical InductionCMSC 56 | Lecture 11: Mathematical Induction
CMSC 56 | Lecture 11: Mathematical Induction
 
CMSC 56 | Lecture 10: Integer Representations & Algorithms
CMSC 56 | Lecture 10: Integer Representations & AlgorithmsCMSC 56 | Lecture 10: Integer Representations & Algorithms
CMSC 56 | Lecture 10: Integer Representations & Algorithms
 
CMSC 56 | Lecture 9: Functions Representations
CMSC 56 | Lecture 9: Functions RepresentationsCMSC 56 | Lecture 9: Functions Representations
CMSC 56 | Lecture 9: Functions Representations
 
CMSC 56 | Lecture 8: Growth of Functions
CMSC 56 | Lecture 8: Growth of FunctionsCMSC 56 | Lecture 8: Growth of Functions
CMSC 56 | Lecture 8: Growth of Functions
 
CMSC 56 | Lecture 6: Sets & Set Operations
CMSC 56 | Lecture 6: Sets & Set OperationsCMSC 56 | Lecture 6: Sets & Set Operations
CMSC 56 | Lecture 6: Sets & Set Operations
 
CMSC 56 | Lecture 5: Proofs Methods and Strategy
CMSC 56 | Lecture 5: Proofs Methods and StrategyCMSC 56 | Lecture 5: Proofs Methods and Strategy
CMSC 56 | Lecture 5: Proofs Methods and Strategy
 
CMSC 56 | Lecture 3: Predicates & Quantifiers
CMSC 56 | Lecture 3: Predicates & QuantifiersCMSC 56 | Lecture 3: Predicates & Quantifiers
CMSC 56 | Lecture 3: Predicates & Quantifiers
 
La Solidaridad and the Propaganda Movement
La Solidaridad and the Propaganda MovementLa Solidaridad and the Propaganda Movement
La Solidaridad and the Propaganda Movement
 
Computer Vision: Feature matching with RANSAC Algorithm
Computer Vision: Feature matching with RANSAC AlgorithmComputer Vision: Feature matching with RANSAC Algorithm
Computer Vision: Feature matching with RANSAC Algorithm
 
Chapter 7 expressions and assignment statements ii
Chapter 7 expressions and assignment statements iiChapter 7 expressions and assignment statements ii
Chapter 7 expressions and assignment statements ii
 
#11 osteoporosis
#11 osteoporosis#11 osteoporosis
#11 osteoporosis
 

Dernier

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
ssuserdda66b
 

Dernier (20)

How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 

CMSC 56 | Lecture 1: Propositional Logic

  • 1. Propositional Logic Lecture 1, CMSC 56 Allyn Joy D. Calcaben
  • 2. LOGIC • the basis of all mathematical reasoning, and of all automated reasoning. • Rules of logic are used to distinguish between valid and invalid mathematical arguments.
  • 3. Propositions • basic building blocks of logic • A declarative sentence that is either true or false, but not both.
  • 4. Which are propositions? Miagao is the capital of Iloilo Province.
  • 5. Which are propositions? Miagao is the capital of Iloilo Province.
  • 6. Which are propositions? Miagao is the capital of Iloilo Province. What time is it?
  • 7. Which are propositions? Miagao is the capital of Iloilo Province. What time is it?
  • 8. Which are propositions? Miagao is the capital of Iloilo Province. What time is it? 2 + 5 = 9
  • 9. Which are propositions? Miagao is the capital of Iloilo Province. What time is it? 2 + 5 = 9
  • 10. Which are propositions? Miagao is the capital of Iloilo Province. What time is it? 2 + 5 = 9 x – 6 = 23
  • 11. Which are propositions? Miagao is the capital of Iloilo Province. What time is it? 2 + 5 = 9 x – 6 = 23
  • 12. Which are propositions? Miagao is the capital of Iloilo Province. What time is it? A + B – C = D 2 + 5 = 9 x – 6 = 23
  • 13. Which are propositions? Miagao is the capital of Iloilo Province. What time is it? A + B – C = D 2 + 5 = 9 x – 6 = 23
  • 14. Which are propositions? Miagao is the capital of Iloilo Province. What time is it? A + B – C = D 2 + 5 = 9 Read this carefully. x – 6 = 23
  • 15. Which are propositions? Miagao is the capital of Iloilo Province. What time is it? A + B – C = D 2 + 5 = 9 Read this carefully. x – 6 = 23
  • 16. Which are propositions? Miagao is the capital of Iloilo Province. What time is it? A + B – C = D 2 + 5 = 9 Read this carefully. x – 6 = 23 Miami is the capital of Florida
  • 17. Which are propositions? Miagao is the capital of Iloilo Province. What time is it? A + B – C = D 2 + 5 = 9 Read this carefully. x – 6 = 23 Miami is the capital of Florida
  • 18. How do we represent propositions?
  • 19. • We use letters to denote propositional variables (or statement variables), that is , variables that represent propositions, just as letter are used to denote numerical variables. • It uses conventional letters such as p, q, r, s, . . . . How do we represent propositions?
  • 20. • We use letters to denote propositional variables (or statement variables), that is , variables that represent propositions, just as letter are used to denote numerical variables. • It uses conventional letters such as p, q, r, s, . . . . • Truth values is denoted by T, if it’s a true proposition, and denoted by F, if it’s a false proposition. How do we represent propositions?
  • 21. • Area of logic that deals with propositions • First developed systematically by the Greek Philosopher Aristotle more than 2300 years ago. Propositional Calculus / Propositional Logic
  • 22. • New propositions formed from existing propositions using logical operators. Compound Propositions
  • 24. Definition 1 Let p be a proposition. The negation of p, denoted by ¬p (also denoted by p ), is the statement “It is not the case that p.” The truth value of the negation of p, ¬p, is the opposite of the truth value of p. Propositions
  • 25. Find the negation of the proposition “Michelle’s PC runs Linux” and express this in simple English. Example
  • 26. Negation: “It is not the case that Michelle’s PC runs Linux.” more simply expressed negation: “Michelle’s PC does not run Linux.” Solution
  • 27. Find the negation of the proposition “Vanessa’s smartphone has at least 32GB of memory.” and express this in simple English. Example
  • 28. Negation: “It is not the case that Vanessa’s smartphone has at least 32GB of memory.” Solution
  • 29. Negation: “It is not the case that Vanessa’s smartphone has at least 32GB of memory.” can also be expressed as: “Vanessa’s smartphone does not have at least 32GB of memory.” Solution
  • 30. Negation: “It is not the case that Vanessa’s smartphone has at least 32GB of memory.” can also be expressed as: “Vanessa’s smartphone does not have at least 32GB of memory.” even more simply as: “Vanessa’s smartphone has less than 32GB of memory.” Solution
  • 31. Truth Table for the negation of a proposition p. Truth Table p ¬p T F
  • 32. Truth Table for the negation of a proposition p. Truth Table p ¬p T F F
  • 33. Truth Table for the negation of a proposition p. Truth Table p ¬p T F F T
  • 35. Definition 2 Let p and q be propositions. The conjunction of p and q, denoted by p ∧ q, is the proposition “p and q.” The conjunction p ∧ q is true when both p and q are true and is false otherwise. Propositions
  • 36. Find the conjunction of the propositions p and q where p is the proposition: “Rachel’s PC has more than 500 GB free hard disk space.” and q is the proposition: “The processor in Rachel’s PC runs faster than 2 GHz.” Example
  • 37. The conjunction of these propositions, p ∧ q, is the proposition: “Rachel’s PC has more than 500 GB free hard disk space, and the processor is Rachel’s PC runs faster than 2 GHz.” Solution
  • 38. The conjunction of these propositions, p ∧ q, is the proposition: “Rachel’s PC has more than 500 GB free hard disk space, and the processor is Rachel’s PC runs faster than 2 GHz.” Solution
  • 39. This conjunction can be expressed more simply as: “Rachel’s PC has more than 500 GB free hard disk space, and its processor runs faster than 2 GHz.” Solution
  • 40. • Note that in logic the word “but” sometimes is used instead of “and” in a conjunction. • Example: “The sun is shining, but it is raining.” “The sun is shining and it is raining.” Note
  • 41. Truth Table for the Conjunction of Two Propositions. Truth Table p q p ∧ q T T T F F T F F
  • 42. Truth Table for the Conjunction of Two Propositions. Truth Table p q p ∧ q T T T T F F T F F
  • 43. Truth Table for the Conjunction of Two Propositions. Truth Table p q p ∧ q T T T T F F F T F F
  • 44. Truth Table for the Conjunction of Two Propositions. Truth Table p q p ∧ q T T T T F F F T F F F
  • 45. Truth Table for the Conjunction of Two Propositions. Truth Table p q p ∧ q T T T T F F F T F F F F
  • 47. Definition 3 Let p and q be propositions. The disjunction of p and q, denoted by p V q, is the proposition “p or q.” The disjunction p V q is false when both p and q are false and is true otherwise. Propositions
  • 48. Find the conjunction of the propositions p and q where p is the proposition: “Rachel’s PC has more than 500 GB free hard disk space.” and q is the proposition: “The processor in Rachel’s PC runs faster than 2 GHz.” Example
  • 49. The disjunction of p and q, p V q, is the proposition: “Rachel’s PC has at least 500 GB free hard disk space, or the processor in Rachel’s PC runs faster than 2 GHz.” Solution
  • 50. Truth Table for the Disjunction of Two Propositions. Truth Table p q p V q T T T F F T F F
  • 51. Truth Table for the Disjunction of Two Propositions. Truth Table p q p V q T T T T F F T F F
  • 52. Truth Table for the Disjunction of Two Propositions. Truth Table p q p V q T T T T F T F T F F
  • 53. Truth Table for the Disjunction of Two Propositions. Truth Table p q p V q T T T T F T F T T F F
  • 54. Truth Table for the Disjunction of Two Propositions. Truth Table p q p V q T T T T F T F T T F F F
  • 56. Definition 4 Let p and q be propositions. The exclusive or of p and q, denoted by p ⊕ q, is the proposition that is true when exactly one of p and q is true and is false otherwise. Propositions
  • 57. Find the conjunction of the propositions p and q where p is the proposition: “Rachel’s PC has more than 500 GB free hard disk space.” and q is the proposition: “The processor in Rachel’s PC runs faster than 2 GHz.” Example
  • 58. The exclusive or of p and q, p ⊕ q, is the proposition: “Rachel’s PC has at least 500 GB free hard disk space, or the processor is Rachel’s PC runs faster than 2 GHz, but not both.” Solution
  • 59. Truth Table for the Exclusive or of Two Propositions. Truth Table p q p ⊕ q T T T F F T F F
  • 60. Truth Table for the Exclusive or of Two Propositions. Truth Table p q p ⊕ q T T F T F F T F F
  • 61. Truth Table for the Exclusive or of Two Propositions. Truth Table p q p ⊕ q T T F T F T F T F F
  • 62. Truth Table for the Exclusive or of Two Propositions. Truth Table p q p ⊕ q T T F T F T F T T F F
  • 63. Truth Table for the Exclusive or of Two Propositions. Truth Table p q p ⊕ q T T F T F T F T T F F F
  • 65. Definition 5 Let p and q be propositions. The conditional statement p → q, is the proposition “if p, then q.” The conditional statement p → q is false when p is true and q is false, and true otherwise. In the conditional statement p → q, p is called the hypothesis (or antecedent or premise) and q is called the conclusion (or consequence). Propositions
  • 66. “if p, then q” “p implies q” “if p, q” “p only if q” “q if p” “q whenever p” “q when p” “q is necessary for p” “q follows from p” “p is sufficient for q” “a necessary condition for p is q” “q unless ¬p” “a sufficient condition for q is p” p → q
  • 67. “if p, then q” “p implies q” “if p, q” “p only if q” “q if p” “q whenever p” “q when p” “q is necessary for p” “q follows from p” “p is sufficient for q” “a necessary condition for p is q” “q unless ¬p” “a sufficient condition for q is p” p → q
  • 68. Let p be the statement: “Joy learns discrete mathematics.” and q the statement: “Joy will find a good job.” Express the statement p → q as a statement in English. Example
  • 69. p → q is: “If Joy learns discrete mathematics, then she will find a good job.” Solution
  • 70. Express the statement p → q as a statement in English. Given p is the proposition: “I am elected.” and q is the proposition: “I will lower taxes.” using “if p, then q”. Example
  • 71. p → q is: “If I am elected, then I will lower taxes.” Solution
  • 72. Truth Table for the Conditional Statement p → q . Truth Table p q p → q T T T F F T F F
  • 73. Truth Table for the Conditional Statement p → q . Truth Table p q p → q T T T T F F T F F
  • 74. Truth Table for the Conditional Statement p → q . Truth Table p q p → q T T T T F F F T F F
  • 75. Truth Table for the Conditional Statement p → q . Truth Table p q p → q T T T T F F F T T F F
  • 76. Truth Table for the Conditional Statement p → q . Truth Table p q p → q T T T T F F F T T F F T
  • 77. p → q is: “If you get 100 on the exam, then I will give you 1.0.” Another Example
  • 79. Given p → q Converse: q → p Contrapositive: ¬q → ¬p Inverse: ¬p → ¬q Propositions
  • 80. Because “q wherever p” is one of the ways to express the conditional statement p → q, the original statement, “The home team wins whenever it is raining.” can be rewritten as “If it is raining, then the home team wins.” Example
  • 81. p → q: “If it is raining, then the home team wins.” Converse: q → p Contrapositive: ¬q → ¬p Inverse: ¬p → ¬q Solution
  • 82. p → q: “If it is raining, then the home team wins.” Converse: q → p “If the home team wins, then it is raining.” Contrapositive: ¬q → ¬p Inverse: ¬p → ¬q Solution
  • 83. p → q: “If it is raining, then the home team wins.” Converse: q → p “If the home team wins, then it is raining.” Contrapositive: ¬q → ¬p “If the home team does not win, then it is not raining.” Inverse: ¬p → ¬q Solution
  • 84. p → q: “If it is raining, then the home team wins.” Converse: q → p “If the home team wins, then it is raining.” Contrapositive: ¬q → ¬p “If the home team does not win, then it is not raining.” Inverse: ¬p → ¬q “If it is not raining, then the home team does not win.” Solution
  • 85. Which among the three is equivalent to the original statement?
  • 86. Which among the three is equivalent to the original statement? Answer: CONTRAPOSITIVE
  • 88. Definition 6 Let p and q be propositions. The biconditional statement p ↔ q, is the proposition “p if and only if q.” The biconditional statement p ↔ q is true when p is and q has the same truth values, and false otherwise. Biconditional statements are also called bi–implications. Propositions
  • 89. There are some other common ways to express p ↔ q: “p is necessary and sufficient for q” “if p and q, and conversely” “p iff q” Propositions
  • 90. Let p be the statement “You can take the flight.” and let q be the statement “You buy a ticket.” What is the p ↔ q statement using iff? Example
  • 91. Let p be the statement “You can take the flight.” and let q be the statement “You buy a ticket.” Then p ↔ q is the statement “You can take the flight if and only if you buy a ticket.” Example
  • 92. Truth Table for the Biconditional Statement p ↔ q. Note that p ↔ q has exactly the same truth value as (p → q) ∧ (q → p) Truth Table p q p ↔ q T T T F F T F F
  • 93. Truth Table for the Biconditional Statement p ↔ q. Note that p ↔ q has exactly the same truth value as (p → q) ∧ (q → p) Truth Table p q p ↔ q T T T T F F T F F
  • 94. Truth Table for the Biconditional Statement p ↔ q. Note that p ↔ q has exactly the same truth value as (p → q) ∧ (q → p) Truth Table p q p ↔ q T T T T F F F T F F
  • 95. Truth Table for the Biconditional Statement p ↔ q. Note that p ↔ q has exactly the same truth value as (p → q) ∧ (q → p) Truth Table p q p ↔ q T T T T F F F T F F F
  • 96. Truth Table for the Biconditional Statement p ↔ q. Note that p ↔ q has exactly the same truth value as (p → q) ∧ (q → p) Truth Table p q p ↔ q T T T T F F F T F F F T
  • 98. Precedence of Logical Operators Operator Precedence 1 2 3 4 5
  • 99. Precedence of Logical Operators Operator Precedence ¬ 1 ∧ ∨ 2 3 → ↔ 4 5
  • 100. Construct the truth table of the compound proposition (p ∨ ¬q) → (p ∧ q) p q ¬q p ∨ ¬q p ∧ q (p ∨ ¬q) → (p ∧ q) T T T F F T F F
  • 101. Construct the truth table of the compound proposition (p ∨ ¬q) → (p ∧ q) p q ¬q p ∨ ¬q p ∧ q (p ∨ ¬q) → (p ∧ q) T T F T T T T F T T F F F T F F F T F F T T F F
  • 102. Reference CHAPTER 1. Rosen, Kenneth H.,Discrete Mathematics and Its Applications, 7th edition, 2012.

Notes de l'éditeur

  1. These rules are used in the design of computer circuits, the construction of computer programs, the verification of the correctness of programs, and in many other ways.
  2. We now turn our attention to methods for producing new propositions from those that we already have. These methods were discussed by the English mathematician George Boole in 1854 in his book The Laws of Thought. Many mathematical statements are constructed by combining one or more propositions. New propositions, called compound propositions, are formed from existing propositions using logical operators.
  3. There are many other ways to express this conditional statement in English. Among the most natural of these are: “Joy will find a good job when she learns discrete mathematics.” “For Joy to get a good job, it is sufficient for her to learn discrete mathematics.” and “Joy will find a good job unless she does not learn discrete mathematics.”
  4. We see that among of these three conditional statements formed from p → q, only the contrapositive always has the same truth value as p → q. We first show that the contrapositive, ¬q →¬p, of a conditional statement p → q always has the same truth value as p → q. To see this, note that the contrapositive is false only when ¬p is false and¬q is true, that is, only when p is true and q is false. We now show that neither the converse, q → p, nor the inverse, ¬p →¬ q, has the same truth value as p → q for all possible truth values of p and q. Note that when p is true and q is false, the original conditional statement is false, but the converse and the inverse are both true.
  5. BEWARE!
  6. BEWARE!