# lect14f - Induction and Recursion Recursive definition...

This preview shows pages 1–6. Sign up to view the full content.

1 Induction and Recursion. Explicit definition Recursive definition 1 2 )... 1 ( ! - = n n n - = = 1 if )! 1 ( 0 if 1 ! n n n n n n n q q q S + + + + = ... 1 2 + = = - 0 if 0 if 1 1 n q S n S n n n R R R R n ... = = = - 1 if 1 if 1 n R R n R R n n Factorial Geometric progression Power of relation on a set

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 The recursive definition of a function makes reference to earlier versions of itself. The main connection between recursion and induction is that objects are defined by means of a natural sequence. Induction is usually the best (possibly the only) way to prove results about recursively defined objects.
3 How to find a closed form for a recursively defined function? In general there is no ready to use recipe. Some simple cases are Linear function of integer n : g 1 ( n ) = an + b g 1 ( n +1) = a ( n +1)+ b= g 1 ( n ) + a • Quadratic function of integer n : g 2 ( n ) = an 2 + bn+c g 2 ( n +1) = a ( n +1) 2 + b ( n +1) +c = g 2 ( n ) +2 an +( a + b ) + - = = 0 if ) 1 ( 0 if ) ( 1 1 n a n g n b n g + + + - = = 0 if ) ( 2 ) 1 ( 0 if ) ( 2 2 n b a an n g n c n g

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
4 Example. Prove that for all positive integers m and n , n m m n R R R = + Proof. Let m be arbitrary positive integer and then prove by induction on n 1. 1) Basis . n =1: (by recursive definition of R m +1 ) 1 1 R R R m m = + 2) IH : Assume that for some k 1 we have IS : We need to prove that k m k m R R R = + ) 1 ( ) 1 ( + + + = k m k m R R R 1 ) ( ) 1 ( R R R k m k m + + + = R R R k m ) ( = ….. by IH ) ( R R R k m = …. association of composition 1 + = k m R R ……. . definition of composition ……. . definition of composition
5 Theorem. The transitive closure of R is Transitive closures again. ... 3 2 Z = + R R R R n n Proof. Denote . We need to prove that S satisfies the definition of transitive closure, i. e. i)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This document was uploaded on 07/14/2011.

### Page1 / 17

lect14f - Induction and Recursion Recursive definition...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online