Skip to content


Subversion checkout URL

You can clone with
Download ZIP
A human way to specify exact cover problems
C Perl Perl6 Makefile
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Dancing Links is a technique for speeding up exact cover searches. See
these links for inspiration.


== Loose plan

Implement exact cover search with Dancing Links in Perl 5, then C, then
Perl 6. Solve these problems, if possible:

* SEND+MORE=MONEY and other alphametics problems
  (an interesting variant is 
   where the object is to find all solutions which
   maximizes MONEY)
* N-queens: both 2D (grid) version and 1D (row) version
* Pentominoes (see Knuth's paper above)
* Sudoku
* Hidato
* The xkcd knapsack problem <>
* Map coloring
* Nonogram
* Magic square
* Anagrams

That should be more than enough. :-)

But the actual search -- while interesting in itself, and important to get
right -- wouldn't be the focus of this project. Instead, the challenge
would be to create adequate ways to *specify* the above problems, in ways
that are as close as possible to the way a person would specify the problem
to another person.

This way, we approach the dream of specifying problems not in the way the
computer expects, but in the way we expect.


All the exact cover problems can be re-stated as big, boring matrices. The
filters/preprocessors that we write would take a human problem specification
and translate it to a boring matrix. The solution could then be mapped onto
the original problem specification, making it extremely readable for the one
specifying the problem. The boring matrices are error-prone and, well,
boring. But this way, all the user sees is her own "views" of the problem.
Something went wrong with that request. Please try again.