# Writer's Block

This puzzle was invented by Oskar van Deventer, and made by Recent Toys. It consists of a hinged box, of which the lid is a frame containing 7 ballpoint pens. The buttons of those pens keep the lid locked in place, but if they were all pressed in the box would open. The buttons can only be pushed by using a key that is provided. The key can be inserted into the frame, pushing in some of the pen buttons, and so switching those pens on or off. There are 8 ways of inserting the key, each affecting a different set of pens. The aim is to open the box by switching all the pens on.

The eight ways of applying the key affect the following pens:

1. 1, 3, 4, 5
2. 2, 4, 5, 6
3. 2, 3, 4, 6
4. 3, 4, 5, 7
5. 1, 2, 5
6. 2, 3, 6
7. 2, 5, 6
8. 3, 6, 7

## The number of positions:

There are 7 independent pens, each with two states, giving 27 = 128 possible positions. All 128 positions can be reached

## Solution:

If all pens are off, then the following 4 moves will switch them all on: 125, 367, 256, 2456.

## Solving one by one:

If you wish to affect any individual pen, then do one of the following sequences:

PenMoves
11345, 2346, 256
22456, 3457, 367
33457, 1345, 125, 367, 256
42346, 236, or its mirror image 2456, 256
53457, 1345, 367, 125, 236
62346, 1345, 125
72346, 3457, 256

## Solving optimally:

If you wish to solve it in the minimum number of moves, then use the table below. If an odd number of the set of pens shown on the right need to be changed, then do the move on the left.

MovePens
13451, 3, 5, 6
34572, 3, 5, 7
1253, 5, 6
3672, 3, 5

There are now only 8 possible patterns left, including the solved one. They can be solved optimally as follows:

PensMoves
2, 3, 4, 62346
2, 4, 5, 62456
2, 3, 6236
2, 5, 6256
3, 52346, 2456 or 236, 256
42346, 236 or its mirror image 2456, 256
3,4,52346, 256, or its mirror image 2456, 236

The above table can be summarised as:
If 2 and 6 are both already correct, then do any move that changes them both. Now it can be solved in one move.

## Theory:

This is the one of the few non-trivial puzzles in which the order that the moves are performed is unimportant (i.e. the puzzle positions form an Abelian group). This means that it is not necessary to do any particular move twice or more during the solution because we could change the order to do them one after the other, and they then cancel down to doing that move at most once. Other puzzles of this kind are the Lights Out puzzles, and Rubik's Clock. Using the methods on the Lights Out Mathematics page this puzzle can easily be analysed, resulting in the solution above.