Some of the puzzles for the Tantrix game require you to make a loop of a specific colour. The rules require that:-
The best strategy for solving these puzzles seems to be to find a loop of the specific colour without trying to match the other colours, and then to rearrange tiles as necessary to satisfy the first rule. This gives an easier problem to solve, one which is more amenable to analysis. Some results for this problem are presented below.
When the colours not on the loop are ignored, a reduced set of only three different tiles can be used:-
The bend and corner tiles contribute 60° or 120° of “turning”, respectively, but the sense of this turning depends on whether they are convex or concave with respect to the interior of a loop.
For each tile in a loop, two edges are crossed by the loop. Of the remaining four edges, those on one side of the loop are internal to the loop—those on the other side are external. It is useful to indicate the internal edges by bold lines, as shown below:-
It can be seen that e = 2 - t in all cases. The number of internal edges can conveniently be used to label these five tile configurations as T0, T1, T2, T3, and T4.
Let N be the number of tiles in a loop, T the total turning, and E the total number of internal edges (counting each shared edge once only). Then 2E = 2N - T, since each edge is shared between two tiles. It is clear that the total turning must be 360°, so T = 6, and E = N - 3.
Because of the second rule, the internal edges must form a connected tree, without loops. Except for the shortest loop N = 3, which has E = 0,the internal edges provide a “skeleton” of a loop, from which the arrangement of tiles can unambiguously be deduced. When there is no branching, the skeleton zig-zags between two endpoints, with any number of bends in between.
Each occurrence of a 3-way junctionintroduces a branching and an additional endpoint. Loops can be classified by the number of endpoints, P. Each endpoint corresponds to a T0 tile.
Let a given puzzle have S straights, B bends, and C corners, so N = S + B + C. If there are P endpoints, it can be shown that the number of tiles of each type to satisfy E = N - 3 must be:-
The number of tiles of each type must be a nonnegative integer, which requires that the following constraints are satisfied:-
B is even
0 ≤ P ≤ C
C + 3 - B/2 ≤ 2P ≤ C + 3 + B/2
The number of T2 tiles is not shown, as the rule E = N - 3 can be satisfied regardless of the number of straights. When there are two endpoints, solutions can be found with any number of straights, or with none. When there are three or more endpoints, however, the interaction of tiles is more complicated, and a certain number of straights may be needed for a solution.
These ideas can be used to solve some puzzles from the Tantrix puzzle page.
First the 7 - Tile loop, which has 2 corners, 4 bends, and 1 straight, so C = 2, B = 4, and S = 1. This gives 0 ≤ P ≤ 2 and 3 ≤ 2P ≤ 7, so P must be 2. The number of tiles of each type is:-
A skeleton with 4 edges is required. It is useful to try out arrangements by marking the edges on graph paper printed with a hexagonal grid. Free graph paper can be downloaded from MathSphere. After positioning the T3, it is clear that the additional edge can only be positioned in two places to avoid branching to 3 endpoints. So the only solutions are this one and its reflection:-
The 9 - Tile loop has 4 corners, 4 bends, and 1 straight, so C = 4, B = 4, and S = 1. This gives 0 ≤ P ≤ 4
and 5 ≤ 2P ≤ 9, so P must be 3 or 4. The The corresponding numbers of tiles of each type, and some samples solutions follow:-
As well as solving puzzles, the skeleton construction makes it easier to devise elaborate patterns, such as this space-filling spiral:-
© Chris Jones, 2004