1. There are 100 prisoners in separate cells, and there's a
room with a light bulb that can be either on or off. The
prisoners can visit the room one by one. They can also
toggle the light bulb. How can they determine when all 100
prisoners have visited the room?
Solution: One prisoner (Prisoner 1) initially turns the light
on. As each prisoner enters the room, if the light is already
on, they leave it on. If the light is off, they toggle it on.
Prisoner 100 knows all prisoners have been there when
he sees the light is already on.
2. There are 25 red balls, 47 green balls, and 3 blue balls
in a basket. What is the minimum number of balls the blind
man has to pick to ensure at least 2 balls of different
colors?
Solution: The blind man would have to pick 49 balls to
ensure at least 2 balls of different colors because there
are only 3 colors to choose from. If he picks 49 balls of the
same color, the next ball he picks will be of a different
color.
3. You have a rectangular chocolate bar consisting of 8x8
squares. You can break it along the lines into smaller
rectangles. What's the minimum number of breaks needed
to divide the chocolate into 64 individual squares?