0% found this document useful (0 votes)
10 views16 pages

Induction

This document introduces mathematical induction and structural induction. It discusses the principles of induction and provides examples of proving identities and properties using induction. It also introduces well-founded relations and orders and well-founded induction.

Uploaded by

gogona3769
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views16 pages

Induction

This document introduces mathematical induction and structural induction. It discusses the principles of induction and provides examples of proving identities and properties using induction. It also introduces well-founded relations and orders and well-founded induction.

Uploaded by

gogona3769
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

An Introduction to Induction

Principles
Patricia H ILL
School of Computing
University of Leeds, United Kingdom

Roberto B AGNARA
Department of Mathematics
University of Parma, Italy

Copyright c 2004–2013 Patricia Hill. Distributed under the terms of the GNU Free Documentation License 1.2 1
M ATHEMATICAL I NDUCTION
Let P (n) be a property of natural numbers n = 0, 1, 2, . . . The
principle of mathematical induction says that to show P (n) holds for
all natural numbers, it is sufficient to show:

• The base case: P (0) holds.

• The step case: If P (m) holds then so does P (m + 1), for any
natural number m.

P (m) is called inductive hypothesis.


Formally,
 
P (0) ∧ ∀m ∈ N : P (m) =⇒ P (m + 1) =⇒ ∀n ∈ N : P (n).
| {z }
ind. hyp.

M ATHEMATICAL I NDUCTION 2
M ATHEMATICAL I NDUCTION : E XAMPLE 1

Let us show that P (n) ≡ 0 + 2 + 4 + · · · + 2n = n(n + 1) :
Pm 
• Inductive hypothesis: P (m) ≡ i=0 2i = m(m + 1) .

• Base case, m = 0: P (0) ≡ 0 = 0(0 + 1) .

• Step case, m ≥ 0: Assume P (m) holds.


m+1
X
2i = 0 + 2 + · · · + 2m + 2(m + 1)
i=0
= (0 + 2 + . . . + 2m) + 2(m + 1) [by rearranging]
= m(m + 1) + 2(m + 1) [by ind. hyp. P (m)]
= (m + 1)(m + 2) [by rearranging]

so that P (m + 1) holds.

M ATHEMATICAL I NDUCTION : E XAMPLE 1 3


E XERCISES
Prove the following identities by mathematical induction:

1 + 3 + 5 + · · · + (2n + 1) = (n + 1)2 ;

1 1 1 1 n+1
+ + + ···+ = ;
1·2 2·3 3·4 (n + 1)(n + 2) n+2

2 1 − r n+1
n
1 + r + r + ···+ r = .
1−r

E XERCISES 4
M ATHEMATICAL I NDUCTION : E XAMPLE 2
Let Q(n) be the property that, for all symbols a, b, s1 , . . . , sn , we have
(as1 · · · sn = s1 · · · sn b) =⇒ a = b. We show that ∀n ∈ N : Q(n).
• Inductive hypothesis:

Q(m) ≡ (as1 · · · sm = s1 · · · sm b) =⇒ a = b .
• Base case, m = 0: Q(0) ≡ (a = b =⇒ a = b).
• Step case, m ≥ 0: Suppose

as1 · · · sm sm+1 = s1 · · · sm sm+1 b;

then b = sm+1 and therefore

as1 · · · sm = s1 · · · sm sm+1 = s1 · · · sm b.

By the inductive hypothesis, a = b, and thus Q(m + 1) holds.

M ATHEMATICAL I NDUCTION : E XAMPLE 2 5


C OMPLETE M ATHEMATICAL I NDUCTION
Let P (n) be a property of natural numbers n = 0, 1, 2, . . . The
principle of complete mathematical induction says that to show P (n)
holds for all natural numbers, it is sufficient to show:
• The base case: P (0) holds.
• The step case: If P (k) holds for each k = 0, 1, . . . m then so
does P (m + 1), for any natural number m.
Vm
The conjunction k=0 P (k) is called inductive hypothesis.
Formally,
 ^
m  !
P (0)∧ ∀m ∈ N : P (k) =⇒ P (m+1) =⇒ ∀n ∈ N : P (n).
k=0
| {z }
ind. hyp.

C OMPLETE M ATHEMATICAL I NDUCTION 6


S TRUCTURAL I NDUCTION
The principle of structural induction is:

In order to show that a property is true of all expressions, it


suffices to show it is true of all atomic expressions and is
preserved by all methods of forming the expressions.

S TRUCTURAL I NDUCTION 7
S TRUCTURAL I NDUCTION : E XERCISE
Definition:

1. “tt” and “ff” are boolean expressions;

2. If b is a boolean expression, “(not b)” is a boolean expression;

3. If b0 and b1 are boolean expressions, “(b0 and b1 )” is a boolean


expression;

4. If b0 and b1 are boolean expressions, “(b0 or b1 )” is a boolean


expression.

5. Nothing is a boolean expression unless it is constructed by rules


1–4.

Prove using structural induction that in every boolean expression the


number of ‘(’ equals the number of ‘)’.

S TRUCTURAL I NDUCTION : E XERCISE 8


W ELL -F OUNDED I NDUCTION : I NTRODUCTION
Mathematical and structural induction are instances of well-founded
induction.

• Mathematical induction relies on the fact that for any number n


every descending sequence n > n − 1 > n − 2 > · · · is finite.

• Structural induction relies on the fact that for any expression a0


every subexpression sequence of the form

a0 ⊐ a1 ⊐ a2 ⊐ · · ·

is finite. (a′ ⊏ a denotes a′ 6= a is a subexpression of a.)

These rely on a well-founded relation.

W ELL -F OUNDED I NDUCTION : I NTRODUCTION 9


W ELL -F OUNDED R ELATIONS
A well-founded relation is a binary relation ‘≺’ on a set A such that
there are no infinite “descending chains”

a0 ≻ a1 ≻ · · · ≻ ai ≻ · · ·

• When a ≺ b, element a is called a predecessor of b.

• An equivalent definition of well-founded relation is:


Every non-empty subset S of A has an element with no
predecessors in S:

∀S ⊆ A : (S 6= ∅ =⇒ ∃m ∈ S . ∀s ∈ S : s ⊀ m)

W ELL -F OUNDED R ELATIONS 10


W ELL -F OUNDED R ELATIONS ( CONT.)
• If ‘≺’ is well-founded, then the transitive closure ‘≺+ ’ is
well-founded.

• We write ‘’ for the reflexive closure of ‘≺’.

a  b ⇐⇒ a = b ∨ a ≺ b

Exercise: Show that ‘’ is not a well-founded relation.

W ELL -F OUNDED R ELATIONS ( CONT.) 11


PARTIAL O RDERING
Suppose R is a binary relation on a set A. R is:
1. Reflexive: if, for all a ∈ A, a R a;
2. Transitive: if, for all a1 , a2 , a3 ∈ A :

(a1 R a2 ∧ a2 R a3 ) =⇒ a1 R a3 ;

3. Antisymmetric: if, for all a1 , a2 ∈ A :

(a1 R a2 ∧ a2 R a1 ) =⇒ a1 = a2 .

A partial ordering is a binary relation that is reflexive, transitive and


antisymmetric.
A total ordering on a set A is a partial ordering  on A such that, for
all a1 , a2 ∈ A, either a1  a2 or a2  a1 .

PARTIAL O RDERING 12
W ELL -F OUNDED R ELATIONS AND PARTIAL O RDERINGS
Exercise: Let ‘≺’ a well-founded relation over a set A.

• Show that ‘≺+ ’, the transitive closure of ‘≺’, is well-founded.

• Show that ‘≺⋆ ’, the reflexive and transitive closure of ‘≺’, is a


partial ordering.

W ELL -F OUNDED R ELATIONS AND PARTIAL O RDERINGS 13


W ELL -F OUNDED R ELATIONS : E XAMPLES
• Let A = N be the set of natural numbers and ‘≺’ be the relation
m ≺ n if and only if n = m + 1.
• Let A = N be the set of natural numbers and ‘≺’ be the relation
‘<’.
• Let A = Aexp be the set of all arithmetic expressions in IMP. Let
b ⊏ a be defined to hold if and only if b is an immediate
subexpression of a.
Then ‘⊏’ is a well-founded relation.
• Let A be the set of all finite character strings.
Let t ⋖ s be defined to hold if and only if t is a proper substring of
s.
Then ‘⋖’ is a well-founded relation.

W ELL -F OUNDED R ELATIONS : E XAMPLES 14


W ELL -F OUNDED I NDUCTION
The principle of well-founded induction is:

Let ≺ be a well-founded relation on a set A. Let P be a


property. Then P (a) holds for all a in A if and only if
  
∀a ∈ A : ∀b ≺ a : P (b) =⇒ P (a) .

So, to prove that a property holds of all elements of a well-founded


set (i.e., a set with a well-founded ordering) we just have to prove
that if it holds for all predecessors of any a ∈ A in this ordering, then
it holds for a.

W ELL -F OUNDED I NDUCTION 15


D EFINITIONS BY I NDUCTION
Consider the following definition: for all a ∈ Aexp we define:



 1, if a ≡ m;


 if a ≡ x;
1,


def
length(a) = length(a0 ) + length(a1 ), if a ≡ (a0 + a1 );





 length(a0 ) + length(a1 ), if a ≡ (a0 − a1 );


length(a ) + length(a ), if a ≡ (a ∗ a ).
0 1 0 1

Definitions of this form are often called inductive or recursive.

D EFINITIONS BY I NDUCTION 16

You might also like