100 prisoners are stuck in the prison in solitary cells. The warden of the prison got bored one day and offered them a challenge. He will put one prisoner per day, selected at random (a prisoner can be selected more than once), into a special room with a light bulb and a switch which controls the bulb. No other prisoners can see or control the light bulb. The prisoner in the special room can either turn on the bulb, turn off the bulb or do nothing. On any day, the prisoners can stop this process and say "Every prisoner has been in the special room at least once". If that happens to be true, all the prisoners will be set free. If it is false, then all the prisoners will be executed. The prisoners are given some time to discuss and figure out a solution. How do they ensure they all go free?
There are three boxes on a table. One of the box contains Gold and the other two are empty. A printed message contains in each box. One of the message is true and the other two are lies.
The first box says "The Gold is not here".
The Second box says "The Gold is not here".
The Third box says "The Gold is in the Second box".
The king of Octopuses has servants who have six, seven or eight legs. The distinguishing characteristics of the servants is that the one with seven legs always lie but the one with either six or eight legs speak the truth always.
One day, four servants meet and converse:
The black one says, 'We have 28 legs altogether.'
The green one says, 'We have 27 legs altogether.'
The yellow one says, 'We have 26 legs altogether.'
The red one says, 'We have 25 legs altogether.'
Can you identify the colour of the servant who is speaking the truth?
I can sizzle like bacon,
I am made with an egg,
I have plenty of backbone, but lack a good leg,
I peel layers like onions, but still remain whole,
I can be long, like a flagpole, yet fit in a hole.
I am beautiful, up in the sky. I am magical, yet I cannot fly. To people I bring luck, and to some people, riches. The boy at my end does whatever he wishes. What am I?