Lecture 3
Lecture 3
Lecture 3
Class Conducted by
Bibek Ropakheti
Associate Professor : Cosmos College of Management and Technology
Visiting Faculty : NCIT
June 2020
Chapter 1
Logic, Induction and Reasoning
Chapter Outline
• Proposition and Truth function • Proofs
• Propositional Logic • Informal Proofs
• Formal Proofs
• Expressing statements in Logic
Propositional Logic • Elementary Induction
• The predicate Logic • Complete Induction
• Validity • Methods of Tableaux
• Informal Deduction in Predicate • Consistency and Completeness
Logic of the System
• Rules of Inference
Last Class
• Propositional Equivalences
• Tautology
• Contradiction
• Logical Equivalences
• Using Truth Table
• Important Equivalences (as Law)
• Arguments
• Constructing New logical Equivalences
• Propositional Satisfiability
Today’s Class
• The Predicate Logic
• Predicates
• Quantifiers
• Universal Quantifiers
• Existential Quantifiers
• Other Quantifiers
• Quantifiers with restricted domain
• Precedence of Quantifiers
• Logical Equivalences involving Quantifiers
• Negating Quantified Expressions
• Translating From English to Logical Expression
Predicate Logic
• Propositional logic can’t adequately express the meaning of all
statements in mathematics and in natural language
• Eg:
• Every Patient admitted in Teku hospital has COVID infection
• The area of logic that deals with predicate and quantifiers is called
Predicate Calculus
The Universal Quantifier
• Many mathematical statements assert that a property is true for all
values of variable in a particular domain, called the domain of
discourse (or the universe of discourse), commonly as the domain
• Such statement is expressed using Universal quantification
• The Universal Quantification of P(x) is the statement
“P(x) for all values of x in the domain.”
• It is denoted by ∀xP(x)
where ∀ is called universal quantifier, and the notation is read as “for
all x P(x)” or “for every x P(x)”
The Universal Quantifier
• Example
• Let P(x) be the statement x+2>x
• Then we can say ∀xP(x) is True
• Domain is necessary to be understood
• It asserts the possible values of any variable
The Universal Quantifier
• Another Example
• Let Q(x): x2<10, with the domain of x being an positive integer not exceeding
three
• Then we can say ∀xQ(x) is True
• This is because, domain of x ranges from 1 to 3
• So, Q(x) = Q(1) ∧ Q(2) ∧ Q(3)
• When all the elements in the domain can be listed say, x1, x2, …, xn
then it follows that the universal quantification ∀xP(x) is the same as
the conjunction of P(x1) ∧ P(x2) ∧ … ∧ P(xn) as it is true if and only if
P(x1), P(x2), …, P(xn) are all true
The Existential Quantifier
• Many mathematical statements assert that there is an element with a
certain property
• Such statements are expressed using existential quantification
• The existential quantification of P(x) is the proposition
“There exists an element x in the domain such that P(x)”
• It is denoted by ∃xP(x)
read as “There is at least one x such that P(x)”
The Existential Quantifier
• Example 1
• Let P(x) be the statement x>12
• Then we can say ∃xP(x) is True
• Example 2
• Let Q(x):x=x+1
• Then we can say ∃xQ(x) is False
The Existential Quantifier
• Another example
• Let T(x):x2>10 with domain being a positive integer not exceeding 4
• Then there exist x=4 for which x2=16
• Hence, x2>10 exists
• So, ∃xT(x) is true with the given domain
• When all the elements in the domain can be listed say, x1, x2, …, xn
then it follows that the existential quantification ∃xP(x) is the same as
the disjunction of P(x1) ∨ P(x2) ∨ … ∨ P(xn) as it is true if and only ifat
least one of P(x1), P(x2), …, P(xn) is true
Quantifiers: What to understand?
∀x P(x) P(x) is true for every x There is an x for which P(x) is false
∃x P(x) There is an x for which P(x) is true P(x) is false for every x
Other Quantifiers: Uniqueness Quantifier
• There is no limitation on the number of different quantifiers we can
define
• For example: “there exist exactly two” or “ there are no more than
five”
• One common such quantifier is Uniqueness Quantifier
• Denoted by ∃!xP(x) (or, ∃|xP(x)) which depicts the meaning that “there exists
a unique x such that p(x) is true”
• We can use any type of quantifiers as per our need
• But commonly, only Universal and Existential Quantifiers are used
Quantifiers with Restricted Domain
• An abbreviated notation is often used to restrict the domain of a
quantifier
• In this notation, a condition, a variable must satisfy is included after
the quantifier
Quantifiers with Restricted Domain: Examples
• ∀x<0 (x2>0)
• It means, for all x less than zero, the square of x is greater than zero
• In other words, for all negative number x, the square of x is positive
• It can also be written as ∀((x<0)à(x2>0))
• ∀y≠0 (y3≠0)
• Describe in words
• ∃z>0(z2=2)
• It means that there exists a real number z with value greater than zero such
that z2=2
• That value exists at 1.41…
• It can also be written as ∃((z>0)∧(z2=2))
Precedence of Quantifiers
• ∀ and ∃ have higher precedence than all logical operators from
propositional calculus
Binding Variables
• When a quantifier is used on the variable x, we say that this
occurrence of the variable is bound
• An occurrence of a variable that is not bound by a quantifier or set
equal to a particular value is said to be free
• All the variables that occur in a propositional function must be bound
or set equal to a particular value to turn it into a proposition
• This can be done using a combination of universal quantifiers,
existential quantifiers and value assignment
Binding Variables: Example
• Let ∃x(x+y=0) be a statement
• Then the variable x is bound to the existential quantifier ∃x
• But the variable y is free as it is not bound to a quantifier and no
value is assigned to it
Logical Equivalences involving Quantifiers
• Statements involving predicates and quantifiers are logically
equivalent if and only if they have the same truth values no matter
which predicates are substituted into these statements and which
domain of discourse is used for the variables in these propositional
functions
Negating Quantified Expression
• ¬(∀x P(x)) ≡ ∃x ¬P(x)
• ¬(∃x P(x)) ≡ ∀x ¬P(x)
• These are the De Morgan’s Law for Quantifiers
Example
• There is an honest politician
• H(x) : x is honest
• Let politician be the domain
• Then, ∃x H(x)
• Negate this statement
• ¬∃x H(x) ≡ ∀x ¬H(x)
• It means that for every x being a politician, no one of them is honest
Practice
• What are the negations of the statement
∀x(x2>x)
• Show that ¬∀x (P(x)àQ(x)) and ∃x ((P(x) ∧ ¬Q(x)) are logically
equivalent
Practice
• What are the negations of the statement
∀x(x2>x)
• Answer: ∃x(x2≤x)
• Show that ¬∀x (P(x)àQ(x)) and ∃x ((P(x) ∧ ¬Q(x)) are logically
equivalent
• L.H.S.= ¬∀x (P(x)àQ(x))
≡ ∃x ¬ (P(x)àQ(x)) {Using De Morgan’s law for Quantifiers}
≡ ∃x ¬ (¬P(x) ∨ Q(x)) {As, PàQ ≡ ¬P∨Q}
≡ ∃x ((P(x) ∧ ¬Q(x)) {Using De Morgan’s law for proposition and double
negation}
≡ R.H.S.
Translating from English to Logical Expression
• Example: Every Student in this class has studied English
• It is equivalent to
“For every student x in this class, x has studied English”
• It can be written as
• ∀x P(x) where, P(x): x has studied English with student of this class being the
domain
• ∀x Q(x, this class) where, Q(x,y): x is the student of y class and studied the
English with domain of x is student and y being the classes in the college
• For every student x, if x is in this class then x has studied english
∀x (Q(x)àP(x)) where, P(x): x has studied English and Q(x): x is student of this
class
• ∀x F(x, English, This class) where, F(x, y, z): x is student of z class and has
studied y
Exercise
• Pg 53
• Q. 1-11, 19-29, 32-34, 37- 44
Reference Books
• Keneth Rosen, Discrete Mathematical Structures with Applications to
Computer Science, WCB/ McGraw Hill
• G. Birkhoff, T.C. Bartee, Modern Applied Algebra, CBS Publishers.
• R. Johnsonbaugh, Discrete Mathematics, Prentice Hall Inc.
• G.Chartand, B.R.Oller Mann, Applied and Algorithmic Graph Theory,
McGraw Hill
• Joe L. Mott, Abrahan Kandel, and Theodore P. Baker, Discrete
Mathematics for Computer Scientists and Mathematicians, Prentice-
Hall of India
Let us Discuss
Any Issues?
Thank You