Recursively Defined Functions - Discrete Mathematics - Lecture Slides, Slides of Discrete Mathematics

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

Typology: Slides

2012/2013

Uploaded on 04/27/2013

atasi
atasi 🇮🇳

4.6

(32)

134 documents

1 / 7

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Discrete Mathematics
CS 2610
October 21, 2008
Docsity.com
pf3
pf4
pf5

Partial preview of the text

Download Recursively Defined Functions - Discrete Mathematics - Lecture Slides and more Slides Discrete Mathematics in PDF only on Docsity!

Discrete Mathematics

CS 2610

October 21, 2008

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) = n

2

for n ∈ Z

or…

f(0) = 0

f(n+1) = f(n) + (2n + 1), for n ∈ Z

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

5

Recursively Defined Languages

As many of you will learn in theory, a language in

Computer Science refers to some set of strings

generated from an alphabet using some set of

syntax rules.

Often times the alphabet is the set {0,1}

Example: L = { x | x is a bitstring }

 Basis: 0 ∈ S, 1 ∈ S  Rec. Step: if x ∈ S, then x0 ∈ S and x1 ∈ S (concatenation)

7

Why Define Recursively?

Why bother to define sets, functions, or structures

recursively, when there are many other ways to

define them?

Recursive definitions can greatly simplify the

inductive proof process.

Example: Fibonacci proof  show f(1) + f(3) + … + f(2n-1) = f(2n) for Z +