Easy | Strategy |

100 prisoners are lined up and assigned a random hat, either red or blue. There can be any number of red hats. Each prisoner can see the hats in front of him but not behind. Starting with the prisoner in the back of the line and moving forward, they must each, in turn, say only one word which must be "red" or "blue". If the word matches their hat color they are released, if not, they are killed on the spot. They can hear each others answers, no matter how far they are on the line. A friendly guard warns them of this test one hour beforehand and tells them that they can formulate a plan where by following the stated rules, 99 of the 100 prisoners will definitely survive, and 1 has a 50/50 chance of survival. What is the plan to achieve the goal?

Hint

Red and blue can be thought of as 0 and 1. Think of modulo 2 sums now.

Solution

Number prisoners from 100 to 1, with 100 being the last person in line, being able to see 99 other hats. Prisoners agree that if the number of red hats that the 100th person can see is even, then he will say “red”. if they add up to an odd number, he will say “blue”. this way number 99 can look ahead and count the red hats. if they add up to an even number and number 100 said “red”, then 99 must be wearing a blue hat. if they add up to an even number and number 100 said “blue”, signalling an odd number of red hats, number 99 must also be wearing a red hat. number 98 knows that 99 said the correct hat, and so uses that information along with the 97 hats in front to figure out what color hat is on 98’s head.

Easy | Strategy |

A traveler wants to go to the mystic. He meets a pair of twins at a fork in the road: one path leads to the jungle, the other to the mystic. One of the twins always says the truth, the other always lies. What yes/no question should he ask one of the twins to determine the path that goes to the mystic?

Hint

Ask one about the other!

Solution

The two-brother problem may be solved in two different ways:

The traveler may ask, "Would your brother agree that the road on the left leads to the mystic?" The answer is guaranteed to be 'Yes' if and only if the road on the right leads to the mystic.

The traveler may ask, "If I were to ask you whether the road on the left leads to the mystic, would you say 'Yes'?" The 'if i were to ask you' construct makes both twins tell the truth. So if the answer is 'Yes', the road on the left indeed leads to the mystic, otherwise the road on the right does so.

(solution was taken from gurmeet's blog)

The traveler may ask, "Would your brother agree that the road on the left leads to the mystic?" The answer is guaranteed to be 'Yes' if and only if the road on the right leads to the mystic.

The traveler may ask, "If I were to ask you whether the road on the left leads to the mystic, would you say 'Yes'?" The 'if i were to ask you' construct makes both twins tell the truth. So if the answer is 'Yes', the road on the left indeed leads to the mystic, otherwise the road on the right does so.

(solution was taken from gurmeet's blog)

Source: Common

Enable Like and Comment Easy | General |

There are two beakers, one containing water, the other wine (equal volumes). A certain amount of water is transferred to the wine, then the same amount of the mixture is transferred back to the water. Is there now more water in the wine than there is wine in the water?

Answer

Equal!

Solution

The main point is that the final volumes of mixture liquids are equal. This means in jar A, volume of water + wine is same as that in jar B. Assume original volume as L. Suppose final volume in jar A is x for water and (L-x) for wine. This implies that jar B has x amount of wine and (L-x) of water. This proves that there are equal amounts of water in the wine jar and wine in the water jar.

Source: Common

Enable Like and Comment Easy | General |

Light bulbs are numbered 1 to 100, and kept off initially. First person comes and toggles all the bulbs which are multiple of 1, i.e. he switches all bulbs to on. Second person toggles all multiples of 2, i.e he turns of even bulbs. Third person comes and toggles all multiples of 3. This process continues till 100 persons pass. After this, how many bulbs are ON?

Hint

Consider the bulb number 9.

Answer

10 bulbs

Solution

We notice that for a perfect square (like 9), the number of factors are always odd, for example:

Number of factors of (16) = # [1,2,4,8,16] = 5

Note that for non-square numbers, factors are even.

As a factor toggles the state of a bulb, bulb number 9 will be toggled by 1,3 & 9. Thus bulb number 9 will switch ON, OFF, ON respectively. Note that odd number of factors cause bulb 9 to be ON at the end.

We note that for odd number of factors is the cause of bulb staying on at the end. Similarly every squared digit bulb will be switched on, and rest will remain off after all factors toggle. Thus the bulbs 1,4,9....81,100 are ON, at the end. Hence 10 bulbs are on.

Number of factors of (16) = # [1,2,4,8,16] = 5

Note that for non-square numbers, factors are even.

As a factor toggles the state of a bulb, bulb number 9 will be toggled by 1,3 & 9. Thus bulb number 9 will switch ON, OFF, ON respectively. Note that odd number of factors cause bulb 9 to be ON at the end.

We note that for odd number of factors is the cause of bulb staying on at the end. Similarly every squared digit bulb will be switched on, and rest will remain off after all factors toggle. Thus the bulbs 1,4,9....81,100 are ON, at the end. Hence 10 bulbs are on.

Easy | Probability |

We have a weighted coin which shows a Head with probability p, (0.5<p<1). How do we get a fair toss from this? That is, how do we toss this coin in such a way that we can have probability of winning = loosing = 50%?

Hint

Clearly we cannot have a fair toss in a single flip of this coin. But by tossing this coin 2 times, we can assign the outputs to "win" or "loose", such that we have a 50% chance for both.

Answer

Toss 2 times, mapping HT to "win", TH to "loose" and repeat the process otherwise.

Solution

Toss the coin twice. If consecutive Heads-Tails appears (HT), we "win". In case of (TH), we "loose". If (TT) or (HH) appears, repeat the process. Probability of infinite repetition (p*p*.....) + (1-p)*(1-p)*.... = 0 + 0 = 0;

Probability of H-T and T-H is equal hence it's fair now.

I proposed a faster method, "lets keep tossing the coin to form a sequence of H's & T's . I win if HT appears before TH" . Was I bluffing?

Actually yes, the probability of HT before TH is just p in second game.

Probability of H-T and T-H is equal hence it's fair now.

I proposed a faster method, "lets keep tossing the coin to form a sequence of H's & T's . I win if HT appears before TH" . Was I bluffing?

Actually yes, the probability of HT before TH is just p in second game.

Source: Common

Enable Like and Comment Latest solved Puzzles

Color Switches Weird Sequences Intersecting Pillars Consecutive sums Scaling a Square Difficulty Level

© BRAINSTELLAR |