http://qs321.pair.com?node_id=196303


in reply to Pentominos Solver

Square polyominos were obfuscated a long time ago using regexps. The program won as most creative of the OPC3 : the sources. If you remove the printing code that shows the progression of the search, it is relatively fast too. The trick used is to fold the board to make the problem unidimensional. I used it as a obfuscation trick to use regexp but it can be used as well as a performance boost.

BTW: there are 12 pentominoes, not eleven. Finding all of them is already quite a challenge.

You should check a Knuth paper that talks about dancing links to solve polyominoes problems and the N-Queens problem. The best book about about polyominos was written by Samuel Golomb and aptly titled polyominoes.

-- stefp -- check out TeXmacs wiki