Abstract
This chapter introduces inductively defined sets and simple inductive data types such as natural numbers, words, lists and trees with emphasis on definition patterns. For these sets and data types, recursive equations in Backus-Naur form are introduced and it is shown how, e.g., propositional formulae and simple while programs can be specified in this format. Next it is explained how functions can be defined inductively on such sets and data types. Examples include the factorial function, Harmonic numbers, Fibonacci numbers, addition and multiplication on natural numbers and functions that compute the length of a word or list and the height of a tree. In contrast, recursive functions are defined in a way that does not necessarily lead to terminating evaluations. Recursive procedures are also described, with examples presented of various sorting algorithms and the Towers of Hanoi puzzle.
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
Rights and permissions
Copyright information
© 2013 Springer-Verlag London
About this chapter
Cite this chapter
Moller, F., Struth, G. (2013). Inductive and Recursive Definitions. In: Modelling Computing Systems. Undergraduate Topics in Computer Science. Springer, London. https://doi.org/10.1007/978-1-84800-322-4_9
Download citation
DOI: https://doi.org/10.1007/978-1-84800-322-4_9
Published:
Publisher Name: Springer, London
Print ISBN: 978-1-84800-321-7
Online ISBN: 978-1-84800-322-4
eBook Packages: Computer ScienceComputer Science (R0)