in reply to Rectangle packing...

This one is an NP-complete problem. Look here for more information on this particular type which is called "tiling problem".