SlideShare a Scribd company logo
1
Boolean Logic
Ahmad Baryal
Saba Institute of Higher Education
Computer Science Faculty
Oct 26, 2024
2 Propositional Logic
 The rules of mathematical logic specify methods of reasoning
mathematical statements. Greek philosopher, Aristotle, was the
pioneer of logical reasoning. Logical reasoning provides the
theoretical base for many areas of mathematics and consequently
computer science. It has many practical applications in computer
science like design of computing machines, artificial intelligence,
definition of data structures for programming languages etc.
 Propositional Logic is concerned with statements to which the truth
values, “true” and “false”, can be assigned. The purpose is to
analyze these statements either individually or in a composite
manner.
3 Propositional Logic-Definition
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, etc). The connectives connect the propositional variables.
Some examples of Propositions are given below −
 "Man is Mortal", it returns truth value “TRUE”
 "12 + 9 = 3 – 2", it returns truth value “FALSE”
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 or false.
4 Connectives
• OR ( )
∨
• AND ( )
∧
• Negation/ NOT (¬)
• Implication / if-then (→)
• If and only if ( ).
⇔
5 OR ( )
∨
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 –
6 AND ( )
∧
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.
The truth table is as follows −
7 Negation (¬)
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 −
8 Implication / if-then (→)
Implication / if-then (→) − An implication A→B is the proposition “if A, then B”. It is
false if A is true and B is false. The rest cases are true.
The truth table is as follows −
Example:
If it rains, then I will stay indoors.
In this example, there are two propositions:
A: It rains
B: I will stay indoors.
9 If and only if ( )
⇔
If and only if ( )
⇔ − A B is bi-conditional logical connective which is true when
⇔
p and q are same, i.e. both are false or both are true.
The truth table is as follows −
Example:
“You can attend the party if and only if you are invited.”
10 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 −
As we can see every value of [(A→B) A]→B is "True", it is a tautology.
∧
11 Contradictions
A Contradiction is a formula which is always false for every value of its
propositional variables.
Example − Prove (A B) [(¬A) (¬B)]is a contradiction
∨ ∧ ∧
The truth table is as follows −
As we can see every value of (A B) [(¬A) (¬B)] is “False”, it is a contradiction.
∨ ∧ ∧
12
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 −
As we can see every value of (A B) (¬A)has both “True” and “False”, it is a
∨ ∧
contingency.
13 Propositional Equivalences
Two statements X and Y are logically equivalent if any of the following two
conditions hold −
• 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)
Here, we can see the truth values of ¬(A B)and[(¬A) (¬B)] are same, hence the statements are equivalent.
∨ ∧
14
Testing by 2nd
method (Bi-conditionality)
As [¬(A B)] [(¬A) (¬B)] is a tautology, the statements are equivalent.
∨ ⇔ ∧
15
Any Questions?

More Related Content

PDF
Proposition Logic in Discrete Structure
NANDINI SHARMA
 
PPTX
Discrete mathematics [LOGICAL CONNECTIVES]
KalingoAurobindo
 
PPTX
basic LOGICAL SYMBOLS IN DISCRETE MATHEMATICS (1).pptx
RenatoKeliste1
 
PPTX
BOOLEAN ALGEBRA1.pptx
adityavarte
 
PPTX
BOOLEAN ALGEBRA.pptx.................................
adityavarte
 
PPTX
Discrete Structure 2 for Bachelor of Science in Computer Science
glenwynnviernes
 
PPTX
DM(1).pptx
PradeeshSAI
 
PPTX
Lecture_-_Logic.pptttttttttttttr5rr55rtt
CrenzylAzeaCawaling
 
Proposition Logic in Discrete Structure
NANDINI SHARMA
 
Discrete mathematics [LOGICAL CONNECTIVES]
KalingoAurobindo
 
basic LOGICAL SYMBOLS IN DISCRETE MATHEMATICS (1).pptx
RenatoKeliste1
 
BOOLEAN ALGEBRA1.pptx
adityavarte
 
BOOLEAN ALGEBRA.pptx.................................
adityavarte
 
Discrete Structure 2 for Bachelor of Science in Computer Science
glenwynnviernes
 
DM(1).pptx
PradeeshSAI
 
Lecture_-_Logic.pptttttttttttttr5rr55rtt
CrenzylAzeaCawaling
 

Similar to Propositional Logics in Theoretical computer science (20)

PPTX
Discrete mathematics notes
josephndengeyingoma
 
DOCX
Mathmatical reasoning
indu psthakur
 
PPTX
20220818151924_PPT01 - The Logic of Compound and Quantitative Statement.pptx
ssuser92109d
 
PPTX
EQUIVALENCES and ARGUMENT FORMS and VALIDITY (Updated, 11-10-23) [GROUP 7 REP...
BigV Jkv
 
PPT
Discrete Maths141 - Course Outline and Lecture Slides
AryanZia3
 
PPTX
DISCRETE MATHEMATICS for IT students.pptx
ReymartVillapea
 
PPT
Jarrar.lecture notes.aai.2011s.ch7.p logic
PalGov
 
PPTX
Artificial Intelligence (AI) | Prepositional logic (PL)and first order predic...
Ashish Duggal
 
PDF
Course notes1
Von Adam Martinez
 
PDF
Lemh1a1
Nagesh Veeranki
 
PDF
Lemh1a1
veerankinagesh
 
PPTX
Tablas de Verdad
Elvin Fortin
 
PPTX
The-Elementary-Logic.pptx nakaksnsnnamma
RenaldInocencio
 
PPT
Logic
Jeane Paguio
 
PPTX
General concepts of digital electronics and
gaurangv9959
 
PDF
Logic
Shiwani Gupta
 
PDF
Uncertainty
Tribhuvan University
 
PDF
UGC NET Computer Science & Application book.pdf [Sample]
DIwakar Rajput
 
PPTX
Propositions - Discrete Structures
Drishti Bhalla
 
PDF
[gaNita] 2. Propositional Equivalences [math.fsu.edu].pdf
rAjyarAjanItjJa
 
Discrete mathematics notes
josephndengeyingoma
 
Mathmatical reasoning
indu psthakur
 
20220818151924_PPT01 - The Logic of Compound and Quantitative Statement.pptx
ssuser92109d
 
EQUIVALENCES and ARGUMENT FORMS and VALIDITY (Updated, 11-10-23) [GROUP 7 REP...
BigV Jkv
 
Discrete Maths141 - Course Outline and Lecture Slides
AryanZia3
 
DISCRETE MATHEMATICS for IT students.pptx
ReymartVillapea
 
Jarrar.lecture notes.aai.2011s.ch7.p logic
PalGov
 
Artificial Intelligence (AI) | Prepositional logic (PL)and first order predic...
Ashish Duggal
 
Course notes1
Von Adam Martinez
 
Tablas de Verdad
Elvin Fortin
 
The-Elementary-Logic.pptx nakaksnsnnamma
RenaldInocencio
 
General concepts of digital electronics and
gaurangv9959
 
UGC NET Computer Science & Application book.pdf [Sample]
DIwakar Rajput
 
Propositions - Discrete Structures
Drishti Bhalla
 
[gaNita] 2. Propositional Equivalences [math.fsu.edu].pdf
rAjyarAjanItjJa
 
Ad

More from Ahmad177077 (12)

PPTX
Pointers in C++ object oriented programming
Ahmad177077
 
PPTX
Array In C++ programming object oriented programming
Ahmad177077
 
PPTX
6. Functions in C ++ programming object oriented programming
Ahmad177077
 
PPTX
Operators in c++ programming types of variables
Ahmad177077
 
PPTX
2. Variables and Data Types in C++ proramming.pptx
Ahmad177077
 
PPTX
Introduction to c++ programming language
Ahmad177077
 
PPTX
Selection Sort & Insertion Sorts Algorithms
Ahmad177077
 
PPTX
Strassen's Matrix Multiplication divide and conquere algorithm
Ahmad177077
 
PPTX
Recursive Algorithms with their types and implementation
Ahmad177077
 
PPTX
Graph Theory in Theoretical computer science
Ahmad177077
 
PPTX
Proof Techniques in Theoretical computer Science
Ahmad177077
 
PPTX
1. Introduction to C++ and brief history
Ahmad177077
 
Pointers in C++ object oriented programming
Ahmad177077
 
Array In C++ programming object oriented programming
Ahmad177077
 
6. Functions in C ++ programming object oriented programming
Ahmad177077
 
Operators in c++ programming types of variables
Ahmad177077
 
2. Variables and Data Types in C++ proramming.pptx
Ahmad177077
 
Introduction to c++ programming language
Ahmad177077
 
Selection Sort & Insertion Sorts Algorithms
Ahmad177077
 
Strassen's Matrix Multiplication divide and conquere algorithm
Ahmad177077
 
Recursive Algorithms with their types and implementation
Ahmad177077
 
Graph Theory in Theoretical computer science
Ahmad177077
 
Proof Techniques in Theoretical computer Science
Ahmad177077
 
1. Introduction to C++ and brief history
Ahmad177077
 
Ad

Recently uploaded (20)

PPTX
The Power of IoT Sensor Integration in Smart Infrastructure and Automation.pptx
Rejig Digital
 
DOCX
Top AI API Alternatives to OpenAI: A Side-by-Side Breakdown
vilush
 
PDF
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
PDF
Why Your AI & Cybersecurity Hiring Still Misses the Mark in 2025
Virtual Employee Pvt. Ltd.
 
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
AVTRON Technologies LLC
 
PDF
agentic-ai-and-the-future-of-autonomous-systems.pdf
siddharthnetsavvies
 
PDF
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
PDF
Software Development Company | KodekX
KodekX
 
PPTX
Comunidade Salesforce São Paulo - Desmistificando o Omnistudio (Vlocity)
Francisco Vieira Júnior
 
PDF
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
PDF
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Artjoker Software Development Company
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PDF
Building High-Performance Oracle Teams: Strategic Staffing for Database Manag...
SMACT Works
 
PDF
Test Bank, Solutions for Java How to Program, An Objects-Natural Approach, 12...
famaw19526
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PDF
DevOps & Developer Experience Summer BBQ
AUGNYC
 
PDF
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
PDF
madgavkar20181017ppt McKinsey Presentation.pdf
georgschmitzdoerner
 
PDF
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
The Power of IoT Sensor Integration in Smart Infrastructure and Automation.pptx
Rejig Digital
 
Top AI API Alternatives to OpenAI: A Side-by-Side Breakdown
vilush
 
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
Why Your AI & Cybersecurity Hiring Still Misses the Mark in 2025
Virtual Employee Pvt. Ltd.
 
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
AVTRON Technologies LLC
 
agentic-ai-and-the-future-of-autonomous-systems.pdf
siddharthnetsavvies
 
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
Software Development Company | KodekX
KodekX
 
Comunidade Salesforce São Paulo - Desmistificando o Omnistudio (Vlocity)
Francisco Vieira Júnior
 
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Artjoker Software Development Company
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
Building High-Performance Oracle Teams: Strategic Staffing for Database Manag...
SMACT Works
 
Test Bank, Solutions for Java How to Program, An Objects-Natural Approach, 12...
famaw19526
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
DevOps & Developer Experience Summer BBQ
AUGNYC
 
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
madgavkar20181017ppt McKinsey Presentation.pdf
georgschmitzdoerner
 
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 

Propositional Logics in Theoretical computer science

  • 1. 1 Boolean Logic Ahmad Baryal Saba Institute of Higher Education Computer Science Faculty Oct 26, 2024
  • 2. 2 Propositional Logic  The rules of mathematical logic specify methods of reasoning mathematical statements. Greek philosopher, Aristotle, was the pioneer of logical reasoning. Logical reasoning provides the theoretical base for many areas of mathematics and consequently computer science. It has many practical applications in computer science like design of computing machines, artificial intelligence, definition of data structures for programming languages etc.  Propositional Logic is concerned with statements to which the truth values, “true” and “false”, can be assigned. The purpose is to analyze these statements either individually or in a composite manner.
  • 3. 3 Propositional Logic-Definition 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, etc). The connectives connect the propositional variables. Some examples of Propositions are given below −  "Man is Mortal", it returns truth value “TRUE”  "12 + 9 = 3 – 2", it returns truth value “FALSE” 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 or false.
  • 4. 4 Connectives • OR ( ) ∨ • AND ( ) ∧ • Negation/ NOT (¬) • Implication / if-then (→) • If and only if ( ). ⇔
  • 5. 5 OR ( ) ∨ 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 –
  • 6. 6 AND ( ) ∧ 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. The truth table is as follows −
  • 7. 7 Negation (¬) 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 −
  • 8. 8 Implication / if-then (→) Implication / if-then (→) − An implication A→B is the proposition “if A, then B”. It is false if A is true and B is false. The rest cases are true. The truth table is as follows − Example: If it rains, then I will stay indoors. In this example, there are two propositions: A: It rains B: I will stay indoors.
  • 9. 9 If and only if ( ) ⇔ If and only if ( ) ⇔ − A B is bi-conditional logical connective which is true when ⇔ p and q are same, i.e. both are false or both are true. The truth table is as follows − Example: “You can attend the party if and only if you are invited.”
  • 10. 10 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 − As we can see every value of [(A→B) A]→B is "True", it is a tautology. ∧
  • 11. 11 Contradictions A Contradiction is a formula which is always false for every value of its propositional variables. Example − Prove (A B) [(¬A) (¬B)]is a contradiction ∨ ∧ ∧ The truth table is as follows − As we can see every value of (A B) [(¬A) (¬B)] is “False”, it is a contradiction. ∨ ∧ ∧
  • 12. 12 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 − As we can see every value of (A B) (¬A)has both “True” and “False”, it is a ∨ ∧ contingency.
  • 13. 13 Propositional Equivalences Two statements X and Y are logically equivalent if any of the following two conditions hold − • 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) Here, we can see the truth values of ¬(A B)and[(¬A) (¬B)] are same, hence the statements are equivalent. ∨ ∧
  • 14. 14 Testing by 2nd method (Bi-conditionality) As [¬(A B)] [(¬A) (¬B)] is a tautology, the statements are equivalent. ∨ ⇔ ∧