[2006-08-10] “How To Solve It By Computer”

“How to Solve it by Computer” by R. G. Dromey is inspired by George Polya's classic book on problem-solving “How to Solve it”. This book explores how good problem-solving techniques can be applied in computer programming to come up with efficient algorithms for many problems.

The problems discussed range from the trivial (“summing up the elements of an array”, for example) to the more interesting (“finding a given sub-string in a line of text in sub-linear time”, for example). For almost every problem, the author first helps the reader come up with a quick and dirty solution and then refine it in stages to make it very efficient. If possible, you should stop after reading the description of a problem and try to come up your own solution. You can then compare your solution with the one the author develops to see how they compare. The sample implementations of the algorithms are in Pascal.

This book nicely complements ordinary textbooks on Data Structures and Algorithms and should be read by every serious programmer. I personally feel that it is one of the most under-appreciated books in Computer Science. The Pascal programmes are easy to understand and to translate to the programming languages that are popular today. This would also give you a chance to think about and analyse the actual implementation of the final algorithm.

There are a couple of minor irritants in this book though. The text is a bit verbose at times and I think some of the more trivial problems could have been safely left out. If you are willing to gloss over these though, it can prove to be really useful.

Other Posts from 2006