# Hive

> Each hexagon holds the smallest number that none of its neighbours has.

Kind of puzzle: Numbers

Web page: https://inkit.games/puzzles/hive

## Origin

Hive comes from Beast Academy's maths puzzle books for kids, and each number follows the "mex" rule that Sprague and Grundy used for games in the 1930s.

## Credit

- Popularized by: Beast Academy (Art of Problem Solving)
- Source: [Beast Academy Puzzles 4](https://beastacademy.com/books/puzzles4)

## Rules

1. Hexagons that touch never hold the same number.
   - ✓ Right: No two the same
   - ✗ Wrong: Two 1s touch
2. Each hexagon's number is the smallest one its neighbours don't have: a hexagon next to 1, 2 and 3 (and no 4) is 4.
   - ✓ Right: Next to 1, 2, 3: 4
   - ✗ Wrong: Should be 4, not 5

## Worked example: Little Hive

A 3×4 Hive 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":"cell","cell":[2,0],"kind":"number","value":3},{"at":"cell","cell":[2,2],"kind":"number","value":3},{"at":"cell","cell":[0,3],"kind":"number","value":3},{"at":"cell","cell":[1,1],"kind":"number","value":5},{"at":"cell","cell":[0,1],"kind":"number","value":3}]
```

The solution, a line per row:

```
2 3 1 3
1 5 4 2
3 2 3 1
```

## Playing on inkit

Tap a hexagon, then a number (or type it). Pencil notes keep track of what's possible.
