Solution of Blind Bartender's Problem
What was the puzzle?
Below is the algorithm which makes sure the bell will ring in at most five turns.
1.On the first turn choose a diagonally opposite pair of glasses and turn both glasses up.
At this point, the position of other 2 glasses is not known.
2.On the second turn, choose 2 adjacent glasses. One of them was turned up in the previous step, so other may or may not in up position. If the other is down then turn it up and if remaining one X is also in up position then bell will be rung.
If the bell does not ring then there are now three glasses up and one down(3U and 1D).
3.On the third turn choose a diagonally opposite pair of glasses. If one is down, turn it up and the bell will ring.
And if you find both are up, then you must have chosen other diagonally opposite pair.
If so, then turn one down so that 2 glasses are up and other 2 are down.
4.On the fourth turn choose two adjacent glasses and reverse both. If both were in the same orientation then the bell will ring.
And in case, if you find one is up and other down like -
still reverse orientation of both as -
Now diagonally opposite pairs are either up or down.
5.On the fifth turn choose a diagonally opposite pair of glasses and reverse both.
The bell will ring for sure.
Comments
Post a Comment