Classics Collection

Classics Collection: Magnets

Hi folks,
it is time for another installment of our beginners series. Today’s set is about Magnets, a puzzle type which appears to have been around for ages, probably longer than I have. To be frank, I was never very good at this puzzle style (neither composing nor solving). Thankfully, Ulrich gave me a hand and created this set, so here we are: Magnets

Before we get to the part about solving techniques, here is a short announcement. There will be another Beginners Contest soon (I was thinking end of the month), and I am planning to conclude this particular series after five more puzzle groups early next year. In 2022, I will be designing the puzzles for the online qualifier of the German Puzzle Championship, and there are a few more puzzle projects on the horizon, so the CC will likely end there and then.

Rules: Fill the grid with neutral (shaded) and magnetic plates. Each magnetic plate has two poles, represented by + and – signs. Poles of the same type cannot be horizontally or vertically adjacent. The numbers indicate how many poles of the corresponding type appear in the respective row or column.

Example and solution:

In the past I have often seen Magnets puzzles with full information (i.e. all clue numbers outside the grid were given). More recently, the puzzles I encountered had only a much smaller number of clues. At first that felt wrong, but it became soon apparent that partial information admits a more structured solving path and gave the author more control. As I see it, these puzzles tend to be much better.

When it comes to the solution code, it has often been customary to ask for the full contents of a couple of rows. There is a slight issue with the letters (sometimes p=plus, m=minus and n=neutral are used, but then one can easily get confused with the association p=positive and n=negative); still, the nature of the code is completely reasonable. Ulrich has made a different suggestion where only groups of cells must be entered (see the PDF file for details). It contains slightly less information but the solver has a better chance to notice a mistake he has made.

Regarding notation during the solve, there is not much to say, just one thing: One will frequently infer that a specific plate must be magnetic (i.e. not shaded), but the orientation of the poles remains unknown at that point. In such a case it is a good idea to somehow mark the plate. Personally I draw a small dot in either plate cell; the point is that the information must be preserved, since it will likely be of value later.

Now, first things first. The same magnetic poles are not allowed to touch each other orthogonally, hence each cell which is adjacent to both a positive and a negative pole must be shaded. This applies to the two cells R3C4 and R4C3 in Magnets 1 from today’s set, and we get two neutral plates immediately. Similarly, a plate must be shaded if both its ends lie adjacent to the same type of pole, such as the plate covering R3C3 and R3C4 in Magnets 2. Such constellations can be present right from the start if some contents are given, but they also come up quite frequently at later stages.

Next, let us study the clues. A clue of 0 means that no magnetic plate can lie entirely within the respective row/column (because such a plate would add both a positive and a negative pole to the clue). For example, the plate covering R2C5 and R3C5 in Magnets 1 must be shaded. On the other hand, if a row has clues for both plus and minus signs and the sum is large, one can go in the opposite direction and rule out neutral plates.

The simplest case is present when the two clues add up to the total size of the grid. (for simplicity we are dealing only with quadratic grids here, but this step works in any case). When that happens, every single cell of the row/column in question must contain a pole. And if one can determine which pole it is for just one of them, the entire row/column can be filled. In Column 1 of Magnets 1, all six cells must contain a pole, and R3C1 must contain a negative pole since it is adjacent to a given plus sign – there you go.

If the sum of the clues is 1 smaller than the maximum, there is one freedom for a shaded cell, but it is not possible for the row/column to contain an entire neutral plate. For instance, the two horizontal plates in Row 6 of Magnets 1 must be magnetic – this is one of the situations mentioned in the paragraph about notation. Likewise, the vertical plates in Column 4 and Column 6 of Magnets 2 as well as the horizontal plate in Row 5 must be magnetic.

Note that, if one cell of such a row/column is known to be shaded, all other cells must be magnetic. For example, we have already established that the cell R3C4 in Magnets 2 is neutral, hence all the other cells in this column must contain magnetic poles. However, in contrast to the previous situation, it is not possible yet to complete this column. The point is that we have two separate chains of magnetic poles, one in R4C1+R4C2, and the other starting from R4C4 downwards.

The situation can be generalized as follows. If both clue numbers for a row/column are given, we know the total number of magnetic poles and consequently the number of neutral cells as well. If as many neutral cells have been located, the remaining cells must all contain magnetic poles. Depending on the exact arrangement of the shaded cells, the rest of the row/column breaks down in some number of chains (contiguous sequences of magnetic poles, as in the previous paragraph).

It is often possible to enter some of the poles based on parity arguments, but I will not bore you with an exact formula, which would be far too chaotic anyway. One simply has to get a feeling for how to deal with these situations. For example, as we have seen before, Column 4 of Magnets 2 breaks down into a chain of length 2 and another of length 3. These cells must accommodate three positive poles and two negative ones. A chain of even length must always contain the same number of plus and minus signs – whether it consists of full plates or separate cells – and unless at least one entry can be determined by other means, two possibilities will remain. The lower part, however, must contain more positive than negative poles. The only way to achieve that is by entering positive poles in R4C4 and R6C4 and a negative pole in R5C4. The upper part remains ambiguous.

Let us take one step further in this direction. A row/column of size 2K can contain no more than K poles of the same kind. And if a clue of K happens to be given, the row/column can be broken down into pairs of cells, each of which must contain exactly one such pole – even if the other clue is not known at all. For instance, Column 6 in Magnets 3 must contain a negative pole in each of its plate (due to the clue of 3 for this column). As a consequence, it must be completely filled, and the clue of 0 in Row 4 tells us which way the poles must be entered.

Column 2 of the same puzzle has another clue of 3, but this time the clue is less informative. There is only one vertical plate inside this column, and from this clue alone one cannot immediately infer that the plate must be magnetic; there would be just enough space outside this plate to accommodate three positive poles. However, the clue of 0 helps again: We know that the plate covering R4C2 and R4C3 has to be neutral, and this leaves us with forced positive poles in R1C2 and R3C2 (with the corresponding negative poles in the same plates). The remaining plus sign could be located either in R2C5 or in R2C6.

The next solving technique is based on the difference of two clues for the same row/column. Let us have a look at Column 1 of Magnets 4. We need only one positive pole but three negative ones in this column. Since each vertical plate contributes both a plus sign and a minus sign, the difference can only come from horizontal plates. And as we have only two horizontal plates in this column available at all, both of them have to be magnetic: R1C1 and R6C1 must both be negative, R1C2 and R6C2 are positive.

If we look at Row 1 of this puzzle next, a similar (parity-based) kind of argument tells us that we either need both vertical plates in the top-right corner to be magnetic or both neutral. On the other hand, Row 6 must use exactly one of the two vertical plates in order to create the difference of 1 between positive and negative poles. The horizontal plate in the bottom-right corner has to be neutral, and using the parity argument again in Column 5 – not the only way to get there, but never mind – we can deduce that the plate covering R3C5 and R3C6 is neutral, too.

The difference technique can be extended to groups of rows or columns. The three rightmost columns in Magnets 5 must contain five negative poles but only three positive ones. Again, there are only two plates “exiting” this part of the grid, hence they both most be filled accordingly. This argument works only if entire row/column groups with full information are available, but if there are, it is often a good idea to consider the difference between positive and negative poles and see where the difference can come from.

These are most of the relevant basic techniques for Magnets puzzles. It is worth emphasizing that new applications of all the above steps arise during the solve. For example, the cell R4C4 in Magnets 2 is known to contain a positive pole at some point, therefore the plate covering the cell R4C3 has to be neutral. Every time the contents for one or more cells in a row/column with one or even two clues is discovered, one should investigate how this impacts the clue numbers.

It may be a good idea to check all the clues that are fully exploited (in the sense that they are satisfied, usually if the entire row/column in question has been completed). This way one can get an idea where to look next. A good example is Row 2 in Magnets 1. Early on one can infer that the horizontal plate is magnetic and that the two vertical plates covering R2C4 and R2C5 have to be neutral. Two cells remain unknown, but only one of them can contain the missing negative pole.

Sometimes the critical location is quite unremarkable. Look again at Magnets 5. So far we have only found two magnetic plates (R1C3+R1C4 and R4C3+R4C4) and one neutral plate (R2C4+R3C4). There seem to be hardly enough clues to go on; still, it is possible to make logical progress. Row 2 must contain two plus poles, and there are surprisingly few possibilities. The cell R2C5 in particular is unavailable – arguments of these kinds are often well hidden but can be crucial for the solve. Row 3 of Magnets 4 is yet another example.

So much about solving techniques (I have left out a few arguments, but nothing really deep). Some of the later puzzles in this set are a bit harder than Classics Collection average, they may need both difficult applications of the above steps and combination techniques. Still, I consider them useful examples to get more familiar with this style. Have fun with the puzzles!

Leave a Reply

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