Linked – an average read

A book about power laws and scale free networks. The book explains how various social and network phenomenon are all scale-free networks. That we are surrounded by the application of power laws. Interesting book but an insipid narrative.

With a title like linked one is definitely intrigued about the content. This book is interesting and uninteresting in equal proportions. What is interesting is that the author manages to make the reader look at various phenomenon under the network theory glass. What is uninteresting is that the treatment of various areas is shallow. First of all what is this book about – the book is about trying to understand how many facets of the world around us are linked to each other. Now, this doesn’t seem to be a great revelation; everyone knows that. What the author gets into details about is how scale free networks are able to describe everything from the structure of a cell to the structure of the social networks. According to the author, any phenomenon which is linked to anything else in nature eventually follows some sort of a power law.

Before I go further, there are two things one needs to understand

  • Power laws
  • Scale free networks

Power law:Before understanding power laws, one needs to know what random networks are. A random network is one in which there is an equal probability for any two nodes to be connected (probability speak: equally likely events). So, there is no preference for connecting any two nodes. So, if random networks were around us, then the probability of me knowing the author of the book is the same as me knowing someone I studied with. When this network is plotted on a graph, then it follows the very familiar bell curve. The main characteristic of the bell curve is that the tail of the bell curve decays very fast i.e. the number of data points in that tail will be very less and they keep reducing. And that is what is different between a random network and a network following a power law. The main characteristic of a network following a power law is that

  1. There is no peak for the plotted graph
  2. The decay of the tail of the network is much more pronounced i.e. there is a very long tail
  3. If the network were to be scaled (say increasing the number of connections by some constant factor), then the new network will grow only by the constant factor (a linear increase in computational complexity terms). This is unlike, say an exponential growth – growth of the network where the growth is a function of an exponent of the constant factor (think of the old tale of the man asking the king to fill a chess board with grains which grow as a power of 2).

The power law is also called the long tail, 80-20 rule,small world network or the pareto distribution. Essentially, there is a large number of phenomenon which are common and there are a few phenomenon which are rare and occur amongst these.

Scale free network: A scale free network is one whose nodes follow a power law i.e. the the number of nodes that are connected in the network are proportional to the power of the number of nodes itself. More here (pdf link) and here
Here is a simple example to understand random and scale-free networks (from the book)

  • Random network: The network of the inter-state highways in the US. Every major city in the US is connected by almost the same number of highways. So, all the cities fall within the central part of the bell curve. And there are few cities which have a lot of highways connecting them or very few – the tails of the bell curve.
  • Scale free network: The network of the flights and airports in the US. In the case of flights though, not all the airports are equal. There are some hubs in the air network which have large number of flights in and out and there are small satellite airports all across the country. For example, Atlanta is a big hub in the south and there are smaller airports around Atlanta which have much lesser flight traffic

That is it – the above is the central idea of the book. Once you get that, the rest of the book gets into the uninteresting bit ! Well, not that uninteresting though. The author goes on to describe how power-laws and scale free networks are all around us. From our social network (more on this further) to the structure of the cell; from the network economy to the links on the WWW. And what the author also explains is how these large ‘hubs’ also are the failure points of the network. Bring down the hubs and the whole network collapses. He explains this with the examples of the blackouts that happened in 1996 in the US. The same hubs occur everywhere – from the hubs connecting the Internet to the hubs in our social network – there always is that one person who stays in touch with everyone in the class. Remove that person from the network and the class-mates lose touch with each other (am not sure how much this is true in the new world of social networking sites). The author goes on to explain the various properties of this scale free network in simple language, but doesn’t go in depth into any of the topic. For example, when explaining of the resilience to failure of a scale free network, the author just mentions – so this network is going to be stable even if majority of the nodes go down, the network goes on because that essentially is the feature of a scale-free network. But he doesn’t touch upon the fact that the remaining nodes now will get overloaded and will collapse under their own weight. A bit more explanation, even if that were mathematical would have been welcome in the book and that is the downside of the book.

When I mentioned the social network above, it was interesting to me because when the book came out in 2003, there might not have been many ways to map the human network. So, the author whimsically wishes, if we were to know the human network, it can pop up a lot of interesting features. And that is almost possible now. With the influx of the social networking sites, it is possible to find out if indeed there are six degrees of separation between people. And that has implications in the online world. Know the hubs in every small network and you have the ability to market / interest a large set of the nodes connected in your idea. Get the nodes to write something nice about you and the ‘word-of-mouth’ marketing will remove the need for a large marketing budget.

As mentioned on some of the low reviews on Amazon the book falls short of taking any idea further than a shallow treatment. But that doesn’t make it a bad read, just an average read. I think the author stretched the ideas a bit too thin. I’d rate it a 6/10 – just because the author does give good examples for one to get the ideas behind his premise.

Caesar cipher in one line

Can we create an encrypt and decrypt using Caesar cipher in one line? I’m sure you can. Here is one way to do it in Python. This assumes the text is typed in English (or where the lower() function on a string can work).
import sys;print ''.join([chr(x) for x in [x if x else x+ord('a') for x in [ (ord(x.lower())+1)%(ord('z')+1) for x in sys.argv[1]]]])
'import sys;print '.join([chr(x) for x in [x if (x%(ord('a')-1)) else ord('z') for x in [ (ord(x)-1) for x in sys.argv[1]]]])
So, now you can send your next missive in shift+1 cipher ! Of course, you are not going to send trade secrets that way, would you? 🙂