Graphs

Given below are 5 friends and how they are connected. If I ask you to find the shortest path for Peter to reach Tom then you will immediately answer that he should go through Sachin [Peter -> Sachin -> Tom]. It requires some effort if you want to make the computer answer the same question.…

Trees

Take a look at the org chart of a startup company. There are 7 employees in the company. Each employee can have up to 2 other employees reporting to them. Tree is a data structure which is used to represent this information in computer’s memory. Using the org chart let us understand the vocabulary used in…

Amazon knows what I like

I buy a lot of books from amazon.com. You can view my online bookshelf here. One of the reasons I like amazon.com is because of its recommendations engine. Few days back it recommended me the book Thinking Fast and Slow. It is one of my favorite books. It not only recommended the book but it also…

Tf-Idf and Cosine similarity

In the year 1998 Google handled 9800 average search queries every day. In 2012 this number shot up to 5.13 billion average searches per day. The graph given below shows this astronomical growth. Year Average Search per day 1998 9800 2000 60000000 2007 1200000000 2008 1745000000 2009 2610000000 2010 3627000000 2011 4717000000 2012 5134000000 The…

Netflix knows what I like

I am a Netflix subscriber. Every time I go to their site it will recommend movies I might like. Most of the times its recommendations are very good. How does it know what I like? I do not know how the actual algorithm is implemented. But I know some of the basic concepts behind this.…