# Forthcoming book review: Algorithms by Louridas

An algorithm is a set of well-defined instructions for data transformation. An algorithm typically is given input, and then gives some sort of output. It is the computing version of a function in mathematics. Examples of algorithms range from the very simple such as long division or multiplication that we are taught in grade school to S. Landau's polynomial time algorithm to factor polynomials over algebraic number fields.

For most people, the influence of algorithms on their life come from more practical examples, such as recommendations on Amazon or optimizing the amount of food delivered to the local grocery store. For this reason, it might be useful to have an introductory book on algorithms aimed at a general audience. Panos Louridas has written just such a book, entitled Algorithms, set to be released by MIT press on August 18, 2020. The publisher was kind enough to send me an advance copy, which I will now review.

Algorithms has the difficult task of introducing the concept of algorithm in just 244 pages. To do this, the author has chosen the greatest common divisor (GCD) algorithm to start with, also aptly illustrated by a flowchart on the front cover of the book. This algorithm, known as Euclid's algorithm, is introduced in the first chapter through a similar problem of distributing as evenly as possible two types of objects arranged in a row. By using Euclid's algorithm graphically, the author shows us how to create one possible distribution of the two types of objects. It is also quite interesting how he related these patterns to drumming rhythms in ancient music.

The next chapter in on graphs, and Louridas begins the chapter appropriately with Euler's solution to the Koenisberg's bridge problem. I would say that the author included enough variety in this chapter to make a good introduction to graphs. Readers may have to work out some examples with a pencil and paper, which of course is a must for anyone learning this material for the first time. However, even less intrepid readers should derive the basic ideas from just reading this chapter. I have not really done much graph theory myself, and this was the first time I actually saw Djikstra's algorithm for shortest path finding.

After graphs, we get a chapter on searching. That is, what's the best way to find something in an array? What if that array has to be repeatedly searched? The author manages to provide an engaging look into searching, relating some of the algorithms for efficient repeated seaching to the Matthew effect in sociology. I thought that was an interesting commentary.

Of course, could any book on algorithms avoid talking about sorting? That's the next chapter of Algorithms. I found this chapter quite clear to the extent that I could easily implement the sorting algorithms discussed. This chapter illustrates the importance of good diagrams: in all chapters, the author went to a lot of work to show each step of algorithms using good diagrams, with appropriate uses of shading. I liked the description of radix sort because although I had heard of radix sort before, I had never bothered to learn it.

The final two chapters are more specialized. The first is a description of Google's Pagerank algorithm, which is basically a transition-matrix Markov-chain model to assign rankings to different websites. This is the first time I actually read through the algorithm. We know of course that Pagerank had to be heavily augmented due to abuse by advertisers and SEO fanatics (sadly still a problem), but the basic algorithm is still quite nice.

The final chapter is on deep learning in neural networks, and the backpropagation algorithm. Funnily enough, I am learning some machine learning right now, so this chapter was quite helpful to me. With such a tricky topic, I believe the author did a really good job of explaining it.

There is also an epilogue mainly on Turing machines and I thought that was a fitting end, considering that Turing machines could be considered the ultimate concept of computer science.

Is there anything in this book that could be improved? The chapter on sorting starts out with Hollerith's mechanization of the United States census data. However, it is really not clear until later in the chapter what this example actually has to do with sorting. The author in the preface also takes a rather strong view that algorithmic and computer developments are essentially good and that they "can and should continue". I feel like in this day and age, a more conservative an careful approach should be taken with regard to the unusual power of technology in our lives, and perhaps there should even be a chapter on the ethics of algorithms in a book like this.

Concluding, I would say this book does a great job of introducing algorithms, and should be suitable for the general population interested in computing, grade school students, educators, and anyone who wants a glimpse into what makes computers tick. Recommended.

Disclaimer: Aside from a copy of this book, I was not compensated for this review.