SlideShare a Scribd company logo
`
1
Definition: Propositional Logic
A proposition is a collection of declarative statements that has either a truth value
"true” or a truth value "false". A propositional consists of propositional variables
and connectives. We denote the propositional variables by capital letters (A, B, C
etc). The connectives connect the propositional variables.
Some examples of Propositions are given below:
• "Man is Mortal", it returns truth value“TRUE” as T.
• "12 + 9 = 3 − 2", it returns truth
value “FALSE” as F.
The following is not a Proposition
• "A is less than 2". It is because unless we give a specific value of A, we
cannot say whether the statement is true orfalse.
Connectives
In propositional logic generally we use five connectives which are OR (), AND
(), Negation/ NOT (¬), Conditional or Implication / if-then (→), Bi conditional or
If and only if ().
Negation (¬) − The negation of a proposition A (written as ¬A) is false when A is true and is true when A
is false.
The truth table is as follows –
A ¬A
True False
False True
AND (  ) − The AND operation of two propositions A and B (written as A  B) is
true if both the propositional variable A and B is true.
`
2
The truth table is as follows −
A B A  B
True True False
True False False
False True False
False False True
OR ()− The OR operation of two propositions A and B (written as A  B) is true
if at least any of the propositional variable A or B is true.
The truth table is as follows −
A B A  B
T T T
T F T
F T T
F F F
Implication / if-then (→) − An implication A→B is False if A is true and B is false. The rest
cases are true.
`
3
The truth table is as follows −
A B A → B
True True True
True False False
False True True
False False True
If and only if ()− A B is bi-conditional logical connective which is true when
p and q are both false or both are true.
The truth table is as follows −
A B A  B
True True True
True False False
False True False
False False True
Well Formed Formulas (WFFs)
The well formed formulas (WFFs) or statement formulas or logic formulas are defined
recursively (or inductively) as below.
1. Propositional variables p,q,r,… and propositional constants F,T are well formed
formulas. They are known as primitive WFFs.
`
4
2. If P and Q are WFFs then P,Q,P Q,P  Q,P → Q and P  Q are also WFFs.
3. All WFFs are obtained by the above procedures applied a finite number of times.
For example, the following are WFFs
p, p  q, p → q, p (q → r) (p  q)→ r, (p → q)→(q → p)
Note: In order to avoid excessive use of parenthesis, we adopt an order of precedence for
logical Operators.
, , , → and 
Tautologies
A Tautology is a formula which is always true for every value of its propositional variables.
Example − Prove [(A → B)  A] → B is a tautology
The truth table is as follows −
A B A → B (A → B)  A [(A → B)  A] → B
True True True True True
True False False False True
False True True False True
False False True False True
As we can see every value of [(A → B)  A] → B is “True”, it is a tautology.
Contradictions
A Contradiction is a formula which is always false for every value of its propositional
variables.
Example − Prove (A VB)  [(¬A)  (¬B)] is a contradiction
The truth table is as follows −
`
5
A B A 
B
¬A ¬B (¬A) 
(¬B)
(A V B)  [(¬A) 
(¬B)]
True True True False False False False
True False True False True False False
False True True True False False False
False False False True True True False
As we can see every value of (A  B)  [(¬A)  (¬B)] is “False”, it is a
Contradiction.
Contingency
A Contingency is a formula which has both some true and some false values for
every value of its propositional variables.
Example − Prove (A  B)  (¬A) a contingency
The truth table is as follows −
A B A  B ¬A (A  B)  (¬A)
True True True False False
True False True False False
False True True True True
False False False True False
As we can see every value of (A  B)  (¬A) has both “True” and “False”, it
is a contingency.
Propositional Equivalences
`
6
Two statements X and Y are logically equivalent if any of the following two conditions −
• The truth tables of each statement have the same truth values.
• The bi-conditional statement X Y is a tautology.
Example−Prove¬(A  B)and[(¬A)  (¬B)]are
equivalent Testing by 1st method (Matching truth
table)
A B A 
B
¬ (A  B) ¬A ¬B [(¬A)  (¬B)]
True True True False False False False
True False True False False True False
False True True False True False False
False False False True True True True
Here, we can see the truth values of ¬ (A  B) and [(¬A)  (¬B)] are same, hence
the statements are equivalent.
Testing by 2nd method (Bi-conditionality)
A B ¬ (A 
B)
[(¬A) 
(¬B)]
[¬ (A  B)]  [(¬A) 
(¬B)]
True True False False True
True False False False True
False True False False True
False False True True True
As [¬ (A  B)]  [(¬A)  (¬B)] is a tautology, the statements are equivalent.
`
8
Laws of Propositional Logic:
S.No Name of Laws Primal Form Dual Form
1 Idempotent Law p  p  p p  p  p
2 Identity Law p  F  p p  T  p
3 Dominant Law p  T  T p  F  F
4 Complement Law p  p  T p  p  F
5 Commutative Law p  q  q  p p  q  q  p
6 Associative Law p  (q  r) (p  q) r p (q  r) (p  q) r
7 Distributive Law p(qr) (p  q)(p  r) p(q  r) (p q)(p r)
8 Absorption Law p  (p  q) p p (p  q) p
9 De Morgan’s Law (p  q) p q (p  q) p  q
10 Double Negation Law (p)  p -
Logical Equivalences involving Conditional Statements
Logical Equivalences involving Biconditional Statements
Inverse, Converse, and Contra-positive
A conditional statement has two parts − Hypothesis and Conclusion.
Example of Conditional Statement − “If you do your homework, you will not
be punished.” Here, "you do your homework" is the hypothesis and "you will
`
9
not be punished" is the conclusion.
Inverse –An inverse of the conditional statement is the negation of both the
hypothesis and the conclusion. If the statement is “If p, then q”, the inverse will
be “If not p, then not q”. The inverse of “If you do your homework, you will not
be punished” is “If you do not do your homework, you will be punished.”
Converse−The converse of the conditional statement is computed by interchanging the
hypothesis and the conclusion. If the statement is “If p, then q”, the inverse will be “If q,
Then p”. The converse of "If you do your homework, you will not be punished" is "If you
will not be punished, you do not do your homework”.
Contra-positive –The contra-positive of the conditional is computed by
interchanging the hypothesis and the conclusion of the inverse statement. If the
statement is “If p, then q”, the inverse will be “If not q, then not p”. The Contra-
positive of "If you do your homework, you will not be punished” is "If you will
be punished, you do your home work”.
Duality Principle
Duality principle set states that for any true statement, the dual statement
obtained by interchanging unions into intersections (and vice versa) and
interchanging Universal set into Null set (and vice versa) is also true. If dual of
any statement is the statement itself, it is said self-dual statement.
`
10
Examples
`
11
Elementary Product: A product of the variables and their negations in a
formula is called an elementary product. If p and q are any two atomic
variables, then p, p  q, q  p, p  q are some examples of
elementary products.
Elementary Sum: A sum of the variables and their negations in a formula is
called an elementary sum. If P and Q are any two atomic variables, then
p, p  q, q  p, p  q are some examples of elementary sums.
Normal Forms: We can convert any proposition in two normal forms −
1. Conjunctive Normal Form (CNF) 2.Disjunctive Normal Form (DNF)
Conjunctive Normal Form
A compound statement is in conjunctive normal form if it is obtained by
operating AND among variables (negation of variables included) connected
with ORs.
Examples: 1. (p  q) (q  r)
2. (p  q  r) (s  r)
Disjunctive Normal Form
A compound statement is in disjunctive normal form if it is obtained by
operating OR among variables (negation of variables included) connected with
ANDs.
Example: (p  q) (p  q) (p  q  r)
Functionally Complete set
A set of logical operators is called functionally complete if every compound
proposition is logically equivalent to a compound proposition involving only
this set of logical operators. ,,  form a functionally complete set of
operators.
Minterms: For two variables p and q there are 4 possible formulas which
consist of conjunctions of p,q or it’s negation given by
p  q, p  q, p  q, p  q
`
12
Maxterms: For two variables p and q there are 4 possible formulas which
consist of disjunctions of p,q or its negation given by
p  q, p  q, p  q, p  q
Principal Disjunctive Normal Form: For a given formula an equivalent
formula consisting of disjunctions of minterms only is known as principal
disjunctive normal form (PDNF).
Principal Conjunctive Normal Form: For a given formula an equivalent
formula consisting of conjunctions of maxterms only is known as principal
conjunctive normal form (PCNF).
Problems:
`
13
`
14
Rule of inference to build arguments:
RuleP: A premise may be introduced at point in the derivation
Rule T: A formula S may be introduced in a derivation if S is a tautologically
implied by any one or more of the preceeding formulas in the derivation.
Rule CP: If we can derive S from R and a set of premises, then we can derive
R →S from the set of premises alone. Rule CP is also called deduction theoem.
`
15
Examples:
`
16
`
17
Quantifiers:
The variable of predicates is quantified by quantifiers. There are two types of quantifier in
Predicate logic − Universal Quantifier and Existential Quantifier.
Universal Quantifier:
Universal quantifier states that the statements within its scope are true for every
value of the specific variable. It is denoted by the symbol ∀.
∀x P(x) is read as for every value of x, P(x) is true.
Example: "Man is mortal" can be transformed into the propositional form ∀x
P(x) where P(x) is the predicate which denotes x is mortal and the universe of
discourse is all men.
Existential Quantifier:
Existential quantifier states that the statements within its scope are true for some
values of the specific variable. It is denoted by the symbol ∃.∃x P(x) is read as
for some values of x, P(x) is true.
`
18
Example: "Some people are dishonest" can be transformed into the
propositional form ∃x P(x) where P(x) is the predicate which denotes x is
dishonest and the universe of discourse is some people.
Nested Quantifiers:
If we use a quantifier that appears within the scope of another quantifier, it is
called nested quantifier.
`
19
Symbolize the following statements:
(a)All men are mortal
(b)All the world loves alover
(c) X is the father of
mother of Y (d)No cats
has atail
(e) Some people who trust others are rewarded
Solution:
`
20
`
21
1

More Related Content

What's hot

RECURSIVE DESCENT PARSING
RECURSIVE DESCENT PARSINGRECURSIVE DESCENT PARSING
RECURSIVE DESCENT PARSING
Jothi Lakshmi
 
3. Syntax Analyzer.pptx
3. Syntax Analyzer.pptx3. Syntax Analyzer.pptx
3. Syntax Analyzer.pptx
Mattupallipardhu
 
Automata
AutomataAutomata
Automata
Gaditek
 
Divide and conquer
Divide and conquerDivide and conquer
Divide and conquer
Dr Shashikant Athawale
 
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
allyn joy calcaben
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
Mamta Pandey
 
Proofs by contraposition
Proofs by contrapositionProofs by contraposition
Proofs by contraposition
Abdur Rehman
 
Proof by contradiction
Proof by contradictionProof by contradiction
Proof by contradiction
GC University Fsd
 
Path testing, data flow testing
Path testing, data flow testingPath testing, data flow testing
Path testing, data flow testing
priyasoundar
 
L attribute in compiler design
L  attribute in compiler designL  attribute in compiler design
L attribute in compiler design
khush_boo31
 
Chomsky Normal Form
Chomsky Normal FormChomsky Normal Form
Chomsky Normal Form
Jasmine Peniel
 
Theory of computation Lec3 dfa
Theory of computation Lec3 dfaTheory of computation Lec3 dfa
Theory of computation Lec3 dfa
Arab Open University and Cairo University
 
Discrete Math Lecture 01: Propositional Logic
Discrete Math Lecture 01: Propositional LogicDiscrete Math Lecture 01: Propositional Logic
Discrete Math Lecture 01: Propositional Logic
IT Engineering Department
 
parallel Merging
parallel Mergingparallel Merging
parallel Merging
Richa Kumari
 
Compiler unit 2&3
Compiler unit 2&3Compiler unit 2&3
Compiler unit 2&3
BBDITM LUCKNOW
 
Recursive Descent Parsing
Recursive Descent Parsing  Recursive Descent Parsing
Recursive Descent Parsing
Md Tajul Islam
 
Asymptotic analysis
Asymptotic analysisAsymptotic analysis
Asymptotic analysis
Soujanya V
 
Formal Logic - Lesson 5 - Logical Equivalence
Formal Logic - Lesson 5 - Logical EquivalenceFormal Logic - Lesson 5 - Logical Equivalence
Formal Logic - Lesson 5 - Logical Equivalence
Laguna State Polytechnic University
 
Randomizing quicksort algorith with example
Randomizing quicksort algorith with exampleRandomizing quicksort algorith with example
Randomizing quicksort algorith with example
maamir farooq
 

What's hot (20)

RECURSIVE DESCENT PARSING
RECURSIVE DESCENT PARSINGRECURSIVE DESCENT PARSING
RECURSIVE DESCENT PARSING
 
3. Syntax Analyzer.pptx
3. Syntax Analyzer.pptx3. Syntax Analyzer.pptx
3. Syntax Analyzer.pptx
 
Automata
AutomataAutomata
Automata
 
Divide and conquer
Divide and conquerDivide and conquer
Divide and conquer
 
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
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 
Proofs by contraposition
Proofs by contrapositionProofs by contraposition
Proofs by contraposition
 
Proof by contradiction
Proof by contradictionProof by contradiction
Proof by contradiction
 
Path testing, data flow testing
Path testing, data flow testingPath testing, data flow testing
Path testing, data flow testing
 
1 intro to logic
1 intro to logic1 intro to logic
1 intro to logic
 
L attribute in compiler design
L  attribute in compiler designL  attribute in compiler design
L attribute in compiler design
 
Chomsky Normal Form
Chomsky Normal FormChomsky Normal Form
Chomsky Normal Form
 
Theory of computation Lec3 dfa
Theory of computation Lec3 dfaTheory of computation Lec3 dfa
Theory of computation Lec3 dfa
 
Discrete Math Lecture 01: Propositional Logic
Discrete Math Lecture 01: Propositional LogicDiscrete Math Lecture 01: Propositional Logic
Discrete Math Lecture 01: Propositional Logic
 
parallel Merging
parallel Mergingparallel Merging
parallel Merging
 
Compiler unit 2&3
Compiler unit 2&3Compiler unit 2&3
Compiler unit 2&3
 
Recursive Descent Parsing
Recursive Descent Parsing  Recursive Descent Parsing
Recursive Descent Parsing
 
Asymptotic analysis
Asymptotic analysisAsymptotic analysis
Asymptotic analysis
 
Formal Logic - Lesson 5 - Logical Equivalence
Formal Logic - Lesson 5 - Logical EquivalenceFormal Logic - Lesson 5 - Logical Equivalence
Formal Logic - Lesson 5 - Logical Equivalence
 
Randomizing quicksort algorith with example
Randomizing quicksort algorith with exampleRandomizing quicksort algorith with example
Randomizing quicksort algorith with example
 

Similar to Proposition Logic in Discrete Structure

Discrete mathematics [LOGICAL CONNECTIVES]
Discrete mathematics [LOGICAL CONNECTIVES]Discrete mathematics [LOGICAL CONNECTIVES]
Discrete mathematics [LOGICAL CONNECTIVES]
KalingoAurobindo
 
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
 
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
ssuser92109d
 
Logic in Computer Science Unit 2 (1).pptx
Logic in Computer Science Unit 2 (1).pptxLogic in Computer Science Unit 2 (1).pptx
Logic in Computer Science Unit 2 (1).pptx
PriyalMayurManvar
 
DM(1).pptx
DM(1).pptxDM(1).pptx
DM(1).pptx
PradeeshSAI
 
Tablas de Verdad
Tablas de VerdadTablas de Verdad
Tablas de Verdad
Elvin Fortin
 
Chapter1p1
Chapter1p1Chapter1p1
Chapter1p1
Angel Martinez
 
Basic Connectives and Truth Tables.ppt
Basic Connectives and Truth Tables.pptBasic Connectives and Truth Tables.ppt
Basic Connectives and Truth Tables.ppt
samalaramesh4
 
12_Truth_Tables.pptx
12_Truth_Tables.pptx12_Truth_Tables.pptx
12_Truth_Tables.pptx
EdelmarBenosa3
 
Chapter 01 - p1.pdf
Chapter 01 - p1.pdfChapter 01 - p1.pdf
Chapter 01 - p1.pdf
smarwaneid
 
Disrete mathematics and_its application_by_rosen _7th edition_lecture_1
Disrete mathematics and_its application_by_rosen _7th edition_lecture_1Disrete mathematics and_its application_by_rosen _7th edition_lecture_1
Disrete mathematics and_its application_by_rosen _7th edition_lecture_1taimoor iftikhar
 
Mathmatical reasoning
Mathmatical reasoningMathmatical reasoning
Mathmatical reasoningindu psthakur
 
Discrete math Truth Table
Discrete math Truth TableDiscrete math Truth Table
Discrete math Truth Table
University of Potsdam
 
Drinkfromme.pptx
Drinkfromme.pptxDrinkfromme.pptx
Drinkfromme.pptx
Ravind8
 
Computer Organization and Assembly Language
Computer Organization and Assembly LanguageComputer Organization and Assembly Language
Computer Organization and Assembly Language
Raquel Mulles
 
Discrete structures & optimization unit 1
Discrete structures & optimization unit 1Discrete structures & optimization unit 1
Discrete structures & optimization unit 1
SURBHI SAROHA
 
3 computing truth tables
3   computing truth tables3   computing truth tables
3 computing truth tables
jennytuazon01630
 
Chapter1p1.pdf
Chapter1p1.pdfChapter1p1.pdf
Chapter1p1.pdf
IqraAli875037
 
CPSC 125 Ch 1 sec 2
CPSC 125 Ch 1 sec 2CPSC 125 Ch 1 sec 2
CPSC 125 Ch 1 sec 2David Wood
 

Similar to Proposition Logic in Discrete Structure (20)

Discrete mathematics [LOGICAL CONNECTIVES]
Discrete mathematics [LOGICAL CONNECTIVES]Discrete mathematics [LOGICAL CONNECTIVES]
Discrete mathematics [LOGICAL CONNECTIVES]
 
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]
 
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
 
Logic in Computer Science Unit 2 (1).pptx
Logic in Computer Science Unit 2 (1).pptxLogic in Computer Science Unit 2 (1).pptx
Logic in Computer Science Unit 2 (1).pptx
 
DM(1).pptx
DM(1).pptxDM(1).pptx
DM(1).pptx
 
Tablas de Verdad
Tablas de VerdadTablas de Verdad
Tablas de Verdad
 
Logic
LogicLogic
Logic
 
Chapter1p1
Chapter1p1Chapter1p1
Chapter1p1
 
Basic Connectives and Truth Tables.ppt
Basic Connectives and Truth Tables.pptBasic Connectives and Truth Tables.ppt
Basic Connectives and Truth Tables.ppt
 
12_Truth_Tables.pptx
12_Truth_Tables.pptx12_Truth_Tables.pptx
12_Truth_Tables.pptx
 
Chapter 01 - p1.pdf
Chapter 01 - p1.pdfChapter 01 - p1.pdf
Chapter 01 - p1.pdf
 
Disrete mathematics and_its application_by_rosen _7th edition_lecture_1
Disrete mathematics and_its application_by_rosen _7th edition_lecture_1Disrete mathematics and_its application_by_rosen _7th edition_lecture_1
Disrete mathematics and_its application_by_rosen _7th edition_lecture_1
 
Mathmatical reasoning
Mathmatical reasoningMathmatical reasoning
Mathmatical reasoning
 
Discrete math Truth Table
Discrete math Truth TableDiscrete math Truth Table
Discrete math Truth Table
 
Drinkfromme.pptx
Drinkfromme.pptxDrinkfromme.pptx
Drinkfromme.pptx
 
Computer Organization and Assembly Language
Computer Organization and Assembly LanguageComputer Organization and Assembly Language
Computer Organization and Assembly Language
 
Discrete structures & optimization unit 1
Discrete structures & optimization unit 1Discrete structures & optimization unit 1
Discrete structures & optimization unit 1
 
3 computing truth tables
3   computing truth tables3   computing truth tables
3 computing truth tables
 
Chapter1p1.pdf
Chapter1p1.pdfChapter1p1.pdf
Chapter1p1.pdf
 
CPSC 125 Ch 1 sec 2
CPSC 125 Ch 1 sec 2CPSC 125 Ch 1 sec 2
CPSC 125 Ch 1 sec 2
 

More from NANDINI SHARMA

Function and Recursively defined function
Function and Recursively defined functionFunction and Recursively defined function
Function and Recursively defined function
NANDINI SHARMA
 
Relation in Discrete Mathematics
Relation in Discrete Mathematics Relation in Discrete Mathematics
Relation in Discrete Mathematics
NANDINI SHARMA
 
Mathematical Induction in Discrete Structure
Mathematical Induction in Discrete StructureMathematical Induction in Discrete Structure
Mathematical Induction in Discrete Structure
NANDINI SHARMA
 
SETS in Discrete Structure
SETS in Discrete StructureSETS in Discrete Structure
SETS in Discrete Structure
NANDINI SHARMA
 
Predicate logic
Predicate logicPredicate logic
Predicate logic
NANDINI SHARMA
 
Rules of Inference in Discrete Structure
Rules of Inference in Discrete StructureRules of Inference in Discrete Structure
Rules of Inference in Discrete Structure
NANDINI SHARMA
 
Algebraic Structure Part 2 DSTL
Algebraic Structure Part 2 DSTLAlgebraic Structure Part 2 DSTL
Algebraic Structure Part 2 DSTL
NANDINI SHARMA
 
FIELD in Discrete Structure
FIELD in Discrete StructureFIELD in Discrete Structure
FIELD in Discrete Structure
NANDINI SHARMA
 
Algebraic Structure
Algebraic StructureAlgebraic Structure
Algebraic Structure
NANDINI SHARMA
 
LATTICE in Discrete Structure
LATTICE in Discrete StructureLATTICE in Discrete Structure
LATTICE in Discrete Structure
NANDINI SHARMA
 
DSTL: TREES AND GRAPH
DSTL: TREES AND GRAPHDSTL: TREES AND GRAPH
DSTL: TREES AND GRAPH
NANDINI SHARMA
 
5 variable kmap questions
5 variable kmap questions5 variable kmap questions
5 variable kmap questions
NANDINI SHARMA
 
Computer Graphics
Computer GraphicsComputer Graphics
Computer Graphics
NANDINI SHARMA
 
Computer Architecture & Organization
Computer Architecture & OrganizationComputer Architecture & Organization
Computer Architecture & Organization
NANDINI SHARMA
 
Database Management System
Database Management SystemDatabase Management System
Database Management System
NANDINI SHARMA
 
Multimedia
Multimedia Multimedia
Multimedia
NANDINI SHARMA
 
Number System (Computer)
Number System (Computer)Number System (Computer)
Number System (Computer)
NANDINI SHARMA
 
Data Structure Part III
Data Structure Part IIIData Structure Part III
Data Structure Part III
NANDINI SHARMA
 
Data Structure Part II
Data Structure Part IIData Structure Part II
Data Structure Part II
NANDINI SHARMA
 
Computer Network Notes (Handwritten) UNIT 2
Computer Network Notes (Handwritten) UNIT 2Computer Network Notes (Handwritten) UNIT 2
Computer Network Notes (Handwritten) UNIT 2
NANDINI SHARMA
 

More from NANDINI SHARMA (20)

Function and Recursively defined function
Function and Recursively defined functionFunction and Recursively defined function
Function and Recursively defined function
 
Relation in Discrete Mathematics
Relation in Discrete Mathematics Relation in Discrete Mathematics
Relation in Discrete Mathematics
 
Mathematical Induction in Discrete Structure
Mathematical Induction in Discrete StructureMathematical Induction in Discrete Structure
Mathematical Induction in Discrete Structure
 
SETS in Discrete Structure
SETS in Discrete StructureSETS in Discrete Structure
SETS in Discrete Structure
 
Predicate logic
Predicate logicPredicate logic
Predicate logic
 
Rules of Inference in Discrete Structure
Rules of Inference in Discrete StructureRules of Inference in Discrete Structure
Rules of Inference in Discrete Structure
 
Algebraic Structure Part 2 DSTL
Algebraic Structure Part 2 DSTLAlgebraic Structure Part 2 DSTL
Algebraic Structure Part 2 DSTL
 
FIELD in Discrete Structure
FIELD in Discrete StructureFIELD in Discrete Structure
FIELD in Discrete Structure
 
Algebraic Structure
Algebraic StructureAlgebraic Structure
Algebraic Structure
 
LATTICE in Discrete Structure
LATTICE in Discrete StructureLATTICE in Discrete Structure
LATTICE in Discrete Structure
 
DSTL: TREES AND GRAPH
DSTL: TREES AND GRAPHDSTL: TREES AND GRAPH
DSTL: TREES AND GRAPH
 
5 variable kmap questions
5 variable kmap questions5 variable kmap questions
5 variable kmap questions
 
Computer Graphics
Computer GraphicsComputer Graphics
Computer Graphics
 
Computer Architecture & Organization
Computer Architecture & OrganizationComputer Architecture & Organization
Computer Architecture & Organization
 
Database Management System
Database Management SystemDatabase Management System
Database Management System
 
Multimedia
Multimedia Multimedia
Multimedia
 
Number System (Computer)
Number System (Computer)Number System (Computer)
Number System (Computer)
 
Data Structure Part III
Data Structure Part IIIData Structure Part III
Data Structure Part III
 
Data Structure Part II
Data Structure Part IIData Structure Part II
Data Structure Part II
 
Computer Network Notes (Handwritten) UNIT 2
Computer Network Notes (Handwritten) UNIT 2Computer Network Notes (Handwritten) UNIT 2
Computer Network Notes (Handwritten) UNIT 2
 

Recently uploaded

Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Soumen Santra
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
Online aptitude test management system project report.pdf
Online aptitude test management system project report.pdfOnline aptitude test management system project report.pdf
Online aptitude test management system project report.pdf
Kamal Acharya
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
gestioneergodomus
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
symbo111
 
Water billing management system project report.pdf
Water billing management system project report.pdfWater billing management system project report.pdf
Water billing management system project report.pdf
Kamal Acharya
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
camseq
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
zwunae
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
heavyhaig
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
Swimming pool mechanical components design.pptx
Swimming pool  mechanical components design.pptxSwimming pool  mechanical components design.pptx
Swimming pool mechanical components design.pptx
yokeleetan1
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 

Recently uploaded (20)

Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
Online aptitude test management system project report.pdf
Online aptitude test management system project report.pdfOnline aptitude test management system project report.pdf
Online aptitude test management system project report.pdf
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
 
Water billing management system project report.pdf
Water billing management system project report.pdfWater billing management system project report.pdf
Water billing management system project report.pdf
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
Swimming pool mechanical components design.pptx
Swimming pool  mechanical components design.pptxSwimming pool  mechanical components design.pptx
Swimming pool mechanical components design.pptx
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 

Proposition Logic in Discrete Structure

  • 1. ` 1 Definition: Propositional Logic A proposition is a collection of declarative statements that has either a truth value "true” or a truth value "false". A propositional consists of propositional variables and connectives. We denote the propositional variables by capital letters (A, B, C etc). The connectives connect the propositional variables. Some examples of Propositions are given below: • "Man is Mortal", it returns truth value“TRUE” as T. • "12 + 9 = 3 − 2", it returns truth value “FALSE” as F. The following is not a Proposition • "A is less than 2". It is because unless we give a specific value of A, we cannot say whether the statement is true orfalse. Connectives In propositional logic generally we use five connectives which are OR (), AND (), Negation/ NOT (¬), Conditional or Implication / if-then (→), Bi conditional or If and only if (). Negation (¬) − The negation of a proposition A (written as ¬A) is false when A is true and is true when A is false. The truth table is as follows – A ¬A True False False True AND (  ) − The AND operation of two propositions A and B (written as A  B) is true if both the propositional variable A and B is true.
  • 2. ` 2 The truth table is as follows − A B A  B True True False True False False False True False False False True OR ()− The OR operation of two propositions A and B (written as A  B) is true if at least any of the propositional variable A or B is true. The truth table is as follows − A B A  B T T T T F T F T T F F F Implication / if-then (→) − An implication A→B is False if A is true and B is false. The rest cases are true.
  • 3. ` 3 The truth table is as follows − A B A → B True True True True False False False True True False False True If and only if ()− A B is bi-conditional logical connective which is true when p and q are both false or both are true. The truth table is as follows − A B A  B True True True True False False False True False False False True Well Formed Formulas (WFFs) The well formed formulas (WFFs) or statement formulas or logic formulas are defined recursively (or inductively) as below. 1. Propositional variables p,q,r,… and propositional constants F,T are well formed formulas. They are known as primitive WFFs.
  • 4. ` 4 2. If P and Q are WFFs then P,Q,P Q,P  Q,P → Q and P  Q are also WFFs. 3. All WFFs are obtained by the above procedures applied a finite number of times. For example, the following are WFFs p, p  q, p → q, p (q → r) (p  q)→ r, (p → q)→(q → p) Note: In order to avoid excessive use of parenthesis, we adopt an order of precedence for logical Operators. , , , → and  Tautologies A Tautology is a formula which is always true for every value of its propositional variables. Example − Prove [(A → B)  A] → B is a tautology The truth table is as follows − A B A → B (A → B)  A [(A → B)  A] → B True True True True True True False False False True False True True False True False False True False True As we can see every value of [(A → B)  A] → B is “True”, it is a tautology. Contradictions A Contradiction is a formula which is always false for every value of its propositional variables. Example − Prove (A VB)  [(¬A)  (¬B)] is a contradiction The truth table is as follows −
  • 5. ` 5 A B A  B ¬A ¬B (¬A)  (¬B) (A V B)  [(¬A)  (¬B)] True True True False False False False True False True False True False False False True True True False False False False False False True True True False As we can see every value of (A  B)  [(¬A)  (¬B)] is “False”, it is a Contradiction. Contingency A Contingency is a formula which has both some true and some false values for every value of its propositional variables. Example − Prove (A  B)  (¬A) a contingency The truth table is as follows − A B A  B ¬A (A  B)  (¬A) True True True False False True False True False False False True True True True False False False True False As we can see every value of (A  B)  (¬A) has both “True” and “False”, it is a contingency. Propositional Equivalences
  • 6. ` 6 Two statements X and Y are logically equivalent if any of the following two conditions − • The truth tables of each statement have the same truth values. • The bi-conditional statement X Y is a tautology. Example−Prove¬(A  B)and[(¬A)  (¬B)]are equivalent Testing by 1st method (Matching truth table) A B A  B ¬ (A  B) ¬A ¬B [(¬A)  (¬B)] True True True False False False False True False True False False True False False True True False True False False False False False True True True True Here, we can see the truth values of ¬ (A  B) and [(¬A)  (¬B)] are same, hence the statements are equivalent. Testing by 2nd method (Bi-conditionality) A B ¬ (A  B) [(¬A)  (¬B)] [¬ (A  B)]  [(¬A)  (¬B)] True True False False True True False False False True False True False False True False False True True True As [¬ (A  B)]  [(¬A)  (¬B)] is a tautology, the statements are equivalent.
  • 7. ` 8 Laws of Propositional Logic: S.No Name of Laws Primal Form Dual Form 1 Idempotent Law p  p  p p  p  p 2 Identity Law p  F  p p  T  p 3 Dominant Law p  T  T p  F  F 4 Complement Law p  p  T p  p  F 5 Commutative Law p  q  q  p p  q  q  p 6 Associative Law p  (q  r) (p  q) r p (q  r) (p  q) r 7 Distributive Law p(qr) (p  q)(p  r) p(q  r) (p q)(p r) 8 Absorption Law p  (p  q) p p (p  q) p 9 De Morgan’s Law (p  q) p q (p  q) p  q 10 Double Negation Law (p)  p - Logical Equivalences involving Conditional Statements Logical Equivalences involving Biconditional Statements Inverse, Converse, and Contra-positive A conditional statement has two parts − Hypothesis and Conclusion. Example of Conditional Statement − “If you do your homework, you will not be punished.” Here, "you do your homework" is the hypothesis and "you will
  • 8. ` 9 not be punished" is the conclusion. Inverse –An inverse of the conditional statement is the negation of both the hypothesis and the conclusion. If the statement is “If p, then q”, the inverse will be “If not p, then not q”. The inverse of “If you do your homework, you will not be punished” is “If you do not do your homework, you will be punished.” Converse−The converse of the conditional statement is computed by interchanging the hypothesis and the conclusion. If the statement is “If p, then q”, the inverse will be “If q, Then p”. The converse of "If you do your homework, you will not be punished" is "If you will not be punished, you do not do your homework”. Contra-positive –The contra-positive of the conditional is computed by interchanging the hypothesis and the conclusion of the inverse statement. If the statement is “If p, then q”, the inverse will be “If not q, then not p”. The Contra- positive of "If you do your homework, you will not be punished” is "If you will be punished, you do your home work”. Duality Principle Duality principle set states that for any true statement, the dual statement obtained by interchanging unions into intersections (and vice versa) and interchanging Universal set into Null set (and vice versa) is also true. If dual of any statement is the statement itself, it is said self-dual statement.
  • 10. ` 11 Elementary Product: A product of the variables and their negations in a formula is called an elementary product. If p and q are any two atomic variables, then p, p  q, q  p, p  q are some examples of elementary products. Elementary Sum: A sum of the variables and their negations in a formula is called an elementary sum. If P and Q are any two atomic variables, then p, p  q, q  p, p  q are some examples of elementary sums. Normal Forms: We can convert any proposition in two normal forms − 1. Conjunctive Normal Form (CNF) 2.Disjunctive Normal Form (DNF) Conjunctive Normal Form A compound statement is in conjunctive normal form if it is obtained by operating AND among variables (negation of variables included) connected with ORs. Examples: 1. (p  q) (q  r) 2. (p  q  r) (s  r) Disjunctive Normal Form A compound statement is in disjunctive normal form if it is obtained by operating OR among variables (negation of variables included) connected with ANDs. Example: (p  q) (p  q) (p  q  r) Functionally Complete set A set of logical operators is called functionally complete if every compound proposition is logically equivalent to a compound proposition involving only this set of logical operators. ,,  form a functionally complete set of operators. Minterms: For two variables p and q there are 4 possible formulas which consist of conjunctions of p,q or it’s negation given by p  q, p  q, p  q, p  q
  • 11. ` 12 Maxterms: For two variables p and q there are 4 possible formulas which consist of disjunctions of p,q or its negation given by p  q, p  q, p  q, p  q Principal Disjunctive Normal Form: For a given formula an equivalent formula consisting of disjunctions of minterms only is known as principal disjunctive normal form (PDNF). Principal Conjunctive Normal Form: For a given formula an equivalent formula consisting of conjunctions of maxterms only is known as principal conjunctive normal form (PCNF). Problems:
  • 12. ` 13
  • 13. ` 14 Rule of inference to build arguments: RuleP: A premise may be introduced at point in the derivation Rule T: A formula S may be introduced in a derivation if S is a tautologically implied by any one or more of the preceeding formulas in the derivation. Rule CP: If we can derive S from R and a set of premises, then we can derive R →S from the set of premises alone. Rule CP is also called deduction theoem.
  • 15. ` 16
  • 16. ` 17 Quantifiers: The variable of predicates is quantified by quantifiers. There are two types of quantifier in Predicate logic − Universal Quantifier and Existential Quantifier. Universal Quantifier: Universal quantifier states that the statements within its scope are true for every value of the specific variable. It is denoted by the symbol ∀. ∀x P(x) is read as for every value of x, P(x) is true. Example: "Man is mortal" can be transformed into the propositional form ∀x P(x) where P(x) is the predicate which denotes x is mortal and the universe of discourse is all men. Existential Quantifier: Existential quantifier states that the statements within its scope are true for some values of the specific variable. It is denoted by the symbol ∃.∃x P(x) is read as for some values of x, P(x) is true.
  • 17. ` 18 Example: "Some people are dishonest" can be transformed into the propositional form ∃x P(x) where P(x) is the predicate which denotes x is dishonest and the universe of discourse is some people. Nested Quantifiers: If we use a quantifier that appears within the scope of another quantifier, it is called nested quantifier.
  • 18. ` 19 Symbolize the following statements: (a)All men are mortal (b)All the world loves alover (c) X is the father of mother of Y (d)No cats has atail (e) Some people who trust others are rewarded Solution:
  • 19. ` 20
  • 20. ` 21
  • 21. 1