Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Pearls of functional algorithm design
Bird R., Cambridge University Press, New York, NY, 2010. 290 pp. Type: Book (978-0-521513-38-8)
Date Reviewed: Jul 21 2011

Most books on algorithm design are thoroughly imperative, sometimes with a thin veneer of object-oriented lacquer, to appeal to a larger audience. But it is slowly dawning on the computing community that these methods do not work so well on modern hardware, which is to say multiple cores under a variety of memory configurations. Functional programming, on the other hand, long a purely academic exercise in mathematical elegance, has fared much better.

But how does one learn the craft of designing functional algorithms? Up to now, the main source was Okasaki’s brilliant book [1]. Now, there is a second book, Richard Bird’s Pearls of functional algorithm design. It is just as brilliant, but in an entirely different way. Rather than focusing directly on particular algorithms, this book focuses on how to solve problems efficiently through functional algorithms.

Each of the book’s 30 chapters presents an interesting computational problem that needs to be solved. The problems can usually be specified in a fairly straightforward manner; in fact, most of the specifications can be turned into simple, but rather inefficient, functional code that “solves” the problem. Then comes design: the recognition of important invariants present in either the problem or the solution, which one can artfully exploit to provide a more efficient solution. Often, this design takes the form of a calculation. Thus, an “algebra of programming” emerges, codifying some of the craft of algorithm design into a more scientific methodology. This lets us glimpse even deeper structures that are present in problems, in their solutions, and in efficient algorithms for solving them.

Though the writing is crisp, and the explanations lucid, this is not an easy book to read. The difficulty lies in the density of the ideas presented. The rewards of persevering are definitely worth it, though. In fact, once immersed, I started to ponder other related questions: Which algorithms could be even further generalized? What would many of these algorithms look like if implemented in Coq or Agda? This is the effect that all good books have on me: well-presented and well-motivated material strives to become a stepping stone to further discovery.

Any serious computer scientist would benefit from reading and properly understanding this book.

Reviewer:  Jacques Carette Review #: CR139267 (1202-0129)
1) Okasaki, C. Purely functional data structures. Cambridge University Press, New York, NY, 1998.
Bookmark and Share
  Reviewer Selected
Editor Recommended
Featured Reviewer
 
 
Functional Constructs (F.3.3 ... )
 
 
Analysis Of Algorithms And Problem Complexity (F.2 )
 
Would you recommend this review?
yes
no
Other reviews under "Functional Constructs": Date
CPS-transformation after strictness analysis
Danvy O., Hatcliff J. ACM Letters on Programming Languages and Systems 1(3): 195-212, 1992. Type: Article
Feb 1 1994
Performance analysis of recovery techniques
Reuter A. ACM Transactions on Database Systems 9(4): 526-559, 1984. Type: Article
Oct 1 1985

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy