Game Theory


Recently I took a course in Coursera on Game Theory. It was an exciting 9 weeks of learning. In this post I will give a brief details of what game theory is and its applications. Also links to resources to explore further about game theory.

According to wikipedia definition “Game Theory is  is the study of mathematical models of conflict and cooperation between intelligent rational decision-makers” . Game Theory application areas includes economics, finance, political science, philosophy, online algorithms, biology etc. John Nash won the Nobel Prize in economics for his foundational contributions to game theory and the movie “A Beautiful Mind” is based on John Nash’s work.

For example a scene in the tv show Numb3rs uses principles of Prisoner’s dilemma or in a game show Golden Balls – £100,000 Split Or Steal.

Apart from Coursera there are other lectures which one can refer to explore on game theory topics  : Yale University  , Game Theory 101 MOOC

Get Started with MongoDB


Important links to get started with mongodb. – MongoDB manual – A Tiny MongoDB Browser Shell (mini tutorial included).Just enough to scratch the surface – Python Language ecosystem for MongoDB. – MongoDB hosting platforms. Also there are Mongolab, Mongohq for MongoDB database as a service providers – A small beginners tutorial – Official Online courses by 10Gen – Webinars/Presentations on MongoDB – Understand the Use Cases of MongoDB

Smartphones, tablets.. but what’s next ? it’s Smartwatch!!!


Have you ever wondered what is the next big thing in mobile devices category? Recent trends in smartphone technologies is leading us to a new smart mobile device “smartwatch”.Google, Apple, Sony, Samsung, LG all are planning to bring their products in the market. If rumors are correct then we might see them by 2013 end or first half of 2014.

Tutorial : Add existing project to Github


So, you have been working on a project locally and then decide you really should version control it and share it with the world. One option would be to create the repository on Github, clone it locally and then copy all the files across. But it does not have to be so messy. Here is how you add an existing project to Github without cloning it first

Python : lambda, map, filter, reduce functions


lambda functions
Find prime numbers(not the most efficient one, though)

nums = range(2, 50) 
for i in range(2, 8):
	nums = filter(lambda x: x == i or x % i, nums)

print nums

#Output : [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47]

The above algorithm is called “the sieve of Eratosthenes

filter(), map() and reduce() – they expect two arguments: A function and a list.
filter() to filter the list based on condition.
map() is used to convert the list.
reduce() is bit different and the “worker function” for this one must accept two arguments.

>>> foo = [2, 18, 9, 22, 17, 24, 8, 12, 27]
>>> print filter(lambda x: x % 3 == 0, foo)
[18, 9, 24, 12, 27]
>>> print map(lambda x: x * 2 + 10, foo)
[14, 46, 28, 54, 44, 58, 26, 34, 64]
>>> print reduce(lambda x, y: x + y, foo)

reduce() – The function is called with the first two elements from the list, then with the result of that call and the third element, and so on, until all of the list elements have been handled