## Jun 6 The Blind Bartender Problem

There are four glasses resting on the corners of a square Lazy Susan. Each of them is either the right way up or upside down. A blind bartender can perform the following operation as many times as they want: they may inspect any two glasses and then flip over either, both or neither of them. After each inspection the Lazy Susan is spun some multiple of 90 degrees by a second party, but the bartender doesn't know by how much it has been spun.

The question is: how can the bartender get all four glasses the same way up as each other in a finite number of moves? The bartender wins when all four glasses are up, or all four are down, irrespective of whether the bartender realises it.

...

This is one of those puzzles where it is surprising that it is surprising that it is even possible. The key realisation to have is that the bartender has two different ways they can pick two glasses to inspect. Either they can pick glasses which are adjacent or diagonally opposite from each other.

Step 1: Take two glasses which are diagonally across from each other and turn them up. Either you win, or you progress on.

Step 2: Take two glasses which are adjacent and turn them up. With this move you have necessarily already double handled one glass along with both of the glasses adjacent to it. Either you win immediately, or you are faced with the situation below:

At this stage it feels like we are mostly done; but just picking random pairs in the hope of hitting the remaining glass doesn't necessarily solve the puzzle in finite time. You might keep getting unlucky. Instead:

Step 3: Take a pair of diagonal glasses. If one is face down then flip it up. Otherwise flip one of the glasses face down. You will have something like this:

Step 4: Take an adjacent (honestly, I've written that word so many times in this article and spell check is still having to correct me) pair and turn both to their opposite orientation. If you picked two that were already in the same position then you will be left with either four up or four down. Otherwise you will be in the situation below.

Step 5: Finally, take two diagonally opposite glasses and turn them over. You have won.

Work has been done to generalise the problem for n glasses. For n=3 you can solve it in 2 moves (have a little think), but for n=5 and above you cannot guarantee a solution in a finite number of moves.

More generally if you have n glasses, but you are allowed to inspect and turn over k glasses, rather than just 2, it can be solved when  k ≥ (1 − 1/p)n, where p is the largest prime factor of n. I'm not even going to go there. Have a photo of my cat instead: