Thursday, December 16, 2010

Distance covered - One puzzle a day - Puzzle Buddies

Puzzle:There is a 50 m long army platoon marching ahead. The last person in the platoon wants to give a letter to first person leading the platoon. So while the platoon is marching he runs ahead, reaches the first person and hands over the letter to him and without stopping he runs and comes back to his original position.

In the mean time the whole platoon has moved by 50 m.

The question is how much distance did the last person cover in that time assuming that he ran the whole distance with uniform speed.
Note: Don't forget to visit us again. Answer to the puzzle will be posted tomorrow with winner's name. You can provide your answer in comments.
Solution:
The last person covered 120.71 meters.
It is given that the platoon and the last person moved with  uniform speed. Also, they both moved for the identical  amount of time. Hence, the ratio of the distance they  covered - while person moving forward and backword - are  equal.   Let's assume that when the last person reached the first  person, the platoon moved X meters forward.   Thus, while moving forward the last person moved (50+X)  meters whereas the platoon moved X meters.   Similarly, while moving back the last person moved [50-(50- X)] X meters whereas the platoon moved (50-X) meters.   Now, as the ratios are equal,  (50+X)/X = X/(50-X)  (50+X)*(50-X) = X*X   Solving, X=35.355 meters   Thus, total distance covered by the last person  = (50+X) + X  = 2*X + 50  = 2*(35.355) + 50  = 120.71 meters  

Winner:

Wednesday, December 15, 2010

Coin Tossing: One puzzle a day - Puzzle Buddies

Puzzle: There's a coin toss game in a casino. You are friends with the dealer and can set up a deal with him. Dealer can get what he wants 80% of times. The bet is that if you win you win $1 and if you loose then you loose $1. You can make X attempts only. What should be your strategy to always win.

Note: Don't forget to visit us again. Answer to the puzzle will be posted tomorrow with winner's name. You can provide your answer in comments.
Source:
 CSE Blog

Monday, December 13, 2010

Camel and Bananas - One puzzle a day - Puzzle Buddies

Puzzle:
A banana plantation is located next to a desert. The plantation owner has 3000 bananas which he wants to transport to the market by camel. The market is located 1000 kilometre away from the plantation with desert in between. The owner has only one camel, which carries a maximum of 1000 bananas at any moment in time. The camel eats one banana every kilometre it travels.

What is the largest number of bananas that can be delivered at the market?

Answer:
The camel needs to make more than one trip to deliver all bananas to the market. No doubt he needs to make at least one stop in between otherwise he can never have enough bananas left for the comeback journey. And this point needs to be less than 500 if he wants any bananas to be left when he reaches the market. Let’s say it’s A.

Plantation======A=====================Market

The trick is to make sure that the camel always travels with his full capacity of bananas. This is true initially as there are total 3000 bananas and the camel carries 1000 bananas at a time. So, he will make 3 trips with 1000 bananas to point A. To make sure he carried his full capacity after point A, we should have a multiple of 1000 bananas left when all bananas are at point A. This number can thus be 2000 at best. So he is eating 1000 bananas from the plantation to point A, making 5 trips in between. So, he eats 200 bananas in 1 trip. Point A is 200 km from the plantation.

Again we need a stopping point in between A and the plantation where there will be 1000 bananas left after 3 trips. So the camel eats 333 1/3 bananas in each trip, point B being 333 1/3 km away from A.

Plantation======A=========B===========Market

In the end, the camel needs to make only 1 trip from B to the market which is 466 2/3 km away, leaving 533 1/3 bananas at the market.

Winner: Ashish and Prabharan

Friday, December 10, 2010

How many Days- One Puzzle a Day -Puzzle Buddies

Puzzle: There is a frog lying under the bottom of a well of depth 40 meters.every day morning the frog leaps up 4 meters and it sleeps till next morning.while the frog is asleep he falls 3 meters down.how many days it will take the frog to escape from the well?

Note: Don't forget to visit us again. Answer to the puzzle will be posted tomorrow with winner's name. You can provide your answer in comments.
Solution:
on first day the frog jumps from 0 t0 4 meters and by night it slips 3 meters
so day 2 it starts at 1
day 3 it starts at 2 likewise
day 37 it starts at 36 and it jumps 4 meters and it comes out
So it takes 37 days.

Winner: Gaurave

Thursday, December 9, 2010

Pair game - One puzzle a day - Puzzle Buddies

Puzzle:Ganesh has a small deck of 12 playing cards made up of only 2 suits of 6 cards each. Each of the 6 cards within a suit has a different value from 1 to 6; thus, for each value from 1 to 6, there are two cards in the deck with that value. Ganesh likes to play a game in which he shuffles the deck, turns over 4 cards, and looks for pairs of cards that have the same value. What is the chance that Ganesh finds at least one pair of cards that have the same value?
Note: Don't forget to visit us again. Answer to the puzzle will be posted tomorrow with winner's name. You can provide your answer in comments.
Solution:
The chance of getting AT LEAST one pair of cards with the same value out of 4 dealt cards should be computed using the 1-x technique. That is, you should figure out the probability of getting NO PAIRS in those 4 cards (an easier probability to compute), and then subtract that probability from 1.

First card: The probability of getting NO pairs so far is 1 (since only one card has been dealt).

Second card: There is 1 card left in the deck with the same value as the first card. Thus, there are 10 cards that will NOT form a pair with the first card. We have 11 cards left in the deck.

Probability of NO pairs so far = 10/11.

Third card: Since we have gotten no pairs so far, we have two cards dealt with different values. There are 2 cards in the deck with the same values as those two cards. Thus, there are 8 cards that will not form a pair with either of those two cards. We have 10 cards left in the deck.
Probability of turning over a third card that does NOT form a pair in any way, GIVEN that we have NO pairs so far = 8/10.

Cumulative probability of avoiding a pair BOTH on the second card AND on the third card = product of the two probabilities above = (10/11) (8/10) = 8/11.

Fourth card: Now we have three cards dealt with different values. There are 3 cards in the deck with the same values; thus, there are 6 cards in the deck that will not form a pair with any of the three dealt cards. We have 9 cards left in the deck.
Probability of turning over a fourth card that does NOT form a pair in any way, GIVEN that we have NO pairs so far = 6/9.

Cumulative probability of avoiding a pair on the second card AND on the third card AND on the fourth card = cumulative product = (10/11) (8/10) (6/9) = 16/33.

Thus, the probability of getting AT LEAST ONE pair in the four cards is 1 - 16/33 = 17/33.

Winner: Nonone

Wednesday, December 8, 2010

How many weights? Part3 - One puzzle a day - Puzzle Buddies


Puzzle: This is the 3rd part of weighing puzzles. You can check Part 2 and Part 1.
You have to weigh 125 packets of sugar with first one weighing 1 lb, second 2 lb, third 3 lb and so on.You can only use one pan of the common balance for measurement for weighing sugar, the other pan has to be used for weights.
The weights have to put on to the balance and it takes time. Time taken to move weights is equal to the number of weights moved.
Eg. So if you are weighing 5 lb using 3lb and 2 lb weight then you have to lift both these weights one by one and thus it will take 2 unit time. If you have to measure only 3lbs it will take only 1 unit time. Now if we have to measure sugar packets of weights 1,3,4 using weights 1 and 3 only. For this first we measure 1 lb, with 1 unit of time, we place 3 lb along with 1 lb and measure 4kg with again 1 unit of time, and finally we move 1kg out of pan to measure 3kg in 1 unit of time. So in 3 units of time we could measure 1,3 and 4lb using weights 1 and 3 only.

Now you have to make sugar packets of all weights from 1 to 125 in minimum time, in other words in minimum movement of weights. The question here is to find out the minimum number of weighs needed and the weight of each the weights used and the strategy to be followed for the creation of 125 packets of sugar.
Note: Don't forget to visit us again. Answer to the puzzle will be posted tomorrow with winner's name. You can provide your answer in comments.
Source: 
Classic Puzzles
Solution: Amazing explanation provided by Kasturi.
You will need the weights 1, 2, 4, 8, 16, 32 and 64 i.e. 7 weights. You can measure 125 packets in 125 movements. The strategy to be followed is this:
Put 1: measure 1, weights in pan 1

To measure further you need to use a new weight.
Put 2: measure 3, weights in pan 1,2
Remove 1: measure 2, weights in pan 2

Thus, by adding the next smallest weight to the pan i.e. 2, we can measure all weights below 4 in total 3 movements.

To measure further you need to use a new weight.
Put 4: measure 6, weights in pan 2,4
Remove 2: measure 4, weights in pan 4
Put 1: measure 5, weights in pan 1,4
Put 2: measure 7, weights in pan 1,2,4

Thus, by adding the next smallest weight to the pan i.e. 4, we can measure all weights below 8 in total 7 movements.

Following the same strategy, whenever we have measured all weights below n, add n and we can measure measure all the weights below 2n in 2n-1 movements.
Eventually, we can measure 125 packets in 125 movements.


Winner: Kasturi again is the winner.

Monday, December 6, 2010

Boat and Anchor - One Puzzle a Day - Puzzle Buddies

Puzzle:
A fisherman is sitting in his boat in the center of a small lake. He throws his anchor into the water. Does the water level rise, fall or stay the same?

Solution:
When the anchor is in the boat, the water displaced is equal to the weight of the anchor. When the anchor is dropped in the water, the water displaced is equal to the volume of the anchor. Since the anchor is denser than water, its weight is more than its volume as compared to water. Hence, it displaces less water when it is thrown in the lake. Thus, the water level falls.

Winner: Vinay

Friday, December 3, 2010

Puzzle: Palindrome - One Puzzle a Day -Puzzle Buddies

Puzzle:
What is smallest possible palindrome number whose cube root is not a palindrome?

For example 1331 is a palindrome. Cube root of 1331 is 11 which is also a palindrome.so this does not satisfy the condition.
Note:a palindrome is a word,phrase or a number that can be read same in either direction.




Note: Don't forget to visit us again. Answer to the puzzle will be posted tomorrow with winner's name. You can provide your answer in comments.
Solution:
10662526601 = 2201³.It is not yet known that if there are any other palindromic numbers whose cube roots are not palindromes.
As of now there are no palindromes of the form X n where X is not a palindrome and n>3.
the only exception is 2201.

Winner:

Passenger seating - One puzzle a day - Puzzle Buddies

Puzzle:A line of 100 airline passengers is waiting to board the plain. They each hold a ticket to one of the 100 seats on that flight. (For convenience, let's say that the Nth passenger in line has a ticket for the seat number N.)
Unfortunately, the first person in line is crazy, and will ignore the seat number on their ticket, picking a random seat to occupy. All the other passengers are quite normal, and will go to their proper seat unless it is already occupied. If it is occupied, they will then find a free seat to sit in, at random.
What is the probability that the last (100th) person to board the plane will sit in their proper seat (#100)?
Note: Don't forget to visit us again. Answer to the puzzle will be posted tomorrow with winner's name. You can provide your answer in comments.
Solution:
The solution to this one is pretty mathimatically involved.

The crazy passenger that boards first has an equal chance of getting on any of the 100 seats. Therefore, the probability of this person sitting in a particular seat k is 1/100.

Now for any value of k, all the passengers up to k will board and take their seats as normal. Then the k-th passenger will find themselves out of a seat, and pick a random seat, in effect, becoming the crazy passenger for a problem with 101 - kpassengers.

(For example if the crazy person takes the tenth seat, passengers 2 through 9 will be seated normally, and when passenger 10's turn comes, they can be considered the crazy passenger first in line of 91 people boarding a plane with 91 seats.)

Let us define P(n) as the probability that the last of n passengers boards their proper place under the conditions of the problem. So for solution, we are looking to find the value of P(100).

In a situation with n passengers, the first, "crazy", passenger can take any of the seats 1 .. n with the probability of 1/n. Also, given some seat number k that the crazy passenger may occupy, the problem will become that of 1+n-k passengers. Therefore, we can say that

P(n) = 1/n * (1 + P(n-1) + P(n-2) + ... + P(2))
(This problem does not make sense with less than 2 passengers. Also, it is easy to see that P(2) is 1/2)

What we would like to do is see what the value of P(n) is in terms of P(n-1).

P(n-1) = 1/(n-1) * (1 + P(n-2) + P(n-3) + ... + P(2) P(n-1) * (n-1) = (1 + P(n-2) + P(n-3) + ... + P(2) P(n) = 1/n * (1 + P(n-1) + P(n-2) + ... + P(2)) (P(n) * n) - P(n-1) = (1 + P(n-2) + ... + P(2))
So,
(P(n) * n) - P(n-1) = P(n-1) * (n-1) (P(n) * n) - P(n-1) = (P(n-1) * n) - P(n-1) (P(n) * n) = (P(n-1) * n) P(n) = P(n-1)
This shows us that the problem's answer does not change if we add one more passenger. Starting at 2 passengers with the anser of 1/2, we can add passengers indefinitely, and still arrive at the same answer. Thus for the instance with 100 passengers, the probability of the last one getting to their proper seat is also 1/2, or 50%.

Winner:

Monday, November 29, 2010

Underground Cable - One Puzzle a Day - Puzzle Buddies

Puzzle:
There is an underground cable in which there are 10 wires, no two wires being connected in any way. The two ends of the cable are 5 miles apart. Sad thing is the wires are all of the same color, material and width and are not labeled. You cannot figure out which wire at one end corresponds to which wire at the other end by looking at them.

You have been given the job to label all the wires at both the ends. Armed with only a battery and a bulb and assuming that you are standing at one of the ends, how many total miles will you have to walk to finish your job? (Don't ask why you don't have a car!)

Will the number change if there are 20 wires?

Solution:

Call the end of the cable that you are at as X. Label one wire A. Join two wires together and label both of them B. Join three wires together and label each of them C. Join the remaining four wires together and label each of them D.

Now go to the other end Y. With the battery and the bulb you can easily find out which wires are joined together and label them as A, B, C or D accordingly.

Now join together one wire from each of the groups and label each of them as 1. Join one wire from each of the groups B, C and D and label them as 2. Join one wire each from C and D and label them as 3. Label the remaining wire from D as 4. We now have the following labels at Y end of the cable: A1, B1, C1, D1, B2, C2, D2, C3, D3 and D4.

Now go to the other end X. Find out the wires joined together and label them as 1, 2, 3 or 4 respectively. We had previously labeled wires as A, B, C or D at end X. So, we now have the labels A1, B1, C1, D1, B2, C2, D2, C3, D3 and D4 at end X too.

It is easy to verify that similarly labeled wires at the two ends are one and the same.

Thus, you had to make only one trip, walking 10 miles. This logic can be applied to any number of wires and the walking distance remains the same.

Saturday, November 27, 2010

How many weights? Part2 - One puzzle a day - Puzzle Buddies

Puzzle: This is part 2 of puzzle posted yesterday. The puzzle is that you have to weigh 1 to 1000 using a common balance scale with minimum number of weighs. This time you can put wights on both sides.
You can check Part 1 of this puzzle How many weights? Puzzle Part 1.
Note: Don't forget to visit us again. Answer to the puzzle will be posted tomorrow with winner's name. You can provide your answer in comments.

Solution: The answer is series of base 3 i.e. 1, 3, 9, 27, 81, 243 and 729.
We can start from smallest number 1. To measure 1 we definitely need 1.
To measure 2 we need to look for highest number possible. We can measure 2 by using 3(3-1 = 2). So we need 1 and 3.
Now to measure 4 we can use 1 and 3 both (1+ 3). To measure 5 again we will look for highest possible number. 9 is highest possible number (9-4 = 5). We can measure up to 13 using these weights.

Continuing the same way we can deduce that a series of base 3 is required, thus 1, 3, 9, 27, 81, 243, 729.
Winner: Kasturi wins again with her excellent explanation.

Friday, November 26, 2010

Eight Queens - One puzzle a day - Puzzle Buddies

Puzzle: How many ways we can arrange eight queens on a 8*8 chessboard, so that no queen can kill the other queens?
Note: Don't forget to visit us again. Answer to the puzzle will be posted tomorrow with winner's name. You can provide your answer in comments.

Solution:puzzle has 92 distinct solutions. If solutions that differ only by rotations and reflections of the board are counted as one, the puzzle has 12 solutions

How many weights? - One puzzle a day - Puzzle Buddies

Puzzle: You have a common balance with two sides. You can only keep weighs on one side. You have to weigh  items from 1 to 1000 weight units with integral weights only.
What is the minimum number of weights required and what will be their weights?
Eg. With 2 weights one of 1 weight unit and other of 3 weight unit you can measure 1, 3 and 4 only.
Note: Don't forget to visit us again. Answer to the puzzle will be posted tomorrow.  You can provide your answer in comments.

Solution: This puzzle is an easy puzzle as to make any odd number you need all other even numbers and one 1.
So only one odd number is needed to make all odd numbers. Now you are left with all even numbers. All even numbers are base 2 and thus can be though of as binary representation. To make 1000 you need at most 10 bits(1111101000). You can make any number below 1000 from these bits.
So the answer is 10 weights required. 1, 2, 4, 8,16, 32, 64, 128, 256, 512.
Winner: Kasturi is again the winner.

Wednesday, November 24, 2010

Egg strength - One puzzle a day - Puzzle Buddies

Puzzle:
1.You have 2 eggs.
2.There's a 100-storey building and you have access to all the floors.
3. Eggs have a particular strength. They will break if dropped from a particular floor and above only.
4. Both eggs are identical.
4. You need to figure out the highest floor of a 100-storey building an egg can be dropped without breaking.
Now the question is how many drops you need to make. You are allowed to break 2 eggs in the process
Solution: Correct answer is 14. Move 14, then 13, then 12, then 11 and so on.
If you drop the first egg from floor 14,27, 39, 50, 60, 69, 77, 84, 90, 95, 99, 100. It can break at any place. If it does you have to check all the floors between last checked floor current floor. In worst case first egg can break from 14th floor and you have to try 1 to 13.
This is most optimal solution because as the series progresses it reduces the number of attempts required to test and keeps the maximum attempts to 14 only.
It took some time for me to digest the optimal solution but finally it all made sense.
Winner: No one today.

Bartender and Gun - One puzzle a day - Puzzle Buddies

Puzzle:A man walks into a bar and asks the bartender for a glass of water.
But the bartender takes out a gun and aims it at the man's head.
The man says "Thank You" and walks out.
Why?


Answer:The man had hickups..



Monday, November 22, 2010

A Card Trick - One puzzle a day - Puzzle Buddies

Puzzle:
A magician takes a 52 card deck and gives it to the audience. The spectators choose any 5 cards and pass these cards to the magician's assistant. The assistant announces 4 of these cards out loud. The magician responds by naming the fifth card. How does the magician "know" the fifth card?

Solution:
This is a rather lengthy solution but simple once its understood.

This is what the assistant must do. In any group of five cards, there must be at least two of the same suit. Select any 2 cards of the same suit(in case there are more than 1)and announce out loud one of them and leave the other one as the fifth card to be guessed by the magician. Thus, the magician knows the suit of the 5th card.

Next, think of the remaining three cards as Low, Medium, and High values(Ace being lowest and King being the highest). The suit is used as a tie-breaker, if necessary. We could use an alphabetical suit order: Clubs, Diamonds, Hearts, Spades. So, for example, if we have 3 of spages, 7 of clubs and 7 of hearts, then Low = 3 of spades, Medium = 7 of clubs and High = 7 of hearts.

Given Low, Medium, and High, we can encode a number between one and six as follows:
LMH = 1, LHM = 2, MLH = 3, MHL = 4, HLM = 5, HML = 6. Thus, the order in which cards 2, 3 and 4 are announced gives a number between 1 and 6 to the magician.

This still leaves us short, as the hidden card could be one of 12.

Imagine the 13 face values (Ace to King) arranged in a circle. The shorter path between two cards, counting forward from one card to the other, is never more than six places. Therefore, out of the two cards of the same suit as mentioned above, announce the card that begins the shorter path, and leave the other card as the fifth card. Now, only a number between 1 and 6 inclusive needs to be added to the first card to get to the fifth card. E.g. if we have king of hearts and 4 of hearts as the two cards, by the cyclic rule, queen + 5 = 4. So, announce the queen and then encode 4 in the last 3 cards by the order in which they are announced.

Example: The audience selects the following cards - 2C, 5D, JC, 5H, KS - and passes them tothe assistant. The only duplicate suit is clubs. Counting forward from JC to 2C is four places, so he announces JC and leaves 2C to be guessed. Of the other three cards, 5D is Low, 5H is Medium (using the suit tie-breaker), and KS is High. To represent four,the assistant uses the ordering MHL. So he announces the 3 cards in the following order 5H, KS, 5D.

To decode, the magician notes that he must count forward from JC. He notes that the natural ordering of the other three cards is: 5D, 5H, KS, and so the cards 5H, KS, 5D represent ordering MHL, which encodes the number four. He therefore counts forward four places from JC and announces the two of clubs!

Winner: None.

Thursday, November 18, 2010

Tom's address - One puzzle a day - Puzzle Buddies

Puzzle:John is tryng to locate Tom's house. All he knows is that Tom lives on a street with houses numbered from 8 to 100.
John asks Tom:
"Is your house number bigger than 50?"
Tom answers him, but he lies. (John doesn't know that he's lying) John continues to ask:
"Is your house number a multiple of 4?"
Tom answers and again, he lies. Then John asks:
"Is your house number the square of an integer?"
Tom answres, but this time he tells the truth. Finally, John asks:
"Is the first digit of your house number 3?"
After Tom answers (we don't know if he lied or not) John declares Tom's house number, but he is wrong! What is Tom's house number?
Note: Don't forget to visit us again. Answer to the puzzle will be posted tomorrow.
Solution:

Tom's house number is 81. Since John asked if the first digit is 3, he thought the number was smaller than 50, but we know that Tom lied about that, so the number we're looking for is bigger than 50. After John asked that, he was certain he had the number, so that means that Tom must have said that the number was indeed the square of an integer, and is a multiple of 4. (That is the only way John could have narrowd down his options to only one) Since he lied about being a multiple of 4, and told the truth about being the square of an integer, we now know that his house number is bigger than 50, isn't a multiple of 4, and is the square of an integer. The only number between 8-100 that fits that description is 81.
Winner:
InitialD

Wednesday, November 17, 2010

Cigar Aficionado - One puzzle a day - Puzzle Buddies

Puzzle:  As we all know a cigar can not be smoked complete to end. One cigar aficionado does not want to waste any bit of his cigars. He collected 27 cigar butts. He can create a new cigar out of 3 cigar butts.
How many cigars in total he will be able to smoke.
Note: Don't forget to visit us again. Answer to the puzzle will be posted tomorrow.

Solution: Solution to this puzzle is 9 + 3 + 1 = 13. 27 cigar butts make 9 complete cigars. 9 will leave 9 cigar butts. He can make 3 cigars from 9 cigar butts. He will have 3 cigar butts left again. He can make one more cigar out of those.
Winner: Kasturi is the winner.

Tuesday, November 16, 2010

Population problem - One puzzle a day - Puzzle Buddies

Puzzle: A town in India contains 100,000 married couples but no children. Every one strongly believes in continuing the male line. On the other hand population is also a big problem. 
So town's wise men decides:
 1. Each family has one baby per annum until the first boy is born. For example, if (at some future date) a family has five children, then it must be either that they are all girls, and another child is planned, or that there are four girls and one boy, and no more children are planned. 
2. Children are equally likely to be born male or female.
Let p(t) be the percentage of children that are male at the end of year t. How is this percentage expected to evolve through time?
Note: Don't forget to visit us again. Answer to the puzzle will be posted tomorrow.
Source: Nigel's puzzle page.

Solution: The strategy is to solve year by year and see the trend

1. 1st year: 50,000 boys, 50,000 girls.
2. 2nd year: 50,000 boys + 25,000 boys, 50,000 girls + 25000 girls.
3. 3rd year: 75000 boys + 12,500 boys, 50,000 girls + 12500 girls
and so on...
So it shows that it will always be 50%.
Winner: Kasturi is the winner.

Monday, November 15, 2010

Sheep among Tigers - One puzzle a day - Puzzle Buddies

Puzzle:
In a meadow, there are 100 tigers and only 1 sheep.

These tigers can survive on grass as well as meat. If any tiger eats the sheep, it will instantly turn into a sheep which other tigers can eat if they want to. All the tigers know this.

The question is, given this knowledge, will any tiger ever eat the sheep?
What about the scenario when there are n tigers and 1 sheep?

Here are some more facts:
1. One tiger has to eat the complete sheep if it wants to. There is no sharing.
2. Tigers value their life. They can survive on grass but will eat the sheep if they are sure their life is not in danger.

Solution:
The strategy is to solve it for 1 tiger first , then 2, then 3 and so on.
If
1. 1 tiger: then he will eat the sheep as he is safe as no one is there to eat him.
2. 2 tigers: Both won't eat the sheep as if one eats the sheep he will become a sheep and then will be eaten by the other tiger.
3. 3 tigers: One of them will eat the sheep and become a sheep himself. This way the situation goes back to point 2 and then all of them are safe.

This way the answer is that whenever there are even number of tigers then they won't eat the sheep other wise one will eat the sheep to make number of tigers even.

Winner: As usual Gaurave. Excellent explanation.

Thursday, November 11, 2010

Breaking Up a Chocolate Bar - One puzzle a day - Puzzle Buddies

Puzzle:How many steps are required to break an m x n bar of chocolate into 1 x 1 pieces?

You can break an existing piece of chocolate horizontally or vertically.

You cannot break two or more pieces at once (so no cutting through stacks).

Note: Don't forget to visit us again. Answer to the puzzle will be posted tomorrow.
Solution:

You need mn – 1 steps.

By breaking an existing piece horizontally or vertically, you merely increase the total number of pieces by one.

You already have 1 piece, so need mn – 1 steps to get to mn pieces.

Winner: Kasturi

Wednesday, November 10, 2010

Creepy Creeps - One puzzle a day - Puzzle Buddies

Puzzle: Two vines, one Grape and other Poison Ivy, are both climbing up and round a cylindrical tree trunk. Grape twists clockwise and Poison Ivy anticlockwise, both start at the same point on the ground. before they reach the first branch of the tree the Grape had made 5 complete twists and the Poison Ivy 3 twists. not counting the bottom and the top, how many times do they cross? 
Source: Pratik Poddar puzzle blog
Solution: The best and most easy to understand the solution is that we can cut the cylinder to make a rectangle of width = 1 complete circle.Then just count the number of intersections. We are not counting the top and the bottom one and thus it will be 5 + 3 -1 = 7.
Winner: No one today.

Tuesday, November 9, 2010

Hats again - One puzzle a day - Puzzle Buddies

Puzzle:Inside of a dark closet are five hats: three blue and two red. Knowing this, three smart men go into the closet, and each selects a hat in the dark and places it unseen upon his head.Once outside the closet, no man can see his own hat. The first man looks at the other two, thinks, and says, “I cannot tell what color my hat is.” The second man hears this, looks at the other two, and says, “I cannot tell what color my hat is either.” The third man is blind. The blind man says, “Well, I know what color my hat is.” What color is his hat? 
Source: Nigel Coldwell puzzles page
Solution: The first man can only say that he does not now what color hat he has when other two hats he is seeing are "red" and "blue". Second man also said same thing which means he is also seeing one red and one blue hat. Now there are only two red hats so first and second both are wearing Red hats and third person is wearing the blue hat.
Winner: Once again Kasturi is the winner.

Monday, November 8, 2010

How many squares,rectangles - One puzzle a day - Puzzle Buddies

Puzzle: There are 64 squares on a standard chess board.it is a 8*8 grid.How many squares and rectangles we can make using these 64?
Note: Don't forget to visit us again. Answer to the puzzle will be posted tomorrow.

Saturday, November 6, 2010

Quarters on the Table - One puzzle a day - Puzzle Buddies

Puzzle:
You and your friend are playing a game.

There is a round table and unlimited quarters. You and your friend take turns to place a quarter on the table. The quarter should be placed flat on the table and should not overlap any other quarter. You cannot move the coins already present on the table. Whoever places the last quarter wins.

If you get to choose who goes first, whom will you choose and what will be your winning strategy?

Solution:
You choose to play first and place the coin in the center of the table.

When your opponent puts a coin, you put your coin in the spot directly opposite to his coin. E.g. your opponent has put the coin at a point which is distance x from the center, consider a diameter of the circle passing through this point. Then put your coin on this diameter at a distance x from the center but in the opposite direction.

With this strategy, wherever your opponent puts his coin, you will always have the described spot empty and you will get to put the last coin.

Winner: None :(

Thursday, November 4, 2010

The Monkey and the Pulley - One puzzle a day - Puzzle Buddies

Puzzle:A weightless and perfectly flexible rope is hung over a weightless, frictionless pulley attached to the roof of a building. At one end is a weight which exactly counterbalances a monkey at the other end.

If the monkey begins to climb, what will happen to the weight - will it remain stationary, will it rise or will it fall?

Note: Don't forget to visit us again. Answer to the puzzle will be posted tomorrow.
Solution:
As the monkey climbs, the weight will rise by the same amount.
Winner: Gaurave

Wednesday, November 3, 2010

Crazy Rabbits - One puzzle a day - Puzzle Buddies

Puzzle: 1. You decided to keep rabbits. Just to begin with you decided to begin with one male rabbit and one female rabbit. These rabbits have just been born.
2. A rabbit will reach sexual maturity after one month.
3. The gestation period of a rabbit is one month.
4. Once it has reached sexual maturity, a female rabbit will give birth every month.
5. A female rabbit will always give birth to one male rabbit and one female rabbit.
6. Rabbits never die.
So how many male/female rabbit pairs are there after one year (12 months)?
Note: Don't forget to visit us again. Answer to the puzzle will be posted tomorrow.
Solution: 

0 month: 1 pair
1 month: 1 pair
2 month: 2 pair
3 month: 3 pair
4 months: 5 pair
5 months: 8 pair
6 months: 13 pair
7 months: 21 pair
8 months: 34 pair
9 months: 55 pair
10 months: 89 pair
11 months: 144 pair
12 months : 233 pair

This is a classic example of Fibonacci series.
Winner: Subodh Singh

Tuesday, November 2, 2010

Bug walk - One puzzle a day - Puzzle Buddies

Puzzle: a bug is sitting in a bottom corner of a square room. He has to walk to the farthest corner. Which path should it take to pick the shortest possible path?

Note: Don't forget to visit us again. Answer to the puzzle will be posted tomorrow.
Solution:
To reach to opposite corner bug has to cross atleast two walls. The shortest distance to cross a wall is if it goes directly towards the midpoint of the edge. This makes an equilateral triangle.
Winner: once again Kasturi is winner. Her explanation is also cool.

Monday, November 1, 2010

Deadly Poisons - One puzzle a day - Puzzle Buddies

Puzzle:
In a mythical land, if you drink poison, the only way to save yourself is to drink a stronger poison, which neutralizes the weaker poison.

The king of the land summoned two scientists, A and B, and said:
- Each of you have to make the strongest poison in the kingdom.
- You have one week's time.
- At the end of the week, both of you will drink the other one's poison, then your own.
- The one who has made the stronger poison, will survive and win.

Scientist A knew he had no chance, as B was much more experienced. So, A came up with a plan to survive and make sure that B dies.

On the last day, B came to know of A's plan. B came up with a counter plan, to make sure he survives and A dies.

At the end of the week, the king summoned both of them. They drank the poisons as planned, A died, B survived and the king didn't get what he wanted.

What happened?

Solution:
A's plan was to drink a weak poison prior to the meeting with the king, then he would drink B's strong poison, which would neutralize the weak poison. As his own poison he would bring water, which will have no affect on him. B, who would drink the water, and then his poison would surely die.
When B figured out this plan, he decided to bring water as well. So A, who drank poison earlier, drank B's water, then his own water, and died of the poison he drank before. B would drink only water, so nothing will happen to him. And because both of them brought the king water, he didn't get a strong poison like he wanted.

Winner: Sorry missed your comment the first time. Winner is Gaurave Sehgal.

Friday, October 29, 2010

Magic Number - One puzzle a day - Puzzle Buddies

Puzzle: 
1. A number has n digits where n is greater than 1.
2. When multiplied by 1 through 6 the result contains the same digits arranged in different order.
3. When multiplied by 7 the result contains a single digit but n times.


What is the magic number?


Answer:
142857 is the correct answer!


142857 x 2 = 285714
142857 x 3 = 428571
142857 x 4 = 571428
142857 x 5 = 714285
142857 x 6 = 857142
142857 x 7 = 999999 


Winner:
Gaurave Sehgal

Thursday, October 28, 2010

Eight Eights puzzle - One puzzle a day - Puzzle Buddies

Puzzle:Using 8 exactly eight times make a 1000.

You can use any mathematical symbols

Note: Don't forget to visit us again. Answer to the puzzle will be posted tomorrow.
Solution:
888+88+8+8+8 = 1000
Winner: Vinay

Wednesday, October 27, 2010

Winner Winner Chicken Dinner - One puzzle a day - Puzzle Buddies

Puzzle: Your friend suggests a betting game. The rules are:

  1. Each person has to call a number after each another until someone calls 50. 
  2. Person who calls 50 wins.
  3. The player who starts has to call a number between 1 and 10 (inclusive).
  4. The new number must be at least 1 greater than the previous number. 
  5. It should not be more than 10 to the previous number.

You have bet 100 dollars on this game. You got the first turn. Which number would you call and why?

Note: Don't forget to visit us again. Answer to the puzzle will be posted tomorrow.
Solution:
This is a good example of backtracking algorithms
Winner says 50.
Looser has to say a number between: 40-49
Winner says 39
Looser has to say a number between: 29-38
Winner says 28
Looser has to say a number between 18-27
Winner says 17
Looser has to say a number between 7 and 16
Winner has to say 6 to start this.
So the answer is 6.
Winner: Kasturi is the Winner

Tuesday, October 26, 2010

The Burning Rope - One puzzle a day - Puzzle Buddies

Puzzle:There are two lengths of rope.Each one can burn in exactly one hour.They are not necessarily of the same length or width as each other.They also are not of uniform width (may be wider in middle than on the end), thus burning half of the rope is not necessarily 1/2 hour.
By burning the ropes, how do you measure exactly 45 minutes worth of time?

Note: Don't forget to visit us again. Answer to the puzzle will be posted tomorrow.
Solution:

If you light both ends of one rope, it will burn in exactly a 1/2 hour. Thus, burn one rope from both ends and the other rope from only one end. Once the one rope (which is burning from both ends) finally burns out (and you know a 1/2 hour has elapsed), you also know that the other rope (which is buring from only one end) has exactly 1/2 hour left to burn. Since you only want 45 minutes, light the second end of the rope. This remaining piece will burn in 15 minutes. Thus, totaling 45 minutes.
Winner: Gaurave Sehgal

Monday, October 25, 2010

Two Primes - One puzzle a day - Puzzle Buddies

Puzzle: Two prime numbers p1 and p2 differ by 11111. What are their sum and product?

Solution: Since p1 and p2 differ by an odd number, one of them must be even. Since 2 is the only even prime number,
p1 = 2 and p2 = 11113
Sum = 11115
Product = 22226




Thursday, October 21, 2010

Division - One puzzle a day - Puzzle Buddies

Puzzle:Find the number of factors of 264,600 that are not divisible by 6.
Note: Don't forget to visit us again. Answer to the puzzle will be posted tomorrow.
Solution:
264,600 = 2^3*3^3*5^2*7^2 (broken into prime numbers)
There are 4 powers of 2: 2^0,2^1,2^2 and 2^3
There are 4 powers of 3: 3^0,3^1,3^2 and 3^3
There are 3 powers of 5: 5^0,5^1, and 5^2
There are 3 powers of 7: 7^0,7^1, and 7^2
There are 4*4*3*3=144 different ways to combine the prime factors of 264,600.

Now, eliminate the factors of 6. A factor of 6 must have at least one 2 and one 3.
So it must either have either 2^1,2^2, or 2^3 AND 3^1,3^2, or 3^3. So, there are 3*3=9 different ways the powers of 2 and 3 can combine to generate distinct numbers divisible by 6.

Also, there are 3*3 = 9 different numbers that can be created from the powers of 5 and 7. Any of these 9 numbers can combine with any of of the 9 multiples of 6 to form 9*9 = 81 distinct multiples of 6.

Hence, the number of factors of 264,600 that are no divisible by 6 is 144-81 = 63.
Winner:
Noone

Wednesday, October 20, 2010

100 Lockers - One puzzle a day - Puzzle Buddies

Puzzle: You are in a locker room with 100 lockers in  a row. You have keys to all the lockers. All the lockers are initially closed. You make 100 passes, you toggle ( if the door is closed you open it, if its open you close it) all the locker doors in the first pass, second time you only visit every second door and toggle it, third time you only visit every third door and toggle it and so on.

How many doors will be open after 100th pass.

Solution: There are three ways to solve this puzzle
1. Brute force
 Keep running it for all 100 passes and then count. The solution will be correct but not elegant.
2. If you try to run brute force for first few you can infer that

  • 1st locker will be toggled 1 time
  • 2nd locker will be toggled 2 times
  • 3rd locker will be toggled 2 times
  • and so on ........

This shows us that each locker will be toggled by its own factors only.
The locker can be in open state if the factors are odd.
Now we can count factors of each number from 1 to 100 and which ever are odd will result in open lockers
3. The easiest way is that only perfect squares can have odd factors. So all perfect squares can be counted and that is the answer.

So the answer is 10 and locker numbers are 1,4,9,16,25,36,49,64,81,100.

Winner: Today's winner is Kasturi

Monday, October 18, 2010

Print 20 Dashes - One puzzle a day - Puzzle Buddies

Puzzle:

In the following C program, replace(not add or delete) only one character so that it would print 20 dashes.

int i, n = 20;
for (i = 0 ; i < n ; i--) {


printf("-");
}

Find three different solutions to this puzzle.

Solution:

1.

int i, n = 20;

for (i = 0 ; i < n ; n--) {
printf("-");
}

2.

int i, n = 20;
for (i = 0 ; i + n ; i--) {
printf("-");
}

3.

int i, n = 20;
for (i = 0 ; -i < n ; i--) {
printf("-");
}

Winner: None

Dice puzzle - One puzzle a day - Puzzle Buddies

Puzzle: Two students play a game based on the total roll of two standard dice. Student A says that a 12 will be rolled first. Student B says that two consecutive 7s will be rolled first. The students keep rolling until one of them wins. What is the probability that A will win?



Solution:

Let p be the probability that student A wins. We consider the possible outcomes of the first two rolls. (Recall that each roll consists of the throw of two dice.) Consider the following mutually exclusive cases, which encompass all possibilities.

  • If the first roll is a 12 (probability 1/36), A wins immediately.
  • If the first roll is a 7 and the second roll is a 12 (probability 1/6 · 1/36 = 1/216), A wins immediately.
  • If the first and second rolls are both 7 (probability 1/6 · 1/6 = 1/36), A cannot win. (That is, B wins immediately.)
  • If the first roll is a 7 and the second roll is neither a 7 nor a 12 (probability 1/6 · 29/36 = 29/216), A wins with probability p.
  • If the first roll is neither a 7 nor a 12 (probability 29/36), A wins with probability p.
Note that in the last two cases we are effectively back at square one; hence the probability that A subsequently wins is p.
Probability p is the weighted mean of all of the above possibilities.
Hence p = 1/36 + 1/216 + (29/216)p + (29/36)p.
Therefore p = 7/13.

Friday, October 15, 2010

Two boys in a row - One puzzle a day - Puzzle Buddies

Puzzle: A woman has two children. One of them is a boy. What is the probability that the other child is also a boy.

Solution: The natural answer to this is 1/2 as the second child can be either Boy or Girl so the probability of boy is 1/2. But this solution is wrong as there can be following cases when there are two children


1. Boy - Boy
2. Boy - Girl
3. Girl - Boy


so the probability is 1/3.


Winner: no winners this time. better luck next time.

Printing stars - One puzzle a day - Puzzle Buddies

Puzzle:
The following C program prints infinite *s. You have to change (not add or remove) only 1 character to make it print exactly 20 *s.

int i, n = 20;
for (i=0; i < n; i--)

{
printf("*");
}

Note: Don't forget to visit us again. Answer to the puzzle will be posted on Monday.


Thursday, October 14, 2010

Slim Lover - One puzzle a day - Puzzle Buddies

Puzzle


A slim young man asked a girl on a date:
"I say something. If it is truthful, will you give me your photo?"
"Yes," replied miss.
"And if it is a lie, do not give me your photograph. Would you promise that?"
The girl agreed. Then the chap said such a sentence, that after a little while of thinking she realized, that if she wanted to honor her promise, she wouldn't have to give him a photo but a kiss.


What would you say (if you were him [or her!]) to be kissed?





Solution:

"You will give me neither your photo nor a kiss."





Note: Don't forget to visit us again. Answer to the puzzle will be posted tomorrow.

Wednesday, October 13, 2010

Twins - One puzzle a day - Puzzle Buddies

Puzzle: Two girls are born to the same mother, on the same day, at the same time, in the same month and year and yet they're not twins. How can this be?


Solution:

They can be triplets or more

Winners: Subodh and Aashish

Tuesday, October 12, 2010

How many Zeroes - One puzzle a day - Puzzle Buddies

Puzzle: A certain street has 1000 buildings. A sign maker is contracted to number the houses from 1 to 1000. How many zeros will the sign maker need

Note: Don't forget to visit us again. Answer to the puzzle will be posted tomorrow.

Solution:

Divide 1000 building numbers into groups of 100 each as follow: (1..100), (101..200), (201..300),....... (901..1000) For the first group, sign-maker will need 11 zeroes.
For group numbers 2 to 9, he will require 20 zeroes each.
And for group number 10, he will require 21 zeroes.
The total numbers of zeroes required are
= 11 + 8*20 + 21
= 11 + 160 + 21
= 192

Winner: None

Monday, October 11, 2010

Iron cube - One puzzle a day - Puzzle Buddies

Puzzle: Eight Iron cubes are presented to you.seven of them are of equal weight and one is heavier than the others.You have a simple balance, you can use it only twice.How can you find out the heavier cube?
Note: It is not possible to identify the heavier cube by size









Solution:




Divide the cubes into 3 - 3 - 2.
Put 3 and 3 on the balance. If they are balanced then put the 2 on th balance to get the heavier.
If the 3 - 3 are not balanced, take the heavier set and split to 1 - 1 - 1. Weigh a set. If the set is balanced then the 1 left out is heaviest.

Winner is @Aus

Friday, October 8, 2010

Heads Up Quarters - One puzzle a day - Puzzle Buddies

Puzzle:
On a table, are 50 quarters. 40 of them are tails up and 10 are heads up.

You are blindfolded, so you cannot see the quarters. Also, you are wearing gloves, so you cannot distinguish between heads up and tails up quarters by touching them.

You have to divide the quarters into two groups such that the number of heads up quarters in both the groups is the same. There is no restriction on the total number of quarters in each group or on the number of heads up quarters in each group. You are allowed to flip the quarters.

How can you accomplish this?


Solution: Divide the quarters into two groups of 10 coins and 40 coins and flip all the 10 coins in the smaller group.

Suppose there are x heads in the 10-coin group. You have:

10-coin group -> x heads, 10-x tails
40-coin group -> 10-x heads(since total heads=10), 30+x tails

When you flip all the coins in the smaller group you have:

10-coin group -> 10-x heads, x tails
40-coin group -> 10-x heads, 30+x tails

The number of heads in the two groups is the same.

Winner: Subodh Singh

Thursday, October 7, 2010

Tight Corner - One puzzle a day - Puzzle Buddies

Puzzle: A King asked one of his prisoners,
"State a sentence. If it is false, you will be hanged. If it is true, you will be shot to death."
The prisoner wants to live. Can you help him with a sentence?

Solution: A problem like this can only be solved with a paradox, a statement neither true nor false. By stating "I will be hanged" he has rendered both the conditions false and saved himself.


Winner: Kasturi (You are a lifesaver!)

Wednesday, October 6, 2010

Find the winners - One puzzle a day - Puzzle Buddies

Puzzle: John and Doe were excitedly describing the result of the Third Annual International Science Fair Extravaganza in Sweden. There were three contestants, Michael, David, and Peter. John reported that Michael won the fair, while David came in second. Doe, on the other hand, reported that Peter won the fair, while Michael came in second.

In fact, neither John nor Doe had given a correct report of the results of the science fair. Each of them had given one correct statement and one false statement. What was the actual placing of the three contestants?

Note: Don't forget to visit us again. Answer to the puzzle will be posted tomorrow.


Solution: Peter won, David came in second and Michael came in last.


Winner: Today's winners are Subodh Singh and DJ

Tuesday, October 5, 2010

Big Bear - One puzzle a day - Puzzle Buddies

Puzzle: A bear walks 5 miles south, turns left and walks 5 miles to east and then turns again and walks 5 miles north and arrives at the starting point.

What is the color of the bear?

Note: Don't forget to visit us again. Answer to the puzzle will be posted tomorrow.


Solution: The bear color is White as its only possible at north pole to go south, then go east and then north to arrive back at the starting point. The bear is polar bear and is thus white.


Winner: Today's winner is DJ.