Algorithms to Live By — Book Review

Leave a comment

December 26, 2017 by styagi68


I have also recorded a video book review . Check it out if you prefer watching to reading!

ALGORITHMS TO LIVE BY

A book by Brian Christian  and Tom Griffiths

Brian Christian is an author and journalist.

Tom Griffiths is a professor of Psychology and Cognitive Science at UC Berkeley

This book is about how algorithms can do more than sort numbers efficiently. They show how algorithms can help us live better in ways in which we never thought analytical thinking could be of much use–like how long to date before committing to marriage.

 

  1. Optimal stopping problem: 37% rule. Comes from hiring a perfect secretary, or renting an apartment in NYC or for that matter finding a spouse. Kepler courted 11 women after his first wife died. Particularly liking 4 and then 5th woman but continuing. After the eleventh, he returned to the fifth, proposed, was accepted and lived happily ever after. This strategy has a success rate of about 37%…so you will end up with not the best person 63% of the time. But it is the best systematic algorithm!
  2. Explore/Exploit: How do you decide whether to try a new restaurant or stick to an old favorite. The answer seems to be dependent on how long you plan to be using the new information. For a young person who has just moved into a new town, it is good to keep exploring. For an old person visiting a city for likely the last time, stick to the old favorites. There is also the question of how to decide what odds to play. This is called the multi-arm bandit problem. If you go to a casino and do not know what is the pay off ratios, how do you decide which arm to pull? Turns out you can calculate something called Gittins Index which tells you the value of each bet, or the money you should accept in lieu of pulling the lever.
  3. Sorting and Caching: Best sorting algorithm might be as simple as refiling everything to the front of the stack. This is also the principle of caching.
  4. Bayes prediction–the likely estimate of how soon a bus will arrive is the time since the last bus. Knowing the priors is important. For example how to predict how much a movie will earn based on earning so far. Or for that matter how long will a person live based on their age. Or how long a politician will be in the office given how long they have been in the office already.
  5. Overfitting–When to think less. Darwin talks about whether he should marry. An absolutely delicious example of how analytical people deal with things which others would never think about analytical. But this chapter is about how to fit a model to some observations. We can always find a model which fits all observed data perfectly, but this will likely fail as soon as the very next data point arrives. Mathematicians have come up with a complexity cost–this is the regularization in machine learning or Lasso regression. So build a model of reality based on few factors and you will not go wrong. So two quick points for those who are curious–on the negatives Darwin noted, “terrible loss of time.” But concluded Marry, Marry, Marry, QED.
  6. Relaxation of constraints: Traveling salesman problem. Relaxing the condition that the salesman can visit the city twice or retrace steps at no cost makes it a solvable problem. Don’t always consider all your options. Toss a coin. Relax. Let things wait. Relaxing constraints can make life much easier.
  7. While I have talked about 6 concepts, there 11 chapters and other chapters talk about scheduling, use of random numbers. Or recursion, which is a special type of algorithm which uses itself to solve problems. Or Game Theory, in which they analyze the structure of division games and optimal strategies. Or how to construct an effective network balancing reliability in communication and actual throughput.

Overall, it is a highly thoughtful book which connects well-known algorithms from computer science to well known daily dilemmas we face and bring out striking results which are striking because they are so obvious once you read them.

Enjoy!

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.