Structural induction
Counting I
Margaret M. Fleck
5 April 2010
This lecture finishes structural induction (in section 4.3 in Rosen) and
starts the topic of counting, covering sections 5.1 and 5.3.
1
Announcements
Midterm coming up on Wednesday. If you have a conflict, you should have
received email from me with the details of the conflict exam. If not, please
contact me right away.
2
Structural induction with 2D points
Last class, we saw examples of “structural” induction proofs using trees.
Structural induction is used to prove a claim about a set
T
of objects which
is defined recursively. Instead of having an explicit induction variable
n
, our
proof follows the structure of the recursive definition.
•
Show the claim holds for the base case(s) of the definition of
T
•
For the recursive cases of
T
’s definition, show that if the claim holds for
the smaller/input objects, then it holds for the larger/output objects.
1
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
To see how this works on a set of things that aren’t trees, consider the
following recursive definition of a set
S
of 2D points:
1. (3
,
5)
∈
S
2. If (
x,y
)
∈
S,
then (
x
+ 2
,y
)
∈
S
3. If (
x,y
)
∈
S,
then (

x,y
)
∈
S
4. If (
x,y
)
∈
S,
then (
y,x
)
∈
S
What’s in
S
? Starting with the pair specified in the base case (3
,
5), we
use rule 3 to add (

3
,
5).
Rule 2 then allows us to add (

1
,
5) and then
(1
,
5). If we apply rule 2 repeatedly, we see that
S
contains all pairs of the
form (2
n
+ 1
,
5) where
x
is a natural number. By rule 4, (5
,
2
n
+ 1) must
also be in
S
for every natural number
n
.
We then apply rules 2 and 3 in the same way, to show that (2
m
+1
,
2
n
+1)
is in
S
for every natural numbers
m
and
n
.
We’ve now shown, albeit somewhat informally, that every pair with odd
coordinates is a member of
S
. But does every member of
S
have odd coor
dinates?
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '10
 fleck
 Mathematical Induction, Natural number, 2m, Structural induction, Margaret M. Fleck

Click to edit the document details