← Back to Blog
•6 min read

Inside-Outside Coloring: The Advanced Technique

Coloring cells as inside or outside the loop reveals hidden constraints that basic rules cannot find.

Seeing Beyond the Lines

When basic logic runs dry, pros turn to the most powerful tool in the Slitherlink arsenal: Inside/Outside Coloring (also known as the Jordan Curve Theorem application).

The loop divides the grid into two distinct regions: Inside the loop and Outside the loop.

The Coloring Rules

Pick a cell (usually outside the grid is "Outside"). Now look at its neighbors:

  • Cross a Line: If you move from Cell A to Cell B and cross a LINE, the region flips. If A is Outside, B must be Inside. (And vice versa).
  • Cross an X (Empty): If you move from Cell A to Cell B and cross an X (no line), the region stays the same. If A is Outside, B must be Outside.
  Cross a LINE → color flips     Cross an X → color stays

  ┌───────┬───────┐              ┌───────┬───────┐
  │  OUT  ║  IN   │              │  OUT  ×  OUT  │
  │       ║       │              │       ×       │
  └───────┴───────┘              └───────┴───────┘
       ═══ (line)                     × (no line)

How to Use This for Deduction

You can propagate these "colors" (Inside/Outside) across the grid even if you don't know where all the lines are.

Example: Suppose you have a "3" next to an Outside cell (border).
Case 1: The shared edge is a Line. Then the cell with "3" is Inside.
Case 2: The shared edge is an X. Then the cell with "3" is Outside.
But wait! A "3" cell must be Inside the loop (usually, depending on topology, but often it forces a region flip). If you find a contradiction where a cell "must be Inside" but your coloring path says "it's Outside," then your initial assumption about the edge was wrong.

  Propagating colors through a 3×3 grid:

  (border = OUT)
  ·═══·───·───·
  ║ IN│OUT│ IN║     Cross ═ → flip
  ·───·═══·───·     Cross ─ → same
  │OUT║ IN║OUT│
  ·───·═══·───·     Each cell is labeled
  │OUT│OUT│OUT│     by following the
  ·───·───·───·     coloring rules.

The Parity Argument

This is a more abstract version of coloring. Pick any row or column. Shoot a ray from the outside edge all the way through.
You must cross the loop an even number of times to end up back Outside.
If you have a row where you've already found 3 vertical lines and there is only 1 uncertain vertical edge left, that edge must be a line (to make the total 4, which is even). If it were an X, you'd have 3 crossings, meaning you end up Inside the loop at the edge of the board—impossible!

  Parity ray across a row:

  OUT │ ║  │  ║  │  ?  │ border
      │ ║  │  ║  │     │
  ────┘ ║  └──║──┘     └────
        ║     ║     ?
  Cross 1  Cross 2   Cross 3?

  Already 2 crossings (even → OUT). If the
  ray must end OUT at the border, the ? edge
  must be × (keeping count even = 2).

When to Use It

Use coloring when:

  • You have a sparse grid with few numbers.
  • You have disjointed loops and need to know if they can connect.
  • You need to check global validity.

This technique separates the masters from the apprentices. It turns a local puzzle into a global topology problem.