# open a box with 4 locks [duplicate]

You have 4 spacial locks with arrows on them, each facing up or down (you don't know the start order), on each corner of a box.

You can only check if all of them are facing the same direction (all arrows are to the same direction UP or DOWN) - as the box opens when they do.

You have 3 switches -

1) changes one of the locks randomly to the opposite state

2) changes randomly two close locks states (corners with a line between them - up right + up left \ up right +bottom right \ up left+bottom left \ down left+down right) total of 4 options

3) changes randomly two far locks (up left +bottom right \ up right+ bottom left) total of 2 options

Each turn you play you can check if the box opens.

What is the series of clicks that will open the box no matter the initial order of the locks arrows?

• I've seen this puzzle on here before. Can't find the original though - I think it had latches doors and each latch could lock the left or right door
– Deusovi
Commented Sep 17, 2015 at 11:09
• Didn't ring a bell for me, I tried to solve it on my own. Commented Sep 17, 2015 at 11:56
• It's a bold move choosing the name "King of Puzzlers" for yourself. This isn't rand al'thor's new account, is it? ;) Commented Sep 17, 2015 at 12:44

First, let's isolate the ones 2 right and 2 wrong:
1 1 / 0 1
0 0 / 1 0
Let's call these 'A' and 'B'

Can we find a combination, using switches 2 and 3, that is guaranteed to lead to a valid solution (0000 or 1111)?
From starting position A, using switch 2 will either solve, or lead to position B. Using switch 3 will always turn it into case B (or it's inverse). Using switch 2 and then switch 3, from starting position A, we'll either solve after one move, or solve in two (A to B, then solve B)
From starting position B, switch 3 is a guaranteed solve, whereas switch 2 leads to state 'A'. Using switch 2 then switch 3 will lead to a guaranteed state 'A'.

So 2/3/2/3 will: Solve a starting state A in one or two moves. Solve a starting state B in at most 4 moves (solve in one, or turn to 'A' in two, then solved in one or two more).

Now let's assume we do a proces 2/3/2/3, and no solution comes up. This means we have a setup where 3 of the switches are the same, and one is different. Using switch 1 once, will solve it, or turn it into a 2 up/2 down situation. Either way that implies it's in position A or B.

Summary:
2 / 3 / 2 / 3 / 1 / 2 / 3 / 2 / 3 should yield a guaranteed solution in at most 9 tries.

• Upon the question being edited to refer to a similar question, it appears the 2/3/2/3 routine is shorter solved as 3/2/3. Using my terminology from my answer, it means: state A will undergo this proces: A / A / B / solved, and state B will undergo this proces: B/solved. That was indeed shorter, but hey, common sense got me a fair bit of the way. Commented Sep 17, 2015 at 12:09