Classics Collection

Classics Collection: Snake

We continue with our beginners series. Our plan is to publish one more group of puzzles after this one and then conclude the Classics Collection with a fifth online contest. But first things first; here is today’s set: Snake

Rules: Draw a snake into the grid that does not touch itself, not even diagonally. The snake cells are numbered; head, tail and perhaps more parts of the snake are given (in particular, the cell containing the number 1 and the cell containing the highest number must mark the two ends of the snake). The numbers outside the grid indicate how many snake cells appear in the respective row or column, including those already given.

Example and solution:

Snake is a popular puzzle type which has been around for quite a while. It is worth mentioning that there are several rule sets for Snakes; they are of course extremely similar, but some of the details vary. For example, sometimes the snake cells are not numbered (hence the length of the snake segments between the given parts is not known). Also, head and tail may not be given but most be located as part of the solve. Finally, there are Snake puzzles with full information outside the grid.

It is difficult to say which version of the rules is the most prevalent or which comes closest to a “standard”. Personally, I prefer the instructions as given above. In particular, as was the case for some other puzzle types (e.g. Magnets), incomplete information can be a good idea to distinguish certain solving steps.

The non-touching rule has been the topic of some discussion – well, not the rule itself, but the wording. Basically, it says that there cannot be any enclosed area of empty cells (every cell not part of the snake must be connected to the border of the grid). However, just in case you want to be a smartass, it is also supposed to mean that there cannot be any 2×2 blocks of snake cells. Every cell occupied by the snake except head and tail must have exactly two adjacent snake cells, and whenever two snake parts lie in neighboring cells, the difference of the respective numbers must be minimal (1 for orthogonally adjacent cells, 2 for diagonally touching cells).

This brings us to the matter of notation. It can be painfully slow to use the full notation (i.e. enter numbers for all the snake cells and also mark all other cells as empty). In practice, many solvers prefer to simply draw a line for the snake and check the unused cells only if they are somehow important for the solving logic. The notation of a simple line is typically accepted in live contests. As for the snake cell numbers, it may be sufficient to enter them for very few cells where the numbering is actually relevant.

The point is, Snake is a highly intuitive puzzle type which can often be solved incredibly fast. Top solvers will therefore avoid “slow” logic in the heat of battle. In fact, it is quite common that a solver studies the general global behavior of the snake, draws something which comes close to a solution and eventually tries to make some adjustments so that all the clues are satisfied. (This what I usually do myself.)

Let us discuss solving steps. Since these puzzles are so intuitive, it feels a little weird to go very deep with logical explanations; I will only sketch a couple of techniques here. In the end, I believe one most discover Snakes by oneself in order to become really good at them.

As with many other puzzle styles, the most informative clues (outside the grid) are either very large or very small ones. Intermediate clues typically do not yield anything interesting at the early solving stages. It should be pointed out that a clue of 0 virtually never occurs: Since snakes are by definition connected, a row or column with a zero clue would imply that the entire snake lies on one side of the clue. But then one obtains a whole bunch of zeroes, and the entire puzzle could simply be presented on a smaller grid right away.

There is nothing deep about large clues. When the clue value equals the grid size (as in the bottom row of Snake 1 from the PDF file), all the cells in the respective row/column must be part of the snake, and one can draw a long segment right away. By the way, this is already an instance where the full notation is useless – after all, we do not know the exact numbers for the snake cells at this point.

Note that the cells R6C2 through R6C6 must all be unused due to the non-touching rule (this always happens near the intermediate parts of a known snake segment). As a consequence, all the remaining cells in Column 2 must again be part of the snake. Such “clue reductions” following other steps are typical for Snakes, they serve to exploit intermediate clues at later stages.

The next point of interest is that all “open ends” of snake segments we have located must somehow be connected with each other, and there cannot be any dead ends. In particular, there is only one way to go from the snake cell R7C1, and likewise for the second corner cell R7C7. The cells R6C1 and R5C1 as well as R6C7 and R5C7 must therefore be part of the snake.

Let us briefly study small clues. A clue of 1 – as in Snake 2 from today’s puzzle sheet – means that the row/column in question can be crossed exactly once. Ergo, there is one part of the snake on one side of the clue, then something we might call a “passage” or a “transition”, and finally another part of the snake entirely on the other side. This does not give us as much as the large clues in Snake 1, but it is something worth keeping in mind. Among other things, it tells us that the snake cannot go left from the head (the cell marked with the number 1), hence this cell has to remain empty.

A clue of 2 can either be used for a single transition – which means the snake remains for one step in the critical row/column – or for two passages. Have another look at the same grid: The snake must visit the rightmost column (because of the clue outside the grid), and then it has to return to the left part. It follows that the clue of 2 above Column 5 must be used for two transitions.

Moving on. There is an interesting observation which turns out to be the starting point for a great many Snake puzzles. Suppose a snake enters and leaves a boundary row/column, then it must occupy at least three of its cells (try to understand the essence of this statement). This implies, for example, that such a row/column with a clue of 3, 4 or 5 must have a single contiguous segment there. The situation occurs several times in the puzzles from today’s set.

The possibilities for the respective segment are often limited, and they may share common cells which must be part of the snake in any case. For instance, the 5 in the bottom row of Snake 2 must occupy the cells R7C3, R7C4 and R7C5. (This inference can be coupled with the implications from the clue of 1 above Column 3.)

Please note that the previous argument regarding clues in boundary rows and columns only works when the end points of the snake are known to lie outside the row/column in question. In the first puzzle we see a snake with a tail in a corner, hence the implications for the rightmost column are different: We know from earlier that there is a segment of length 3 in the bottom-right part, and the fourth cell in Column 7 is already given. Thus no other cell in that column can be part of the snake.

By the way, if the puzzle rules are such that head and/or tail of the Snake are a priori unknown, then this kind of step collapses entirely. Incidentally, this is one major reason why I do not like the alternative rule set: Many logical steps lose their power (at least some of it), and the solving path appears clumsy and sluggish.

There are some other interesting clue constellations, but I will only mention one more. When there are several large clues in adjacent rows/column, it may be necessary to pack the snake cells in this part of the grid as tightly as possible. It is virtually impossible to give a precise formula, so let us just look at Snake 4 for an example. The 5 and 6 near the eastern border of the grid leave very few options; you will note that a single long segment in Column 7 leads to a contradiction. Therefore, the snake must enter the rightmost column twice, and there is only one possible pathway in this region to satisfy both clues at the same time.

We finish our introduction to Snakes with a few thoughts concerning solving steps which either do not use the clues at all or which are heavily based on snake parts in the grid that are already known. One step of major importance is that certain open ends cannot be connected prematurely. This is where the numbered snake cells come into play.

In Snake 3, for example, the given snake cells R2C3 and R4C4 cannot be connected directly. As we have remarked earlier, a connection is already established via a diagonally touching cell. As a consequence, neither of the cells R3C3 and R3C4 can be used by the snake. A similar situation is present in Snake 4. This may not strike you as a big deal; the point is, this kind of argument occurs all the time, basically whenever a new piece of the snake has been located.

Such steps can occasionally be combined with the implications from clues. For instance, in Snake 2 we deduced from the clue of 1 that there must be a transition between Column 2 and Column 4, but the passage cannot lie in any of the three top rows. Also note that a single large clue can be affected by the presence of a known snake cell nearby, as in Snake 3: The cells R1C2, R1C3 and R1C4 cannot all be part of the snake at the same time, hence the other four cells in the top row must be used by the snake.

Finally, regarding the numbers of the snake cells: They can be used to decide whether snake parts which must be connected can be united directly or via a detour. For example, you will find that the cell R7C6 is part of the snake and carries the number 7 (or 15, but the latter is impossible). Now, the 1 and the 7 are six steps apart no matter what, so they must be brought together without any detour.

On the other hand, the cell R1C6 in the same grid will be occupied by the snake cell 17, and this is quite a long way from the 26 nearby. The two must eventually be linked, but since their grid distance is five steps, a detour covering four more snake cells must be found. Likewise, the top-left corner cell in Snake 3 (which we have seen to be part of the snake a few paragraphs earlier) must be linked to the 17, but not directly: once again, some extra steps are required.

I am aware that some of the last explanations were brief and vague. As I said before, I believe one must explore Snakes by oneself to some degree in order to get really familiar with them. Anyway, enjoy the puzzles.

2 replies on “Classics Collection: Snake”

Leave a Reply

Your email address will not be published. Required fields are marked *