# Recursively Defined Functions - Discrete Mathematics - Lecture Slides, Slides for Discrete Mathematics. Islamic University of Science & Technology

## Discrete Mathematics

Description: During the study of discrete mathematics, I found this course very informative and applicable.The main points in these lecture slides are:Recursively Defined Functions, Recursive Step, Fibonacci Sequence, Positive Integer, Recursively Defined Sets, Recursively Defined Languages, Recursively Defined Structures, Binary Trees, Fibonacci Proof, Inductive Proof Process
Showing pages  1  -  4  of  7
Discrete Mathematics
CS 2610
October 21, 2008
Docsity.com
2
Recursively Defined Functions
We are familiar with the use of formulae to define
functions. But it is also possible to define some
functions using recursion.
Example:
f(n) = n2 for n Z≥0
or…
f(0) = 0
f(n+1) = f(n) + (2n + 1), for n Z≥0
Docsity.com
3
Recursively Defined Functions
Defining a function recursively requires a basis step
(or steps) and a recursive step,
just like induction
.
Example: f(n) = n!, for n Z≥0
Basis: f(0) = 1
Yup, that’s the def. of 0!
Rec. Step: f(n+1) = f(n) (n+1), n Z≥0
Example:
Fibonacci sequence
: 0, 1, 1, 2, 3, 5, 8, …
Basis: f(0) = 0, f(1) = 1
Rec. Step: f(n+2) = f(n+1) + f(n), for n Z≥0
Docsity.com
4
Recursively Defined Sets
We can define sets in the same manner, by
establishing a basis and recursive step.
Example: S = { x | x is an odd, positive integer }
Basis: 1 S
Rec. Step: if x S, then x + 2 S
Docsity.com