The study of algorithms offers much to the practicing programmer. A course on the subject equips students with functions for important tasks and techniques for attacking new problems. We'll see in later columns how advanced algorithmic tools sometimes have a substantial influence on software systems, both in reduced development time and in faster execution speed.
As crucial as those sophisticated ideas are, algorithms have a more important effect at a more common level of programming. In his book Aha! Insight (from which I stole my title), Martin Gardner describes the contribution I have in mind: ``A problem that seems difficult may have a simple, unexpected solution.'' Unlike the advanced methods, the aha! insights of algorithms don't come only after extensive study; they're available to any programmer willing to think seriously before, during and after coding.
The teaching material contains overhead transparencies describing the vector rotation algorithm in Section 2.3; the slides are available in both Postscript and Acrobat. It also contains material on the anagram algorithm in Sections 2.4 and 2.8; the slides are available in both Postscript and Acrobat.
The code for Column 2 contains the programs for generating anagrams and a program for timing several vector rotation algorithms.
Copyright © 1999 Lucent Technologies. All rights reserved. We 6 Oct 1999