SlideShare una empresa de Scribd logo
1 de 13
Descargar para leer sin conexión
1.1.1
A. Elgammal – CS205 Rutgers
Implication – Conditional Statement
p → q (p implies q) (if p then q) is the
proposition that is false when p is true and
q is false and true otherwise.
Equivalent to “not p or q”
Ex.
If I am elected then I will lower the taxes
If you get 100% on the final then you will get
an A
p: I am elected
q: I will lower the taxes
Think of it as a contract, obligation or pledge
The contract is breached (implication is false)
only if the p is true and q is false.
Otherwise the contract (the pledge) is valid
(true)
1.1.2
A. Elgammal – CS205 Rutgers
p → q (p implies q)
p: hypothesis, premise, antecedent
q: conclusion, consequence
p and q do not have to be related
If 2+2 = 4 then Albany is the capitol of N.Y. (T)
If 2+2 = 4 then Peapack is the capitol of N.J. (F)
If 2+2 = 5 then there is a state with only one neighbor
(T)
If 2+2 = 5 then you are the pope
Also (T)
1.1.3
A. Elgammal – CS205 Rutgers
• Different forms for implications
p implies q is equivalent to
If p then q
q if p
q whenever p
q when p
q follows from p
p is sufficient for q
a sufficient condition for q is p
q is necessary for p
a necessary condition for p is q
p only if q
1.1.4
A. Elgammal – CS205 Rutgers
p → q (p implies q)
p is sufficient for q
a sufficient condition for q is p
q is necessary for p
a necessary condition for p is q
Ex.
If you get 100% on the final you will get an A
You get 100% on the final is sufficient to get an A
A sufficient condition to get an A is to get 100% on the
final
You get an A is necessary for you to get 100% on the
final (but not sufficient)
A necessary condition for you get 100% is you get an A
(imagine that you know your letter grade and you are
trying to guess your grade in the final:
If you didn’t get A then for sure you didn’t get 100%
If you get A then you may or may not get 100% )
1.1.5
A. Elgammal – CS205 Rutgers
p → q (p implies q)
p is sufficient for q
a sufficient condition for q is p
q is necessary for p
a necessary condition for p is q
If you show up on Monday you will get the job
You show up on Monday is sufficient for you to get the
job
A sufficient condition for you to get the job is to show
up on Monday
You get the job is necessary for you have shown up on
Monday.
A necessary condition for you have shown up on
Monday is you got the job.
1.1.6
A. Elgammal – CS205 Rutgers
• You walk 8 miles is necessary to get to the
top
Which is equivalent ?
If you walk 8 miles then you get to the top
If you got to the top then you have walked 8
miles
The first statement is not equivalent. Walking
8 miles is necessary (but other things might
be also necessary). suppose you walked 8
miles in the wrong direction ! But if you
got to the top then you are sure that you
must have walked 8 miles.
1.1.7
A. Elgammal – CS205 Rutgers
• Contrapositive
The contrapositive of “if p then q” is
“if not q then not p”
The contrapositive of
p → q is ¬ q → ¬ p
A conditional statement is logically
equivalent to its contrapositive.
Proof by truth table.
Ex. If today is Easter then tomorrow is
Monday
Contrapositive:
If tomorrow is not Monday then today is not
Easter
1.1.8
A. Elgammal – CS205 Rutgers
• If p then q (p → q )
• The converse is “ If q then p”
q → p
• The inverse is “If not p then not q”
¬ p → ¬ q
• The contrapositive “if not q then not p”
¬ q → ¬ p
Ex. If today is Easter then tomorrow is Monday
Converse: If tomorrow is Monday then today is Easter
Inverse: If today is not Easter then tomorrow is not
Monday
Conditional statement is not equiv. to its converse
Conditional statement is not equiv. to its inverse
The converse and inverse are logically equivalent.
1.1.9
A. Elgammal – CS205 Rutgers
• p only if q means “if not q then not p”
By contrapositive this is equivalent to “if p
then q”
Ex:
If you get 100% on the final then you will get an A
Which statement is equivalent ?
- you will get A only if you get 100% on the final
- You get 100% on the final only if you get an A
The first statement is not equivalent to our statement:
according to our statement you can get A even if
you don’t get 100% on the final.
1.1.10
A. Elgammal – CS205 Rutgers
• Your guarantee is good only if you bought
your CD player less than 90 days ago
Which statement is equivalent ?
1. if you bought your CD player less than 90
days ago then your guarantee is good
2. If your guarantee is good then you have
bought your CD player less than 90 days
ago
3. You bought your CD player less than 90
days ago is sufficient for the guarantee to
be good.
4. You bought your CD player less than 90
days ago is necessary for the guarantee to
be good.
1 and 3 are not equivalent .. Why ?
1.1.11
A. Elgammal – CS205 Rutgers
The biconditional p ↔ q is the proposition
that is true when p and q have the same
truth values, and is false otherwise.
Biconditional is equivalent to two way
implication:
p ↔ q ≡ p → q ∧ q → p
p → q : if p then q : p only if q
q → p : if q then p : p if q
p ↔ q : p if and only if q
or,
p ↔ q : p iff q
: q iff p
T
F
F
F
T
F
F
F
T
T
T
T
p ↔ q
q
p
1.1.12
A. Elgammal – CS205 Rutgers
p ↔ q ≡ p → q ∧ q → p
p → q : p is sufficient condition for q
q → p : p is necessary condition for q
p ↔ q : p is necessary and sufficient
condition for q
Or, since p ↔ q ≡ q ↔ p ,
q is necessary and sufficient condition for p
1.1.13
A. Elgammal – CS205 Rutgers
Ex:
This program is correct if, and only if, it produces the
correct answer for all possible sets of input data.
This is equivalent to:
If this program is correct, then it produces the correct
answer for all possible sets of input data
and
if it produces the correct answer for all possible sets of
input data then this program is correct.
This is equivalent to:
This program is correct is necessary and sufficient
condition for it to produce correct answer for all
possible sets of input data.
This is also equivalent to:
This program produces the correct answer for all
possible sets of input data is necessary and sufficient
condition for the program to be correct

Más contenido relacionado

Similar a implication.pdf

Arguments and methods of proof
Arguments and methods of proofArguments and methods of proof
Arguments and methods of proofRobert Geofroy
 
CSE-203 Lec_1.pptx
CSE-203 Lec_1.pptxCSE-203 Lec_1.pptx
CSE-203 Lec_1.pptxMahdiHasan86
 
Discrete Structure vs Discrete Mathematics
Discrete Structure vs Discrete MathematicsDiscrete Structure vs Discrete Mathematics
Discrete Structure vs Discrete MathematicsAbdulRehman378540
 
Drinkfromme.pptx
Drinkfromme.pptxDrinkfromme.pptx
Drinkfromme.pptxRavind8
 
Geometry journal 2
Geometry journal 2Geometry journal 2
Geometry journal 2Katina1196
 
Basic Connectives and Truth Tables.ppt
Basic Connectives and Truth Tables.pptBasic Connectives and Truth Tables.ppt
Basic Connectives and Truth Tables.pptsamalaramesh4
 
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.pptxAdeel Saifee
 
Determining the Inverse, Converse, and Contrapositive of an If-then Statement...
Determining the Inverse, Converse, and Contrapositive of an If-then Statement...Determining the Inverse, Converse, and Contrapositive of an If-then Statement...
Determining the Inverse, Converse, and Contrapositive of an If-then Statement...Ma. Loiel Salome Nabelon
 
determiningtheinverseconverseandcontrapositiveofanif-thenstatementautosaved-2...
determiningtheinverseconverseandcontrapositiveofanif-thenstatementautosaved-2...determiningtheinverseconverseandcontrapositiveofanif-thenstatementautosaved-2...
determiningtheinverseconverseandcontrapositiveofanif-thenstatementautosaved-2...mysthicrious
 
Unit I discrete mathematics lecture notes
Unit I  discrete mathematics lecture notesUnit I  discrete mathematics lecture notes
Unit I discrete mathematics lecture notesGIRIM8
 
Discrete mathematics [LOGICAL CONNECTIVES]
Discrete mathematics [LOGICAL CONNECTIVES]Discrete mathematics [LOGICAL CONNECTIVES]
Discrete mathematics [LOGICAL CONNECTIVES]KalingoAurobindo
 
M5.A1 Truth Table ExercisesB.docx
M5.A1 Truth Table ExercisesB.docxM5.A1 Truth Table ExercisesB.docx
M5.A1 Truth Table ExercisesB.docxBetseyCalderon89
 

Similar a implication.pdf (20)

Arguments and methods of proof
Arguments and methods of proofArguments and methods of proof
Arguments and methods of proof
 
CSE-203 Lec_1.pptx
CSE-203 Lec_1.pptxCSE-203 Lec_1.pptx
CSE-203 Lec_1.pptx
 
Discrete Structure vs Discrete Mathematics
Discrete Structure vs Discrete MathematicsDiscrete Structure vs Discrete Mathematics
Discrete Structure vs Discrete Mathematics
 
Drinkfromme.pptx
Drinkfromme.pptxDrinkfromme.pptx
Drinkfromme.pptx
 
Bab 1 proposisi
Bab 1 proposisiBab 1 proposisi
Bab 1 proposisi
 
Geometry journal 2
Geometry journal 2Geometry journal 2
Geometry journal 2
 
Basic Connectives and Truth Tables.ppt
Basic Connectives and Truth Tables.pptBasic Connectives and Truth Tables.ppt
Basic Connectives and Truth Tables.ppt
 
2.3 deductive reasoning
2.3 deductive reasoning2.3 deductive reasoning
2.3 deductive reasoning
 
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
 
Determining the Inverse, Converse, and Contrapositive of an If-then Statement...
Determining the Inverse, Converse, and Contrapositive of an If-then Statement...Determining the Inverse, Converse, and Contrapositive of an If-then Statement...
Determining the Inverse, Converse, and Contrapositive of an If-then Statement...
 
determiningtheinverseconverseandcontrapositiveofanif-thenstatementautosaved-2...
determiningtheinverseconverseandcontrapositiveofanif-thenstatementautosaved-2...determiningtheinverseconverseandcontrapositiveofanif-thenstatementautosaved-2...
determiningtheinverseconverseandcontrapositiveofanif-thenstatementautosaved-2...
 
CS202Ch1.ppt
CS202Ch1.pptCS202Ch1.ppt
CS202Ch1.ppt
 
Logic2.pptx
Logic2.pptxLogic2.pptx
Logic2.pptx
 
1. Logic.pptx
1. Logic.pptx1. Logic.pptx
1. Logic.pptx
 
Unit I discrete mathematics lecture notes
Unit I  discrete mathematics lecture notesUnit I  discrete mathematics lecture notes
Unit I discrete mathematics lecture notes
 
Discrete mathematics [LOGICAL CONNECTIVES]
Discrete mathematics [LOGICAL CONNECTIVES]Discrete mathematics [LOGICAL CONNECTIVES]
Discrete mathematics [LOGICAL CONNECTIVES]
 
logicj-160412050513.pptx
logicj-160412050513.pptxlogicj-160412050513.pptx
logicj-160412050513.pptx
 
The logic
The logicThe logic
The logic
 
Lecture 1 Propositional logic
Lecture 1   Propositional logicLecture 1   Propositional logic
Lecture 1 Propositional logic
 
M5.A1 Truth Table ExercisesB.docx
M5.A1 Truth Table ExercisesB.docxM5.A1 Truth Table ExercisesB.docx
M5.A1 Truth Table ExercisesB.docx
 

Más de EllenGrace9

4. ERD Cardinality.pptx
4. ERD Cardinality.pptx4. ERD Cardinality.pptx
4. ERD Cardinality.pptxEllenGrace9
 
3. Venn Diagram.pptx
3. Venn Diagram.pptx3. Venn Diagram.pptx
3. Venn Diagram.pptxEllenGrace9
 
Introduction.pptx
Introduction.pptxIntroduction.pptx
Introduction.pptxEllenGrace9
 
Data Structures and Algorithm - Module 1.pptx
Data Structures and Algorithm - Module 1.pptxData Structures and Algorithm - Module 1.pptx
Data Structures and Algorithm - Module 1.pptxEllenGrace9
 
1. Introduction.pptx
1. Introduction.pptx1. Introduction.pptx
1. Introduction.pptxEllenGrace9
 

Más de EllenGrace9 (8)

3. ERD.pptx
3. ERD.pptx3. ERD.pptx
3. ERD.pptx
 
4. ERD Cardinality.pptx
4. ERD Cardinality.pptx4. ERD Cardinality.pptx
4. ERD Cardinality.pptx
 
3. Venn Diagram.pptx
3. Venn Diagram.pptx3. Venn Diagram.pptx
3. Venn Diagram.pptx
 
Introduction.pptx
Introduction.pptxIntroduction.pptx
Introduction.pptx
 
Sets.pdf
Sets.pdfSets.pdf
Sets.pdf
 
Sets.pptx
Sets.pptxSets.pptx
Sets.pptx
 
Data Structures and Algorithm - Module 1.pptx
Data Structures and Algorithm - Module 1.pptxData Structures and Algorithm - Module 1.pptx
Data Structures and Algorithm - Module 1.pptx
 
1. Introduction.pptx
1. Introduction.pptx1. Introduction.pptx
1. Introduction.pptx
 

Último

Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 

Último (20)

Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 

implication.pdf

  • 1. 1.1.1 A. Elgammal – CS205 Rutgers Implication – Conditional Statement p → q (p implies q) (if p then q) is the proposition that is false when p is true and q is false and true otherwise. Equivalent to “not p or q” Ex. If I am elected then I will lower the taxes If you get 100% on the final then you will get an A p: I am elected q: I will lower the taxes Think of it as a contract, obligation or pledge The contract is breached (implication is false) only if the p is true and q is false. Otherwise the contract (the pledge) is valid (true)
  • 2. 1.1.2 A. Elgammal – CS205 Rutgers p → q (p implies q) p: hypothesis, premise, antecedent q: conclusion, consequence p and q do not have to be related If 2+2 = 4 then Albany is the capitol of N.Y. (T) If 2+2 = 4 then Peapack is the capitol of N.J. (F) If 2+2 = 5 then there is a state with only one neighbor (T) If 2+2 = 5 then you are the pope Also (T)
  • 3. 1.1.3 A. Elgammal – CS205 Rutgers • Different forms for implications p implies q is equivalent to If p then q q if p q whenever p q when p q follows from p p is sufficient for q a sufficient condition for q is p q is necessary for p a necessary condition for p is q p only if q
  • 4. 1.1.4 A. Elgammal – CS205 Rutgers p → q (p implies q) p is sufficient for q a sufficient condition for q is p q is necessary for p a necessary condition for p is q Ex. If you get 100% on the final you will get an A You get 100% on the final is sufficient to get an A A sufficient condition to get an A is to get 100% on the final You get an A is necessary for you to get 100% on the final (but not sufficient) A necessary condition for you get 100% is you get an A (imagine that you know your letter grade and you are trying to guess your grade in the final: If you didn’t get A then for sure you didn’t get 100% If you get A then you may or may not get 100% )
  • 5. 1.1.5 A. Elgammal – CS205 Rutgers p → q (p implies q) p is sufficient for q a sufficient condition for q is p q is necessary for p a necessary condition for p is q If you show up on Monday you will get the job You show up on Monday is sufficient for you to get the job A sufficient condition for you to get the job is to show up on Monday You get the job is necessary for you have shown up on Monday. A necessary condition for you have shown up on Monday is you got the job.
  • 6. 1.1.6 A. Elgammal – CS205 Rutgers • You walk 8 miles is necessary to get to the top Which is equivalent ? If you walk 8 miles then you get to the top If you got to the top then you have walked 8 miles The first statement is not equivalent. Walking 8 miles is necessary (but other things might be also necessary). suppose you walked 8 miles in the wrong direction ! But if you got to the top then you are sure that you must have walked 8 miles.
  • 7. 1.1.7 A. Elgammal – CS205 Rutgers • Contrapositive The contrapositive of “if p then q” is “if not q then not p” The contrapositive of p → q is ¬ q → ¬ p A conditional statement is logically equivalent to its contrapositive. Proof by truth table. Ex. If today is Easter then tomorrow is Monday Contrapositive: If tomorrow is not Monday then today is not Easter
  • 8. 1.1.8 A. Elgammal – CS205 Rutgers • If p then q (p → q ) • The converse is “ If q then p” q → p • The inverse is “If not p then not q” ¬ p → ¬ q • The contrapositive “if not q then not p” ¬ q → ¬ p Ex. If today is Easter then tomorrow is Monday Converse: If tomorrow is Monday then today is Easter Inverse: If today is not Easter then tomorrow is not Monday Conditional statement is not equiv. to its converse Conditional statement is not equiv. to its inverse The converse and inverse are logically equivalent.
  • 9. 1.1.9 A. Elgammal – CS205 Rutgers • p only if q means “if not q then not p” By contrapositive this is equivalent to “if p then q” Ex: If you get 100% on the final then you will get an A Which statement is equivalent ? - you will get A only if you get 100% on the final - You get 100% on the final only if you get an A The first statement is not equivalent to our statement: according to our statement you can get A even if you don’t get 100% on the final.
  • 10. 1.1.10 A. Elgammal – CS205 Rutgers • Your guarantee is good only if you bought your CD player less than 90 days ago Which statement is equivalent ? 1. if you bought your CD player less than 90 days ago then your guarantee is good 2. If your guarantee is good then you have bought your CD player less than 90 days ago 3. You bought your CD player less than 90 days ago is sufficient for the guarantee to be good. 4. You bought your CD player less than 90 days ago is necessary for the guarantee to be good. 1 and 3 are not equivalent .. Why ?
  • 11. 1.1.11 A. Elgammal – CS205 Rutgers The biconditional p ↔ q is the proposition that is true when p and q have the same truth values, and is false otherwise. Biconditional is equivalent to two way implication: p ↔ q ≡ p → q ∧ q → p p → q : if p then q : p only if q q → p : if q then p : p if q p ↔ q : p if and only if q or, p ↔ q : p iff q : q iff p T F F F T F F F T T T T p ↔ q q p
  • 12. 1.1.12 A. Elgammal – CS205 Rutgers p ↔ q ≡ p → q ∧ q → p p → q : p is sufficient condition for q q → p : p is necessary condition for q p ↔ q : p is necessary and sufficient condition for q Or, since p ↔ q ≡ q ↔ p , q is necessary and sufficient condition for p
  • 13. 1.1.13 A. Elgammal – CS205 Rutgers Ex: This program is correct if, and only if, it produces the correct answer for all possible sets of input data. This is equivalent to: If this program is correct, then it produces the correct answer for all possible sets of input data and if it produces the correct answer for all possible sets of input data then this program is correct. This is equivalent to: This program is correct is necessary and sufficient condition for it to produce correct answer for all possible sets of input data. This is also equivalent to: This program produces the correct answer for all possible sets of input data is necessary and sufficient condition for the program to be correct