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

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

View Full Document Right Arrow Icon
1 CSE 20 Lecture 11 Function, Recursion & Analysis (Ch. 6 Shaum’s ) February 23, 2010
Background image of page 1

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

View Full DocumentRight Arrow Icon
OUTLINE DEFINITION FUNTION RECURSION: CASES ANALYSIS 2
Background image of page 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
Background image of page 3

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

View Full DocumentRight Arrow Icon
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 .
Background image of page 4
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
Background image of page 5

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

View Full DocumentRight Arrow Icon
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)
Background image of page 6
7 Ackermann Function (0,0) (0,1) (0,2) (0,3) (0,4) (0,5) (0,6) (0,7) 1 2 3 4
Background image of page 7

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

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

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 Right Arrow Icon
Ask a homework question - tutors are online