Puzzle: Four glasses are placed on the corners of a square plate which can rotate about its center. Glasses are either upright (up) or upside-down (down) in no known number.
A person is made blindfold and seated next to the rotating plate. The blindfold person has to re-arrange the glasses so that they are either all up or all down which will be signalled by the ringing of a bell.
The glasses can be rearranged in turns, following the given rules:
- In a single turn, any two glasses can be inspected and following three actions can be done by the person:
- The person can reverse the status (upright or upside-down) of either of the glass.
- The person can reverse the status (upright or upside-down) of both the glasses.
- The person can let the status (upright or upside-down) of glasses as it is i.e. no change.
- After each turn, the square plate is rotated through a random angle.
Help the blindfolded person by devising an algorithm that ensures all glasses in the same position (either up or down) in a finite number of turns. The algorithm must not depend on luck i.e. it should be non-stochastic.
- Turn 1: Choose a pair of glasses which are diagonally opposite and turn both the glasses up.
- Turn 2: Choose a pair of adjacent glasses, at least one of the glass will be up because of the previous step. If the other is down, then turn that glass up as well. If the bell does not ring, then now there are three glasses up and one down.
- Turn 3: Choose a pair of glasses which are diagonally opposite. If one is down, then turn it up and the bell will ring. If both the glasses are up, then turn one down. There are now two glasses in down position and they must be adjacent.
- Turn 4: Choose a pair of adjacent glasses and reverse both the glasses. If both the glasses were in the same position then the bell will ring, otherwise, there are now two glasses down and they must be diagonally opposite.
- Turn 5: Choose a pair of glasses which are diagonally opposite and reverse both the glasses. Now, all the glasses are in the same position either up or down and the bell will ring.
- Puzzle | Upside-Down Glasses
- Puzzle | Four Alternating Knights
- Puzzle 34 | (Prisoner and Policeman Puzzle)
- Puzzle 51| Cheryl’s Birthday Puzzle and Solution
- Puzzle | 3 Priests and 3 devils Puzzle
- Puzzle 15 | (Camel and Banana Puzzle)
- Puzzle 24 | (10 Coins Puzzle)
- Puzzle 27 | (Hourglasses Puzzle)
- Puzzle 28 | (Newspaper Puzzle)
- Puzzle 29 | (Car Wheel Puzzle)
- Puzzle 31 | (Minimum cut Puzzle)
- Puzzle 33 | ( Rs 500 Note Puzzle )
- Puzzle 36 | (Matchstick Puzzle)
- Puzzle 38 | (Tic Tac Toe Puzzle)
- Puzzle 39 | (100 coins puzzle)
- Puzzle 81 | 100 people in a circle with gun puzzle
- Puzzle 85 | Chain Link Puzzle
- Puzzle | Elevator Puzzle
- Puzzle | Man fell in well Puzzle
- Four People on a Rickety Bridge
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : Chinmoy Lenka