0% found this document useful (0 votes)
2 views

Lecture 2

This document covers predicates and quantifiers in logic, introducing concepts such as universal and existential quantifiers, and their roles in predicate logic. It explains how to translate English statements into logical expressions, the properties of quantifiers, and the process of negating quantified expressions. Additionally, it discusses the importance of proofs in mathematics and computer science, defining terms like theorem, lemma, and corollary.

Uploaded by

zardalihumam
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Lecture 2

This document covers predicates and quantifiers in logic, introducing concepts such as universal and existential quantifiers, and their roles in predicate logic. It explains how to translate English statements into logical expressions, the properties of quantifiers, and the process of negating quantified expressions. Additionally, it discusses the importance of proofs in mathematics and computer science, defining terms like theorem, lemma, and corollary.

Uploaded by

zardalihumam
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 77

Predicates

and
Quantifiers
SECTION 1.4
Section Summary

 Predicates
 Variables
 Quantifiers
 Universal Quantifier
 Existential Quantifier
 Negating Quantifiers
 De Morgan’s Laws for Quantifiers
 Translating English to Logic
 Logic Programming (optional)
Propositional Logic Not
Enough
 If we have:
“All men are mortal.”
“Socrates is a man.”
 Does it follow that “Socrates is mortal?”
 Can’t be represented in propositional logic.
Need a language that talks about objects, their
properties, and their relations.
 Later we’ll see how to draw inferences.
Introducing Predicate
Logic
 Predicate logic uses the following new features:
 Variables: x, y, z
 Predicates: P(x), M(x)
 Quantifiers (to be covered in a few slides):
 Propositional functions are a generalization of
propositions.
 They contain variables and a predicate, e.g., P(x)
 Variables can be replaced by elements from their
domain.
Propositional Functions
 Propositional functions become propositions (and have
truth values) when their variables are each replaced by a
value from the domain (or bound by a quantifier, as we
will see later).
 The statement P(x) is said to be the value of the
propositional function P at x.
 For example, let P(x) denote “x > 0” and the domain be
the integers. Then:
P(-3) is ?
P(0) is ?
P(3) is ?
 Often the domain is denoted by U. So in this example U is
the integers.
Examples of Propositional
Functions
 Let “x + y = z” be denoted by R(x, y, z) and U (for all three variables) be
the integers. Find these truth values:
R(2,-1,5)
Solution: ?
R(3,4,7)
Solution: ?
R(x, 3, z)
Solution: ?
 Now let “x - y = z” be denoted by Q(x, y, z), with U as the integers. Find
these truth values:
Q(2,-1,3)
Solution: ?
Q(3,4,7)
Solution: ?
Q(x, 3, z)
Solution: ?
Compound Expressions
 Connectives from propositional logic carry over to predicate
logic.
 If P(x) denotes “x > 0,” find these truth values:
P(3) ∨ P(-1) Solution:?
P(3) ∧ P(-1) Solution:?
P(3) → P(-1) Solution:?
P(3) → ¬P(-1) Solution: ?
Expressions with variables are not propositions and therefore do
not have truth values. For example,
P(3) ∧ P(y)
P(x) → P(y)
 When used with quantifiers (to be introduced next), these
expressions (propositional functions) become propositions.
Quantifiers
 We need quantifiers to express the meaning of English
words including all and some:
 “All men are Mortal.”
 “Some cats do not have fur.”
 The two most important quantifiers are:
 Universal Quantifier, “For all,” symbol: 

 Existential Quantifier, “There exists,” symbol: 


 We write as in x P(x) and x P(x).
 x P(x) asserts P(x) is true for every x in the domain.
 x P(x) asserts P(x) is true for some x in the domain.
 The quantifiers are said to bind the variable x in these
expressions.
Universal Quantifier

 x P(x) is read as “For all x, P(x)” or “For every x,


P(x)”
Examples:
1) If P(x) denotes “x > 0” and U is the integers, then x P(x) is
false.
2) If P(x) denotes “x > 0” and U is the positive integers, then
x P(x) is true.
3) If P(x) denotes “x is even” and U is the integers, then  x
P(x) is false.
Existential Quantifier
 x P(x) is read as “For some x, P(x)”, or as “There is
an x such that P(x),” or “For at least one x, P(x).”

Examples:
1. If P(x) denotes “x > 0” and U is the integers, then x P(x)
is true. It is also true if U is the positive integers.
2. If P(x) denotes “x < 0” and U is the positive integers, then
x P(x) is false.
3. If P(x) denotes “x is even” and U is the integers, then x
P(x) is true.
Thinking about Quantifiers
 When the domain of discourse is finite, we can think of
quantification as looping through the elements of the domain.
 To evaluate x P(x) loop through all x in the domain.
 If at every step P(x) is true, then x P(x) is true.
 If at a step P(x) is false, then x P(x) is false and the loop
terminates.
 To evaluate x P(x) loop through all x in the domain.
 If at some step, P(x) is true, then x P(x) is true and the loop
terminates.
 If the loop ends without finding an x for which P(x) is true, then x
P(x) is false.
 Even if the domains are infinite, we can still think of the
quantifiers this fashion, but the loops will not terminate in some
cases.
Properties of Quantifiers
 The truth value of x P(x) and  x P(x) depend on both the
propositional function P(x) and on the domain U.
 Examples:
1. If U is the positive integers and P(x) is the statement
“x < 2”, then x P(x) is true, but  x P(x) is false.
2. If U is the negative integers and P(x) is the statement
“x < 2”, then both x P(x) and  x P(x) are true.
3. If U consists of 3, 4, and 5, and P(x) is the statement
“x > 2”, then both x P(x) and  x P(x) are true. But if P(x) is
the statement “x < 2”, then both x P(x) and x
P(x) are false.
Precedence of Quantifiers

 The quantifiers  and  have higher


precedence than all the logical operators.
 For example, x P(x) ∨ Q(x) means (x P(x))∨
Q(x)
 x (P(x) ∨ Q(x)) means something different.
 Unfortunately, often people write x P(x) ∨ Q(x)
when they mean  x (P(x) ∨ Q(x)).
Translating from English to
Logic
Example 1: Translate the following sentence into
predicate logic: “Every student in this class has
taken a course in Java.”
Solution:
First decide on the domain U.
Solution 1: If U is all students in this class, define a
propositional function J(x) denoting “x has taken a
course in Java” and translate as x J(x).
Solution 2: But if U is all people, also define a
propositional function S(x) denoting “x is a student
in this class” and translate as x (S(x)→ J(x)).
x (S(x) ∧ J(x)) is not correct. What does it mean?
Returning to the Socrates
Example
 Introduce the propositional functions Man(x)
denoting “x is a man” and Mortal(x) denoting “x
is mortal.” Specify the domain as all people.
 The two premises are:

 The conclusion is:

 Later we will show how to prove that the


conclusion follows from the premises.
Equivalences in Predicate
Logic
 Statements involving predicates and
quantifiers are logically equivalent if and only if
they have the same truth value
 for every predicate substituted into these statements
and
 for every domain of discourse used for the variables
in the expressions.
 The notation S ≡T indicates that S and T are
logically equivalent.
 Example: x ¬¬S(x) ≡ x S(x)
Thinking about Quantifiers as
Conjunctions and Disjunctions
 If the domain is finite, a universally quantified proposition is
equivalent to a conjunction of propositions without
quantifiers and an existentially quantified proposition is
equivalent to a disjunction of propositions without
quantifiers.
 If U consists of the integers 1,2, and 3:

 Even if the domains are infinite, you can still think of the
quantifiers in this fashion, but the equivalent expressions
without quantifiers will be infinitely long.
Negating Quantified
Expressions
 Consider x J(x)
“Every student in your class has taken a course in
Java.”
Here J(x) is “x has taken a course in Java” and
the domain is students in your class.
 Negating the original statement gives “It is not the
case that every student in your class has taken
Java.” This implies that “There is a student in your
class who has not taken Java.”
Symbolically ¬x J(x) and x ¬J(x) are equivalent
Negating Quantified
Expressions (continued)
 Now Consider  x J(x)
“There is a student in this class who has taken a
course in Java.”
Where J(x) is “x has taken a course in Java.”
 Negating the original statement gives “It
is not the case that there is a student in
this class who has taken Java.” This
implies that “Every student in this class has
not taken Java”
Symbolically ¬ x J(x) and  x ¬J(x) are
equivalent
De Morgan’s Laws for
Quantifiers
 The rules for negating quantifiers are:

 The reasoning in the table shows that:

 These are important. You will use these.


Translation from English to
Logic
Examples:
1. “Some student in this class has visited Mexico.”
Solution: Let M(x) denote “x has visited Mexico” and S(x)
denote “x is a student in this class,” and U be all people.
_____________________

2. “Every student in this class has visited Canada or


Mexico.”
Solution: Add C(x) denoting “x has visited Canada.”
x (S(x)→ (M(x)∨C(x)))
___________________________________
Lewis Carroll Example
 The first two are called premises and the third is called the
conclusion.
1. “All lions are fierce.”
2. “Some lions do not drink coffee.”
3. “Some fierce creatures do not drink coffee.”
 Here is one way to translate these statements to
predicate logic. Let P(x), Q(x), and R(x) be the
propositional functions “x is a lion,” “x is fierce,” and “x
drinks coffee,” respectively.
1. x (P(x)→ Q(x))
2. x (P(x) ∧ ¬R(x))
3. x (Q(x) ∧ ¬R(x))
 Later we will see how to prove that the conclusion
follows from the premises.
More Predicate Calculus
Definitions (optional)
 The scope of a quantifier is the part of an
assertion in which variables are bound by the
quantifier.
Example: x has wide scope

Example: x has narrow scope


 Kenneth H. Rosen (2012)
Discrete Mathematics and its Applications, 7th ed.
The
Foundations:
Logic and
Proofs
CHAPTER 1, PART III: PROOFS
Introduction
to Proofs
SECTION 1.7
Section Summary

 Mathematical Proofs
 Forms of Theorems
 Direct Proofs
 Indirect Proofs
 Proof of the Contrapositive
 Proof by Contradiction
Proofs of Mathematical
Statements
 A proof is a valid argument that establishes the truth of a
statement.
 In math, CS, and other disciplines, informal proofs which are
generally shorter, are generally used.
 More than one rule of inference are often used in a step.
 Steps may be skipped.
 The rules of inference used are not explicitly stated.
 Easier for to understand and to explain to people.
 But it is also easier to introduce errors.
 Proofs have many practical applications:
 verification that computer programs are correct
 establishing that operating systems are secure
 enabling programs to make inferences in artificial intelligence
 showing that system specifications are consistent
Definitions
 A theorem is a statement that can be shown to be true
using:
 definitions
 other theorems
 axioms (statements which are given as true)
 rules of inference
 A lemma is a ‘helping theorem’ or a result which is needed
to prove a theorem.
 A corollary is a result which follows directly from a theorem.
 Less important theorems are sometimes called propositions.
 A conjecture is a statement that is being proposed to be
true. Once a proof of a conjecture is found, it becomes a
theorem. It may turn out to be false.
Forms of Theorems
 Many theorems assert that a property holds for all elements in
a domain, such as the integers, the real numbers, or some of
the discrete structures that we will study in this class.
 Often the universal quantifier (needed for a precise
statement of a theorem) is omitted by standard
mathematical convention.
For example, the statement:
“If x > y, where x and y are positive real numbers, then
x2 > y2 ”
really means
“For all positive real numbers x and y, if x > y, then x2 >
y2 .”
Proving Theorems
 Many theorems have the form:

 To prove them, we show that where c is an arbitrary


element of the domain,
 By universal generalization the truth of the original formula
follows.
 So, we must prove something of the form:
Proving Conditional
Statements: p → q
 Trivial Proof: If we know q is true, then
p → q is true as well.

“If it is raining then 1=1.”

 Vacuous Proof: If we know p is false then


p → q is true as well.
“If I am both rich and poor then 2 + 2 = 5.”

[ Even though these examples seem silly, both trivial and


vacuous proofs are often used in mathematical induction,
as we will see in Chapter 5) ]
Even and Odd Integers
Definition: The integer n is even if there exists an integer k
such that n = 2k, and n is odd if there exists an integer k,
such that n = 2k + 1. Note that every integer is either
even or odd and no integer is both even and odd.

We will need this basic fact about the integers in some of


the example proofs to follow.
Proving Conditional
Statements: p → q
 Direct Proof: Assume that p is true. Use rules of inference,
axioms, and logical equivalences to show that q must also
be true.
Example: Give a direct proof of the theorem “If n is an odd
integer, then n2 is odd.”
Solution: Assume that n is odd. Then n = 2k + 1 for an integer k.
Squaring both sides of the equation, we get:
n2 = (2k + 1)2 = 4k2 + 4k +1 = 2(2k2 + 2k) + 1= 2r + 1,
where r = 2k2 + 2k , an integer.
We have proved that if n is an odd integer, then n2 is an odd
integer.

( marks the end of the proof. Sometimes


QED is used instead. )
Proving Conditional
Statements: p → q
Definition: The real number r is rational if there exist
integers p and q where q≠0 such that r = p/q
Example: Prove that the sum of two rational
numbers is rational.
Solution: Assume r and s are two rational numbers.
Then there must be integers p, q and also t, u
such that

where v = pu + qt
w = qu ≠ 0
Thus the sum is rational.
Proving Conditional
Statements: p → q
 Proof by Contraposition: Assume ¬q and show ¬p is true also. This
is sometimes called an indirect proof method. If we give a direct
proof of ¬q → ¬p then we have a proof of p → q.
Why does this work?
Example: Prove that if n is an integer and 3n + 2 is odd,
then n is odd.
Solution: Assume n is even. So, n = 2k for some integer k.
Thus
3n + 2 = 3(2k) + 2 =6k +2 = 2(3k + 1) = 2j for j = 3k +1
Therefore 3n + 2 is even. Since we have shown ¬q → ¬p , p →
q must hold as well. If n is an integer and 3n + 2 is odd (not
even) , then n is odd (not even).
Proving Conditional
Statements: p → q
 Proof by Contradiction: (AKA reductio ad absurdum).
To prove p, assume ¬p and derive a contradiction
such as p ∧ ¬p. (an indirect form of proof). Since we
have shown that ¬p →F is true , it follows that the
contrapositive T→p also holds.

Example: Prove that if you pick 22 days from the


calendar, at least 4 must fall on the same day of the
week.
Solution: Assume that no more than 3 of the 22 days
fall on the same day of the week. Because there are 7
days of the week, we could only have picked 21 days.
This contradicts the assumption that we have picked
22 days.
Proof by Contradiction

 A preview of Chapter 4.
Example: Use a proof by contradiction to give a proof that √2
is irrational.
Solution: Suppose √2 is rational. Then there exists integers a and b
with √2 = a/b, where b≠ 0 and a and b have no common factors. Then

Therefore a2 must be even. If a2 is even then a must be even (an


exercise). Since a is even, a = 2c for some integer c. Thus,

Therefore b2 is even. Again then b must be even as well.


But then 2 must divide both a and b. This contradicts our assumption
that a and b have no common factors. We have proved by contradiction
that our initial assumption must be false and therefore √2 is
irrational .
Theorems that are
Biconditional Statements
 To prove a theorem that is a biconditional
statement, that is, a statement of the form p q,
we show that p → q and q →p are both true.
Example: Prove the theorem: “If n is an integer, then n is
odd if and only if n2 is odd.”
Solution: We have already shown (previous slides) that
both p →q and q →p. Therefore we can conclude p q.

Sometimes iff is used as an abbreviation for “if an only if,”


as in
“If n is an integer, then n is odd iif n2 is odd.”
What is wrong with this?
“Proof” that 1 = 2

Solution: ????
Looking Ahead

 If direct methods of proof do not work:


 We may need a clever use of a proof by
contraposition.
 Or a proof by contradiction.
 In the next section, we will see strategies that can
be used when straightforward approaches do not
work.
 In Chapter 5, we will see mathematical induction
and related techniques.
 In Chapter 6, we will see combinatorial proofs
Proof Methods
and Strategy
SECTION 1.8
Section Summary

 Proof by Cases
 Existence Proofs
 Constructive
 Nonconstructive
 Disproof by Counterexample
 Nonexistence Proofs
 Uniqueness Proofs
 Proof Strategies
 Proving Universally Quantified Assertions
 Open Problems
Proof by Cases
 To prove a conditional statement of the form:

 Use the tautology

 Each of the implications is a case.


Proof by Cases
Example: Let a @ b = max{a, b} = a if a ≥ b, otherwise
a @ b = max{a, b} = b.
Show that for all real numbers a, b, c
(a @b) @ c = a @ (b @ c)
(This means the operation @ is associative.)
Proof: Let a, b, and c be arbitrary real numbers.
Then one of the following 6 cases must hold.
1. a≥b≥c
2. a≥c≥b
3. b ≥ a ≥c
4. b ≥ c ≥a
5. c≥a≥b
6. c≥b≥a
Continued on next slide →
Proof by Cases

Case 1: a ≥ b ≥ c
(a @ b) = a, a @ c = a, b @ c = b
Hence (a @ b) @ c = a = a @ (b @ c)
Therefore the equality holds for the first case.

A complete proof requires that the equality be


shown to hold for all 6 cases. But the proofs of
the remaining cases are similar. Try them.
Without Loss of Generality
Example: Show that if x and y are integers and both x∙y and x+y
are even, then both x and y are even.
Proof: Use a proof by contraposition. Suppose x and y are not
both even. Then, one or both are odd. Without loss of
generality, assume that x is odd. Then x = 2m + 1 for some
integer m.

Case 1: y is even. Then y = 2n for some integer n, so


x + y = (2m + 1) + 2n = 2(m + n) + 1 is odd.
Case 2: y is odd. Then y = 2n + 1 for some integer n, so
x ∙ y = (2m + 1) (2n + 1) = 2(2m ∙ n +m + n) + 1 is odd.

We only cover the case where x is odd because the case where y is odd is
similar. The use phrase without loss of generality (WLOG) indicates
this.
Existence Proofs

 Proof of theorems of the form .


 Constructive existence proof:
 Find an explicit value of c, for which P(c) is true.
 Then is true by Existential Generalization (EG).
Example: Show that there is a positive integer that can be
written as the sum of cubes of positive integers in two
different ways:
Proof: 1729 is such a number since
1729 = 103 + 93 = 123 + 13
Nonconstructive Existence
Proofs
 In a nonconstructive existence proof, we assume no c
exists which makes P(c) true and derive a
contradiction.
Example: Show that there exist irrational numbers x and
y such that xy is rational.
Proof: We know that √2 is irrational. Consider the number
√2 √2 . If it is rational, we have two irrational numbers x and y
with xy rational, namely x = √2 and y = √2. But if √2 √2
is irrational, then we can let x = √2 √2 and y = √2 so that
xy = (√2 √2 )√2 = √2 (√2 √2) = √2 2 = 2.
Uniqueness Proofs
 Some theorems asset the existence of a unique element
with a particular property, !x P(x). The two parts of a
uniqueness proof are
 Existence: We show that an element x with the property
exists.
 Uniqueness: We show that if y≠x, then y does not have the
property.
Example: Show that if a and b are real numbers and a ≠0, then
there is a unique real number r such that ar + b = 0.
Solution:
 Existence: The real number r = −b/a is a solution of ar + b = 0
because a(−b/a) + b = −b + b =0.
 Uniqueness: Suppose that s is a real number such that as + b = 0.
Then ar + b = as + b, where r = −b/a. Subtracting b from both sides
and dividing by a shows that r = s.
Universally Quantified
Assertions
 To prove theorems of the form ,assume x is
an arbitrary member of the domain and show
that P(x) must be true. Using UG it follows that
.
Example: An integer x is even if and only if x2 is
even.
Solution: The quantified assertion is
x [x is even  x2 is even]
We assume x is arbitrary.
Recall that is equivalent to
So, we have two cases to consider. These are
considered in turn.
Continued on next slide →
Universally Quantified
Assertions
Case 1. We show that if x is even then x2 is even
using a direct proof (the only if part or necessity).
If x is even then x = 2k for some integer k.
Hence x2 = 4k2 = 2(2k2 ) which is even since it is an
integer divisible by 2.
This completes the proof of case 1.

Case 2 on next slide →


Universally Quantified
Assertions
Case 2. We show that if x2 is even then x must be
even (the if part or sufficiency). We use a proof by
contraposition.
Assume x is not even and then show that x2 is not
even.
If x is not even then it must be odd. So, x = 2k + 1 for
some k. Then x2 = (2k + 1)2 = 4k2 + 4k + 1 = 2(2k2 +
2k) + 1
which is odd and hence not even. This completes the
proof of case 2.
Since x was arbitrary, the result follows by UG.
Therefore we have shown that x is even if and only if
x2 is even.
The Role of Open
Problems
 Unsolved problems have motivated much work in
mathematics. Fermat’s Last Theorem was
conjectured more than 300 years ago. It has only
recently been finally solved.
Fermat’s Last Theorem: The equation xn + yn = zn
has no solutions in integers x, y, and z, with xyz≠0
whenever n is an integer with n > 2.

A proof was found by Andrew Wiles in the 1990s.


An Open Problem

 The 3x + 1 Conjecture: Let T be the transformation


that sends an even integer x to x/2 and an odd
integer x to 3x + 1. For all positive integers x, when
we repeatedly apply the transformation T, we will
eventually reach the integer 1.
For example, starting with x = 13:
T(13) = 3∙13 + 1 = 40, T(40) = 40/2 = 20, T(20) = 20/2
= 10,
T(10) = 10/2 = 5, T(5) = 3∙5 + 1 = 16,T(16) = 16/2 = 8,
T(8) = 8/2 = 4, T(4) = 4/2 = 2, T(2) = 2/2 = 1
The conjecture has been verified using computers up to 5.6
∙ 1013 .
Additional Proof Methods

 Later we will see many other proof methods:


 Mathematical induction, which is a useful method
for proving statements of the form n P(n), where
the domain consists of all positive integers.
 Structural induction, which can be used to prove
such results about recursively defined sets.
 Cantor diagonalization is used to prove results
about the size of infinite sets.
 Combinatorial proofs use counting arguments.
 Kenneth H. Rosen (2012)
Discrete Mathematics and its Applications, 7th ed.
Mathematical
Induction
SECTION 5.1
Section Summary

 Mathematical Induction
 Examples of Proof by Mathematical Induction
 Mistaken Proofs by Mathematical Induction
 Guidelines for Proofs by Mathematical Induction
Climbing an
Infinite Ladder
Suppose we have an infinite ladder:
1. We can reach the first rung of the ladder.
2. If we can reach a particular rung of the
ladder, then we can reach the next rung.

From (1), we can reach the first rung.


Then by applying (2), we can reach
the second rung. Applying (2) again,
the third rung. And so on. We can
apply (2) any number of times to
reach any particular rung, no matter
how high up.
This example motivates proof by
mathematical induction.
Principle of Mathematical Induction
Principle of Mathematical Induction: To prove that P(n) is true for all positive
integers n, we complete these steps:
 Basis Step: Show that P(1) is true.
 Inductive Step: Show that P(k) → P(k + 1) is true for all positive integers k.
To complete the inductive step, assuming the inductive hypothesis that P(k) holds
for an arbitrary integer k, show that must P(k + 1) be true.

Climbing an Infinite Ladder Example:


 BASIS STEP: By (1), we can reach rung 1.
 INDUCTIVE STEP: Assume the inductive hypothesis that we can reach rung k. Then by
(2), we can reach rung k + 1.
Hence, P(k) → P(k + 1) is true for all positive integers k. We can reach every rung
on the ladder.
Important Points About Using
Mathematical Induction
 Mathematical induction can be expressed as the rule
of inference
(P(1) ∧ ∀k (P(k) → P(k + 1))) → ∀n P(n),
where the domain is the set of positive integers.
 In a proof by mathematical induction, we don’t
assume that P(k) is true for all positive integers! We
show that if we assume that P(k) is true, then P(k + 1)
must also be true.
 Proofs by mathematical induction do not always start
at the integer 1. In such a case, the basis step begins
at a starting point b where b is an integer. We will see
examples of this soon.
Validity of Mathematical Induction

 Mathematical induction is valid because of the well ordering property,


which states that every nonempty subset of the set of positive integers has a
least element (see Section 5.2 and Appendix 1). Here is the proof:
 Suppose that P(1) holds and P(k) → P(k + 1) is true for all positive integers
k.
 Assume there is at least one positive integer n for which P(n) is false.
Then the set S of positive integers for which P(n) is false is nonempty.
 By the well-ordering property, S has a least element, say m.
 We know that m can not be 1 since P(1) holds.
 Since m is positive and greater than 1, m − 1 must be a positive integer.
Since m − 1 < m, it is not in S, so P(m − 1) must be true.
 But then, since the conditional P(k) → P(k + 1) for every positive integer
k holds, P(m) must also be true. This contradicts P(m) being false.
 Hence, P(n) must be true for every positive integer n.
Remembering How Mathematical
Induction Works We know that the first domino
is knocked down, i.e., P(1) is
true .
Consider an infinite
sequence of We also know that if
dominoes, labeled whenever the kth domino is
1,2,3, …, where each knocked over, it knocks over
domino is standing. the (k + 1)st domino, i.e, P(k) →
P(k + 1) is true for all positive
Let P(n) be the integers k.
proposition that
the nth domino is Hence, all dominos are knocked
knocked over. over.

P(n) is true for all positive integers


n.
Proving a Summation Formula by
Mathematical Induction
Note: Once we have
Example: Show that: this conjecture,
mathematical
Solution: induction can be used
to prove it correct.
 BASIS STEP: P(1) is true since 1(1 + 1)/2 = 1.
 INDUCTIVE STEP: Assume true for P(k).
The inductive hypothesis is
Under this assumption,
Conjecturing and Proving Correct
a Summation Formula
Example: Conjecture and prove correct a formula for the sum of the first n positive odd integers. Then prove your conjecture.

Solution: We have: 1= 1, 1 + 3 = 4, 1 + 3 + 5 = 9, 1 + 3 + 5 + 7 = 16, 1 + 3 + 5 + 7 + 9 = 25.

 We can conjecture that the sum of the first n positive odd integers is n2,

1 + 3 + 5 + ∙∙∙+ (2n − 1) + (2n + 1) =n2 .


 We prove the conjecture is proved correct with mathematical induction.

 BASIS STEP: P(1) is true since 12 = 1.

 INDUCTIVE STEP: P(k) → P(k + 1) for every positive integer k.

Assume the inductive hypothesis holds and then show that P(k + 1) holds has well.

Inductive Hypothesis: 1 + 3 + 5 + ∙∙∙+ (2k − 1) =k2

 So, assuming P(k), it follows that:


1 + 3 + 5 + ∙∙∙+ (2k − 1) + (2k + 1) =[1 + 3 + 5 + ∙∙∙+ (2k − 1)] + (2k + 1)
= k2 + (2k + 1) (by the inductive hypothesis)
= k2 + 2k + 1
= (k + 1) 2

 Hence, we have shown that P(k + 1) follows from P(k). Therefore the sum of the first n positive odd integers is n2.
Proving Inequalities
Example: Use mathematical induction to prove that n < 2n for all positive
integers n.
Solution: Let P(n) be the proposition that n < 2n.
 BASIS STEP: P(1) is true since 1 < 21 = 2.
 INDUCTIVE STEP: Assume P(k) holds, i.e., k < 2k, for an arbitrary positive integer k.
 Must show that P(k + 1) holds. Since by the inductive hypothesis, k < 2k, it follows
that:
k + 1 < 2k + 1 ≤ 2k + 2k = 2 ∙ 2k = 2k+1
Therefore n < 2n holds for all positive integers n.
Proving Inequalities
Example: Use mathematical induction to prove that 2n < n!, for every
integer n ≥ 4.
Solution: Let P(n) be the proposition that 2n < n!.
 BASIS STEP: P(4) is true since 24 = 16 < 4! = 24.
 INDUCTIVE STEP: Assume P(k) holds, i.e., 2k < k! for an arbitrary integer k ≥
4. To show that P(k + 1) holds:
2k+1 = 2∙2k
< 2∙ k! (by the inductive hypothesis)
< (k + 1)k!
= (k + 1)!
Therefore, 2n < n! holds, for every integer n ≥ 4.

Note that here the basis step is P(4), since P(0), P(1), P(2), and P(3) are
all false.
Proving Divisibility Results

Example: Use mathematical induction to prove that n3 − n is divisible


by 3, for every positive integer n.
Solution: Let P(n) be the proposition that n3 − n is divisible by 3.
 BASIS STEP: P(1) is true since 13 − 1 = 0, which is divisible by 3.
 INDUCTIVE STEP: Assume P(k) holds, i.e., k3 − k is divisible by 3, for an
arbitrary positive integer k. To show that P(k + 1) follows:
(k + 1)3 − (k + 1) = (k3 + 3k2 + 3k + 1) − (k + 1)
= (k3 − k) + 3(k2 + k)
By the inductive hypothesis, the first term (k3 − k) is divisible by 3 and the
second term is divisible by 3 since it is an integer multiplied by 3. So by
part (i) of Theorem 1 in Section 4.1 , (k + 1)3 − (k + 1) is divisible by 3.
Therefore, n3 − n is divisible by 3, for every integer positive integer n.
Number of Subsets of a Finite Set

Example: Use mathematical induction to show that if S is a finite set


with n elements, where n is a nonnegative integer, then S has 2n
subsets.
(Chapter 6 uses combinatorial methods to prove this result.)
Solution: Let P(n) be the proposition that a set with n elements has 2n
subsets.
 Basis Step: P(0) is true, because the empty set has only itself as a subset
and 20 = 1.
 Inductive Step: Assume P(k) is true for an arbitrary nonnegative integer
k.

continued

Number of Subsets of a Finite Set
Inductive Hypothesis: For an arbitrary nonnegative integer
k, every set with k elements has 2k subsets.

 Let T be a set with k + 1 elements. Then T = S ∪ {a}, where a ∈ T and S = T − {a}.


Hence |S| = k.
 For each subset X of S, there are exactly two subsets of T, i.e., X and X ∪ {a}.

 By the inductive hypothesis S has 2k subsets. Since there are two subsets of T for each
subset of S, the number of subsets of T is 2 ∙2k = 2k+1 .
Tiling Checkerboards

Example: Show that every 2n ×2n checkerboard with one square removed can be tiled using right
triominoes.

A right triomino is an L-shaped tile which


covers three squares at a time.
Solution: Let P(n) be the proposition that every 2n ×2n checkerboard with one square removed can
be tiled using right triominoes. Use mathematical induction to prove that P(n) is true for all positive
integers n.
 BASIS STEP: P(1) is true, because each of the four 2 ×2 checkerboards with one square removed
can be tiled using one right triomino.

 INDUCTIVE STEP: Assume that P(k) is true for every 2k ×2k checkerboard, for some positive integer k.

continued

Tiling Checkerboards

Inductive Hypothesis: Every 2k ×2k checkerboard, for


some positive integer k, with one square removed can
be tiled using right triominoes.

 Consider a 2k+1 ×2k+1 checkerboard with one square removed. Split this checkerboard into four checkerboards of size 2k ×2k,by dividing it
in half in both directions.

 Remove a square from one of the four 2k ×2k checkerboards. By the inductive hypothesis, this board can be tiled. Also by the inductive
hypothesis, the other three boards can be tiled with the square from the corner of the center of the original board removed. We can then
cover the three adjacent squares with a triominoe.

 Hence, the entire 2k+1 ×2k+1 checkerboard with one square removed can be tiled using right triominoes.
An Incorrect “Proof” by
Mathematical Induction
Example: Let P(n) be the statement that every set of n lines in the
plane, no two of which are parallel, meet in a common point. Here
is a “proof” that P(n) is true for all positive integers n ≥ 2.
 BASIS STEP: The statement P(2) is true because any two lines in the plane
that are not parallel meet in a common point.
 INDUCTIVE STEP: The inductive hypothesis is the statement that P(k) is
true for the positive integer k ≥ 2, i.e., every set of k lines in the plane, no
two of which are parallel, meet in a common point.
 We must show that if P(k) holds, then P(k + 1) holds, i.e., if every set of k
lines in the plane, no two of which are parallel, k ≥ 2, meet in a common
point, then every set of k + 1 lines in the plane, no two of which are
parallel, meet in a common point.

continued

An Incorrect “Proof” by
Mathematical Induction
Inductive Hypothesis: Every set of k lines in the plane,
where k ≥ 2, no two of which are parallel, meet in a
common point.

 Consider a set of k + 1 distinct lines in the plane, no two parallel. By the inductive
hypothesis, the first k of these lines must meet in a common point p1. By the inductive
hypothesis, the last k of these lines meet in a common point p2.
 If p1 and p2 are different points, all lines containing both of them must be the same
line since two points determine a line. This contradicts the assumption that the lines are
distinct. Hence, p1 = p2 lies on all k + 1 distinct lines, and therefore P(k + 1) holds.
Assuming that k ≥2, distinct lines meet in a common point, then every k + 1 lines meet in a
common point.
 There must be an error in this proof since the conclusion is absurd. But where is the error?
 Answer: P(k)→ P(k + 1) only holds for k ≥3. It is not the case that P(2) implies P(3). The first
two lines must meet in a common point p1 and the second two must meet in a common
point p2. They do not have to be the same point since only the second line is common to
both sets of lines.
Guidelines:
Mathematical Induction Proofs
 Kenneth H. Rosen (2012)
Discrete Mathematics and its Applications, 7th ed.

You might also like