Pick your Look: Standard - Rising Blue - Retro Curves
RajeshGoli.com
- Thoughts on Technology and life...
Reason :: Problems and Puzzles
Here is a collection of a few puzzles or problems that were posed to me and I had the joy of
solving. I got them from a different variety of sources. The only common denominator of all these
problems is that I enjoyed solving them. 
I plan to update this Article as and when I find problems that are interesting.
You can leave the solution or the approach to solve as a comment to this article.
Update 30-April-2006 : Added the 7th puzzle: Of poisoned wine bottles and an extension.
Update 25-July-2006 : Added the 8th puzzle and added links to discussions on the puzzles in pnp forum.
Update 07-August-2006: Added the 9th puzzle, "The greedy pirates".
Space fuel
You are given a space shuttle that has a mileage of one light year per gallon of fuel. The shuttle has a tank capacity of a thousand gallons of fuel and no further. You are given three thousand gallons of fuel which you are to transport to alpha centauri which is a thousand light years away from earth. At every light year on the way to alpha centauri, there is a dumping station. You can put as much fuel as you want in the dumping station and collect it later. What is the maximum amount of fuel that you can take to alpha centauri?
Type: Mathematical
The Y shaped linked list
There are two singly linked lists in a system. By some programming error the end node of one of the linked list got linked into the second list, forming a inverted Y shaped list. Give an algorithm that will output the set of nodes (N1, N2), one node from each list, whose next pointer points to the same node. The algorithm must run in O(N) timeframe where N is the total number of nodes.
Type: Computer Science, Algorithm Design, Interview Question
Marked Monks
There is a monastery in Tibet. The monastery hosts a head monk and a number of his disciples, the monks. The monks are persons of very high intelligence. They have taken a strict vow of ascetism which allows them no communication among each other and does not allow them the use of mirror or any such device that shows them their reflection. The monastery has a conclave each morning, where the monks gather in a prayer hall and pray. One night while the monks are asleep, the head monk marks on the foreheads of a few monks without their knowledge. It is known that at least one monk is marked and at most all monks could be marked. The next day at the conclave, the head monks announces that all the monks who have marks on their foreheads have graduated and need not stay back at the monastery. How and when will the graduated monks realize this and leave the monastery?
Type: General, Mathematical, Interview Question
Find the celebrity
There is a party going on. There are a number of people in the party. Some of them know each other, some others don't. But each person in the party knows at least one other person. Now a celebrity enters the party, everybody knows the celebrity but the celebrity knows no one in the party. After some time, you enter the party. You are allowed to ask only one question to each person in the party. The question should be of the form "Do you know this person?". "This person" could be anyone you choose from the party. Can you figure out who is the celebrity?
If you'd rather have it mathematical, assume there are N people in the party plus the celebrity. Assume that their names are 1..N+1, including the name of the celebrity (which needn't be any special number like 1 or N+1).
Type: General, Mathematical, Interview Question.
Relatively prime
Given a set of 2N consecutive numbers, pick randomly a set of N+1 numbers. Can you prove that in this set there are at least two numbers that are relatively prime to each other?
Type: Mathematical
Find the remainder
What is the remainder you get when you divide (3 + 2x2! + 3x3! + ... + 10x10!) by (11!) ?
Here 'x' indicates multiplication and m! is 'm factorial'.
Type: Mathematical, CAT Question
Poisoned bottle of wine and an extension
The king of a certain domain is to host a banquet for a dignitary who is to visit the coming month. The king arranged for a thousand bottles of the finest wine to be served at the feast. A disgruntled cook, however, has mixed poison in one of the bottles. The poison takes a month to take its affect. You have rats at your disposal that can be used to test wine for poison. A rat that ingests poisoned wine will die in a month. A rat that drinks wine that is not poisoned will stay healthy. There is time only for one trail. What is the minimum number of rats that are required to find out which bottle of wine has poison and given so many rats how will you be able to tell the bottle?
Why is the extension required?
When I was posed with this question, I gave the correct answer in a matter of seconds. But my reasoning was flawed. If you fell for the same flawed reasoning, solving the following extension will be an enlightening exercise. If you have followed the correct line of reasoning, then solving the extension just matter of change in the parameters.
Extension:
Suppose that the poison can also affect the rats that smell the poisoned wine. Suppose that the effect of this sniffing is a serious aliment for the rat that inhaled poisoned wine. Sniffing wine that is not poisoned does not affect the rat in any way, just in the same way ingesting the wine that is not poisoned. What is the minimum number of rats that you need to tell the poisoned wine given the above information? How will you be able to tell the poisoned bottle given so many rats?
Type: General, Mathematical
Find out the Age
Two mathematicians, M1 and M2, are having a chat. M1 asked M2 if he can say the age of one of his 3 daughters. M2 asked for a hint. Their conversation is given below:
M1 : Product of their ages is 36.
M2 : Cant say... Gimme another hint.
M1 : Sum of their ages is same as my House no.
M2 : Give me one more hint.
M1 : Eye colour of my youngest daughter is green.
M2 replied with the answer. Can you find out the age of M1's daughters with this information.
Type: Mathematical
The greedy pirartes
Five pirates have 100 gold coins. they have to divide up the loot. In order of seniority (suppose pirate 5 is most senior, pirate 1 is least senior), the most senior pirate proposes a distribution of the loot. they vote and if at least 50% accept the proposal, the loot is divided as proposed. Otherwise the most senior pirate is executed, and they start over again with the next senior pirate. What solution does the most senior pirate propose? Assume they are very intelligent and extremely greedy (and that they would prefer not to die).
Type: Mathematical, Analytical
Created on 28th April 2006 and modified last on 7th August 2006
1. abhismiles
really looking to break free
abhishek on 12th February 2007
2. Cola problem
U are given 200 bottles of coke out of which 10 have poison. Along with this u have 8 rats. Figure out which are the 10 bottles with poison and get the other 190. Note: The rat dies even if it consumes a drop of poison.
Avik ranjan on 13th September 2006
3. Mr.. oh wairt, title of the post you mean :D
Questions flew straight over the cuckoo's nest 
Manas Karekar (powerslave) on 15th May 2006
Add Article Comment
Articles
Portfolio
Styles
Support this site!