Sunday, September 23, 2018

Algorithms to Live by

Author: Brian Christian and Tom Griffiths



The authors attempt to translate algorithms from computer science to relate to problems that we encounter in our daily life. The first couple of chapters are compelling and keep with this theme. The subsequent ones, seemed more inclined towards explaining computer science algorithms and their parallels in our everyday life. They were interesting to folks like me who knew the algorithms only from a computer science perspective. The book gave me a whole new way to look at some of the workhorses of computer science like sorting, searching, queueing, etc. However, they did little in terms of being useful in my everyday life. 

Let me start with my most favorite part of the book which is the chapter on the Optimal Stopping Problem. It is algorithmically well established that if you have to select a candidate from a large number of unknown candidates, you are best served by letting the first 37% go by, and then choosing the first one that is better than all the prior candidates. You can apply this to renting or buying a house, finding a parking spot, choosing a secretary or even more importantly choosing your mate. The last one might need some tweaking if you account for the fact that your choice may not resonate with the other person.

The chapter on sorting is interesting as well and highlights the trade off between the time spent upfront sorting your entries versus the time spent later on searching for the items that you’re interested in. This might be useful when you are considering whether to carefully file away your notes in some well defined way, or simply make it searchable, like I do, so you pay for it marginally while trying to retrieve the right piece of information.

The chapter on Bayes’s rule gives some good insights into human behavior. I could not agree more with the authors that “what we project about the future reveals a lot — about the world we live in, and about our own past”. The more prior information we have about a problem the more likely we are to be biased about the future. The proliferation of social media might exacerbate this problem as fake news can spread quickly and skew our internal statistics of experience.  

Another useful reminder from the authors is Occam’s razor principle which says that the simplest possible hypothesis is probably the right one. 

Overall, this is a great read for the algorithmically inclined. The best parts are in the first few chapters. Stick around for the rest if you are a nerdy computer scientist. 

No comments: