8

Design Using Recursion

Objectives

After reading this chapter, you should understand:

  • The design of recursive algorithms
  • Execution trace and its use in understanding control flow of programs
  • How to express the execution trace using regular expressions
  • Iterative and recursive functions
  • The Ackermann’s function

To define recursion, we must first define recursion.

—Author unknown

To iterate is human; to recurse, divine.

—Author unknown

Chapter Outline

8.1  Introduction

We are already familiar with recursive algorithms and their implementation. It is ...

Get Design and analysis of Algorithms, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.