Induction and Recursion in Discrete Structures - Prof. G. Baumgartner, Study notes of Programming Languages

This document, presented by konstantin busch from lsu, discusses the concepts of induction and recursion in the context of discrete structures. It includes proof techniques, theorems, and algorithms related to these concepts.

Typology: Study notes

2010/2011

Uploaded on 11/06/2011

eltacostar
eltacostar 🇺🇸

1 document

1 / 59

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Induction and Recursion
CSC-2259 Discrete Structures
Konstantin Busch - LSU 1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b

Partial preview of the text

Download Induction and Recursion in Discrete Structures - Prof. G. Baumgartner and more Study notes Programming Languages in PDF only on Docsity!

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

  • Recursion is a description method for algorithms
  • Induction is a proof method suitable

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

P ( 1 )  P ( 2 )  P ( 3 )  P ( 4 )  

Inductive basis Inductive Step

Proposition true for all positive integers

7

n n P nn Inductive Basis: 2 1 ( 1 1 ) ( 1 ): 1  P  Inductive Hypothesis: 2 ( 1 ) ( ): 1 2     k k P kk Inductive Step: K. Busch - LSU Theorem: Proof: 2 ( 1 )(( 1 ) 1 ) ( 1 ): 1 2 ( 1 )          k k P kk 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 kk k

Inductive Step:

(inductive

hypothesis)

End of Proof

Theorem:

2

n

H

n

Proof:

n  0

Inductive Basis:

1 2 2

0

n

H H H

n

n  0

Inductive Hypothesis: n^  k

2

k

H

k Suppose it holds:  

Inductive Step: nk ^1

1

2

k

H

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: nk ^1

1 2

H k k

We will show:

H n

n

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: nk ^1

1 1

 

k k