Imagine a grid of columns you must fill. You are handed a pile of rows, each row marking a few of the columns. Your job sounds easy: pick a handful of rows so that every column is covered exactly once — no column left empty, no column covered twice.
That single rule — exactly once — is the whole game. It is the abstract heart of fitting pentominoes into a board (every cell filled once, no overlaps) and of solving a Sudoku (every cell, row, column and box satisfied exactly once). Phrase the puzzle as columns-and-rows and these all become the same problem: exact cover.
The catch is the same one that haunts so much of computer science. Checking a proposed set of rows is instant. Finding one, in the worst case, can force you to wander through an exponential thicket of combinations.
Comments
Loading comments...