Uploaded by sushantgaming

Chapter 5 Induction and Recursion

advertisement
💻
Chapter 5 | Induction and
Recursion
Created
Property
Subject
@March 21, 2023 5:47 PM
💻 CS 2305 | Discrete Mathematics
5.1 | Mathematical Induction
In general, mathematical induction
can be used to prove statements that
assert that P (n) is true for all
positive integers n, where P (n) is a
propositional function
A proof by mathematical induction
has two main parts:
The basis step, where we show
that P (1) is true
The inductive step, where we
show that for all positive integers
k, if P (k) is true, then P (k + 1)
is true
P (k) → P (k + 1)
To complete the inductive step of a
proof using the principle of
mathematical induction, we assume
that P (k) is true for an arbitrary
Chapter 5 | Induction and Recursion
1
positive integer k and show that,
under this assumption, P (k
must also be true
+ 1)
The assumption that P (k) is true
is callled the inductive hypothesis
Once we complete both steps in a
proof by mathematical induction, we
have shown that P (n) is true for all
positive integers n, that is, we have
shown that ∀nP (n) is true where
quantification is over the set of
positive integers
In the inductive step, we show
that ∀k(P (k) → P (k + 1))
with the same domain of positive
integers
Chapter 5 | Induction and Recursion
2
Expressed as a rule of inference, this proof technique becomes the following when
the domain is the set of positive integers:
(P (1) ∧ ∀k(P (k) → P (k + 1))) → ∀nP (n)
Choosing the Correct Basis Step
Sometimes we will need to show that P (n) is true for n =
where b is an integer other than 1
b, b + 1, b + 2, ...,
In this case, we can use induction by changing the basis step from proving
P (1) is true to proving P (b) is true
Note that b can be negative, zero, or positive
Guidelines for Proofs by Mathematical Induction
More Information on Induction
❕
You can prove a theorem by mathematical induction even if you have no idea
why it’s true!
Chapter 5 | Induction and Recursion
3
❕
❕
IH
Look for the = symbol to see where the inductive hypothesis is used.
SECTION 5.1 ON MCGRAWHILL HAS A TON OF EXAMPLES OF
INDUCTION IN MANY DIFFERENT SCENARIOS, TOO MANY TO PUT
HERE. IT IS VERY RECOMMENDED TO GO THROUGH THEM, THEY
WILL HELP YOU UNDERSTAND MATHEMATICAL INDUCTION!
5.2 | Strong Induction and Well-Ordering
Strong induction can often be used when we cannot easily prove a result using
mathematical induction
Strong Induction
To prove that P (n) is true for all positive integers n, where P (n) is a propositional
function, we complete two steps:
Basis step, where we verify that P (1) is true
Inductive step, where we show that [P (1) ∧ P (2) ∧ ... ∧ P (k)]
→ P (k + 1)
is true for all positive integers k
When we use strong induction to prove that P (n) is true for all positive integers n,
our inductive hypothesis includes all k statements P (1), P (2), ..., P (k)
Because we can use all k statements P (1), P (2), ..., P (k) to prove P (k
+ 1),
rather than just the statement P (k) as in a proof by mathematical induction, strong
induction is a more flexible proof technique
Because of this, some mathematicians prefer to always use strong induction,
even when a proof by mathematical induction is easy to find
Strong induction is sometimes called the second principle of mathematical
induction or complete induction
In the terminology of complete induction, a normal mathematical induction is
known as incomplete induction
Chapter 5 | Induction and Recursion
4
There are examples of these in McGraw Hill
Using Strong Induction in Computational Geometry
Computational Geometry is the part of discrete mathematics that studies
computational problems involving geometric objects
Computational geometry is used extensively in computer graphics, computer
games, robotics, scientific calculations, and a vast array of other areas
A polygon is a closed geometric figure consisting of a sequence of line segments
s1 , s2 , ...sn called sides
Each pair of consecutive sides, si and si+1 , i = 1, 2, ..., n − 1, as well as the last
side sn and the first side s1 , of the polygon meet at a common endpoint, called a
vertex
A polygon is called simple if no two nonconsecutive sides intersect
Every simple polygon divides the plane into two regions, its interior, consisting of
the points inside the curve, and its exterior, consisting of points outside the curve
A polygon is called convex if every line segment connecting two points in the
interior of the polygon lies entirely inside the polygon, otherwise the polygon is
nonconvex
A diagonal of a simple polygon is a line segment connecting two nonconsecutive
vertices of the polygon, and a diagonal is called an interior diagonal if it lies
entirely inside the polygon, except for its endpoints
// (a) & (b) are convex, while (c) & (d) are not
One of the most basic operations of computational geometry involves dividing a
simple polygon into triangles by adding nonintersecting diagonals
Chapter 5 | Induction and Recursion
5
This process is called triangulation
A simple polygon can have many different triangulations
💡
💡
Theorem 1: A simply polygon with n sides, where n is an integer with n ≥ 3,
can be triangulated into n − 2 triangles
Lemma 1: Every simple polygon with at least four sides has an interior
diagonal
Example Proof Using the Well-Ordering Property
Well-ordering property: Every nonempty set of nonnegative integers has a least
element
Chapter 5 | Induction and Recursion
6
Chapter 5 | Induction and Recursion
7
Download