An array with destructive updates (IO/ST) may help. You can also look into the exact cover problem and dancing links. If I recall correctly, this problem can be  transformed to a 729*324 matrix.

在 2012-1-3 上午8:10,"Peter Hall" <peter.hall@memorphic.com>写道: