SlideShare a Scribd company logo
LOGIC
Statements
• Logic is the tool for reasoning about
the truth or falsity of statements.
– Propositional logic is the study of
Boolean functions
– Predicate logic is the study of
quantified Boolean functions (first
order predicate logic)
Arithmetic vs. Logic
Arithmetic Logic
0 false
1 true
Boolean variable statement variable
form of function statement form
value of function truth value of statement
equality of function equivalence of statements
Notation
Word Symbol
and v
or w
implies 6
equivalent ]
not ~
not 5
parentheses ( ) used for grouping terms
Notation Examples
English Symbolic
A and B A v B
A or B A w B
A implies B A 6 B
A is equivalent to B A ] B
not A ~A
not A 5A
Statement Forms
• (p v q) and (q v p) are different as statement
forms. They look different.
• (p v q) and (q v p) are logically equivalent. They
have the same truth table.
• A statement form that represents the constant 1
function is called a tautology. It is true for all
truth values of the statement variables.
• A statement form that represents the constant 0
function is called a contradiction. It is false for
all truth values of the statement variables.
Truth Tables - NOT
P 5P
T F
F T
Truth Tables - AND
P Q PvQ
T T T
T F F
F T F
F F F
Truth Tables - OR
P Q PwQ
T T T
T F T
F T T
F F F
Truth Tables - EQUIVALENT
P Q P]Q
T T T
T F F
F T F
F F T
Truth Tables - IMPLICATION
P Q P6Q
T T T
T F F
F T T
F F T
Truth Tables - Example
P true means rain
P false means no rain
Q true means clouds
Q false means no clouds
Truth Tables - Example
P Q P6Q P6Q
rain clouds rainclouds T
rain no clouds rainno clouds F
no rain clouds no rainclouds T
no rain no clouds no rainno clouds T
Algebraic rules for statement forms
• Associative rules:
(p v q) v r ] p v (q v r)
(p w q) w r ] p w (q w r)
• Distributive rules:
p v (q w r) ] (p v q) w (p v r)
p w (q v r) ] (p w q) v (p w r)
• Idempotent rules:
p v p ] p
p w p ] p
Rules (continued)
• Double Negation:
55p ] p
• DeMorgan’s Rules:
5(p v q) ] 5p w 5q
5(p w q) ] 5p v 5q
• Commutative Rules:
p v q ] q v p
p w q ] q w p
Rules (continued)
• Absorption Rules:
p w (p v q) ] p
p v (p w q) ] p
• Bound Rules:
p v 0 ] 0
p v 1 ] p
p w 0 ] p
p w 1 ] 1
• Negation Rules:
p v 5p ] 0
p w 5p ] 1
A Simple Tautology
P  Q is the same as 5Q 5P
This is the same as asking: PQ ] 5Q  5P
How can we prove this true?
By creating a truth table!
P Q
T T
T F
F T
F F
A Simple Tautology (continued)
Add appropriate columns
P Q 5P 5Q
T T F F
T F F T
F T T F
F F T T
A Simple Tautology (continued)
Remember your implication table!
P Q 5P 5Q PQ
T T F F T
T F F T F
F T T F T
F F T T T
A Simple Tautology (continued)
Remember your implication table!
P Q 5P 5Q PQ 5Q5P
T T F F T T
T F F T F F
F T T F T T
F F T T T T
A Simple Tautology (continued)
Remember your implication table!
P Q 5P 5Q PQ 5Q5P PQ ] 5Q5P
T T F F T T T
T F F T F F T
F T T F T T T
F F T T T T T
Since the last column is all true, then the original
statement:
PQ ] 5Q5P is a tautology
Note: 5Q5P is the contrapositive of PQ
Translation of English
If P then Q: PQ
P only if Q: 5Q5P or
PQ
P if and only if Q: P ] Q
also written as P iff Q
Translation of English
P is sufficient for Q: PQ
P is necessary for Q: 5P5Q or
QP
P is necessary and sufficient for Q:
P ] Q
P unless Q: 5QP or
5PQ
Predicate Logic
• Consider the statement: x2
> 1
• Is it true or false?
• Depends upon the value of x!
• What values can x take on (what is the
domain of x)?
• Express this as a function: S(x) = x2
> 1
• Suppose the domain is the set of reals.
• The codomain (range) of S is a set of
statements that are either true or false.
Example
• S(0.9) = 0.92
> 1 is a false statement!
• S(3.2) = 3.22
> 1 is a true statement!
• The function S is an example of a
predicate.
• A predicate is any function whose
codomain is a set of statements that are
either true or false.
Note
• The codomain is a set of statements
• The codomain is not the truth value of the
statements
• The domain of predicate is arbitrary
• Different predicates can have different domains
• The truth set of a predicate S with domain D is
the set of the x ε D for which S(x) is true:
{x ε D | S(x) is true}
• Or simply: {x | S(x)}
Quantifiers
• The phrase “for all” is called a universal
quantifier and is symbolically written as œ
• The phrase “for some” is called an existential
quantifier and is written as ›
Notations for set of numbers:
Reals Integers
Rationals Primes
Naturals (nonnegative integers)
Goldbach’s conjecture
• Every even number greater than or equal
to 4 can be written as the sum of two
primes
• Express it as a quantified predicate
• It is unknown whether or not Goldbach’s
conjecture is true. You are only asked to
make the assertion
• Another example: Every sufficiently large
odd number is the sum of three primes.
Negating Quantifiers
• Let D be a set and let P(x) be a predicate
that is defined for x ε D, then
5(œ(x ε D), P(x)) ] (›(x ε D), 5P(x))
and
5(›(x ε D), P(x)) ] (œ(x ε D), 5P(x))

More Related Content

What's hot

Chapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound StatementsChapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound Statementsguestd166eb5
 
Propositional And First-Order Logic
Propositional And First-Order LogicPropositional And First-Order Logic
Propositional And First-Order Logicankush_kumar
 
CMSC 56 | Lecture 2: Propositional Equivalences
CMSC 56 | Lecture 2: Propositional EquivalencesCMSC 56 | Lecture 2: Propositional Equivalences
CMSC 56 | Lecture 2: Propositional Equivalences
allyn joy calcaben
 
Truth table a.r
Truth table a.rTruth table a.r
Truth table a.r
Syed Umair
 
Mathematical Logic - Part 1
Mathematical Logic - Part 1Mathematical Logic - Part 1
Mathematical Logic - Part 1
blaircomp2003
 
Discrete mathematics
Discrete mathematicsDiscrete mathematics
Discrete mathematics
University of Potsdam
 
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 د. خالد بكرو
Dr. Khaled Bakro
 
#3 formal methods – propositional logic
#3 formal methods – propositional logic#3 formal methods – propositional logic
#3 formal methods – propositional logic
Sharif Omar Salem
 
Per3 logika&pembuktian
Per3 logika&pembuktianPer3 logika&pembuktian
Per3 logika&pembuktian
Evert Sandye Taasiringan
 
Truth table
Truth tableTruth table
Context Free Grammar
Context Free GrammarContext Free Grammar
Context Free Grammar
Akhil Kaushik
 
Truth tables
Truth tablesTruth tables
Truth tableswalkerlj
 
Regular Grammar
Regular GrammarRegular Grammar
Regular Grammar
Ruchika Sinha
 
Lecture 7: Definite Clause Grammars
Lecture 7: Definite Clause GrammarsLecture 7: Definite Clause Grammars
Lecture 7: Definite Clause Grammars
CS, NcState
 
Discrete Mathematics - Propositional Logic
Discrete Mathematics - Propositional LogicDiscrete Mathematics - Propositional Logic
Discrete Mathematics - Propositional Logic
University of Potsdam
 
Mathematical Logic Part 2
Mathematical Logic Part 2Mathematical Logic Part 2
Mathematical Logic Part 2
blaircomp2003
 
Mathematical Logic
Mathematical LogicMathematical Logic
Mathematical Logic
endahnurfebriyanti
 
Exercise 1
Exercise 1Exercise 1
Exercise 1Amr Nady
 

What's hot (19)

Chapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound StatementsChapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound Statements
 
Propositional And First-Order Logic
Propositional And First-Order LogicPropositional And First-Order Logic
Propositional And First-Order Logic
 
CMSC 56 | Lecture 2: Propositional Equivalences
CMSC 56 | Lecture 2: Propositional EquivalencesCMSC 56 | Lecture 2: Propositional Equivalences
CMSC 56 | Lecture 2: Propositional Equivalences
 
Truth table a.r
Truth table a.rTruth table a.r
Truth table a.r
 
Mathematical Logic - Part 1
Mathematical Logic - Part 1Mathematical Logic - Part 1
Mathematical Logic - Part 1
 
Discrete mathematics
Discrete mathematicsDiscrete mathematics
Discrete mathematics
 
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 د. خالد بكرو
 
#3 formal methods – propositional logic
#3 formal methods – propositional logic#3 formal methods – propositional logic
#3 formal methods – propositional logic
 
Per3 logika&pembuktian
Per3 logika&pembuktianPer3 logika&pembuktian
Per3 logika&pembuktian
 
Truth table
Truth tableTruth table
Truth table
 
Context Free Grammar
Context Free GrammarContext Free Grammar
Context Free Grammar
 
Truth tables
Truth tablesTruth tables
Truth tables
 
Regular Grammar
Regular GrammarRegular Grammar
Regular Grammar
 
Lecture 7: Definite Clause Grammars
Lecture 7: Definite Clause GrammarsLecture 7: Definite Clause Grammars
Lecture 7: Definite Clause Grammars
 
Discrete Mathematics - Propositional Logic
Discrete Mathematics - Propositional LogicDiscrete Mathematics - Propositional Logic
Discrete Mathematics - Propositional Logic
 
Mathematical Logic
Mathematical LogicMathematical Logic
Mathematical Logic
 
Mathematical Logic Part 2
Mathematical Logic Part 2Mathematical Logic Part 2
Mathematical Logic Part 2
 
Mathematical Logic
Mathematical LogicMathematical Logic
Mathematical Logic
 
Exercise 1
Exercise 1Exercise 1
Exercise 1
 

Viewers also liked

A chronology of paul’s letters
A chronology of paul’s lettersA chronology of paul’s letters
A chronology of paul’s letters
Paul Fuller
 
Reuters: Pictures of the Year 2016 (Part 2)
Reuters: Pictures of the Year 2016 (Part 2)Reuters: Pictures of the Year 2016 (Part 2)
Reuters: Pictures of the Year 2016 (Part 2)
maditabalnco
 
What's Next in Growth? 2016
What's Next in Growth? 2016What's Next in Growth? 2016
What's Next in Growth? 2016
Andrew Chen
 
The Six Highest Performing B2B Blog Post Formats
The Six Highest Performing B2B Blog Post FormatsThe Six Highest Performing B2B Blog Post Formats
The Six Highest Performing B2B Blog Post Formats
Barry Feldman
 
The Outcome Economy
The Outcome EconomyThe Outcome Economy
The Outcome Economy
Helge Tennø
 
32 Ways a Digital Marketing Consultant Can Help Grow Your Business
32 Ways a Digital Marketing Consultant Can Help Grow Your Business32 Ways a Digital Marketing Consultant Can Help Grow Your Business
32 Ways a Digital Marketing Consultant Can Help Grow Your Business
Barry Feldman
 

Viewers also liked (6)

A chronology of paul’s letters
A chronology of paul’s lettersA chronology of paul’s letters
A chronology of paul’s letters
 
Reuters: Pictures of the Year 2016 (Part 2)
Reuters: Pictures of the Year 2016 (Part 2)Reuters: Pictures of the Year 2016 (Part 2)
Reuters: Pictures of the Year 2016 (Part 2)
 
What's Next in Growth? 2016
What's Next in Growth? 2016What's Next in Growth? 2016
What's Next in Growth? 2016
 
The Six Highest Performing B2B Blog Post Formats
The Six Highest Performing B2B Blog Post FormatsThe Six Highest Performing B2B Blog Post Formats
The Six Highest Performing B2B Blog Post Formats
 
The Outcome Economy
The Outcome EconomyThe Outcome Economy
The Outcome Economy
 
32 Ways a Digital Marketing Consultant Can Help Grow Your Business
32 Ways a Digital Marketing Consultant Can Help Grow Your Business32 Ways a Digital Marketing Consultant Can Help Grow Your Business
32 Ways a Digital Marketing Consultant Can Help Grow Your Business
 

Similar to Logic

CS202Ch1.ppt
CS202Ch1.pptCS202Ch1.ppt
CS202Ch1.ppt
RuchiTuliWadhwa
 
Introduction to mathematical analysis
Introduction to mathematical analysisIntroduction to mathematical analysis
Introduction to mathematical analysis
AnoojaI
 
MFCS PPT.pdf
MFCS PPT.pdfMFCS PPT.pdf
MFCS PPT.pdf
jayarao21
 
Mathematical foundations of computer science
Mathematical foundations of computer scienceMathematical foundations of computer science
Mathematical foundations of computer science
BindhuBhargaviTalasi
 
logic_lec4.ppt
logic_lec4.pptlogic_lec4.ppt
logic_lec4.ppt
noramohed732
 
DMS UNIT-1 ppt.pptx
DMS UNIT-1 ppt.pptxDMS UNIT-1 ppt.pptx
DMS UNIT-1 ppt.pptx
DrMadhavaReddyCh
 
Logic in Computer Science Unit 2 (1).pptx
Logic in Computer Science Unit 2 (1).pptxLogic in Computer Science Unit 2 (1).pptx
Logic in Computer Science Unit 2 (1).pptx
PriyalMayurManvar
 
1. Introduction to math logic.pptx
1. Introduction to math logic.pptx1. Introduction to math logic.pptx
1. Introduction to math logic.pptx
ssuserabc12e
 
Theorem proving 2018 2019
Theorem proving 2018 2019Theorem proving 2018 2019
Theorem proving 2018 2019
Emmanuel Zarpas
 
02-boolean.ppt
02-boolean.ppt02-boolean.ppt
02-boolean.ppt
RyanAnderson41811
 
Discreate Truth tables and laws of logic
Discreate Truth tables and laws of logicDiscreate Truth tables and laws of logic
Discreate Truth tables and laws of logic
ZenLooper
 
UNIT-III-PPT.pptx
UNIT-III-PPT.pptxUNIT-III-PPT.pptx
UNIT-III-PPT.pptx
DakshBaveja
 
Basic Connectives and Truth Tables.ppt
Basic Connectives and Truth Tables.pptBasic Connectives and Truth Tables.ppt
Basic Connectives and Truth Tables.ppt
samalaramesh4
 
Theorem proving 2018 2019
Theorem proving 2018 2019Theorem proving 2018 2019
Theorem proving 2018 2019
Emmanuel Zarpas
 
2.pdf
2.pdf2.pdf
4 ch 2 logical reasoning
4 ch 2 logical reasoning4 ch 2 logical reasoning
4 ch 2 logical reasoning
SummermhaeJamora
 
dms.pptx
dms.pptxdms.pptx
dms.pptx
YagnaPriya11
 

Similar to Logic (20)

CS202Ch1.ppt
CS202Ch1.pptCS202Ch1.ppt
CS202Ch1.ppt
 
Introduction to mathematical analysis
Introduction to mathematical analysisIntroduction to mathematical analysis
Introduction to mathematical analysis
 
MFCS PPT.pdf
MFCS PPT.pdfMFCS PPT.pdf
MFCS PPT.pdf
 
Mathematical foundations of computer science
Mathematical foundations of computer scienceMathematical foundations of computer science
Mathematical foundations of computer science
 
logic_lec4.ppt
logic_lec4.pptlogic_lec4.ppt
logic_lec4.ppt
 
DMS UNIT-1 ppt.pptx
DMS UNIT-1 ppt.pptxDMS UNIT-1 ppt.pptx
DMS UNIT-1 ppt.pptx
 
Logic in Computer Science Unit 2 (1).pptx
Logic in Computer Science Unit 2 (1).pptxLogic in Computer Science Unit 2 (1).pptx
Logic in Computer Science Unit 2 (1).pptx
 
The logic
The logicThe logic
The logic
 
L01.ppt
L01.pptL01.ppt
L01.ppt
 
1. Introduction to math logic.pptx
1. Introduction to math logic.pptx1. Introduction to math logic.pptx
1. Introduction to math logic.pptx
 
Theorem proving 2018 2019
Theorem proving 2018 2019Theorem proving 2018 2019
Theorem proving 2018 2019
 
02-boolean.ppt
02-boolean.ppt02-boolean.ppt
02-boolean.ppt
 
Discreate Truth tables and laws of logic
Discreate Truth tables and laws of logicDiscreate Truth tables and laws of logic
Discreate Truth tables and laws of logic
 
UNIT-III-PPT.pptx
UNIT-III-PPT.pptxUNIT-III-PPT.pptx
UNIT-III-PPT.pptx
 
Basic Connectives and Truth Tables.ppt
Basic Connectives and Truth Tables.pptBasic Connectives and Truth Tables.ppt
Basic Connectives and Truth Tables.ppt
 
Theorem proving 2018 2019
Theorem proving 2018 2019Theorem proving 2018 2019
Theorem proving 2018 2019
 
2.pdf
2.pdf2.pdf
2.pdf
 
4 ch 2 logical reasoning
4 ch 2 logical reasoning4 ch 2 logical reasoning
4 ch 2 logical reasoning
 
Course notes1
Course notes1Course notes1
Course notes1
 
dms.pptx
dms.pptxdms.pptx
dms.pptx
 

Recently uploaded

Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 

Recently uploaded (20)

Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 

Logic

  • 2. Statements • Logic is the tool for reasoning about the truth or falsity of statements. – Propositional logic is the study of Boolean functions – Predicate logic is the study of quantified Boolean functions (first order predicate logic)
  • 3. Arithmetic vs. Logic Arithmetic Logic 0 false 1 true Boolean variable statement variable form of function statement form value of function truth value of statement equality of function equivalence of statements
  • 4. Notation Word Symbol and v or w implies 6 equivalent ] not ~ not 5 parentheses ( ) used for grouping terms
  • 5. Notation Examples English Symbolic A and B A v B A or B A w B A implies B A 6 B A is equivalent to B A ] B not A ~A not A 5A
  • 6. Statement Forms • (p v q) and (q v p) are different as statement forms. They look different. • (p v q) and (q v p) are logically equivalent. They have the same truth table. • A statement form that represents the constant 1 function is called a tautology. It is true for all truth values of the statement variables. • A statement form that represents the constant 0 function is called a contradiction. It is false for all truth values of the statement variables.
  • 7. Truth Tables - NOT P 5P T F F T
  • 8. Truth Tables - AND P Q PvQ T T T T F F F T F F F F
  • 9. Truth Tables - OR P Q PwQ T T T T F T F T T F F F
  • 10. Truth Tables - EQUIVALENT P Q P]Q T T T T F F F T F F F T
  • 11. Truth Tables - IMPLICATION P Q P6Q T T T T F F F T T F F T
  • 12. Truth Tables - Example P true means rain P false means no rain Q true means clouds Q false means no clouds
  • 13. Truth Tables - Example P Q P6Q P6Q rain clouds rainclouds T rain no clouds rainno clouds F no rain clouds no rainclouds T no rain no clouds no rainno clouds T
  • 14. Algebraic rules for statement forms • Associative rules: (p v q) v r ] p v (q v r) (p w q) w r ] p w (q w r) • Distributive rules: p v (q w r) ] (p v q) w (p v r) p w (q v r) ] (p w q) v (p w r) • Idempotent rules: p v p ] p p w p ] p
  • 15. Rules (continued) • Double Negation: 55p ] p • DeMorgan’s Rules: 5(p v q) ] 5p w 5q 5(p w q) ] 5p v 5q • Commutative Rules: p v q ] q v p p w q ] q w p
  • 16. Rules (continued) • Absorption Rules: p w (p v q) ] p p v (p w q) ] p • Bound Rules: p v 0 ] 0 p v 1 ] p p w 0 ] p p w 1 ] 1 • Negation Rules: p v 5p ] 0 p w 5p ] 1
  • 17. A Simple Tautology P  Q is the same as 5Q 5P This is the same as asking: PQ ] 5Q  5P How can we prove this true? By creating a truth table! P Q T T T F F T F F
  • 18. A Simple Tautology (continued) Add appropriate columns P Q 5P 5Q T T F F T F F T F T T F F F T T
  • 19. A Simple Tautology (continued) Remember your implication table! P Q 5P 5Q PQ T T F F T T F F T F F T T F T F F T T T
  • 20. A Simple Tautology (continued) Remember your implication table! P Q 5P 5Q PQ 5Q5P T T F F T T T F F T F F F T T F T T F F T T T T
  • 21. A Simple Tautology (continued) Remember your implication table! P Q 5P 5Q PQ 5Q5P PQ ] 5Q5P T T F F T T T T F F T F F T F T T F T T T F F T T T T T Since the last column is all true, then the original statement: PQ ] 5Q5P is a tautology Note: 5Q5P is the contrapositive of PQ
  • 22. Translation of English If P then Q: PQ P only if Q: 5Q5P or PQ P if and only if Q: P ] Q also written as P iff Q
  • 23. Translation of English P is sufficient for Q: PQ P is necessary for Q: 5P5Q or QP P is necessary and sufficient for Q: P ] Q P unless Q: 5QP or 5PQ
  • 24. Predicate Logic • Consider the statement: x2 > 1 • Is it true or false? • Depends upon the value of x! • What values can x take on (what is the domain of x)? • Express this as a function: S(x) = x2 > 1 • Suppose the domain is the set of reals. • The codomain (range) of S is a set of statements that are either true or false.
  • 25. Example • S(0.9) = 0.92 > 1 is a false statement! • S(3.2) = 3.22 > 1 is a true statement! • The function S is an example of a predicate. • A predicate is any function whose codomain is a set of statements that are either true or false.
  • 26. Note • The codomain is a set of statements • The codomain is not the truth value of the statements • The domain of predicate is arbitrary • Different predicates can have different domains • The truth set of a predicate S with domain D is the set of the x ε D for which S(x) is true: {x ε D | S(x) is true} • Or simply: {x | S(x)}
  • 27. Quantifiers • The phrase “for all” is called a universal quantifier and is symbolically written as œ • The phrase “for some” is called an existential quantifier and is written as › Notations for set of numbers: Reals Integers Rationals Primes Naturals (nonnegative integers)
  • 28. Goldbach’s conjecture • Every even number greater than or equal to 4 can be written as the sum of two primes • Express it as a quantified predicate • It is unknown whether or not Goldbach’s conjecture is true. You are only asked to make the assertion • Another example: Every sufficiently large odd number is the sum of three primes.
  • 29. Negating Quantifiers • Let D be a set and let P(x) be a predicate that is defined for x ε D, then 5(œ(x ε D), P(x)) ] (›(x ε D), 5P(x)) and 5(›(x ε D), P(x)) ] (œ(x ε D), 5P(x))