Quant, Math & Computer Science Puzzles for Interview Preparation & Brain Teasing
A collection of ~225 Puzzles with Solutions (classified by difficulty and topic)

Mar 20, 2011

Keynesian beauty contest

Pick a number from 0 to 100. The winner is the person who chooses the number closest to 2/3rds of the group's average response. What is the rational answer?

Related thought:
Once you get the solution, you would be surprised to see the implications. A Keynesian beauty contest is a concept developed by John Maynard Keynes and introduced in Chapter 12 of his work, "General Theory of Employment Interest and Money" (1936), to explain price fluctuations in equity markets. Read wikipedia article to appreciate it: http://en.wikipedia.org/wiki/Keynesian_beauty_contest

Update: (23 March 2011):
Solution posted by Gautam Kamath (EE, Senior Undergraduate, IIT Bombay) in comments!

Mar 13, 2011

Dividing a Plane

Source: Concrete Mathematics, Donald Knuth

Let's say we have a plane. Draw N straight lines on the plane, any way you wish. Try to divide the plane into as many different regions as possible. How many regions is that? For example, if we draw 1 line on the plane, we can divide it into two regions. If we draw 2 lines, we can divide it into four regions.

Followup questions:
Source: http://skepticsplay.blogspot.com/
Draw N perfect circles on a plane, of any size, anywhere you want. Into how many regions can you divide the plane? Next, draw N perfect ellipses on another plane. Into how many regions can you divide the plane?

King's Poisonous Wine II

Source: Puzzle Corner, Australian Mathematical Society

Problem: The king has 500 barrels of wine, but one of them is poisoned. Anyone drinking the poisoned wine will die within 12 hours. The king has four prisoners whom he is willing to sacrifice in order to find the poisoned barrel. Can this be done within 48 hours?

Related Problem:
King's Poisonous Wine Puzzle - CSE Blog

Update (16/03/2011):
Solution posted by Tejas Hiremani (IITB EE Alumnus, Goldman Sachs Quant), Siddhant Agarwal (IITB EE Senior Undergraduate), Mehul Tikekar (IITB EE Alumnus, MIT PhD Candidate) and Gaurav Sinha (chera, IITK 1996 Graduate, Indian Revenue Service) in comments!