Crossroads The ACM Magazine for Students

Sign In

Association for Computing Machinery

Door Number…?  (WINTER 2015)


A criminal gets to pick his punishment by choosing among three rooms. 
The first is full of burning fires, the second is full of assassins with loaded guns, and the third is full of lions that haven't eaten in three years. Which room is the safest choice?


The third room. The lions must be dead by now.




When asked about his birthday, a man said: "The day before yesterday I was only 25 and next year I will turn 28."

This is true only one day in a year, when was he born?


He was born on December 31st and spoke about it on January 1st.




There are 5 ships in a port:

1. The Greek ship leaves at six and carries coffee.
2. The Ship in the middle has a black chimney.
3. The English ship leaves at nine.
4. The French ship with blue chimney is to the left of a ship that carries coffee.
5. To the right of the ship carrying cocoa is a ship going to Marseille.
6. The Brazilian ship is heading for Manila.
7. Next to the ship carrying rice is a ship with a green chimney.
8. A ship going to Genoa leaves at five.
9. The Spanish ship leaves at seven and is to the right of the ship going to Marseille.
10. The ship with a red chimney goes to Hamburg.
11. Next to the ship leaving at seven is a ship with a white chimney.
12. The ship on the border carries corn.
13. The ship with a black chimney leaves at eight.
14. The ship carrying corn is anchored next to the ship carrying rice.
15. The ship to Hamburg leaves at six.

Which ship goes to Port Said? Which ship carries tea?


The Spanish ship goes to Port Said and the French ship carries tea. However, tea can be carried by the Brazilian ship, too.

If you understood position 'to the right' to mean anywhere on the right side from the given point (not only right next to).

French 5:00 tea blue Genoa
Greek 6:00 coffee red Hamburg
Brazilian 8:00 cocoa black Manila
English 9:00 rice white Marseille
Spanish 7:00 corn green Port Said
(SOURCE: MathsisFun)

Survival of the Sheep (SPRING 2015)


There is an island filled with grass and trees and plants. The only inhabitants are 100 lions and one sheep.

The lions are special:

  • They are infinitely logical, smart, and completely aware of their surroundings.
  • They can survive by just eating grass (and there is an infinite amount of grass on the island).
  • They prefer, of course, to eat sheep.
  • Their only food options are grass or sheep.

Now, here's the kicker:

  • If a lion eats a sheep, he turns into a sheep (and could then be eaten by other lions).
  • A lion would rather eat grass all his life than be eaten by another lion (after he turned into a sheep).

Assume that one lion is closest to the sheep and will get to it before all others. Assume that there is never an issue with who gets to the sheep first. The issue is whether the first lion will get eaten by other lions afterwards or not. Also assume the sheep cannot get away from the lion if the lion decides to eat it. Do not assume anything that hasn't been stated above.

Will that one sheep get eaten or not and why?


The sheep would remain untouched. In fact, the sheep would remain untouched if there is an even number of lions on the island, and would be eaten immediately if there is an odd number of lions on the island.

Here's the reasoning:

Consider a scenario with just one lion and one sheep: The lion will eat the sheep. Why? Because after he eats it and turns into a sheep himself, there aren't any lions on the island to eat him, so he is happy.

Now look at a scenario with two lions and one sheep. Here the sheep would remain unharmed. Why? Because if any one of them eats it, and turns into a sheep himself, he knows that he awaits certain death because he will then be a sheep and the other lion will be the only lion on the island and nothing will stop him from eating the sheep.

So now we know for a fact one lion and one sheep—sheep gets eaten. Two lions and one sheep—sheep doesn't get eaten.

We can now make a conclusion about three lions and one sheep: The sheep will definitely be eaten, because the lion that eats it will know that by eating he leaves behind two lions and one sheep (himself). And as we already know two lions and one is a situation where the sheep survives.

You can use the same logic to go on to four lions and one sheep, and then all the way to 100 or 1000, but it will always be true that with an odd number of lions the sheep gets eaten and with an even number the sheep doesn't.

(SOURCE: Braingle)