Lecture7

# Lecture7 - Computational Optimization ISE 407 Lecture 7 Dr...

• 16

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

Computational Optimization ISE 407 Lecture 7 Dr. Ted Ralphs

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

ISE 407 Lecture 7 1 Readings for Today’s Lecture Miller and Boxer, Chapters 2 and 3. Aho, Hopcroft, and Ullman, Sections 2.5–2.9. R. Sedgewick, Algorithms in C++ (Third Edition), 1998.
ISE 407 Lecture 7 2 Recursion A recursive function is one that calls itself. There are two basic types of recursive functions. A linear recursion calls itself once. A branching recursion calls itself two or more times. Examples of linear recursion Euclid’s algorithm Binary search

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

ISE 407 Lecture 7 3 Properties of Recursive Algorithms Generally speaking, recursive algorithms should have the following two properties to be guarantee well-defined termination. They should solve an explicit base case . Each recursive call should be made with a smaller input size . All recursive algorithms have an associated tree that can be used to diagram the function calls. Execution of the program essentially requires traversal of the tree. By adding up the number of steps at each node of the tree, we can compute the running time. We will revisit trees later in the course.
ISE 407 Lecture 7 4 Divide, Conquer, and Combine Many recursive algorithms arise from employment of a divide-and-conquer approach. This means breaking a larger problem into pieces that can be solved independently. The solutions to the various pieces may then have to recombined in some way. More accurately, these are divide, conquer, and combine algorithms.

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

This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern