Tag: Hard

Loading...

Alice secretly picks two different integers by an unknown process and puts them in two envelopes. Bob chooses one of the two envelopes randomly (with a fair coin toss) and shows you the number in that envelope. Now you must guess whether the number in the other, closed envelope is larger or smaller than the one you have seen.

Is there a strategy which gives you a better than 50% chance of guessing correctly, no matter what procedure Alice used to pick her numbers?

Choose any strictly decreasing function F on the set of all integers which takes values between 0 and 1. Now, if you see the number X in Bob’s envelope, guess with probability F(X) that this number is smaller. If the two numbers in the envelopes are A and B, then your probability of guessing correctly is equal to:

F(A) * 0.5 + (1 – F(B)) * 0.5 = 0.5 + 0.5 * (F(A) – F(B)) > 50%.

Loading...

There are 5 houses and each of them has a different color. Their respective owners have different heritages, drink different types of beverages, smoke different brands of cigarettes, and look after different types of pets. It is known that:

  1. The Brit lives in the red house.
  2. The Swede keeps dogs as pets.
  3. The Dane drinks tea.
  4. Looking from in front, the green house is just to the left of the white house.
  5. The green house’s owner drinks coffee.
  6. The person who smokes Pall Malls raises birds.
  7. The owner of the yellow house smokes Dunhill.
  8. The man living in the center house drinks milk.
  9. The Norwegian lives in the leftmost house.
  10. The man who smokes Blends lives next to the one who keeps cats.
  11. The man who keeps a horse lives next to the man who smokes Dunhill.
  12. The owner who smokes Bluemasters also drinks beer.
  13. The German smokes Prince.
  14. The Norwegian lives next to the blue house.
  15. The man who smokes Blends has a neighbor who drinks water.

The question is, who owns the pet fish?

The German owns the pet fish.

Since the Norwegian lives in the leftmost house (9) and the house next to him is blue (14), the second house must be blue. Since the green house is on the left of the white house (4), the person living in the center house drinks milk (8), and the green house’s owner drinks coffee (5), the fourth house must be green and the fifth one must be white. Since the Brit lives in the red house (1) and the Norwegian lives in the leftmost house (9), the leftmost house must be yellow and the center house must be red. Therefore, the colors of the houses are: YELLOW, BLUE, RED, GREEN, WHITE.

Since the Norwegian from the yellow house smokes Dunhill (7), the man from the blue house must keep a horse (11). The person smoking Blends cannot be in the red house, because this would imply that the person in the green house keeps cats and the Swede keeps dogs in the white house (2, 10). However, in this case the Dane must be drinking tea in the blue house (3) and the person smoking Blends does not have a neighbor drinking water (5), which is a contradiction (15). Also, the person smoking Blends cannot be in the green house, because this would imply that the person in the white house drinks water (15), the Dane lives in the blue house (3), and the German and the Swede live in the last two houses. Since the German smokes Prince (13) and the Swede keeps dogs (2), there is nobody who could smoke Bluemaster and drink beer (12). The person smoking Blends cannot be in the white house either, because this would imply that the person in the green house drinks water (15), when in fact he drinks coffee (5).

Therefore, the person smoking Blends must be in the blue house, and then the German and the Swede must live in the last two houses (2, 13). Since the person who smokes Bluemasters drinks beer (12), this must be the Swede with his dogs in the white house (2). The only option for the person who smokes Pall Mall and raising birds (6) is the red house. Then the Norwegian must keep cats (10) and the German is left with the pet fish in the green house.

Loading...

Two moms, Sarah and Courtney, are talking to each other.

Sarah: I have two children.
What is the probability that both of Sarah’s children are boys?

Courtney: Me too! Do you have any boys?
What is the probability that both of Courtney’s children are boys?

Sarah: Yes, I do! What is your younger child?
What is the probability that both of Sarah’s children are boys?

Courtney: It is a boy. He is so mischievous!
What is the probability that both of Courtney’s children are boys?

Sarah: Is he Sagittarius? Sagittarius boys are known to drive their mothers crazy. I can testify from personal experience.
What is the probability that both of Sarah’s children are boys?

Courtney: No, but actually I have the opposite personal experience to yours.
What is the probability that both of Courtney’s children are boys?

Sarah: Well, I guess astrology does not always get it right.

Courtney: I assume it does about half of the time.

The answers are: ~1/4, ~1/4, ~1/3, ~1/2, ~23/47, 1.

Explanation:

Initially, we do not have any information about the children and therefore the chance that both of them boys is 1/2 × 1/2. This applies to the first and the second question.

After Sarah says that she has at least one boy, there are equal possibilities that she has Boy + Boy, Boy + Girl, or Girl + Boy. Therefore, the chance that both children are boys is 1/3.

After Courtney says that her younger child is a boy, the only remaining question is what is the gender of her older child, and therefore the chance is 1/2.

The fifth exchange implies that Sarah has a Sagittarius boy. There are 23 combinations such that both children are boys and at least one of them is Sagittarius. There are 47 combinations such that at least one of the children is a Sagittarius boy. Therefore, the chance that both children are boys is 23/47.

Finally, Courtney says that her younger child, which is a boy, is not Sagittarius, but her personal experience with Sagittarius boys is positive. Therefore, her older child is a Sagittarius boy and the chance is 1.

Loading...

Alex and Bob are playing a game. They are taking turns drawing arrows over the segments of an infinite grid. Alex wins if he manages to create a closed loop, Bob wins if Alex does not win within the first 1000 moves. Who has a winning strategy if:

a) Alex starts first (easy)
b) Bob starts first (hard)

Remark: The loop can include arrows drawn both by Alex and Bob.

In both cases, Bob wins. An easy strategy for part a) is the following:

Every time Alex draws an arrow, Bob draws an arrow in such a way, that the two arrows form an L-shaped piece and either point towards or away from each other. Since every closed loop must contain a bottom left corner, Alex cannot win.

For part b), Bob should use a modification of his strategy in part a). First, he draws a horizontal arrow. Then, he splits the remaining edges into pairs, as shown on the image below. If Alex draws one arrow on the grid, then Bob draws its paired arrow, such that the two arrows point either towards or away from each other. The only place where a loop can have a bottom left corner is where Bob drew the first arrow. However, if a loop has a bottom left corner in this positio, then it must have at least one more bottom left corner, which is impossible. 

Loading...

I give you a pen and paper and ask you to write the numbers from 1 to 100 in succession so that there are no three numbers such that twice the second one is equal to the sum of the first and the third one. The three numbers do not need to be successive in the sequence.

You have 5 minutes, what do you do?

Remark: The sequence 3, 1, 2, 5, 4 works, but the sequence 1, 4, 2, 5, 3 does not because of the numbers 1, 2, and 3.

Start with the following sequences:

1  →  1, 2  →  2, 4, 1, 3  →  4, 8, 2, 6, 3, 7, 1, 5  →  8, 16, 4, 12, 6, 14, 2, 10, 7, 15, 3, 11, 5, 13, 1, 9

and keep iterating until you get a sequence with all numbers from 1 to 128. On each step you take the previous sequence, multiply all elements by 2, and then add the same result but with all elements decreased by 1. This will ensure that the first half contains only even numbers and the second half contains only odd numbers. Since the sum of an odd and an even number is not divisible by 2, if some sequence violates the property, then the previous sequence would have violated it as well.

Once you construct a sequence with 128 numbers, simply remove the numbers from 101 to 128 and you are done. To speed up the process, you can reduce the sequence 8, 16, 4, 12, 6, 14, 2, 10, 7, 15, 3, 11, 5, 13, 1, 9 to 8, 4, 12, 6, 2, 10, 7, 3, 11, 5, 13, 1, 9 and then continue the process.

Loading...

Bob and Jane are taking turns, placing knights and coins respectively on a chessboard. If Bob is allowed to place a knight only on an empty square which is not attacked by another knight, how many pieces at most can he place before running out of moves? Assume that Jane starts second and plays optimally, trying to prevent Bob from placing knights on the board.

Bob can place at most 16 knights. One way to do this is to keep placing knights only on the 32 white squares. In order to see that Jane can prevent Bob from placing more than 16 knights, split the board in four 4×4 grids. Then, group the squares in each grid in pairs, as shown on the image below. If Bob places a knight on any square, then Jane will place a coin on its paired square. This way Bob can place at most one knight on each of the four red squares, one knight on each of the four green squares, one knight on each of the four brown squares, and one knight on each of the four blue squares. Therefore, he can not place more than 64/4 = 16 knights on the board.

Loading...

There are three light bulbs in your attic. All of them are turned off and their switches are installed downstairs. You can play with the switches as much as you want and after that, you can visit the attic above just once. How can you find out which switch to which bulb corresponds?

You turn the first switch on, then wait for 30 minutes and turn the second switch on. After that go upstairs and examine the bulbs. The one which is turned off corresponds to the third switch. The one which is turned on and is still cold corresponds to the second switch. The one which is turned on and is hot corresponds to the first switch.

Loading...

100 prisoners are given the following challenge: They will be taken to a room and will be arranged in a column, such that each of them faces the backs of the of the ones in front. After that, black and red hats will be put on their heads, and the prisoners will be asked one at a time what is their hat color, starting from the one at the back of the column. If a prisoner guesses his color correctly, he is spared, if not – he is executed. If every prisoner can see only the hat colors of the prisoners in front of him in the line, what strategy should they come up with, so that their losses are minimized?

There is a strategy which ensures that 99 prisoners are spared and there is 50% chance that one of them is executed. Clearly, one can not do better.

The strategy is the following: The first prisoner (at the back of the line) counts the number of black hats of the prisoners in front and says BLACK if the number is odd and RED if the number is even. Then the second prisoner counts the number of black hats in front of him, figures out whether his hat is black or white, and announces its color. The third prisoner counts the number of black hats in front of him and knowing what the second prisoner’s hat is, figures out what color his own hat is. The prisoners continue in the same manner until all 99 prisoners in the front guess their hat colors correctly. The chance for survival of the first prisoner is 50%.