Tuesday, May 4, 2010

Cow distribution.

A farmer had 17 cows. After his death, his will said 1/2th of the cows go to first son, 1/3 rd to the
second son and 1/9th to the third son.
While the sons where thinking on how to distribute the cows, they saw a wise old man passing by with his cow. On seeking help, he solved the riddle. What did he do?

Answer:
Since there were odd number of cows he added his cow to the group, so now there were 18 cows.
The first son took 1/2th of it, which is 8. The second took 1/3rd of 18, which is 6 cows and the last son took 2 cows, which is 1/9th of 18. Now the old man left the place with his cow.

Monday, May 3, 2010

How many candies to pick?

If a candy box contains 8 cherry candies, 5 orange candies and 4 lemon candies, then how many candies a person has to pick to get at least one of each type?

Answer: Since there are 8 cherry, 5 orange and 4 lemon candies, the person has to pick 14 candies to be sure that he has one of each type. This is because there is possibility that he picks all 8 cherry and 5 orange candies in the first 13 picks and the 14 pick will surely be a lemon in that case. So the sum of the maximums + 1 guaranties one of each color.

Wednesday, April 21, 2010

What song did he sing...?

A man is sitting in a pub feeling rather poor. He sees the man next to him pull a wad of Rs. 500 notes out of his wallet.

He turns to the rich man and says to him, "I have an amazing talent: I know almost every song that has ever existed."

The rich man laughs.

The poor man says, "I am willing to bet you all the money you have in your wallet that I can sing a genuine song with a lady's name of your choice in it."
The rich man laughs again and says, "OK, how about my daughter's name, Jenna Amarnath Mehta..?"
The rich man goes home poor. The poor man goes home rich.

What song did he sing...?


Answer: He sang "Happy Birthday"!

Saturday, November 8, 2008

Crossing the bridge.

4 people have to cross the bridge: Child, Father, Uncle, Grandpa.All they have is a single flashlight and for some reason they know thatthe batteries will last for exactly 60 minutes.
It is also quite foggy, the beam of the flashlight cannot be seen for more than a few meters - the bridge is far longer.The bridge can carry only two persons at a time - strange enough, it depends only on the *number*, not on the *weight* of the people.

However, each person takes a different amount of time to cross the bridge:
Child: 5 min
Father: 10 min
Uncle: 20 min
Grandpa: 25 min
In what order do they have to cross the bridge so that nobody is on the bridge in the dark - *and* the flashlight doesn't burn out before they all reached the other side?

Answer:
All people are on BankA and they want to reach BankB.
1)Child and Father cross the bridge from BankA to BankB(10 min)
2)Child returns to BankA(5 min)
3)Uncle and Grandpa cross the bridge from BankA to BankB(25 min)
4)Father returns to BankA (10 min)
5)Child and Father cross the bridge from BankA to BankB(10 min)

Total Time consumed is: 10+5+25+10+10 = 60 min.

Friday, November 7, 2008

The N fast Horses

There are 25 horses, you need to rank them on the basis of their speed. They all run at the same speed everytime. Given that you can run only 5 of them at a time.
(1) What do you think how many races to will it take to rank all of them from 1 to 25
(2) How many races will it take to find out the fastest one?
(3) How many races will it take find the top 5 fastest?

Answer:
We group the 25 horses in 5 groups each containing 5 horses.In each of first five races we will rank each five horsesA, B,C,D and E ( A : fastest and E: slowest) in the group.
1A 1B 1C 1D 1E
2A 2B 2C 2D 2E
3A 3B 3C 3D 3E
4A 4B 4C 4D 4E
5A 5B 5C 5D 5E
In the sixth race ( among the first of each group) we will get the fastest horse and rank these five horses 1A,2A,3A,4A & 5A (1A : fastest and 5A slowest). Similarly just select the fastest of the remaining horses from each row for the race.
Now we have got the fastest horse 1A and will also set nomenclature for each horses.The fastest of the remaining horses in the row will take part.For e.g. the seventh race will be between 1B & 2A (no need to run 3A,4A & 5A)for determining2nd fastest horse.
The 8th race will determine the third place and it will be between 1C and 2B ( in case 1B wins 7th race) or among 1B,2B & 3A ( in case 2A wins 7th race).
The 9th race will determine the 4th place and the 10th race will determine 5th place.And moving on 25 th race will determine 20th place.The 26th race will tel the remaining 5 ranks.

Wednesday, October 29, 2008

Camel and Bananas

A camel is sitting by a stack of 3000 bananas at the edge of a 1000-mile-wide desert. He is going to travel across the desert, carrying as many bananas as he can to the other side. He can carry up to 1000 bananas at any given time, but he eats one banana every mile. What is the maximum number of bananas the camel can get across the desert? How does the camel do it? Be prepared to present your solution to the class.

Hint: The camel doesn't have to go all the way across the desert in one trip.

Answer: Since camel can carry at most 1000 bananas at a time, if it carries all 1000 bananas and travels it will reach the market with zero bananas and cannot came back to fetch the remaining 2000 bananas, so this problem has to be solved by "divide and conquer" technique.

To take 3000 bananas it has to go three times in the direction of market and 2 times towards the stack. That is it has to make 5 trips to carry all bananas from starting point.



P (Stacked Point)

===forth===>
<===back==== ===forth===>
<===back==== ===forth===>


A


===forth===>
<===back==== ===forth===>


B



===forth===>



M (market)

Note that section PA must be in the solution (as explained above), but section AB or section BM might have a length of 0. Let us now look at the costs of each part of the route. One kilometre on section PA costs 5 bananas. One kilometre on section AB costs 3 bananas. One kilometre on section BM costs 1 banana. To save bananas, we should make sure that the length of PA is less than the length of AB and that the length of AB is less than the length of BM. Since PA is greater than 0, we conclude that AB is greater than 0 and that BM is greater than 0.

The camel can carry away at most 2000 bananas from point A. This means the distance between P and A must be chosen such that exactly 2000 bananas arrive in point A. When PA would be chosen smaller, more than 2000 bananas would arrive in A, but the surplus can't be transported further. When PA would be chosen larger, we are losing more bananas to the camel than necessary. Now we can calculate the length of PA: 3000-5*PA=2000, so PA=200 kilometres. Note that this distance is less than 500 kilometres, so the camel can travel back from A to P.

The situation in point B is similar to that in point A. The camel can't transport more than 1000 bananas from point B to the market M. Therefore, the distance between A and B must be chosen such that exactly 1000 bananas arrive in point B. Now we can calculate the length of AB: 2000-3*AB=1000, so AB=333 1/3. Note that this distance is less than 500 kilometres, so the camel can travel back from B to A. It follows that BM=1000-200-333 1/3=466 2/3 kilometres. As a result, the camel arrives at the market with 1000-466 2/3=533 1/3 bananas.

Monday, October 27, 2008

Count 45 minutes with 2 ropes that burn one hour each.

There are 2 ropes that are not of same lenght , but both take an hour each to burn completely.
You are given a lighter and no clock. You have to measure 45 minutes.

Answer: Light one rope from both ends and another rope from one end. The rope that is lit from both ends burns out completely in 30 minutes. The rope that is lit at one end is burnt half. At this point of time, light the other end of the rope too. The left half of the rope will burn in 15 minutes.