[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Programmers Contest: Fit pictures on a page

Devin Mullins

6/29/2005 9:52:00 PM

My guess is one of two things:

1. What's the smallest circumscribing rectangular area in which you can fit a collection of fixed-size non-overlapping rectangles, and what is their orientation? The size of a circumscribing rectangular area is its area -- that is, width * height.
2. If you're allowed to resize each individual rectangle to your heart's content, but must keep the aspect ratio of each the same (90 degree rotation is ok, though), how can you arrange the rectangles on another, fixed-size rectangle (the paper) in a way that minimizes whitespace (measured in total area of whiteness)?

Devin



> > Or is it possibly, what's the minimum number of (uniformly
> > dimensioned?) boundries required to FIT the n shapes? THIS sort of
> > problem is one I come across regularly in woodworking; how do I
> > minimize the number of sheets of plywood (etc.) needed to cut out all
> > the pieces of a given construction?
>
> I *think* that is probably what they were trying to get at. Lets say
> you have 50 pictures of varying sizes. The problem then is to try to
> minimize the number of pages that are needed to print all 50 pictures.
>