https://github.com/scriptraccoon/pentomino-tilings
Computation and Visualization of Pentomino Tilings
https://github.com/scriptraccoon/pentomino-tilings
Last synced: 9 days ago
JSON representation
Computation and Visualization of Pentomino Tilings
- Host: GitHub
- URL: https://github.com/scriptraccoon/pentomino-tilings
- Owner: ScriptRaccoon
- License: mit
- Created: 2023-11-11T05:44:36.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-26T00:04:46.000Z (over 2 years ago)
- Last Synced: 2025-11-30T08:59:45.265Z (7 months ago)
- Language: Python
- Homepage: https://pentomino-tilings.netlify.app
- Size: 496 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Exact cover problem and pentomino tilings
The [pentomino](https://en.wikipedia.org/wiki/Pentomino) tilings of a rectangle, where every one of the 12 pentominoes appears exactly one, can be interpreted as an [exact cover problem](https://en.wikipedia.org/wiki/Exact_cover) and hence enumerated with [Knuth's algorithm](https://en.wikipedia.org/wiki/Knuth%27s_Algorithm_X). This repository contains
- a Python implementation of this algorithm (see `/scripts`, the results are written to `/public/data`)
- a visualization of these made with Svelte, which is deployed at https://pentomino-tilings.netlify.app
The exact cover algorithm in `exactcover.py` may not be optimized, but the code is incredibly short because we use Python sets (not incidence matrices) and generators - we don't need the usual "select and deselect" step.
