Abstract
Recursion is used to implement a repetitive task. It can sometimes be used to describe a solution in a simpler manner than with an iterative solution. Recursion is a design and programming technique by which a circular definition is employed, a structure is defined in terms of itself. Recursion can sometimes be simpler and clearer than an iterative solution to a problem. This allows the solution of a big problem by partitioning it into several smaller subproblems of the same kind and then we can combine the solutions to these subproblems. This way recursion can be used to describe complex algorithms. The recursive approach to design and implement functions accomplishes the same goal as using the iterative approach for problems with repetitions. A function or method definition that contains a call to it is said to be recursive. This chapter introduces the basic concepts that involve recursion and includes a problem-solving application of recursion using recursive function calls.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
Copyright information
© 2009 Springer-Verlag US
About this chapter
Cite this chapter
Garrido, J. (2009). Recursion. In: Object Oriented Simulation. Springer, Boston, MA. https://doi.org/10.1007/978-1-4419-0516-1_17
Download citation
DOI: https://doi.org/10.1007/978-1-4419-0516-1_17
Published:
Publisher Name: Springer, Boston, MA
Print ISBN: 978-1-4419-0515-4
Online ISBN: 978-1-4419-0516-1
eBook Packages: Computer ScienceComputer Science (R0)