{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

CSE20 Lecture 11

# CSE20 Lecture 11 - CSE 20 Lecture 11 Function Recursion...

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

1 CSE 20 Lecture 11 Function, Recursion & Analysis (Ch. 6 Shaum’s ) February 23, 2010

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

View Full Document
OUTLINE DEFINITION FUNTION RECURSION: CASES ANALYSIS 2
3 I. Definition A function f: A B maps elements in domain A to codomain B such that for each a ϵ A, f(a) is exact one element in B. f: A B A: Domain B: Codomain f(A): range or image of function f(A) B

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

View Full Document
4 (5) NOT A FUNCTION Examples (2) f(x) (1) f(x)=x 2 , x (3) f(x) NOT A FUNCTION (4) 6) if domain A is an integer set Z, we may denote f(x) as f x , ie. f 0 , f 1 , f 2 .
5 Cases of Recursion Fibonacci Sequence 0 1 2 3 4 5 6 0 1 1 2 3 5 8 0 1 n n-1 2 f 0, f 1, f f f 1 n n - = = = + 2200

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

View Full Document
6 Cases of Recursion: Ackermann Function Ackermann Function: A(m,n), m, n N 0 a) m=0, A(0,n)=n+1 B) m 0, n=0; A(m,0)=A(m-1,1) C) m 0, n 0, A(m,n)=A(m-1, A(m,n-1)) Example: A(1,1)= A(0, A(1,0)) =A(0,2) A(2,0) =A(1,1)
7 Ackermann Function (0,0) (0,1) (0,2) (0,3) (0,4) (0,5) (0,6) (0,7) 1 2 3 4

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 / 12

CSE20 Lecture 11 - CSE 20 Lecture 11 Function Recursion...

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

View Full Document
Ask a homework question - tutors are online