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.