Sudoku strategyBy the Shapedoku TeamPublished 6 min read

The Jellyfish Technique in Sudoku

In Sudoku the X-Wing, Swordfish and Jellyfish are one idea at growing sizes, so once you can read a single digit across two lines, the four-line Jellyfish is only a matter of scale.

The fish family in one sentence

A fish works on a single digit. If that digit is confined to a small set of columns across the same number of rows, then in those columns the digit can be removed from every cell that lies outside those rows. An X-Wing uses two rows and two columns, a Swordfish uses three of each, and a Jellyfish uses four of each; the size grows but the reasoning stays identical, since a base set of lines pins the digit into a matching set of crossing lines. To recognise a Jellyfish specifically, pick a digit and look at four rows. If, across those four rows, the digit can only appear within the same four columns, you have one. The candidates do not need to fill all sixteen intersections, and no single row has to use all four columns; each of the four rows simply has to keep the digit somewhere inside that shared group of four columns. The instant one row places the digit in a fifth column, the pattern is broken, so the whole configuration depends on those four rows staying loyal to just four columns between them.

A worked example

Let the digit be three, and suppose it behaves like this across four rows. Row one has three only in r1c2 and r1c7. Row four has it only in r4c3 and r4c9. Row six has it only in r6c2 and r6c9. Row eight has it only in r8c3 and r8c7. Take a moment to check the columns those eight candidates occupy: column two, column three, column seven and column nine, and nothing else. Four rows, four columns, every relevant three tucked neatly inside them. That is a textbook Jellyfish on the digit three, using rows one, four, six and eight as its base. Notice again that the rows use the columns unevenly, some picking columns two and seven, others three and nine, and that is perfectly allowed. The only condition that matters is the one we just verified: no three in any of these four rows escapes the set of four columns, which locks the pattern in place and lets you start clearing candidates elsewhere in those columns.

The elimination step

  1. Confirm the four base rows each keep the digit within the same four columns.
  2. Conclude that those four columns will each place the digit exactly once, and every one of those placements sits inside your four base rows.
  3. Therefore no cell in those four columns, outside the four base rows, can hold the digit.
  4. Erase the digit from every such cell, for example r2c2, r5c7 or r9c9 in the example above.
  5. Repeat the entire search with rows and columns swapped, since a Jellyfish can point either way.

Why the columns are forced

It is worth seeing clearly why those crossing columns get cleared, rather than taking it on trust. Each of the four base rows must place the digit somewhere, and by assumption that somewhere is always one of the four shared columns. Four rows contributing one placement each, all landing within four columns, means those four columns are completely spoken for by the base rows alone. A column can hold the digit only once, so as soon as its single slot is claimed by one of the base rows, no other cell anywhere in that column can be the digit. Run that argument over all four columns at once and every candidate outside the four base rows falls away. This is the same counting argument that underlies the X-Wing and the Swordfish; the Jellyfish just performs it with four lines instead of two or three, which is why the whole family feels so consistent once the smallest member makes sense.

A word of honesty, and when to reach for it

A note of honesty is in order. The Jellyfish is genuinely rare and easy to overlook, and most boards that appear to need one can actually be cracked another way. There is even a known result that any elimination a true Jellyfish offers on a standard puzzle could also be reached through other means, so it is more a tool for completeness and for the very hardest grids than a daily workhorse. Do not spend ages hunting a Jellyfish before trying coloring, a wing, or a simpler fish, all of which usually get there faster. Save it for the deep end, when a hard board has resisted your usual tools and a single stubborn digit seems spread thinly right across the grid. In Shapedoku that digit is a single glowing shape, so mapping where one shape can still go across four rows is really just scanning for that colour and form. Mark the candidates, check whether four rows stay locked to four columns, and if they do, enjoy pulling off one of the most elegant and satisfying eliminations the puzzle has to offer.

Ready to put it into practice?

Play Shapedoku free in your browser. No download, no login, just colorful shape Sudoku.

Play the Web App

Keep reading