Halloween Tale: The C Programming Language
bobhobbs.com
bobhobbs.com
For example, tree data structures and singly linked lists work well with recursive algorithms for elegant processing. Problems like parsing a grammar, dynamic programming (knapsack, etc.), and many more are easier to comprehend with recursion.
"Foundations of Computer Science" (http://infolab.stanford.edu/~ullman/focs.html) is a favorite book that does an excellent job at showing how to think and reason recursively.
The thing is, in simple cases recursion can easily be replaced with iteration, and in complex cases it is hard to reason about. Fortran didn’t (use to) have support for it, which made it a perfect tool for writing high-performance code.
Adaptive quadrature is numeric integration, with an accuracy that is better than an error bound. It uses a three-point and a five-point approximation of the integral value on a region. From the difference between the two, it makes an estimate of the error. If the error is above the error bound, it splits the interval in half, and recursively calls itself twice with the two halves of the interval (and both times with half the error bound).
I mean, you could iteratively do that with a queue of intervals and error bounds, and a running total of the ones that met their error bound, but that seems messier than the recursive version.
Inductive methods are very common in everyday life. [1]
Formal inductive logic is not.
Maybe it's unsuitability for rhetoric plays a role.
Beware of the Turing tar-pit
in which everything is possible
but nothing of interest is easy.
--Epigram 54
The two major advantages of recursion over iteration are off-by-one errors.