Lecture 03a
Lecture 03a
Lecture 03
Waqas Ali
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 1 / 48
Agenda
Get ready for an exciting journey into the world of discrete mathematics!
3 Reference Books
4 Chapter 1: The Foundations: Logics and Proofs — Predicate and
Quantifiers
5 Nested Quantifiers
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 2 / 48
Goals of Discrete Mathematics Course
Agenda
Get ready for an exciting journey into the world of discrete mathematics!
3 Reference Books
4 Chapter 1: The Foundations: Logics and Proofs — Predicate and
Quantifiers
5 Nested Quantifiers
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 3 / 48
Goals of Discrete Mathematics Course
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 4 / 48
Goals of Discrete Mathematics Course
Agenda
Get ready for an exciting journey into the world of discrete mathematics!
3 Reference Books
4 Chapter 1: The Foundations: Logics and Proofs — Predicate and
Quantifiers
5 Nested Quantifiers
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 7 / 48
Organization and Contents of the Course
Major Topics
Logic
Set Theory
Algorithms
Number Theory
Counting Methods
Recursion
Introduction to Matrics
Mathematical Inductions
Graph Theory Applications
Introduction to Trees and their Applications
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 8 / 48
Organization and Contents of the Course
Major Topics
Logic
Set Theory
Algorithms
Number Theory
Counting Methods
Recursion
Introduction to Matrics
Mathematical Inductions
Graph Theory Applications
Introduction to Trees and their Applications
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 8 / 48
Organization and Contents of the Course
Major Topics
Logic
Set Theory
Algorithms
Number Theory
Counting Methods
Recursion
Introduction to Matrics
Mathematical Inductions
Graph Theory Applications
Introduction to Trees and their Applications
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 8 / 48
Organization and Contents of the Course
Course Evaluation
Mid (30%)
Final (40%)
Quizzes 2-3 (10%) – Unannounced
Assignments (10%)
Mini-Project and Presentation (10%)
Minimum 80 percent attendance is MUST.
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 9 / 48
Reference Books
Agenda
Get ready for an exciting journey into the world of discrete mathematics!
3 Reference Books
4 Chapter 1: The Foundations: Logics and Proofs — Predicate and
Quantifiers
5 Nested Quantifiers
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 10 / 48
Reference Books
Reference Books
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 11 / 48
Chapter 1: The Foundations: Logics and Proofs — Predicate and
Quantifiers
Agenda
Get ready for an exciting journey into the world of discrete mathematics!
3 Reference Books
4 Chapter 1: The Foundations: Logics and Proofs — Predicate and
Quantifiers
5 Nested Quantifiers
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 12 / 48
Nested Quantifiers
Agenda
Get ready for an exciting journey into the world of discrete mathematics!
3 Reference Books
4 Chapter 1: The Foundations: Logics and Proofs — Predicate and
Quantifiers
5 Nested Quantifiers
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 13 / 48
Nested Quantifiers
Summary
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 14 / 48
Nested Quantifiers
Nested Quantifiers
Example:
Let the domain of x and y be people.
Let L(x, y ) be ”x likes y” (A statement with 2 free variables – not a
proposition).
Then ∃y L(x, y ) = ”There is someone whom x likes.” (A statement
with 1 free variable x – not a proposition).
Then ∀x(∃y L(x, y )) = ”Everyone has someone whom they like.” (A
statement with free variables.)
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 15 / 48
Nested Quantifiers
Nested quantifiers are quantifiers that occur within the scope of other
quantifiers.
The order of the quantifiers is important unless all the quantifiers are
universal quantifiers or all are existential quantifiers.
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 16 / 48
Nested Quantifiers
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 17 / 48
Nested Quantifiers
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 18 / 48
Nested Quantifiers
Nested Quantifiers
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 19 / 48
Nested Quantifiers
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 20 / 48
Nested Quantifiers
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 21 / 48
Nested Quantifiers
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 22 / 48
Nested Quantifiers
∀x ∀y P(x, y ) ≡ ∀y ∀x P(x, y )
∃x ∃y P(x, y ) ≡ ∃y ∃x P(x, y )
∀x (P(x) ∧ Q(x)) ≡ (∀x P(x)) ∧ (∀x Q(x))
∃x (P(x) ∨ Q(x)) ≡ (∃x P(x)) ∨ (∃x Q(x))
Exercise: See if you can prove these yourself.
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 23 / 48
Nested Quantifiers
Notational Conventions
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 24 / 48
Argument and Rules of Inference
Agenda
Get ready for an exciting journey into the world of discrete mathematics!
3 Reference Books
4 Chapter 1: The Foundations: Logics and Proofs — Predicate and
Quantifiers
5 Nested Quantifiers
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 25 / 48
Argument and Rules of Inference
Rule of Inference
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 26 / 48
Argument and Rules of Inference
If I play all day, then I get tired. I play all day. Therefore, I got tired.
Logical representation of underlying variables:
p: I play all day. q: I get tired.
Logical analysis of the argument:
p → q Premise 1
p Premise 2
∴q Conclusion
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 27 / 48
Argument and Rules of Inference
Valid Arguments
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 28 / 48
Argument and Rules of Inference
Rules of Inference
premise 1
premise 2
..
.
∴ conclusion
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 29 / 48
Argument and Rules of Inference
Premises → Conclusion
Corresponding Tautology:
((premise 1) ∧ (premise 2) ∧ . . .) → conclusion ;
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 30 / 48
Argument and Rules of Inference
p
p→q
∴q
Rule of Modus Ponens (a.k.a. law of detachment)
((p ∧ (p → q)) → q) is a tautology
Truth Table:
p q p→q ((p ∧ (p → q)) → q)
True True True True
True False False True
False True True True
False False True True
Notice that the first row is the only one where premises are all true.
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 31 / 48
Argument and Rules of Inference
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 32 / 48
Argument and Rules of Inference
If p implies q, and
It is not the case that q,
Then we can conclude ¬p.
It’s like saying, ”If this condition is true, but the result is false, then
the initial condition must be false.”
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 33 / 48
Argument and Rules of Inference
Statement: p → q
Interpretation: ”If this jewel is really a diamond, then it will scratch
glass.”
Observation: ”The jewel does not scratch glass.”
Conclusion: ”Therefore, the jewel is not a diamond.”
Modus Tollens in action!
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 34 / 48
Argument and Rules of Inference
Formal Representation
(¬q ∧ (p → q)) → ¬p
This formula is a tautology, meaning it is always true in classical logic.
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 35 / 48
Argument and Rules of Inference
Rule of Inference
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 36 / 48
Argument and Rules of Inference
Rule of Addition
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 37 / 48
Argument and Rules of Inference
Rule of Simplification
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 38 / 48
Argument and Rules of Inference
Rule of Conjunction
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 39 / 48
Argument and Rules of Inference
Rules of Inference
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 40 / 48
Argument and Rules of Inference
Argument 1
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 41 / 48
Argument and Rules of Inference
Argument 2
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 42 / 48
Argument and Rules of Inference
Argument 3
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 43 / 48
Argument and Rules of Inference
Argument 4
Statement: (p ∧ q) → p
Rule of Inference: Rule of Simplification
Explanation: We simplify the conjunction ”it is below freezing and
raining now” to ”it is below freezing now.”
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 44 / 48
Argument and Rules of Inference
Hypothetical Syllogism
Rule of Hypothetical Syllogism
p→q
q→r
p→r
Tautology
[(p → q) ∧ (q → r )] → (p → r )
Example: State the rule of inference used in the argument: Let’s
represent it rains today as p and we will not have a barbecue today as
q.it rains today as r
If it rains today, then we will not have a barbecue today.
If we do not have a barbecue today, then
we will have a barbecue tomorrow. Therefore, if it rains today,
we will have a barbecue tomorrow.
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 45 / 48
Argument and Rules of Inference
Hypothetical Syllogism
Rule of Hypothetical Syllogism
p→q
q→r
p→r
Tautology
[(p → q) ∧ (q → r )] → (p → r )
Example: State the rule of inference used in the argument: Let’s
represent it rains today as p and we will not have a barbecue today as
q.it rains today as r
If it rains today, then we will not have a barbecue today.
If we do not have a barbecue today, then
we will have a barbecue tomorrow. Therefore, if it rains today,
we will have a barbecue tomorrow.
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 45 / 48
Argument and Rules of Inference
Disjunctive Syllogism
Rule of Disjunctive Syllogism
Rule: p ∨ q
Conclusion: ¬p → q or ¬q → p
Example: State the rule of inference used in the argument:
Either it’s sunny or it’s raining. It’s not raining. Therefore,
it must be sunny.
Let’s represent it’s sunny as p and it must be sunny as q.
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 46 / 48
Argument and Rules of Inference
Disjunctive Syllogism
Rule of Disjunctive Syllogism
Rule: p ∨ q
Conclusion: ¬p → q or ¬q → p
Example: State the rule of inference used in the argument:
Either it’s sunny or it’s raining. It’s not raining. Therefore,
it must be sunny.
Let’s represent it’s sunny as p and it must be sunny as q.
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 46 / 48
Argument and Rules of Inference
Resolution
Rule of Resolution
4 By applying the rule of resolution, you can derive a new clause that
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 47 / 48
Argument and Rules of Inference
Resolution
Rule of Resolution
4 By applying the rule of resolution, you can derive a new clause that
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 47 / 48
Argument and Rules of Inference
Waqas Ali, Lecturer at DCS, UET, Lahore Discrete Mathematics (CSC-101) September 23, 2023 48 / 48