Jaap's Puzzle Page

Brain-chek

Brain-chek Stoplight Brain-chek PhD Magic Path

The Brain-chek puzzles consist of a 5x4 square grid, and a slider that can move along the edges of that grid. Each square has a dial, spot or other marker that changes whenever the slider moves along an edge of that square.

There are several versions. The markers of the Stoplight version (pictured above left) are pictures of stoplights which obviously have 3 states, red, yellow, green. A move along an edge of a stoplight in the clockwise direction will make it change its colour from red to green, green to yellow, or yellow back to red. A move in the opposite direction changes the light the other way. The aim is of course to make all the lights green (or all red), preferably ending with the slider at a corner.

The PhD version, pictured above middle, has both arrows and dots. The arrows have three states, and turn one step in the same direction as the direction you move the slider along an edge, similar to the Stoplight version. The dot in the centre only has two states (white or green in the picture), and changes with every move along the square's edge. Combined, the arrow and dot give each square six states.

There are also versions with just the dots, either with pictures eyes that open or close, or of faces with noses that change colour.

Lastly, there is a version where you can select the difficulty by choosing one of three sliders - one slider changes only dots, another only arrows, the third changes both. The sliders are stored in little compartements at the top of the puzzle, and can be inserted onto the grid by removing a small piece of the bottom edge of the frame.

This puzzle is a remarkable piece of mechanical design. There is a clever mechanism that locks the arrows/dots in place, and which is only released when the slider passes by. This ensures that the arrows/dots are never dislodged unintentionally.

Steven Kunreuther is the inventor/designer of the puzzle. It has taken him a long time to market it, so many of the variants of this puzzle that have found their way into puzzle collectors' hands are from relatively small prototype batches that were produced in order to promote it to puzzle manufacturers and distributors. The version with three sliders of varying difficulty has been produced in Taiwan under the name Magic Path by Getin Fun Creativity Co.

There is some interesting mathematics behind this puzzle. There is an explanation of it after the solution below. [Skip to the maths section.]

If your browser supports JavaScript, then you can play Brain-chek by clicking the link below:

JavaScript Brain-chek

The number of positions:

The Brain-check has 20 markers. It turns out that each marker can be set independently, i.e. without affecting the state of any other markers. This means that there are 220, 320, or 620 marker positions depending on which version of the puzzle you have. If you also want to include the position of the slider in your calculation, you should multiply this by 5×6 = 30, because the slider can be at any of the 30 grid points. This gives the following results:
Puzzle Name  Positions
Blinking Eye  30·220  =31,457,280
Stoplight 30·320=104,603,532,030
PhD 30·620=  109,684,753,201,889,280

Solution:

  1. Bring the slider to just below the second row.
  2. Solve the top row in the following manner:
    1. Choose a first row marker that you wish to change.
    2. Move the slider horizontally towards the same column as the chosen first row marker.
    3. Move the slider around the square directly below the incorrect marker. Do this as often and in whatever direction is necessary to fix the first row marker. Note that no other first row markers are changed by this.
  3. Repeat step b until all the first row markers are correct.
  4. Apply steps a-c to the second row, third row and fourth row. Now everything is solved except the last row.
  5. Move the slider to the right hand corner.
  6. For each of the incorrect markers in the bottom row, do the following:
    1. look up the marker in the tables below.
    2. Move the slider up the right hand side, to just below the top row.
    3. The row of numbers from the table indicate how often and in which direction the slider must pass along the top edges of the top row squares. For example, -1,0,0,0 would mean that you have to move along the top edge of the first square leftwards, i.e. anti-clockwise around that square. Do this now for the numbers you found in the table.
    4. Move the slider to the right hand side and then down to the bottom right corner, so you can do the same thing for the other bottom row markers.
  7. Now repeat steps a-e once more. If you did step f correctly, the result should be that the bottom row turns out solved.

Note that step f is the only one where the slider goes along the top edges of the grid.

Here are the tables for the different versions:

2-state puzzle
Bottom row positionTop row moves
1 0 0 00 0 0 1
0 1 0 00 0 1 0
0 0 1 00 1 0 0
0 0 0 11 0 0 0
3-state puzzle
Bottom row positionTop row moves
1 0 0 0 0,-1, 1, 1
0 1 0 0-1, 1, 0, 1
0 0 1 0 1, 0, 1,-1
0 0 0 1 1, 1,-1, 0
 
-1 0 0 0 0, 1,-1,-1
0 -1 0 0 1,-1, 0,-1
0 0 -1 0-1, 0,-1, 1
0 0 0 -1-1,-1, 1, 0
6-state puzzle
Bottom row positionTop row moves
1 0 0 0 0, 2,-2, 1
0 1 0 0 2,-2, 3,-2
0 0 1 0-2, 3,-2, 2
0 0 0 1 1,-2, 2, 0
 
2 0 0 0 0,-2, 2, 2
0 2 0 0-2, 2, 0, 2
0 0 2 0 2, 0, 2,-2
0 0 0 2 2, 2,-2, 0
 
3 0 0 0 0, 0, 0, 3
0 3 0 0 0, 0, 3, 0
0 0 3 0 0, 3, 0, 0
0 0 0 3 3, 0, 0, 0
 
-2 0 0 0 0, 2,-2,-2
0 -2 0 0 2,-2, 0,-2
0 0 -2 0-2, 0,-2, 2
0 0 0 -2-2,-2, 2, 0
 
-1 0 0 0 0,-2, 2,-1
0 -1 0 0-2, 2, 3, 2
0 0 -1 0 2, 3, 2,-2
0 0 0 -1-1, 2,-2, 0

Alternatively, below I have made pictures that show circuits that change only one bottom row marker.

 

If you can solve the 2-state and the 3-state versions of the puzzle, then you can also solve the 6-state PhD puzzle. Simply solve the arrows first just like the 3-state puzzle. Then solve the dots just like the 2-state puzzle except that you do everything 3 times so that the arrows are not affected.

The mathematics of the puzzle

The mathematics behind this puzzle is very similar to Lights Out. There are three key insights that are needed in order to fully analyse the game.

  1. If you move the slider along two different circuits, one after the other, then the order of those two circuits doesn't matter.

In the example below, the slider goes clockwise around one square, and then clockwise around the square to its left. The same effect is achieved by going around the left square first.

Insight 1

  1. Any circuit can be split up as the sum of circuits around individual squares.

As you can see in the previous example, going around two adjacent squares one by one in the same direction has the same effect as going once around their combined 1x2 rectangle. Similarly, going around any area has the same effect as going around each square individually. All the internal edges are traversed in both directions and so their effects cancel out, leaving only the effect of travelling around the outermost path.

Insight 2

  1. Any circuit can be applied regardless of where the slider is.

Simply move the slider towards any part of the circuit by any route, go around the circuit, and then take the same route back. This leaves the slider in the same position, the effects of the route to and fro cancel each other, so the only change is that the markers have been affected by the circuit itself.

Insight 3

From 1 and 2 it follows that we can solve the puzzle by Linear Algebra in the same way as Lights Out. Simply consider a clockwise circuit around a single square to be one move, the equivalent of a button press in Lights Out. Such a move advances its own marker 4 times, and sets back all the adjacent markers once. We could set up a matrix of how each move affects the markers, and then invert it to get a matrix showing which moves to do to affect each marker individually. From 3 above it follows that we can do that solution regardless of what these moves are and where the slider is. So we can solve the puzzle by first moving the slider to its final spot, then calculating the solution by a matrix multiplication, and finally applying that solution by circumnavigating each square the number of times given by the solution.

The 'Light Chasing' technique that is used in Lights Out is very effective here too, as seen in the solution described above. We can solve any row of markers by doing circuits around the squares in the row below them. This allows us to reduce the size of the matrix to 4x4, and its inverse is what is used in the tables of the solution.

Once a solution is found, there is a further question to be answered. What is the best way to apply that solution?

It is nearly always inefficient to move along an edge in one direction and later move along that same edge in the other direction, as it is often possible to rearrange the order in which you do the moves to make this unnecessary. The only exception is when the solution would otherwise consist of disjoint circuits.

Also, if a marker has N possible states then going clockwise k times around a circuit has the same effect as going N-k times around anti-clockwise. Therefore you can often reduce the length of the solution by going around some squares in the other direction.

In general it is not clear to me if there is a really quick way to know for sure whether a solution path is as short as possible. Things are simpler in the case where each marker has only two states. The direction in which the slider moves along an edge doesn't matter, both directions have the same effect. The resulting graph can therefore be assumed to be undirected. All double edges can be removed, and only if that leaves a disconnected graph add the minimal amount of double edges needed to make it connected again. After all this, any Eulerian path (path that uses up all the edges of the graph exactly once) will be an optimal solution.