SlideShare a Scribd company logo
1 of 35
DISCRETE MATHEMATICS
LECTURE 01
RUBYA AFRIN
LECTURER
NORTHERN UNIVERSITY OF BUSINESS AND TECHNOLOGY
OUTLINE
CSE 1203: Discrete Mathematics C. Hrs. 3.00
Introduction to discrete mathematical structure, logic, Set theory: Sets, Relations, Partial Ordered
sets, Functions. Mathematical reasoning and proof techniques. Propositional calculus, Predicate
calculus. Boolean algebra, algebric systems, induction, algorithm technique, recursion,
permutation and combination, recurrence relation, generating functions and its solution,
principle of counting, advance counting, discrete probability, Graph theory : Graphs , Paths,
Trees. Algebraic Structures, Binary operations, Semi-graphs, Groups, Permutation Groups, Rings
and Fields, Lattices. Morphism of algebraic structures.
Recommended Books:
Discrete Mathematics and Its Applications : Kenneth H. Rosen
Discrete Mathematics: Shaum’s series
GRADING
LET’S GET STARTED WITH...
Logic!
4
LOGIC
• Crucial for mathematical reasoning
• Used for designing electronic circuitry
• Logic is a system based on propositions.
• A proposition is a statement that is either true or false (not
both).
• We say that the truth value of a proposition is either true (T) or false
(F).
• Corresponds to 1 and 0 in digital circuits
5
THE STATEMENT/PROPOSITION GAME
“Elephants are bigger than mice.”
6
Is this a statement? yes
Is this a proposition? yes
What is the truth value
of the proposition? true
THE STATEMENT/PROPOSITION GAME
“520 < 111”
7
Is this a statement? yes
Is this a proposition? yes
What is the truth value
of the proposition? false
THE STATEMENT/PROPOSITION GAME
“y > 5”
8
Is this a statement? yes
Is this a proposition? no
Its truth value depends on the value of y,
but this value is not specified.
We call this type of statement a
propositional function or open sentence.
9
THE STATEMENT/PROPOSITION GAME
“Today is January 1 and 99 < 5.”
Is this a statement? yes
Is this a proposition? yes
What is the truth value
of the proposition? false
COMBINING PROPOSITIONS
As we have seen in the previous examples,
one or more propositions can be combined
to form a single compound proposition.
We formalize this by denoting propositions
with letters such as p, q, r, s, and introducing
several logical operators.
10
LOGICAL OPERATORS
(CONNECTIVES)
We will examine the following logical operators:
• Negation (NOT)
• Conjunction (AND)
• Disjunction (OR)
• Exclusive or (XOR)
• Implication (if – then)
• Biconditional (if and only if)
Truth tables can be used to show how these operators can combine
propositions to compound propositions.
11
NEGATION (NOT)
Unary Operator, Symbol: 
12
P P
true (T) false (F)
false (F) true (T)
CONJUNCTION (AND)
Binary Operator, Symbol: 
13
P Q PQ
T T T
T F F
F T F
F F F
DISJUNCTION (OR)
Binary Operator, Symbol: 
14
P Q PQ
T T T
T F T
F T T
F F F
EXCLUSIVE OR (XOR)
Binary Operator, Symbol: 
15
P Q PQ
T T F
T F T
F T T
F F F
IMPLICATION (IF - THEN)
Binary Operator, Symbol: 
16
P Q PQ
T T T
T F F
F T T
F F T
BICONDITIONAL (IF AND ONLY IF)
Binary Operator, Symbol: 
17
P Q PQ
T T T
T F F
F T F
F F T
STATEMENTS AND OPERATORS
 Statements and operators can be combined in any
way to form new statements.
18
P Q P Q (P)(Q)
T T F F F
T F F T T
F T T F T
F F T T T
STATEMENTS AND OPERATIONS
 Statements and operators can be combined in any
way to form new statements.
19
P Q PQ  (PQ) (P)(Q)
T T T F F
T F F T T
F T F T T
F F F T T
EQUIVALENT STATEMENTS
 The statements (PQ) and (P)  (Q) are logically
equivalent, since (PQ)  (P)  (Q) is always true.
20
P Q (PQ) (P)(Q) (PQ)(P)(Q)
T T F F T
T F T T T
F T T T T
F F T T T
TAUTOLOGIES AND CONTRADICTIONS
 A tautology is a statement that is always true.
 Examples:
• R(R)
• (PQ)(P)(Q)
 If ST is a tautology, we write ST.
 If ST is a tautology, we write ST.
21
TAUTOLOGIES AND CONTRADICTIONS
 A contradiction is a statement that is always
 false.
 Examples:
• R(R)
• ((PQ)(P)(Q))
 The negation of any tautology is a contra-
 diction, and the negation of any contradiction is
 a tautology.
22
EXERCISES
We already know the following tautology:
(PQ)  (P)(Q)
Nice home exercise:
Show that (PQ)  (P)(Q).
These two tautologies are known as De Morgan’s laws.
23
LET’S TALK ABOUT LOGIC
• Logic is a system based on propositions.
• A proposition is a statement that is either true or false (not both).
• We say that the truth value of a proposition is either true (T) or false
(F).
• Corresponds to 1 and 0 in digital circuits
24
PROPOSITIONAL FUNCTIONS
Propositional function (open sentence):
statement involving one or more variables,
e.g.: x-3 > 5.
Let us call this propositional function P(x), where P is the predicate and
x is the variable.
25
What is the truth value of P(2) ? false
What is the truth value of P(8) ?
What is the truth value of P(9) ?
false
true
PROPOSITIONAL FUNCTIONS
Let us consider the propositional function
Q(x, y, z) defined as:
x + y = z.
Here, Q is the predicate and x, y, and z are the variables.
26
What is the truth value of Q(2, 3, 5) ? true
What is the truth value of Q(0, 1, 2) ?
What is the truth value of Q(9, -9, 0) ?
false
true
UNIVERSAL QUANTIFICATION
Let P(x) be a propositional function.
Universally quantified sentence:
For all x in the universe of discourse P(x) is true.
Using the universal quantifier :
x P(x) “for all x P(x)” or “for every x P(x)”
(Note: x P(x) is either true or false, so it is a proposition, not a
propositional function.)
27
UNIVERSAL QUANTIFICATION
Example:
S(x): x is a NUB student.
G(x): x is a genius.
What does x (S(x)  G(x)) mean ?
“If x is a UMBC student, then x is a genius.”
or
“All UMBC students are geniuses.”
28
EXISTENTIAL QUANTIFICATION
Existentially quantified sentence:
There exists an x in the universe of discourse for which P(x) is true.
Using the existential quantifier :
x P(x) “There is an x such that P(x).”
 “There is at least one x such that P(x).”
(Note: x P(x) is either true or false, so it is a proposition, but no
propositional function.)
29
EXISTENTIAL QUANTIFICATION
Example:
P(x): x is a UMBC professor.
G(x): x is a genius.
What does x (P(x)  G(x)) mean ?
“There is an x such that x is a UMBC professor and x is a genius.”
or
“At least one UMBC professor is a genius.”
30
QUANTIFICATION
Another example:
Let the universe of discourse be the real numbers.
What does xy (x + y = 320) mean ?
“For every x there exists a y so that x + y = 320.”
31
Is it true?
Is it true for the natural numbers?
yes
no
DISPROOF BY COUNTEREXAMPLE
A counterexample to x P(x) is an object c so that P(c) is false.
Statements such as x (P(x)  Q(x)) can be disproved by simply
providing a counterexample.
32
Statement: “All birds can fly.”
Disproved by counterexample: Penguin.
NEGATION
 (x P(x)) is logically equivalent to x (P(x)).
 (x P(x)) is logically equivalent to x (P(x)).
 See Table 3 in Section 1.3.
 I recommend exercises 5 and 9 in Section 1.3.
33
QUESTION???
THANK YOU…

More Related Content

What's hot

What's hot (20)

Predicate Calculus
Predicate CalculusPredicate Calculus
Predicate Calculus
 
Trc final
Trc finalTrc final
Trc final
 
Introduction of predicate logics
Introduction of predicate  logicsIntroduction of predicate  logics
Introduction of predicate logics
 
Introduction of Partial Differential Equations
Introduction of Partial Differential EquationsIntroduction of Partial Differential Equations
Introduction of Partial Differential Equations
 
applications of first order non linear partial differential equation
applications of first order non linear partial differential equationapplications of first order non linear partial differential equation
applications of first order non linear partial differential equation
 
Forth Lecture
Forth LectureForth Lecture
Forth Lecture
 
1. linear model, inference, prediction
1. linear model, inference, prediction1. linear model, inference, prediction
1. linear model, inference, prediction
 
Sequences 01
Sequences 01Sequences 01
Sequences 01
 
R meetup lm
R meetup lmR meetup lm
R meetup lm
 
Unit viii
Unit viiiUnit viii
Unit viii
 
BCA_Semester-II-Discrete Mathematics_unit-ii_Relation and ordering
BCA_Semester-II-Discrete Mathematics_unit-ii_Relation and orderingBCA_Semester-II-Discrete Mathematics_unit-ii_Relation and ordering
BCA_Semester-II-Discrete Mathematics_unit-ii_Relation and ordering
 
Chapter i
Chapter iChapter i
Chapter i
 
SPDE
SPDE SPDE
SPDE
 
Statistics (recap)
Statistics (recap)Statistics (recap)
Statistics (recap)
 
Distributavity
DistributavityDistributavity
Distributavity
 
Mathematical Logic Part 2
Mathematical Logic Part 2Mathematical Logic Part 2
Mathematical Logic Part 2
 
Relations digraphs
Relations  digraphsRelations  digraphs
Relations digraphs
 
Advance enginering mathematics
Advance enginering mathematicsAdvance enginering mathematics
Advance enginering mathematics
 
Multiple scales
Multiple scalesMultiple scales
Multiple scales
 
Lec5
Lec5Lec5
Lec5
 

Similar to Logic DM

Discrete Mathematics - All chapters
Discrete Mathematics - All chapters Discrete Mathematics - All chapters
Discrete Mathematics - All chapters Omnia A. Abdullah
 
Abdbfhdkmdmdjfmfkmfmfmfjjfjfjfnfnnfnfnfn
AbdbfhdkmdmdjfmfkmfmfmfjjfjfjfnfnnfnfnfnAbdbfhdkmdmdjfmfkmfmfmfjjfjfjfnfnnfnfnfn
AbdbfhdkmdmdjfmfkmfmfmfjjfjfjfnfnnfnfnfnNipunMeena
 
Chapter 01 - p2.pdf
Chapter 01 - p2.pdfChapter 01 - p2.pdf
Chapter 01 - p2.pdfsmarwaneid
 
leanCoR: lean Connection-based DL Reasoner
leanCoR: lean Connection-based DL ReasonerleanCoR: lean Connection-based DL Reasoner
leanCoR: lean Connection-based DL ReasonerAdriano Melo
 
Lecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inferenceLecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inferenceasimnawaz54
 
A comparative analysis of predictve data mining techniques3
A comparative analysis of predictve data mining techniques3A comparative analysis of predictve data mining techniques3
A comparative analysis of predictve data mining techniques3Mintu246
 
Factor analysis
Factor analysis Factor analysis
Factor analysis Mintu246
 
Discrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdfDiscrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdfMuhammadUmerIhtisham
 
DIGITAL TEXT BOOK
DIGITAL TEXT BOOKDIGITAL TEXT BOOK
DIGITAL TEXT BOOKbintu55
 
20130928 automated theorem_proving_harrison
20130928 automated theorem_proving_harrison20130928 automated theorem_proving_harrison
20130928 automated theorem_proving_harrisonComputer Science Club
 
Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)SHUBHAM KUMAR GUPTA
 
Maths Symbols
Maths SymbolsMaths Symbols
Maths Symbolsjanobearn
 

Similar to Logic DM (20)

dma_ppt.pdf
dma_ppt.pdfdma_ppt.pdf
dma_ppt.pdf
 
Discrete Mathematics - All chapters
Discrete Mathematics - All chapters Discrete Mathematics - All chapters
Discrete Mathematics - All chapters
 
1019Lec1.ppt
1019Lec1.ppt1019Lec1.ppt
1019Lec1.ppt
 
Abdbfhdkmdmdjfmfkmfmfmfjjfjfjfnfnnfnfnfn
AbdbfhdkmdmdjfmfkmfmfmfjjfjfjfnfnnfnfnfnAbdbfhdkmdmdjfmfkmfmfmfjjfjfjfnfnnfnfnfn
Abdbfhdkmdmdjfmfkmfmfmfjjfjfjfnfnnfnfnfn
 
Chapter 01 - p2.pdf
Chapter 01 - p2.pdfChapter 01 - p2.pdf
Chapter 01 - p2.pdf
 
Logic
LogicLogic
Logic
 
Lecture 01.ppt
Lecture 01.pptLecture 01.ppt
Lecture 01.ppt
 
leanCoR: lean Connection-based DL Reasoner
leanCoR: lean Connection-based DL ReasonerleanCoR: lean Connection-based DL Reasoner
leanCoR: lean Connection-based DL Reasoner
 
DMS UNIT-1 ppt.pptx
DMS UNIT-1 ppt.pptxDMS UNIT-1 ppt.pptx
DMS UNIT-1 ppt.pptx
 
DM(1).pptx
DM(1).pptxDM(1).pptx
DM(1).pptx
 
Course notes1
Course notes1Course notes1
Course notes1
 
Lecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inferenceLecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inference
 
A comparative analysis of predictve data mining techniques3
A comparative analysis of predictve data mining techniques3A comparative analysis of predictve data mining techniques3
A comparative analysis of predictve data mining techniques3
 
Factor analysis
Factor analysis Factor analysis
Factor analysis
 
Discrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdfDiscrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdf
 
DIGITAL TEXT BOOK
DIGITAL TEXT BOOKDIGITAL TEXT BOOK
DIGITAL TEXT BOOK
 
20130928 automated theorem_proving_harrison
20130928 automated theorem_proving_harrison20130928 automated theorem_proving_harrison
20130928 automated theorem_proving_harrison
 
FUZZY LOGIC
FUZZY LOGICFUZZY LOGIC
FUZZY LOGIC
 
Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)
 
Maths Symbols
Maths SymbolsMaths Symbols
Maths Symbols
 

More from Rokonuzzaman Rony (20)

Course outline for c programming
Course outline for c  programming Course outline for c  programming
Course outline for c programming
 
Pointer
PointerPointer
Pointer
 
Operator Overloading & Type Conversions
Operator Overloading & Type ConversionsOperator Overloading & Type Conversions
Operator Overloading & Type Conversions
 
Constructors & Destructors
Constructors  & DestructorsConstructors  & Destructors
Constructors & Destructors
 
Classes and objects in c++
Classes and objects in c++Classes and objects in c++
Classes and objects in c++
 
Functions in c++
Functions in c++Functions in c++
Functions in c++
 
Object Oriented Programming with C++
Object Oriented Programming with C++Object Oriented Programming with C++
Object Oriented Programming with C++
 
Humanitarian task and its importance
Humanitarian task and its importanceHumanitarian task and its importance
Humanitarian task and its importance
 
Structure
StructureStructure
Structure
 
Pointers
 Pointers Pointers
Pointers
 
Loops
LoopsLoops
Loops
 
Introduction to C programming
Introduction to C programmingIntroduction to C programming
Introduction to C programming
 
Array
ArrayArray
Array
 
Constants, Variables, and Data Types
Constants, Variables, and Data TypesConstants, Variables, and Data Types
Constants, Variables, and Data Types
 
C Programming language
C Programming languageC Programming language
C Programming language
 
User defined functions
User defined functionsUser defined functions
User defined functions
 
Numerical Method 2
Numerical Method 2Numerical Method 2
Numerical Method 2
 
Numerical Method
Numerical Method Numerical Method
Numerical Method
 
Data structures
Data structuresData structures
Data structures
 
Data structures
Data structures Data structures
Data structures
 

Recently uploaded

भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 

Recently uploaded (20)

भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 

Logic DM

  • 1. DISCRETE MATHEMATICS LECTURE 01 RUBYA AFRIN LECTURER NORTHERN UNIVERSITY OF BUSINESS AND TECHNOLOGY
  • 2. OUTLINE CSE 1203: Discrete Mathematics C. Hrs. 3.00 Introduction to discrete mathematical structure, logic, Set theory: Sets, Relations, Partial Ordered sets, Functions. Mathematical reasoning and proof techniques. Propositional calculus, Predicate calculus. Boolean algebra, algebric systems, induction, algorithm technique, recursion, permutation and combination, recurrence relation, generating functions and its solution, principle of counting, advance counting, discrete probability, Graph theory : Graphs , Paths, Trees. Algebraic Structures, Binary operations, Semi-graphs, Groups, Permutation Groups, Rings and Fields, Lattices. Morphism of algebraic structures. Recommended Books: Discrete Mathematics and Its Applications : Kenneth H. Rosen Discrete Mathematics: Shaum’s series
  • 4. LET’S GET STARTED WITH... Logic! 4
  • 5. LOGIC • Crucial for mathematical reasoning • Used for designing electronic circuitry • Logic is a system based on propositions. • A proposition is a statement that is either true or false (not both). • We say that the truth value of a proposition is either true (T) or false (F). • Corresponds to 1 and 0 in digital circuits 5
  • 6. THE STATEMENT/PROPOSITION GAME “Elephants are bigger than mice.” 6 Is this a statement? yes Is this a proposition? yes What is the truth value of the proposition? true
  • 7. THE STATEMENT/PROPOSITION GAME “520 < 111” 7 Is this a statement? yes Is this a proposition? yes What is the truth value of the proposition? false
  • 8. THE STATEMENT/PROPOSITION GAME “y > 5” 8 Is this a statement? yes Is this a proposition? no Its truth value depends on the value of y, but this value is not specified. We call this type of statement a propositional function or open sentence.
  • 9. 9 THE STATEMENT/PROPOSITION GAME “Today is January 1 and 99 < 5.” Is this a statement? yes Is this a proposition? yes What is the truth value of the proposition? false
  • 10. COMBINING PROPOSITIONS As we have seen in the previous examples, one or more propositions can be combined to form a single compound proposition. We formalize this by denoting propositions with letters such as p, q, r, s, and introducing several logical operators. 10
  • 11. LOGICAL OPERATORS (CONNECTIVES) We will examine the following logical operators: • Negation (NOT) • Conjunction (AND) • Disjunction (OR) • Exclusive or (XOR) • Implication (if – then) • Biconditional (if and only if) Truth tables can be used to show how these operators can combine propositions to compound propositions. 11
  • 12. NEGATION (NOT) Unary Operator, Symbol:  12 P P true (T) false (F) false (F) true (T)
  • 13. CONJUNCTION (AND) Binary Operator, Symbol:  13 P Q PQ T T T T F F F T F F F F
  • 14. DISJUNCTION (OR) Binary Operator, Symbol:  14 P Q PQ T T T T F T F T T F F F
  • 15. EXCLUSIVE OR (XOR) Binary Operator, Symbol:  15 P Q PQ T T F T F T F T T F F F
  • 16. IMPLICATION (IF - THEN) Binary Operator, Symbol:  16 P Q PQ T T T T F F F T T F F T
  • 17. BICONDITIONAL (IF AND ONLY IF) Binary Operator, Symbol:  17 P Q PQ T T T T F F F T F F F T
  • 18. STATEMENTS AND OPERATORS  Statements and operators can be combined in any way to form new statements. 18 P Q P Q (P)(Q) T T F F F T F F T T F T T F T F F T T T
  • 19. STATEMENTS AND OPERATIONS  Statements and operators can be combined in any way to form new statements. 19 P Q PQ  (PQ) (P)(Q) T T T F F T F F T T F T F T T F F F T T
  • 20. EQUIVALENT STATEMENTS  The statements (PQ) and (P)  (Q) are logically equivalent, since (PQ)  (P)  (Q) is always true. 20 P Q (PQ) (P)(Q) (PQ)(P)(Q) T T F F T T F T T T F T T T T F F T T T
  • 21. TAUTOLOGIES AND CONTRADICTIONS  A tautology is a statement that is always true.  Examples: • R(R) • (PQ)(P)(Q)  If ST is a tautology, we write ST.  If ST is a tautology, we write ST. 21
  • 22. TAUTOLOGIES AND CONTRADICTIONS  A contradiction is a statement that is always  false.  Examples: • R(R) • ((PQ)(P)(Q))  The negation of any tautology is a contra-  diction, and the negation of any contradiction is  a tautology. 22
  • 23. EXERCISES We already know the following tautology: (PQ)  (P)(Q) Nice home exercise: Show that (PQ)  (P)(Q). These two tautologies are known as De Morgan’s laws. 23
  • 24. LET’S TALK ABOUT LOGIC • Logic is a system based on propositions. • A proposition is a statement that is either true or false (not both). • We say that the truth value of a proposition is either true (T) or false (F). • Corresponds to 1 and 0 in digital circuits 24
  • 25. PROPOSITIONAL FUNCTIONS Propositional function (open sentence): statement involving one or more variables, e.g.: x-3 > 5. Let us call this propositional function P(x), where P is the predicate and x is the variable. 25 What is the truth value of P(2) ? false What is the truth value of P(8) ? What is the truth value of P(9) ? false true
  • 26. PROPOSITIONAL FUNCTIONS Let us consider the propositional function Q(x, y, z) defined as: x + y = z. Here, Q is the predicate and x, y, and z are the variables. 26 What is the truth value of Q(2, 3, 5) ? true What is the truth value of Q(0, 1, 2) ? What is the truth value of Q(9, -9, 0) ? false true
  • 27. UNIVERSAL QUANTIFICATION Let P(x) be a propositional function. Universally quantified sentence: For all x in the universe of discourse P(x) is true. Using the universal quantifier : x P(x) “for all x P(x)” or “for every x P(x)” (Note: x P(x) is either true or false, so it is a proposition, not a propositional function.) 27
  • 28. UNIVERSAL QUANTIFICATION Example: S(x): x is a NUB student. G(x): x is a genius. What does x (S(x)  G(x)) mean ? “If x is a UMBC student, then x is a genius.” or “All UMBC students are geniuses.” 28
  • 29. EXISTENTIAL QUANTIFICATION Existentially quantified sentence: There exists an x in the universe of discourse for which P(x) is true. Using the existential quantifier : x P(x) “There is an x such that P(x).”  “There is at least one x such that P(x).” (Note: x P(x) is either true or false, so it is a proposition, but no propositional function.) 29
  • 30. EXISTENTIAL QUANTIFICATION Example: P(x): x is a UMBC professor. G(x): x is a genius. What does x (P(x)  G(x)) mean ? “There is an x such that x is a UMBC professor and x is a genius.” or “At least one UMBC professor is a genius.” 30
  • 31. QUANTIFICATION Another example: Let the universe of discourse be the real numbers. What does xy (x + y = 320) mean ? “For every x there exists a y so that x + y = 320.” 31 Is it true? Is it true for the natural numbers? yes no
  • 32. DISPROOF BY COUNTEREXAMPLE A counterexample to x P(x) is an object c so that P(c) is false. Statements such as x (P(x)  Q(x)) can be disproved by simply providing a counterexample. 32 Statement: “All birds can fly.” Disproved by counterexample: Penguin.
  • 33. NEGATION  (x P(x)) is logically equivalent to x (P(x)).  (x P(x)) is logically equivalent to x (P(x)).  See Table 3 in Section 1.3.  I recommend exercises 5 and 9 in Section 1.3. 33