SlideShare a Scribd company logo
1 of 18
Discrete Structures
BY ABDUR REHMAN USMANI
Logic
o Study of the principles and techniques
of reasoning
o Basis of all mathematical reasoning,
and of all automated reasoning.
o Foundation for computer science
operation.
o For reasoning about their truth or falsity.
Proposition
o A proposition is a *declarative
sentence/statement that is either true or
false, but not both.
• Islamabad is the capital of the Pakistan.
• 1 + 1 = 2
• If 1=2 then roses are red.
These are not proposition
 What time is it?
 x + 1 = 2
Proposition
o We use letters to denote
propositional variables (or
statement variables), that
is p, q, r, s, . . . .
o We say that the truth value of a
proposition is either true (T) or
false (F).
Proposition
“Today is January 27”
Is this a statement? Yes
Is this a proposition? yes
What is the truth value
of the proposition? false
Connectives/Logical Operators
o Compound propositions(statements),
are formed from existing propositions
using logical operators.
Truth Table
o The truth value of the
compound proposition
depends only on the truth
value of the component
propositions. Such a list is a
called a truth table.
Negation (NOT) 
o If p = “I have brown hair.”
o then ¬p = “I do not have
brown hair.”
P  P
true (T) false (F)
false (F) true (T)
Conjunction (AND) 
 If p=“I will have salad for lunch.” and q=“I will have
biryani for dinner .”, then p∧q=“I will have salad for
lunch and AND I will have biryani for dinner.”
P Q P Q
T T T
T F F
F T F
F F F
Disjunction (OR) 
o p=“My car has a bad engine.”
o q=“My car has a bad carburetor.”
o p∨q=“Either my car has a bad engine,
or my car has a bad carburetor.”
P Q P  Q
T T T
T F T
F T T
F F F
Connectives
Let p=“It rained last night”,
q=“The sprinklers came on last night,”
r=“The lawn was wet this morning.”
Translate each of the following into English:
¬p = “It didn’t rain last night.”
r ∧ ¬p =“The lawn was wet this morning,
and it didn’t rain last night.”
¬ r ∨ p ∨ q =“Either the lawn wasn’t wet this
morning, or it rained last night, or the sprinklers
came on last night.”
Connectives
Let p= “It is hot”
q=““It is sunny”
1. It is not hot but it is sunny.
2. It is neither hot nor sunny.
Solution
1. ⌐p∧q
2. ⌐p∧ ⌐q
Exclusive Or (XOR) 
o p = “I will earn an A in this course,”
o q = “I will drop this course,”
o p ⊕ q = “I will either earn an A in this
course, or I will drop it (but not both!)”
P Q PQ
T T F
T F T
F T T
F F F
Exclusive Or (XOR) 
o 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.
P Q PQ
T T F
T F T
F T T
F F F
• p = “I will earn an A in this
course,”
• q = “I will drop this course,”
• p ⊕ q = “I will either earn
an A in this course, or I will
drop it (but not both!)”
Implication (if - then) 
o 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. p is
called the hypothesis and q is
called the conclusion
Implication (if - then) 
P Q PQ
T T T
T F F
F T T
F F T
p = “You study hard.”
q = “You will get a
good grade.”
p → q = “If you study
hard, then you will get
a good
grade.”
Biconditionals (if and Only If) 
 p = “Zardari wins the 2008 election.”
 q = “Zardari will be president for five
years.”
 p ↔ q = “If, and only if, Zardari wins the
2008 election, Zardari will be president
for five years.”
p ↔ q does not imply that p
and q are true, or that
either of them causes the other,
or that they have a
common cause.

More Related Content

What's hot

Conditional Statements
Conditional StatementsConditional Statements
Conditional Statementsmicdsram
 
Axiom of Choice
Axiom of Choice Axiom of Choice
Axiom of Choice gizemk
 
1.3.2 Conditional Statements
1.3.2 Conditional Statements1.3.2 Conditional Statements
1.3.2 Conditional Statementssmiller5
 
Applications of maxima and minima
Applications of maxima and minimaApplications of maxima and minima
Applications of maxima and minimarouwejan
 
Logic (slides)
Logic (slides)Logic (slides)
Logic (slides)IIUM
 
Logic (PROPOSITIONS)
Logic (PROPOSITIONS)Logic (PROPOSITIONS)
Logic (PROPOSITIONS)D Nayanathara
 
6.2 the indefinite integral
6.2 the indefinite integral 6.2 the indefinite integral
6.2 the indefinite integral dicosmo178
 
Lesson 27: Integration by Substitution (slides)
Lesson 27: Integration by Substitution (slides)Lesson 27: Integration by Substitution (slides)
Lesson 27: Integration by Substitution (slides)Matthew Leingang
 
Axiom of choice presentation
Axiom of choice presentationAxiom of choice presentation
Axiom of choice presentationzapi2011
 
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 contrapositiveBrandeis High School
 
Probability In Discrete Structure of Computer Science
Probability In Discrete Structure of Computer ScienceProbability In Discrete Structure of Computer Science
Probability In Discrete Structure of Computer SciencePrankit Mishra
 
CMSC 56 | Lecture 2: Propositional Equivalences
CMSC 56 | Lecture 2: Propositional EquivalencesCMSC 56 | Lecture 2: Propositional Equivalences
CMSC 56 | Lecture 2: Propositional Equivalencesallyn joy calcaben
 

What's hot (20)

Conditional Statements
Conditional StatementsConditional Statements
Conditional Statements
 
Proposition (Logic)
Proposition (Logic)Proposition (Logic)
Proposition (Logic)
 
Formal Logic - Lesson 2 - Logical Connectives
Formal Logic - Lesson 2 - Logical ConnectivesFormal Logic - Lesson 2 - Logical Connectives
Formal Logic - Lesson 2 - Logical Connectives
 
Axiom of Choice
Axiom of Choice Axiom of Choice
Axiom of Choice
 
Basic calculus (ii) recap
Basic calculus (ii) recapBasic calculus (ii) recap
Basic calculus (ii) recap
 
1.3.2 Conditional Statements
1.3.2 Conditional Statements1.3.2 Conditional Statements
1.3.2 Conditional Statements
 
Applications of maxima and minima
Applications of maxima and minimaApplications of maxima and minima
Applications of maxima and minima
 
Truth table
Truth tableTruth table
Truth table
 
Logic (slides)
Logic (slides)Logic (slides)
Logic (slides)
 
Introduction to Sets
Introduction to SetsIntroduction to Sets
Introduction to Sets
 
Logic (PROPOSITIONS)
Logic (PROPOSITIONS)Logic (PROPOSITIONS)
Logic (PROPOSITIONS)
 
Conditionals
ConditionalsConditionals
Conditionals
 
Discrete math Truth Table
Discrete math Truth TableDiscrete math Truth Table
Discrete math Truth Table
 
6.2 the indefinite integral
6.2 the indefinite integral 6.2 the indefinite integral
6.2 the indefinite integral
 
Lesson 27: Integration by Substitution (slides)
Lesson 27: Integration by Substitution (slides)Lesson 27: Integration by Substitution (slides)
Lesson 27: Integration by Substitution (slides)
 
Axiom of choice presentation
Axiom of choice presentationAxiom of choice presentation
Axiom of choice presentation
 
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
 
Probability In Discrete Structure of Computer Science
Probability In Discrete Structure of Computer ScienceProbability In Discrete Structure of Computer Science
Probability In Discrete Structure of Computer Science
 
CMSC 56 | Lecture 2: Propositional Equivalences
CMSC 56 | Lecture 2: Propositional EquivalencesCMSC 56 | Lecture 2: Propositional Equivalences
CMSC 56 | Lecture 2: Propositional Equivalences
 
Logic
LogicLogic
Logic
 

Similar to 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 applicationsZenLooper
 
Converse, contrapositive, inverse
Converse, contrapositive, inverseConverse, contrapositive, inverse
Converse, contrapositive, inverseAbdur Rehman
 
Drinkfromme.pptx
Drinkfromme.pptxDrinkfromme.pptx
Drinkfromme.pptxRavind8
 
Propositional Logic.pdf
Propositional Logic.pdfPropositional Logic.pdf
Propositional Logic.pdfZLEMORHAN3
 
Artificial Intelligence - Propositional Logic
Artificial Intelligence - Propositional LogicArtificial Intelligence - Propositional Logic
Artificial Intelligence - Propositional LogicSaravanan T.M
 
Discrete Structure vs Discrete Mathematics
Discrete Structure vs Discrete MathematicsDiscrete Structure vs Discrete Mathematics
Discrete Structure vs Discrete MathematicsAbdulRehman378540
 
Chapter 01 - p1.pdf
Chapter 01 - p1.pdfChapter 01 - p1.pdf
Chapter 01 - p1.pdfsmarwaneid
 
CSE-203 Lec_1.pptx
CSE-203 Lec_1.pptxCSE-203 Lec_1.pptx
CSE-203 Lec_1.pptxMahdiHasan86
 
UGC NET Computer Science & Application book.pdf [Sample]
UGC NET Computer Science & Application book.pdf  [Sample]UGC NET Computer Science & Application book.pdf  [Sample]
UGC NET Computer Science & Application book.pdf [Sample]DIwakar Rajput
 
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 ProofsProfSHananeel
 

Similar to logic, preposition etc (20)

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
 
logicj-160412050513.pptx
logicj-160412050513.pptxlogicj-160412050513.pptx
logicj-160412050513.pptx
 
Converse, contrapositive, inverse
Converse, contrapositive, inverseConverse, contrapositive, inverse
Converse, contrapositive, inverse
 
Drinkfromme.pptx
Drinkfromme.pptxDrinkfromme.pptx
Drinkfromme.pptx
 
Propositional Logic.pdf
Propositional Logic.pdfPropositional Logic.pdf
Propositional Logic.pdf
 
Artificial Intelligence - Propositional Logic
Artificial Intelligence - Propositional LogicArtificial Intelligence - Propositional Logic
Artificial Intelligence - Propositional Logic
 
Discrete Structure vs Discrete Mathematics
Discrete Structure vs Discrete MathematicsDiscrete Structure vs Discrete Mathematics
Discrete Structure vs Discrete Mathematics
 
Chapter1p1.pdf
Chapter1p1.pdfChapter1p1.pdf
Chapter1p1.pdf
 
Dscrete structure
Dscrete  structureDscrete  structure
Dscrete structure
 
Chapter 01 - p1.pdf
Chapter 01 - p1.pdfChapter 01 - p1.pdf
Chapter 01 - p1.pdf
 
Chapter1p1
Chapter1p1Chapter1p1
Chapter1p1
 
1. Logic.pptx
1. Logic.pptx1. Logic.pptx
1. Logic.pptx
 
CSE-203 Lec_1.pptx
CSE-203 Lec_1.pptxCSE-203 Lec_1.pptx
CSE-203 Lec_1.pptx
 
UGC NET Computer Science & Application book.pdf [Sample]
UGC NET Computer Science & Application book.pdf  [Sample]UGC NET Computer Science & Application book.pdf  [Sample]
UGC NET Computer Science & Application book.pdf [Sample]
 
CS202Ch1.ppt
CS202Ch1.pptCS202Ch1.ppt
CS202Ch1.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
 
Chapter1p1 2.pptx
Chapter1p1 2.pptxChapter1p1 2.pptx
Chapter1p1 2.pptx
 
L01.ppt
L01.pptL01.ppt
L01.ppt
 
Bab 1 proposisi
Bab 1 proposisiBab 1 proposisi
Bab 1 proposisi
 
Logic
LogicLogic
Logic
 

More from Abdur Rehman

Financial accounting
Financial accountingFinancial accounting
Financial accountingAbdur Rehman
 
Valid & invalid arguments
Valid & invalid argumentsValid & invalid arguments
Valid & invalid argumentsAbdur Rehman
 
Proving existential statements
Proving existential statementsProving existential statements
Proving existential statementsAbdur Rehman
 
Method of direct proof
Method of direct proofMethod of direct proof
Method of direct proofAbdur Rehman
 
Proofs by contraposition
Proofs by contrapositionProofs by contraposition
Proofs by contrapositionAbdur Rehman
 
Constructing circuits for boolean expressions(gate)
Constructing circuits for boolean expressions(gate)Constructing circuits for boolean expressions(gate)
Constructing circuits for boolean expressions(gate)Abdur Rehman
 
Application of bases
Application of basesApplication of bases
Application of basesAbdur Rehman
 
Intro to disceret structure
Intro to disceret structureIntro to disceret structure
Intro to disceret structureAbdur Rehman
 

More from Abdur Rehman (15)

Financial accounting
Financial accountingFinancial accounting
Financial accounting
 
Valid & invalid arguments
Valid & invalid argumentsValid & invalid arguments
Valid & invalid arguments
 
Sets
SetsSets
Sets
 
Sequences
SequencesSequences
Sequences
 
Recursion
RecursionRecursion
Recursion
 
Queue
QueueQueue
Queue
 
Quantification
QuantificationQuantification
Quantification
 
Proving existential statements
Proving existential statementsProving existential statements
Proving existential statements
 
Method of direct proof
Method of direct proofMethod of direct proof
Method of direct proof
 
Proofs by contraposition
Proofs by contrapositionProofs by contraposition
Proofs by contraposition
 
Laws in disceret
Laws in disceretLaws in disceret
Laws in disceret
 
Constructing circuits for boolean expressions(gate)
Constructing circuits for boolean expressions(gate)Constructing circuits for boolean expressions(gate)
Constructing circuits for boolean expressions(gate)
 
Application of bases
Application of basesApplication of bases
Application of bases
 
Intro to disceret structure
Intro to disceret structureIntro to disceret structure
Intro to disceret structure
 
Dst lec3
Dst lec3Dst lec3
Dst lec3
 

Recently uploaded

Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
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.pptxJisc
 
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.pdfPoh-Sun Goh
 
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 17Celine George
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
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).pdfssuserdda66b
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
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.pptxDenish Jangid
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 
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Ữ Â...Nguyen Thanh Tu Collection
 

Recently uploaded (20)

Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
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
 
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
 
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
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
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
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
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
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
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Ữ Â...
 

logic, preposition etc

  • 2. Logic o Study of the principles and techniques of reasoning o Basis of all mathematical reasoning, and of all automated reasoning. o Foundation for computer science operation. o For reasoning about their truth or falsity.
  • 3. Proposition o A proposition is a *declarative sentence/statement that is either true or false, but not both. • Islamabad is the capital of the Pakistan. • 1 + 1 = 2 • If 1=2 then roses are red. These are not proposition  What time is it?  x + 1 = 2
  • 4. Proposition o We use letters to denote propositional variables (or statement variables), that is p, q, r, s, . . . . o We say that the truth value of a proposition is either true (T) or false (F).
  • 5. Proposition “Today is January 27” Is this a statement? Yes Is this a proposition? yes What is the truth value of the proposition? false
  • 6. Connectives/Logical Operators o Compound propositions(statements), are formed from existing propositions using logical operators.
  • 7. Truth Table o The truth value of the compound proposition depends only on the truth value of the component propositions. Such a list is a called a truth table.
  • 8. Negation (NOT)  o If p = “I have brown hair.” o then ¬p = “I do not have brown hair.” P  P true (T) false (F) false (F) true (T)
  • 9. Conjunction (AND)   If p=“I will have salad for lunch.” and q=“I will have biryani for dinner .”, then p∧q=“I will have salad for lunch and AND I will have biryani for dinner.” P Q P Q T T T T F F F T F F F F
  • 10. Disjunction (OR)  o p=“My car has a bad engine.” o q=“My car has a bad carburetor.” o p∨q=“Either my car has a bad engine, or my car has a bad carburetor.” P Q P  Q T T T T F T F T T F F F
  • 11. Connectives Let p=“It rained last night”, q=“The sprinklers came on last night,” r=“The lawn was wet this morning.” Translate each of the following into English: ¬p = “It didn’t rain last night.” r ∧ ¬p =“The lawn was wet this morning, and it didn’t rain last night.” ¬ r ∨ p ∨ q =“Either the lawn wasn’t wet this morning, or it rained last night, or the sprinklers came on last night.”
  • 12. Connectives Let p= “It is hot” q=““It is sunny” 1. It is not hot but it is sunny. 2. It is neither hot nor sunny. Solution 1. ⌐p∧q 2. ⌐p∧ ⌐q
  • 13. Exclusive Or (XOR)  o p = “I will earn an A in this course,” o q = “I will drop this course,” o p ⊕ q = “I will either earn an A in this course, or I will drop it (but not both!)” P Q PQ T T F T F T F T T F F F
  • 14. Exclusive Or (XOR)  o 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. P Q PQ T T F T F T F T T F F F • p = “I will earn an A in this course,” • q = “I will drop this course,” • p ⊕ q = “I will either earn an A in this course, or I will drop it (but not both!)”
  • 15.
  • 16. Implication (if - then)  o 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. p is called the hypothesis and q is called the conclusion
  • 17. Implication (if - then)  P Q PQ T T T T F F F T T F F T p = “You study hard.” q = “You will get a good grade.” p → q = “If you study hard, then you will get a good grade.”
  • 18. Biconditionals (if and Only If)   p = “Zardari wins the 2008 election.”  q = “Zardari will be president for five years.”  p ↔ q = “If, and only if, Zardari wins the 2008 election, Zardari will be president for five years.” p ↔ q does not imply that p and q are true, or that either of them causes the other, or that they have a common cause.

Editor's Notes

  1. *that is, a sentence that declares a fact
  2. *that is, a sentence that declares a fact
  3. *that is, a sentence that declares a fact
  4. *that is, a sentence that declares a fact
  5. *that is, a sentence that declares a fact