forehead has asked for the wisdom of the Perl Monks concerning the following question:

here's the problem: we have 5 little square and we can use these to get 12 types of polygon. like:
-----, |___|, --|_ , etc.

now put all these polygons into 6*10's matrix, no blank left, every polgon only can be use once. it also can rotate left to right or front to back.

in my try, i've got at least 4 solutions to make all 12 polygon into 6*10 matrix. and now I want to know the all solutions to the problem. of course , we need perl to look up.

any monks could give the code to answer the question?

and further more, if the matrix is 5*12 ?

Title edit by tye

Replies are listed 'Best First'.
Re: martix
by thor (Priest) on Jun 17, 2003 at 12:41 UTC
    Are you trying to solve the pentominos problem? From your description, it sounds a lot like that. If that's the case, be forewarned that because most people don't do this in real life, but only because it was assigned to them as a homework problem, you might not get much help. However, now that you know the name of the problem, you could probably ask Google and see how it goes.

    thor

Re: martix
by halley (Prior) on Jun 17, 2003 at 14:42 UTC
    See my Pentominos Solving Quine. Be warned that the 6x10 board has 2336 unique solutions and could take a plain Perl script running on one average machine a few months to brute-force it for all solutions.

    --
    [ e d @ h a l l e y . c c ]

      cooool, I'll check, thanks very much!