Solution to the four glasses puzzle
I will use a "X" to represent a glass in an unknown position,
a 0 to represent a glass in normal position, and a 1 to represent
a glass in upside-down position.
All the diagram are given as examples only.
Starting point:
X X
X X
1. Take one side and flip it to 0:
X X
0 0
2. Take one diagonal and flip it to 0:
1 0
0 0
3. Now the fourth glass is necessarily a 1, otherwise you
have already won at step 2. Now take one side, if it is
10 or 01 put it to 00 and you win. if it is 00, put it
to either 01 or 10, and you get to one of the following
two possibilities (and all possible rotations of them):
1 0 1 0
a) b)
0 1 1 0
4. Now check a diagonal. If you get 00, you are in case a),
so you just turn it to 11 and you win. If you get 11 you
are in case a), turn it to 00 and win. If you get 10
(or 01) you are in case b), and you leave them as they are:
1 0
1 0
5. Take one side. If it is 00 or 11 you just flip both and
you win. If it is 01 or 10 you just need to swap them, so
you get:
1 0
0 1
6. Take one diagonal, if it's 00 turn to 11 and win. If it's
11 turn to 00 and win.