Discrete Structure lecture_21

Apr 28th, 2015
Studypool Tutor
University of Phoenix
Course: Information Technologies
Price: $5 USD

Tutor description

It includes all the details about the Discrete structure with examples.Step by step solution.

Word Count: 468
Showing Page: 1/6
DISCREAT STRUCTURELECTURE # 21RECURSIONKHAWAJA TARIQ MAHMOODLecture # 21RECURSIONRECURSION:The process of defining an object in terms of smaller versions of itself is called recursion.A recursive definition has two parts:1. BASE:An initial simple definition which cannot be expressed in terms of smaller versions of itself.2. RECURSION:The part of definition which can be expressed in terms of smaller versions of itself.EXAMPLE:Suppose that f is defined recursively byf 0 3f n 1 2 f n 3Findf 1 ,f 2 ,f 3 ,andf 4SOLUTION:As we know thatf 0 3f n 1 2 f n 3Put n 0 in above formula, we getf 0 1 2 f 0 3f 1 2 3 3 6 3 9Put n 1 in above formula, we getf 1 1 2 f 1 3Khawaja Tariq Mahmood.Page 2Lecture # 21RECURSIONf 2 2 9 3 18 3 21Put n 2 in above formula, we getf 2 1 2 f 2 3f 3 2 21 3 42 3 45Put n 3 in above formula, we getf 3 1 2 f 3 3f 4 2 45 3 90 3 93EXERCISE:Findf 2 ,f 3 ,andf 4 if f is defined recursively byf 0 1f 1 2f n 1 f n 3 f n 1SOLUTION:As we know thatf

Review from student

Studypool Student
" Excellent work as usual "
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1823 tutors are online

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors