# Hamiltonian Plumbers

> Pipe every cell: join each pair of matching ends outside the grid, crossing only at the crossings.

Kind of puzzle: Lines

Web page: https://inkit.games/puzzles/hamiltonian-plumbers

## Origin

Portponky, the developer of the games Recursed and Only Sliding, made Hamiltonian Plumbers in 2021. Its setters draw the pipe ends as shapes; here they're numbers.

## Credit

- Inventor: Portponky (2021)
- Source: [Thinky Games](https://thinkygames.com/games/recursed/)

## Rules

1. Join each pair of matching pipe ends outside the grid with one pipe through the cells. Every cell has a pipe through it, and pipes never branch.
   - ✓ Right: Every cell used
   - ✗ Wrong: A cell left empty
2. Pipes cross only at the crossings, and go straight through them both ways: all four sides are used.
   - ✓ Right: Straight through
   - ✗ Wrong: No crossing there

## Worked example: First Pipes

A 5×5 Hamiltonian Plumbers puzzle, with exactly one solution.

The givens, as inkit's puzzle engine writes them (cells are [row, column] from 0 at the top left):

```json
[{"at":"edge","cell":[0,1],"side":"top","kind":"inlet","value":1},{"at":"edge","cell":[0,2],"side":"top","kind":"inlet","value":1},{"at":"edge","cell":[4,1],"side":"bottom","kind":"inlet","value":2},{"at":"edge","cell":[0,0],"side":"left","kind":"inlet","value":2},{"at":"edge","cell":[2,4],"side":"right","kind":"inlet","value":3},{"at":"edge","cell":[0,3],"side":"top","kind":"inlet","value":3},{"at":"edge","cell":[4,4],"side":"bottom","kind":"inlet","value":4},{"at":"edge","cell":[4,0],"side":"left","kind":"inlet","value":4},{"at":"cell","cell":[1,2],"kind":"crossing"},{"at":"cell","cell":[3,1],"kind":"crossing"}]
```

The solution is drawn on the web page: https://inkit.games/puzzles/hamiltonian-plumbers

## Playing on inkit

Drag from cell to cell to lay pipe; drag back over a pipe to take it up.
