Prisoners and a Bulb

There are 100 prisoners in solitary cells. There is a central living room with one light bulb in it, which can be either on or off initially. No prisoner can see the light bulb from his or her own cell. Everyday the warden picks a prisoner at random and that prisoner visits the living room. While there, the prisoner can toggle the light bulb if he wishes to do so. Also, at any time every prisoner has the option of asserting that all 100 prisoners already have been in the living room. If this assertion is false, all 100 prisoners are executed. If it is correct, all prisoners are set free.

The prisoners are allowed to get together one night in the courtyard and come up with a plan. What plan should they agree on, so that eventually someone will make a correct assertion and they will be set free?

First the prisoners should elect one of them to be a leader and the rest – followers. The first two times a follower visits the living room and sees that the light bulb is turned off, he should turn it on; after that he shouldn’t touch it anymore. Every time the leader visits the living room and sees that the light bulb is turned on, he should turn it off. After the leader turns off the lightbulb 199 times, this will mean that all followers have already visited the room. Then he can make the assertion and set everyone free.

Battleship

A battleship starts moving at 12 PM from an integer point on the real line with constant speed, landing on every hour again on an integer point. Every day at midnight you can shoot at an arbitrary point on the real plane, trying to destroy the battleship. Can you find a strategy with which you will eventually succeed to do this?

If we know the starting point of the battleship and its speed, then we can determine its position at any time after 12 PM.

There are countably many combinations (X, Y) of starting point and speed. We can order them in the following way:

(0, 0) – starting point 0, speed 0;
(0, 1) – starting point 0, speed +1;
(1, 0) – starting point 1, speed 0;
(0, -1) – starting point 0, speed -1;
(1, 1) – starting point 1, speed +1;
(-1, 0) – starting point -1, speed 0;
(0, 2) – starting point 0, speed +2;
(1, -1) – starting point 1, speed -1;
(-1, 1) – starting point -1, speed 1;
(2, 0)- starting point 2, speed 0,
and so on. Of course, we can choose the ordering in many different ways.

Now we can start exhausting all possibilities one after another. First we assume the combination is (0, 0), calculate where the battleship would be at midnight during the first day and shoot there. Then we assume the combination is (0, 1), calculate where the battleship would be at midnight during the second day and shoot there. If we continue like this, eventually we will hit the battleship.

Soccer Ball

Almost everyone knows how a soccer ball looks like – there are several black regular pentagons on it and around each of them – five white regular hexagons. Around each hexagon there are three pentagons and three more hexagons. However, can you figure out how many pentagons and hexagons are there in total on the surface of the ball?

Let the number of pentagons is equal to P and the number of hexagons is equal to H. Then the number of edges is equal to (5P + 6H)/2 – that’s because every pentagon has five edges, every hexagon has 6 edges and every edge belongs to 2 sides. Also, the number of vertices is equal to (5P + 6H)/3 – that’s because every pentagon has five vertices, every hexagon has 6 vertices and every vertex belongs to 3 sides. Now using Euler’s Theorem we get P + H + (5P + 6H)/3 – (5P + 6H)/2 = 2, or equivalently P/6=2 and therefore P = 12. Since around every pentagon there are exactly 5 hexagons and around every hexagon there are exactly 3 pentagons, we get H = 5P/3 = 20. Therefore there are 12 pentagons and 20 hexagons on a soccer ball.