{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lec11_Recursion

# Lec11_Recursion - Discrete Structures TDS1191 Lecture 11...

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

Discrete Structures 1 [Lecture 11][Recursion] Discrete Structures TDS1191 - Lecture 11 - Recursion

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

View Full Document
Discrete Structures 2 Contents What is recursion? Recursively defined function Recursively defined sequence [Lecture 11][Recursion]
Discrete Structures 3 Examine the sequence 2 0 , 2 1 , 2 2 , 2 3 ,2 4 , and so on…. Can you come up with a general expression for this sequence in terms of n ; where n = 0, 1, 2, 3, 4, …. ? a(n) = ……. Now determine the first 5 terms of the sequence defined by the following function ƒ(0) = 1 ƒ(n+1) = 2 x ƒ(n) for n = 0, 1, 2, 3, 4, ….. What can you say about the 2 sequences ? [Lecture 11][Recursion]

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

View Full Document
Discrete Structures 4 The formulae a(n) =2 n for n = 0,1,2,3,4…. and ƒ(0) = 1 ƒ(n+1) = 2 x ƒ(n) for n = 0, 1, 2, 3, 4, ….. are both expressions used to obtain the terms of the sequence 1, 2, 4, 8, 16…….. The second expression is a Recursive Definition for the sequence 1, 2, 4, 8, 16…….. [Lecture 11][Recursion]
Discrete Structures 5 Recursive Definition We say that a sequence is defined recursively provided: 1. Some finite set of values, usually the first one or first few, are specified.

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.

{[ snackBarMessage ]}

### Page1 / 18

Lec11_Recursion - Discrete Structures TDS1191 Lecture 11...

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

View Full Document
Ask a homework question - tutors are online