AZTest
← All Logic Puzzles
Shapes & Symbols Pure Logic · No Guessing 100 Online Levels

Tents

Pitch a tent beside every tree with no two tents touching, matching row and column counts.

Alternative Names: Tents and Trees Camping Tentai (distinct from galaxies)

Basic Game Premise & Rules

Tents is an untimed, deterministic pencil-and-paper logic puzzle played on a grid. Every valid puzzle has exactly one unique solution that can be discovered through rigorous deductive reasoning alone, without trial and error or guessing.

Rules by Example

See how each rule looks when done correctly versus when violated:

A Tent Beside Every Tree

Every tree has a tent of its own in a cell that shares a side with it. A tent at a corner doesn't count, and one tent can't serve two trees.

✓ Correct The tent shares a side with its tree.
✗ Wrong The tent only touches the tree at a corner.
✗ Wrong Two trees but one tent: each tree needs a tent of its own.

Tents Never Touch

No two tents touch, not along a side and not at a corner. Trees may touch anything.

✓ Correct Each tent beside its own tree, with space between the tents.
✗ Wrong Two tents side by side.
✗ Wrong Two tents touching at a corner: that is not allowed either.

Count the Tents

The number beside a row, or above a column, is how many tents it holds. Cells you know are empty can be marked as grass.

20011110
✓ Correct Every row and column has its number of tents; the green cells are marked as grass.
20011110
✗ Wrong The second row needs a tent and has none; the last row should have none and has one.

History & Origins

Tents (originally *Tents and Trees*) was invented by Dutch puzzle creator Léon Balmaekers in 1989 and published by Breinbrekers in the Netherlands.

The puzzle was an instant international sensation. Its delightful camping metaphor makes graph-theoretic matching instantly understandable: campers pitch tents beside trees, but demand privacy (no tents touching, even diagonally). It was popularized in the UK by *The Daily Telegraph* and *The Times*, and in computer gaming by Simon Tatham's puzzle suite.

Mathematical Concepts & Computational Complexity

Beyond its entertainment value, Tents formalizes core principles of discrete mathematics, theoretical computer science, and combinatorics:

Bipartite Maximum Weight Matching

Tents can be modeled as finding a perfect matching in a bipartite graph B = (T, S), where T is the set of trees and S is the set of candidate tent sites. Edges connect each tree to its orthogonally adjacent sites. The problem adds mutual exclusion: no two matched sites in S may be adjacent in the King's graph.

NP-Completeness via Planar 3-SAT

In 2011, Marc van Kreveld, Maarten Löffler, and Elena Mumford proved that Tents and Trees is NP-complete. Even on grids where all row and column counts are small and trees are sparsely distributed, determining whether a valid tent placement exists is NP-complete.

Pigeonhole Counting & Row/Column Parity

When a row or column clue equals 0, all cells in that line are guaranteed to be grass. When the remaining empty cells in a line equal its required tent count, all those cells must be tents. Placing a tent immediately converts its 8 surrounding King's neighbors into grass.

References & Further Reading

  1. Balmaekers, L. (1989). 'Tents and Trees'. Breinbrekers, Netherlands.
  2. van Kreveld, M., Löffler, M., & Mumford, E. (2011). 'Tents and Trees is NP-complete'. International Journal of Computational Geometry & Applications.
  3. Tatham, S. (2004). 'Tents'. Simon Tatham's Portable Puzzle Collection.

Free Printable PDF Booklet

50 Levels Included · Solutions in Back

Download our beautifully formatted, high-resolution A4 puzzle booklet. Generated directly from the handcrafted levels on AZTest, it contains 50 puzzles ordered from gentle introductory boards up to master-level challenges, followed by complete solutions at the back.

Difficulty Stage Grid Size Description Puzzles
Intro 5×5 Small campsites with 0s and single-tree pairings. 3
Easy 5×5 to 6×6 Row/column full lines and King's non-touching grass fills. 12
Medium 7×7 to 8×8 Trees shared between multiple tent candidates. 12
Hard 8×8 to 10×10 Dense forest clusters requiring bipartite matching analysis. 12
Expert 10×10 Master wilderness maps with intricate cross-row parity dependencies. 11
📥 Download Tents Booklet (PDF) 1138 KB

Formatted for standard A4 printing. 4 puzzles per page provides ample workspace for pencil solving. Free to distribute for personal or educational use.

Explore More Logic Puzzles

Slitherlink

Connect dots to draw a single unbroken loop guided by surrounding cell numbers.

Wolves & Sheep

Draw a Slitherlink loop that fences the gentle sheep in and keeps the fierce wolves out.

Masyu

Draw one closed loop through cell centres that rigorously obeys the black and white pearls.

Nurikabe

Shade the sea to leave numbered white islands of exact sizes in one connected ocean.

Nonogram

Shade runs of cells according to row and column number clues to reveal a hidden picture.

Themed Nonogram

Solve color picture cross puzzles that blossom into vibrant pixel art upon completion.

Hitori

Shade the repeated numbers until every row and column has unique digits, keeping all white cells connected.

Kurodoko

Shade cells so every numbered circle sees exactly that many white cells in its row and column.

Mosaic

Shade cells guided by numbers that count how many cells around them are filled, revealing a hidden picture.

Binairo

Fill every cell with blue or white circles: never three in a row, every line half and half.

Heyawake

Shade rooms according to their clues without isolating unshaded cells or leaving long straight corridors.

Searchlights

Place light beams in white cells so that every numbered black post sees its exact clue count.

Light Up

Place light bulbs to illuminate every white cell without any two shining on each other.

Calcudoku

A Latin square where every outlined cage satisfies its arithmetic target and operator.

Skyscrapers

Place towers of heights 1 to N so that each outside clue sees the exact count of buildings.

Sum Skyscrapers

Skyscrapers where each outside clue is the sum of the heights of all visible buildings.

Suguru

The elegant polyomino number puzzle where no two identical digits can touch, even diagonally.

Futoshiki

A Latin square puzzle with inequality signs pointing between neighboring numbers.

Fillomino

Divide the grid into polyomino blocks where each cell's number equals the area of its block.

Galaxies

Partition the grid into rotational 180° symmetric galaxies, each centered on a single dot.

Shikaku

Cut the whole grid into rectangles and squares, each containing exactly one number: its area.

L-Pieces

Draw borders to partition all white cells into perfect four-cell L-shapes.

Numberlink

Connect pairs of matching numbers with continuous non-crossing paths covering the grid.

Bridges

Connect the island network with straight horizontal and vertical bridges into one united world.

Slant

Draw a diagonal slash in every cell matching the corner numbers, without ever closing a loop.

Marupeke

Place circles and crosses in every cell without creating three in a row in any direction.

Ready to play Tents?

Test your deduction skills online with 100 free interactive levels, automatic conflict detection, progressive hints, and continuous browser save state.

Start Playing Level 1 →