SlideShare a Scribd company logo
1 of 20
Download to read offline
FUNDAMENTALS OF LOGIC
BY
LAKSHMI R
ASST. PROFESSOR
DEPARTMENT OF ISE
PROPOSITION
• Statement or declaration which in a given context, can be either true or false,
but not both.
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
Propositions:
i. France borders Belgium
ii. 8 is an even number
(May not be true always!!)
i. Barcelona is in Italy
ii. 2 is rational
Not Propositions:
i. Can you pass the sheet?
ii. Listen to me.
iii. What a lovely dress!
iv. Give me a cup of tea.
TRUTH VALUE
• The truth or falsity of a proposition is called its truth value
Propositions:
i. France borders Belgium – with truth value TRUE (1)
ii. 8 is an even number – with truth value TRUE (1)
iii. Barcelona is in Italy - with truth value FALSE (0)
iv. 2 is rational - with truth value FALSE (0)
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
LOGICAL CONNECTIVES
• New phrases are obtained – not, or, and, if then, if and only if etc.,
• Compound propositions - The new proposition obtained by the use of logical
connectives eg: France borders Belgium and Norway borders Sweden
• Components or primitives – original propositions from which a compound
proposition is obtained.
• Simple propositions – Proposition that do not contain any logical connectives
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
LOGICAL CONNECTIVES
UNDERSTANDING
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
LOGICAL CONNECTIVES CONTD., - TRUTH TABLES
Negation (NOT) Conjunction (AND) Disjunction (OR)
Exclusive Disjunction (XOR) Conditional or Implication (if
then)
Bidirectional or Double
Implication (if and only if)
PQ AND Q  P
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
LOGICAL CONNECTIVES CONTD., EXAMPLES
Negation:
p: Madrid is a capital city
¬p : Madrid is not a capital city
Conjunction:
P: 2 is an irrational number
Q: 2 + 5 = 7
P ∧ Q : 2 is an irrational number and
2 + 5 = 7
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
Disjunction:
p: Triangles have three sides
q : Bangalore is in Karnataka
p ∨ q : Triangles have three sides or
Bangalore is in Karnataka
Exclusive Disjunction:
p: Alex eats an apple
q: Alex eats an orange
p ⊻ q : Alex eats an apple or Alex
eats an orange, but not both
LOGICAL CONNECTIVES CONTD., EXAMPLES
Conditional
p: I weigh more than 120 pounds
q : I shall enrol in an exercise class
p → q : if I weigh more than 120 pounds, then I shall enrol in an
exercise class
Bidirectional: (p → q) ∧ (q → p)
p: I shall enrol in an exercise class
q : I weigh more than 120 pounds
p ↔ q : I shall enrol in an exercise class if and only if I weigh more
than 120 pounds
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
PROBLEM 1:
Let s, t, and u denote the following primitive statements.
s: Zac goes out for a walk
t: The moon is out
u: It is snowing
Express the following compound propositions in words
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
(t ∧ ¬u) → s
¬ ∧ ∨ ⊻ → ↔
If the moon is out and it is not snowing, then Zac goes out for a walk
t → (¬u → s) If the moon is out then it is not snowing then Zac goes out for a walk
¬(s ↔ (u ∨ t))
It is not the case that Zac goes out for a walk if and only if it is snowing or
the moon is out
u ∧ s It is snowing and Zac goes out for a walk
(u ∧ ¬t) → ¬s If it is snowing and the moo is not out, then Zac does not go out for a walk
s ↔ t Zac goes out for a walk if and only the moon is out
p → q ---- if p, then q
p ↔ q ---- p if and only if q
PROBLEM 2:
Construct truth table for the following compound propositions
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
¬ ∧ ∨ ⊻ → ↔
p ∧ ¬q
p → ¬q
p q ¬q p → ¬q
0 0 1 1
0 1 0 1
1 0 1 1
1 1 0 0
p q ¬q p ∧ ¬q
0 0 1 0
0 1 0 0
1 0 1 1
1 1 0 0
q ∧ (¬r → p)
p q r ¬r ¬r → p q ∧ (¬r → p)
0 0 0 1 0 0
0 0 1 0 1 0
0 1 0 1 0 0
0 1 1 0 1 1
1 0 0 1 1 0
1 0 1 0 1 0
1 1 0 1 1 1
1 1 1 0 1 1
(p ∨ q) ∧ r
p ∨ (q ∨ r)
(p ∧ q) → ¬r
Try this!
Let p and q be primitive statements for which the implication p → q is false.
Determine the truth values of the following
i. p ∧ q
ii. ¬ p ∨ q
iii.q → p
iv.¬ q → ¬ p
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
PROBLEM 3: ¬ ∧ ∨ ⊻ → ↔
Given: p → q is false
p → q is false only when p is true and
q is false
 Truth value of p is 1 (or true)
Truth value of q is 0 (or false)
Solution:
p = 1 q = 0
i. p ∧ q = 1 ∧ 0 = 0
 p ∧ q is false
ii. ¬ p ∨ p = ¬ 1 ∨ 0 = 0 ∨ 0 = 0
 ¬ p ∨ p if false
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
iii. q → p = 0 → 1 = 1
 q → p is true
iv. ¬ q → ¬ p = ¬ 0 → ¬ 1 = 1 → 0 = 0
 ¬ q → ¬ p is false
Let p, q, and r be propositions having truth values 0, 0, and 1 respectively. Find
the truth values of the following
i. (p ∨ q) ∨ r
ii. (p ∧ q) ∧ r
iii. (p ∧ q) → r
iv. p → (q ∧ r)
v. p ∧ (r → q)
vi. p → (q → ¬ r)
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
¬ ∧ ∨ ⊻ → ↔PROBLEM 4:
Answers:
i. True
ii. False
iii. True
iv. True
v. False
vi. True
• Find the possible truth values of p, q, and r in the following cases.
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
PROBLEM 5:
p → (q ∨ r) is false
¬ ∧ ∨ ⊻ → ↔
Solution
⁃ p → (q ∨ r) = 0
⁃ Only if p =1 and (q ∨ r) = 0
⁃ (q ∨ r) is false only if q = 0, r = 0
p ∧ (q → r) is true
Solution
⁃ This is possible only when
⁃ p = 1 and (q → r) = 1
⁃ (q → r) = 1 in 3 cases (recall the truth table
of implication)
p q r
1 0 0
p q r
1 0 0
1 0 1
1 1 1
• If a proposition q has truth value 1, determine all truth value assignments for the
primitive propositions p, q, r, and s for which the truth value of the following
proposition is 1
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
PROBLEM 6: ¬ ∧ ∨ ⊻ → ↔
[ q → { (¬p ∨ r ) ∧ ¬s } ] ∧ {¬s → (¬r ∧ q ) }
[ q → { (¬p ∨ r ) ∧ ¬s } ] ∧ {¬s → (¬r ∧ q ) }
1 1
q → { (¬p ∨ r ) ∧ ¬s } = 1
---- eq(1)
¬s → (¬r ∧ q ) = 1 ---- eq(2)
Given, q = 1. Substitute this.
q → { (¬p ∨ r ) ∧ ¬s } = 1
Substituting q = 1 in eq(1)
⇒ 1 → { (¬p ∨ r ) ∧ ¬s } = 1
This is possible only if
{ (¬p ∨ r ) ∧ ¬s } = 1
⇒ ¬s = 1 and
(¬p ∨ r ) = 1 --- eq (3)
If ¬s = 1, s = 0
¬s → (¬r ∧ q ) = 1
We got, ¬s = 1
Substituting ¬s = 1 and
q = 1 in eq(2)
1 → (¬r ∧ 1 ) = 1
This is possible only if
(¬r ∧ 1 ) = 1
⇒ ¬r = 1
If ¬r = 1 , r = 0
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
Substituting r in eq (3),
(¬p ∨ 0 ) = 1
¬p has to be 1 to get
the above equation
right.
Therefore, p = 0
Truth values
p q r s
0 1 0 0
1 2 3
Give the conjunction and disjunction of p and q, also indicate the truth value.
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
PROBLEM 7: ¬ ∧ ∨ ⊻ → ↔
i)
p: 4 is a perfect square
q: 27 is a prime number
ii)
p: 5 is divisible by 2
q: 7 is a multiple of 5
Conjunction: p ∧ q ⇒ 4 is a perfect
square and 27 is a prime number
p = 1, q = 0
 p ∧ q is False
Disjunction: p ∨ q ⇒ 4 is a perfect
square or 27 is a prime number
p = 1, q = 0
 p ∨ q is true
Conjunction: p ∧ q ⇒ 5 is divisible by 2
and 7 is a multiple of 5
p = 0, q = 0
 p ∧ q is False
Disjunction: p ∨ q ⇒ 5 is divisible by 2
and 7 is a multiple of 5
p = 0, q = 0
 p ∨ q is False
From the information given in each of the following
determine the truth value required.
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
Solve it!!!
a. p ∧ q is false and p is true. Find the truth value of q
b. p → q is true, q is false. Find the truth value of p
c. P ↔ q is true, p is false. Find the truth value of q.
¬ ∧ ∨ ⊻ → ↔PROBLEM 8:
TAUTOLOGY, CONTRADICTION AND
CONTINGENCY
• Tautology – Always true regardless of the truth values of its components
Eg: p ∨ ¬ p
• Contradiction – Always false
Eg: p ∧ ¬ p
• Contingency – Neither tautology not contingency
Eg: ¬ p ∧ q
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
p ¬ p p ∨ ¬ p
0 1 1
1 0 1
p ¬ p p ∧ ¬ p
0 1 0
1 0 0
p q ¬ p ¬ p ∧ q
0 0 1 0
0 1 1 1
1 0 0 0
1 1 0 0
i. (p ⊻ q) ∨ (p ↔ q) is a tautology
ii. (p ⊻ q) ∧ (p ↔ q) is a contradiction
iii. (p ⊻ q) ∧ (p → q) is a contingency
iv. P → (p ∨ q) is a tautology
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
PROBLEM 9: SHOW THAT
Another way of asking the same question
Show that the truth values of the following
compound propositions are independent of the
truth values of their components.

More Related Content

What's hot

Proofs by contraposition
Proofs by contrapositionProofs by contraposition
Proofs by contrapositionAbdur Rehman
 
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
 
Limits and continuity powerpoint
Limits and continuity powerpointLimits and continuity powerpoint
Limits and continuity powerpointcanalculus
 
Relations and functions
Relations and functions Relations and functions
Relations and functions Leslie Amoguis
 
Basic Connectives and Truth Tables.ppt
Basic Connectives and Truth Tables.pptBasic Connectives and Truth Tables.ppt
Basic Connectives and Truth Tables.pptsamalaramesh4
 
Propositional logic
Propositional logicPropositional logic
Propositional logicMamta Pandey
 
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 Inferenceallyn joy calcaben
 
Mathematical Induction
Mathematical InductionMathematical Induction
Mathematical InductionEdelyn Cagas
 
Principle of mathematical induction
Principle of mathematical inductionPrinciple of mathematical induction
Principle of mathematical inductionKriti Varshney
 
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 Strategyallyn joy calcaben
 
Mathematical Logic - Part 1
Mathematical Logic - Part 1Mathematical Logic - Part 1
Mathematical Logic - Part 1blaircomp2003
 
1.3.2 Conditional Statements
1.3.2 Conditional Statements1.3.2 Conditional Statements
1.3.2 Conditional Statementssmiller5
 
Permutations & Combinations
Permutations & CombinationsPermutations & Combinations
Permutations & Combinationsrfant
 
CMSC 56 | Lecture 1: Propositional Logic
CMSC 56 | Lecture 1: Propositional LogicCMSC 56 | Lecture 1: Propositional Logic
CMSC 56 | Lecture 1: Propositional Logicallyn joy calcaben
 
Continuity of a Function
Continuity of a Function Continuity of a Function
Continuity of a Function Vishvesh Jasani
 
CMSC 56 | Lecture 3: Predicates & Quantifiers
CMSC 56 | Lecture 3: Predicates & QuantifiersCMSC 56 | Lecture 3: Predicates & Quantifiers
CMSC 56 | Lecture 3: Predicates & Quantifiersallyn joy calcaben
 

What's hot (20)

Logic - Logical Propositions
Logic - Logical Propositions Logic - Logical Propositions
Logic - Logical Propositions
 
Proofs by contraposition
Proofs by contrapositionProofs by contraposition
Proofs by contraposition
 
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 د. خالد بكرو
 
Limits and continuity powerpoint
Limits and continuity powerpointLimits and continuity powerpoint
Limits and continuity powerpoint
 
Relations and functions
Relations and functions Relations and functions
Relations and functions
 
Basic Connectives and Truth Tables.ppt
Basic Connectives and Truth Tables.pptBasic Connectives and Truth Tables.ppt
Basic Connectives and Truth Tables.ppt
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 
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 Induction
Mathematical InductionMathematical Induction
Mathematical Induction
 
Principle of mathematical induction
Principle of mathematical inductionPrinciple of mathematical induction
Principle of mathematical induction
 
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
 
Mathematical Logic - Part 1
Mathematical Logic - Part 1Mathematical Logic - Part 1
Mathematical Logic - Part 1
 
1.3.2 Conditional Statements
1.3.2 Conditional Statements1.3.2 Conditional Statements
1.3.2 Conditional Statements
 
Homomorphisms
HomomorphismsHomomorphisms
Homomorphisms
 
Permutations & Combinations
Permutations & CombinationsPermutations & Combinations
Permutations & Combinations
 
Language of Sets
Language of SetsLanguage of Sets
Language of Sets
 
CMSC 56 | Lecture 1: Propositional Logic
CMSC 56 | Lecture 1: Propositional LogicCMSC 56 | Lecture 1: Propositional Logic
CMSC 56 | Lecture 1: Propositional Logic
 
Sequence and series
Sequence and seriesSequence and series
Sequence and series
 
Continuity of a Function
Continuity of a Function Continuity of a Function
Continuity of a Function
 
CMSC 56 | Lecture 3: Predicates & Quantifiers
CMSC 56 | Lecture 3: Predicates & QuantifiersCMSC 56 | Lecture 3: Predicates & Quantifiers
CMSC 56 | Lecture 3: Predicates & Quantifiers
 

Similar to Fundamentals of logic 1

Logic and proof
Logic and proofLogic and proof
Logic and proofSuresh Ram
 
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
 
[gaNita] 2. Propositional Equivalences [math.fsu.edu].pdf
[gaNita] 2. Propositional Equivalences [math.fsu.edu].pdf[gaNita] 2. Propositional Equivalences [math.fsu.edu].pdf
[gaNita] 2. Propositional Equivalences [math.fsu.edu].pdfrAjyarAjanItjJa
 
UNIT-III-PPT.pptx
UNIT-III-PPT.pptxUNIT-III-PPT.pptx
UNIT-III-PPT.pptxDakshBaveja
 
Math 189 Exam 1 Solutions
Math 189 Exam 1 SolutionsMath 189 Exam 1 Solutions
Math 189 Exam 1 SolutionsTyler Murphy
 
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
 
Logical arguments and its computer applications.
Logical arguments and its computer applications.Logical arguments and its computer applications.
Logical arguments and its computer applications.Saumay Paul
 
20220818151924_PPT01 - The Logic of Compound and Quantitative Statement.pptx
20220818151924_PPT01 - The Logic of Compound and Quantitative Statement.pptx20220818151924_PPT01 - The Logic of Compound and Quantitative Statement.pptx
20220818151924_PPT01 - The Logic of Compound and Quantitative Statement.pptxssuser92109d
 
Chapter 01 - p1.pdf
Chapter 01 - p1.pdfChapter 01 - p1.pdf
Chapter 01 - p1.pdfsmarwaneid
 
Discrete Mathematical Structures - Fundamentals of Logic - Principle of duality
Discrete Mathematical Structures - Fundamentals of Logic - Principle of dualityDiscrete Mathematical Structures - Fundamentals of Logic - Principle of duality
Discrete Mathematical Structures - Fundamentals of Logic - Principle of dualityLakshmi R
 
Proofs and disproofs
Proofs and disproofsProofs and disproofs
Proofs and disproofsLakshmi R
 
Discrete-Chapter 04 Logic Part II
Discrete-Chapter 04 Logic Part IIDiscrete-Chapter 04 Logic Part II
Discrete-Chapter 04 Logic Part IIWongyos Keardsri
 

Similar to Fundamentals of logic 1 (20)

Logic parti
Logic partiLogic parti
Logic parti
 
Logic and proof
Logic and proofLogic and proof
Logic and proof
 
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]
 
[gaNita] 2. Propositional Equivalences [math.fsu.edu].pdf
[gaNita] 2. Propositional Equivalences [math.fsu.edu].pdf[gaNita] 2. Propositional Equivalences [math.fsu.edu].pdf
[gaNita] 2. Propositional Equivalences [math.fsu.edu].pdf
 
UNIT-III-PPT.pptx
UNIT-III-PPT.pptxUNIT-III-PPT.pptx
UNIT-III-PPT.pptx
 
Math 189 Exam 1 Solutions
Math 189 Exam 1 SolutionsMath 189 Exam 1 Solutions
Math 189 Exam 1 Solutions
 
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
 
L2.pdf
L2.pdfL2.pdf
L2.pdf
 
Logic
LogicLogic
Logic
 
12_Truth_Tables.pptx
12_Truth_Tables.pptx12_Truth_Tables.pptx
12_Truth_Tables.pptx
 
Course notes1
Course notes1Course notes1
Course notes1
 
Logical arguments and its computer applications.
Logical arguments and its computer applications.Logical arguments and its computer applications.
Logical arguments and its computer applications.
 
20220818151924_PPT01 - The Logic of Compound and Quantitative Statement.pptx
20220818151924_PPT01 - The Logic of Compound and Quantitative Statement.pptx20220818151924_PPT01 - The Logic of Compound and Quantitative Statement.pptx
20220818151924_PPT01 - The Logic of Compound and Quantitative Statement.pptx
 
Chapter 01 - p1.pdf
Chapter 01 - p1.pdfChapter 01 - p1.pdf
Chapter 01 - p1.pdf
 
Discrete Mathematical Structures - Fundamentals of Logic - Principle of duality
Discrete Mathematical Structures - Fundamentals of Logic - Principle of dualityDiscrete Mathematical Structures - Fundamentals of Logic - Principle of duality
Discrete Mathematical Structures - Fundamentals of Logic - Principle of duality
 
Proofs and disproofs
Proofs and disproofsProofs and disproofs
Proofs and disproofs
 
DS Lecture 2.ppt
DS Lecture 2.pptDS Lecture 2.ppt
DS Lecture 2.ppt
 
Chapter1p1
Chapter1p1Chapter1p1
Chapter1p1
 
Chapter1p1.pdf
Chapter1p1.pdfChapter1p1.pdf
Chapter1p1.pdf
 
Discrete-Chapter 04 Logic Part II
Discrete-Chapter 04 Logic Part IIDiscrete-Chapter 04 Logic Part II
Discrete-Chapter 04 Logic Part II
 

More from Lakshmi R

Use of quantifiers
Use of quantifiersUse of quantifiers
Use of quantifiersLakshmi R
 
Logical implication - Necessary and Sufficient conditions
Logical implication  -  Necessary and Sufficient conditionsLogical implication  -  Necessary and Sufficient conditions
Logical implication - Necessary and Sufficient conditionsLakshmi R
 
NAND and NOR connectives
NAND and NOR connectivesNAND and NOR connectives
NAND and NOR connectivesLakshmi R
 
Logical equivalence, laws of logic
Logical equivalence, laws of logicLogical equivalence, laws of logic
Logical equivalence, laws of logicLakshmi R
 
Rules of inference
Rules of inferenceRules of inference
Rules of inferenceLakshmi R
 
Java Collection Framework
Java Collection FrameworkJava Collection Framework
Java Collection FrameworkLakshmi R
 
Jsp presentation
Jsp presentationJsp presentation
Jsp presentationLakshmi R
 

More from Lakshmi R (9)

Use of quantifiers
Use of quantifiersUse of quantifiers
Use of quantifiers
 
Css basics
Css basicsCss basics
Css basics
 
Html basics
Html basicsHtml basics
Html basics
 
Logical implication - Necessary and Sufficient conditions
Logical implication  -  Necessary and Sufficient conditionsLogical implication  -  Necessary and Sufficient conditions
Logical implication - Necessary and Sufficient conditions
 
NAND and NOR connectives
NAND and NOR connectivesNAND and NOR connectives
NAND and NOR connectives
 
Logical equivalence, laws of logic
Logical equivalence, laws of logicLogical equivalence, laws of logic
Logical equivalence, laws of logic
 
Rules of inference
Rules of inferenceRules of inference
Rules of inference
 
Java Collection Framework
Java Collection FrameworkJava Collection Framework
Java Collection Framework
 
Jsp presentation
Jsp presentationJsp presentation
Jsp presentation
 

Recently uploaded

CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 

Recently uploaded (20)

CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 

Fundamentals of logic 1

  • 1. FUNDAMENTALS OF LOGIC BY LAKSHMI R ASST. PROFESSOR DEPARTMENT OF ISE
  • 2. PROPOSITION • Statement or declaration which in a given context, can be either true or false, but not both. LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE Propositions: i. France borders Belgium ii. 8 is an even number (May not be true always!!) i. Barcelona is in Italy ii. 2 is rational Not Propositions: i. Can you pass the sheet? ii. Listen to me. iii. What a lovely dress! iv. Give me a cup of tea.
  • 3. TRUTH VALUE • The truth or falsity of a proposition is called its truth value Propositions: i. France borders Belgium – with truth value TRUE (1) ii. 8 is an even number – with truth value TRUE (1) iii. Barcelona is in Italy - with truth value FALSE (0) iv. 2 is rational - with truth value FALSE (0) LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
  • 4. LOGICAL CONNECTIVES • New phrases are obtained – not, or, and, if then, if and only if etc., • Compound propositions - The new proposition obtained by the use of logical connectives eg: France borders Belgium and Norway borders Sweden • Components or primitives – original propositions from which a compound proposition is obtained. • Simple propositions – Proposition that do not contain any logical connectives LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
  • 5. LOGICAL CONNECTIVES UNDERSTANDING LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
  • 6. LOGICAL CONNECTIVES CONTD., - TRUTH TABLES Negation (NOT) Conjunction (AND) Disjunction (OR) Exclusive Disjunction (XOR) Conditional or Implication (if then) Bidirectional or Double Implication (if and only if) PQ AND Q  P LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
  • 7. LOGICAL CONNECTIVES CONTD., EXAMPLES Negation: p: Madrid is a capital city ¬p : Madrid is not a capital city Conjunction: P: 2 is an irrational number Q: 2 + 5 = 7 P ∧ Q : 2 is an irrational number and 2 + 5 = 7 LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE Disjunction: p: Triangles have three sides q : Bangalore is in Karnataka p ∨ q : Triangles have three sides or Bangalore is in Karnataka Exclusive Disjunction: p: Alex eats an apple q: Alex eats an orange p ⊻ q : Alex eats an apple or Alex eats an orange, but not both
  • 8. LOGICAL CONNECTIVES CONTD., EXAMPLES Conditional p: I weigh more than 120 pounds q : I shall enrol in an exercise class p → q : if I weigh more than 120 pounds, then I shall enrol in an exercise class Bidirectional: (p → q) ∧ (q → p) p: I shall enrol in an exercise class q : I weigh more than 120 pounds p ↔ q : I shall enrol in an exercise class if and only if I weigh more than 120 pounds LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
  • 9. PROBLEM 1: Let s, t, and u denote the following primitive statements. s: Zac goes out for a walk t: The moon is out u: It is snowing Express the following compound propositions in words LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE (t ∧ ¬u) → s ¬ ∧ ∨ ⊻ → ↔ If the moon is out and it is not snowing, then Zac goes out for a walk t → (¬u → s) If the moon is out then it is not snowing then Zac goes out for a walk ¬(s ↔ (u ∨ t)) It is not the case that Zac goes out for a walk if and only if it is snowing or the moon is out u ∧ s It is snowing and Zac goes out for a walk (u ∧ ¬t) → ¬s If it is snowing and the moo is not out, then Zac does not go out for a walk s ↔ t Zac goes out for a walk if and only the moon is out p → q ---- if p, then q p ↔ q ---- p if and only if q
  • 10. PROBLEM 2: Construct truth table for the following compound propositions LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE ¬ ∧ ∨ ⊻ → ↔ p ∧ ¬q p → ¬q p q ¬q p → ¬q 0 0 1 1 0 1 0 1 1 0 1 1 1 1 0 0 p q ¬q p ∧ ¬q 0 0 1 0 0 1 0 0 1 0 1 1 1 1 0 0 q ∧ (¬r → p) p q r ¬r ¬r → p q ∧ (¬r → p) 0 0 0 1 0 0 0 0 1 0 1 0 0 1 0 1 0 0 0 1 1 0 1 1 1 0 0 1 1 0 1 0 1 0 1 0 1 1 0 1 1 1 1 1 1 0 1 1 (p ∨ q) ∧ r p ∨ (q ∨ r) (p ∧ q) → ¬r Try this!
  • 11. Let p and q be primitive statements for which the implication p → q is false. Determine the truth values of the following i. p ∧ q ii. ¬ p ∨ q iii.q → p iv.¬ q → ¬ p LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE PROBLEM 3: ¬ ∧ ∨ ⊻ → ↔ Given: p → q is false p → q is false only when p is true and q is false  Truth value of p is 1 (or true) Truth value of q is 0 (or false) Solution:
  • 12. p = 1 q = 0 i. p ∧ q = 1 ∧ 0 = 0  p ∧ q is false ii. ¬ p ∨ p = ¬ 1 ∨ 0 = 0 ∨ 0 = 0  ¬ p ∨ p if false LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE iii. q → p = 0 → 1 = 1  q → p is true iv. ¬ q → ¬ p = ¬ 0 → ¬ 1 = 1 → 0 = 0  ¬ q → ¬ p is false
  • 13. Let p, q, and r be propositions having truth values 0, 0, and 1 respectively. Find the truth values of the following i. (p ∨ q) ∨ r ii. (p ∧ q) ∧ r iii. (p ∧ q) → r iv. p → (q ∧ r) v. p ∧ (r → q) vi. p → (q → ¬ r) LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE ¬ ∧ ∨ ⊻ → ↔PROBLEM 4: Answers: i. True ii. False iii. True iv. True v. False vi. True
  • 14. • Find the possible truth values of p, q, and r in the following cases. LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE PROBLEM 5: p → (q ∨ r) is false ¬ ∧ ∨ ⊻ → ↔ Solution ⁃ p → (q ∨ r) = 0 ⁃ Only if p =1 and (q ∨ r) = 0 ⁃ (q ∨ r) is false only if q = 0, r = 0 p ∧ (q → r) is true Solution ⁃ This is possible only when ⁃ p = 1 and (q → r) = 1 ⁃ (q → r) = 1 in 3 cases (recall the truth table of implication) p q r 1 0 0 p q r 1 0 0 1 0 1 1 1 1
  • 15. • If a proposition q has truth value 1, determine all truth value assignments for the primitive propositions p, q, r, and s for which the truth value of the following proposition is 1 LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE PROBLEM 6: ¬ ∧ ∨ ⊻ → ↔ [ q → { (¬p ∨ r ) ∧ ¬s } ] ∧ {¬s → (¬r ∧ q ) } [ q → { (¬p ∨ r ) ∧ ¬s } ] ∧ {¬s → (¬r ∧ q ) } 1 1 q → { (¬p ∨ r ) ∧ ¬s } = 1 ---- eq(1) ¬s → (¬r ∧ q ) = 1 ---- eq(2) Given, q = 1. Substitute this.
  • 16. q → { (¬p ∨ r ) ∧ ¬s } = 1 Substituting q = 1 in eq(1) ⇒ 1 → { (¬p ∨ r ) ∧ ¬s } = 1 This is possible only if { (¬p ∨ r ) ∧ ¬s } = 1 ⇒ ¬s = 1 and (¬p ∨ r ) = 1 --- eq (3) If ¬s = 1, s = 0 ¬s → (¬r ∧ q ) = 1 We got, ¬s = 1 Substituting ¬s = 1 and q = 1 in eq(2) 1 → (¬r ∧ 1 ) = 1 This is possible only if (¬r ∧ 1 ) = 1 ⇒ ¬r = 1 If ¬r = 1 , r = 0 LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE Substituting r in eq (3), (¬p ∨ 0 ) = 1 ¬p has to be 1 to get the above equation right. Therefore, p = 0 Truth values p q r s 0 1 0 0 1 2 3
  • 17. Give the conjunction and disjunction of p and q, also indicate the truth value. LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE PROBLEM 7: ¬ ∧ ∨ ⊻ → ↔ i) p: 4 is a perfect square q: 27 is a prime number ii) p: 5 is divisible by 2 q: 7 is a multiple of 5 Conjunction: p ∧ q ⇒ 4 is a perfect square and 27 is a prime number p = 1, q = 0  p ∧ q is False Disjunction: p ∨ q ⇒ 4 is a perfect square or 27 is a prime number p = 1, q = 0  p ∨ q is true Conjunction: p ∧ q ⇒ 5 is divisible by 2 and 7 is a multiple of 5 p = 0, q = 0  p ∧ q is False Disjunction: p ∨ q ⇒ 5 is divisible by 2 and 7 is a multiple of 5 p = 0, q = 0  p ∨ q is False
  • 18. From the information given in each of the following determine the truth value required. LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE Solve it!!! a. p ∧ q is false and p is true. Find the truth value of q b. p → q is true, q is false. Find the truth value of p c. P ↔ q is true, p is false. Find the truth value of q. ¬ ∧ ∨ ⊻ → ↔PROBLEM 8:
  • 19. TAUTOLOGY, CONTRADICTION AND CONTINGENCY • Tautology – Always true regardless of the truth values of its components Eg: p ∨ ¬ p • Contradiction – Always false Eg: p ∧ ¬ p • Contingency – Neither tautology not contingency Eg: ¬ p ∧ q LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE p ¬ p p ∨ ¬ p 0 1 1 1 0 1 p ¬ p p ∧ ¬ p 0 1 0 1 0 0 p q ¬ p ¬ p ∧ q 0 0 1 0 0 1 1 1 1 0 0 0 1 1 0 0
  • 20. i. (p ⊻ q) ∨ (p ↔ q) is a tautology ii. (p ⊻ q) ∧ (p ↔ q) is a contradiction iii. (p ⊻ q) ∧ (p → q) is a contingency iv. P → (p ∨ q) is a tautology LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE PROBLEM 9: SHOW THAT Another way of asking the same question Show that the truth values of the following compound propositions are independent of the truth values of their components.