



















































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




















































Induction and Recursion
CSC-2259 Discrete Structures
Induction
Induction is a very useful proof technique
In computer science, induction is used
to prove properties of algorithms
Induction and recursion are closely related
for recursive algorithms
Inductive Step: Prove that P (^ k ^1 ) is true
Inductive Hypothesis:Assume P ( k ) is true
P ( k ) P ( k 1 )
In other words in inductive step we prove:
(for any positive integer k)
for every positive integer k
P ( k ) P ( k 1 ) P ( 1 )
True
True
Inductive basis Inductive Step
Proposition true for all positive integers
7
n n P n n Inductive Basis: 2 1 ( 1 1 ) ( 1 ): 1 P Inductive Hypothesis: 2 ( 1 ) ( ): 1 2 k k P k k Inductive Step: K. Busch - LSU Theorem: Proof: 2 ( 1 )(( 1 ) 1 ) ( 1 ): 1 2 ( 1 ) k k P k k k We will prove assume that it holds
2
( 1 )(( 1 ) 1 )
2
( 1 ) 2 ( 1 )
( 1 )
2
( 1 )
( 1 ): 1 2 ( 1 )
k k
k k k
k
k k
P k k k
Inductive Step:
(inductive
hypothesis)
End of Proof
Theorem:
2
n
n
Proof:
n 0
Inductive Basis:
1 2 2
0
n
n
n 0
Inductive Hypothesis: n^ k
2
k
k Suppose it holds:
Inductive Step: n k ^1
1
2
k
k We will show:
Theorem: (^) H n n
2
Proof:
n 0
Inductive Basis:
H H H n n
1 2 2
0
n 0
Inductive Hypothesis: n^ k
H k k
2
Suppose it holds:
Inductive Step: n k ^1
1 2
H k k
We will show:
n
2
We have shown:
It holds that: k k
H H H k
log log
2 2
H k
k
k
1 log
log
H (log k ) k
hole
hole
hole
2 2
3 3
Triominos
Inductive Hypothesis: n^ k
k k
Hole can be anywhere
Assume that a checkerboard
can be tiled with the hole anywhere
k k
Inductive Step: n k ^1
1 1
k k