Abstract
We give four elementary examples of recursion that are real-life, non-trivial, more natural than the corresponding iterative approach, and do not involve any sophisticated algorithms, data structures, or mathematical problems. The examples are two forms of writing numbers in words, coalescing page references for an index, and finding unclosed begin blocks.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Ackermann, W.: Zum hilbertschen aufbau der reellen zahlen. Mathematische Annalen 99, 118–133 (1928)
Wichmann, B.A.: Ackermann’s function in ada. Ada Lett. VI, 65–70 (1986)
Knuth, D.E.: Textbook examples of recursion. In: Artificial Intelligence and Mathematical Theory of Computation: Papers in Honor of John McCarthy, pp. 207–229. Academic Press Professional, Inc., San Diego (1991)
Manna, Z.: Mathematical Theory of Computation. McGraw-Hill, New York (1974)
Takeuchi, I.: On a recursive function that does almost recursion only. Technical report, Musahino Electrical Communication Laboratory, Nippon Telephone and Telegraph Company, Tokyo, Japan (1978)
Knuth, D.E.: The Art of Computer Programming, Volume 1: Fundamental Algorithms, 3rd edn. Addison Wesley Longman Publishing Co., Inc., Redwood City (1997)
Tarjan, R.E.: Depth-first search and linear graph algorithms. SIAM Journal on Computing 1(2), 146–160 (1972)
Aho, A.V., Sethi, R., Ullman, J.D.: Compilers—Principles, Techniques, and Tools. Addison-Wesley Publishing Co., Inc., Reading (1986)
Conway, J.H., Guy, R.: The Book of Numbers. Springer, New York (1996)
Knuth, D.E., Miller, A.A.: A programming and problem-solving seminar. Technical Report STAN-CS-81-863, Department of Computer Science, Stanford University, Stanford, CA, USA (1981)
Davis, P.J.: The Lore of Large Numbers. Yale University Press, New Haven (1961)
Gove, P.B.: Webster’s Third New International Dictionary of the English Language. G. & C. Merriam Co., Springfield (1961)
Knuth, D.E.: Supernatural numbers. In: Klarner, D.A. (ed.) The Mathematical Gardner, pp. 310–325. Wadsworth, Boston (1981)
Reingold, E.M.: Writing numbers in words in TeX. TUGboat 28(2), 256–259 (2007)
Stallman, R.: GNU Emacs Manual, 16th edn. Free Software Foundation, Boston (2007)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2014 Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
Reingold, E.M. (2014). Four Apt Elementary Examples of Recursion. In: Dershowitz, N., Nissan, E. (eds) Language, Culture, Computation. Computing - Theory and Technology. Lecture Notes in Computer Science, vol 8001. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-45321-2_11
Download citation
DOI: https://doi.org/10.1007/978-3-642-45321-2_11
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-45320-5
Online ISBN: 978-3-642-45321-2
eBook Packages: Computer ScienceComputer Science (R0)