Dive into algorithms: a Python adventure for the intrepid beginner
Tuckfield B., No Starch Press, San Francisco, CA, 2021. 248 pp. Type: Book
Date Reviewed: 05/02/22

Algorithms--their concepts, theory, and methods--are not limited to computer science. My recipe for making chili for dinner is an algorithm, as are my lesson plans for my courses, and the Internal Revenue Service (IRS) tax return forms I file every April. Even my method for writing book reviews follows an algorithm. Of course, algorithms pervade all of computing; it could be said that computing itself is essentially a collection of algorithms. Look for a definition of the term and you will find many general and specific examples, for example, “a set of instructions for solving a problem or accomplishing a task.” According to Knuth [1]--and I’m paraphrasing here--an algorithm is an effective, finite series of well-defined steps using specified inputs, producing outputs related to the inputs.

The computing literature on this subject is varied and extensive, including Sedgewick and Wayne’s classic Algorithms [2] and Cormen et al.’s Introduction to algorithms [3], to name just two prominent examples. Author Bradford Tuckfield adds to this collection with Dive into algorithms, an introduction to the topic using Python that is written for a wide audience of students, developers, and general readers. Tuckfield, a technical writer and data scientist at Kmbara, has also written about machine learning and natural language processing.

The book’s first two chapters introduce the basic ideas and history of algorithms using physical and mathematical examples, and begin right away with Python code modeling and visualizing the required steps. Some assumptions are made about the level of programming and mathematical knowledge needed, although they are reasonably basic.

The remaining chapters of the book cover some traditional algorithmic topics such as min/max methods, sorting and searching, geometry, language, and a bit of machine learning and artificial intelligence (AI). The first technical chapter on min/max algorithms discusses and demonstrates gradient ascent. The accompanying Python code is generally sparse yet readable, and the author includes the required setup instructions for Windows, MacOS, and Linux in the book’s introduction.

The chapter on sorting and searching begins a discussion of algorithmic performance and efficiency that continues in several of the subsequent chapters, such as the chapter on the traveling salesman problem. The chapter on AI presents an entertaining analysis of the dots-and-boxes game, including algorithms for scoring and for finding winning moves.

The author concludes with a (very) brief chapter on the problem of checking the results of algorithms and the related P=NP question. However, the value of the book lies in the variety of application areas presented: math functions, geometry, language, and decision trees. Some of the more complex algorithms presented include Python code that might be a bit challenging for beginners, but the explanations of the required steps are generally pretty clear. The book is certainly a worthy addition to the literature on algorithms.

1)

Knuth, D. E. The art of computer programming. Addison-Wesley Pub. Co., Reading, MA, 1973.

2)

Sedgewick, R.; Wayne, K. Algorithms (4th ed.). Addison-Wesley, Boston, MA, 2016.

3)

Cormen, T. H.; Leiserson, C. E.; Rivest, R. L.; Stein, C. Introduction to algorithms (3rd ed.). MIT Press, Cambridge, MA, 2009.

 Reviewer:  Harry J. Foxwell Review #: CR147435

Reproduction in whole or in part without permission is prohibited.   Copyright 2022 ComputingReviews.com™