[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: [ANN] LuaTango: generalization of Knuth's Dancing Links
- From: Dirk Laurie <dirk.laurie@...>
- Date: Tue, 24 Jan 2012 22:14:46 +0200
Knuth's "Dancing Links" refers to a program `dance.w` that he wrote in
CWEB to solve the exact cover problem. He showed that `dance` can
solve Sudoku's.
I needed something that can solve Kakuros. You can get `dance` to do
it but it really requires some more sophisticated steps than just
plain dancing. Hence, Tango.
To celebrate my Lua birthday (12 months of Lua programming) I wanted
to write a nontrivial Lua program involving substantial use of
userdata, and a generalization of `dance` to the multiple subset sum
problem seemed to be killing two birds with one stone.
Mainly as a backup for the package, not because I think it will have
any users except myself, I've uploaded it to my Lua site:
https://sites.google.com/a/aims.ac.za/experimental-mathematics/lua/luatango-0.9.2.zip
However, the documentation is quite thorough (I was discovering Anansi
at the same time) and if anyone wants to try it, at least it won't be
necessary to guess what the program does.
I don't plan any further additions to the package: the 0.9.2 is my
estimate of how close it is to the presumably bug-free 1.0.0. I am
however working on some applications that start out with
libtango = require "libtango"
For example, I can confirm that the Tetris Cube puzzle does indeed
have 9839 solutions as claimed by the manufacturers.