MathOverflow is a question and answer site for professional mathematicians. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got the following problem,

I've got a fixed size square and within there are a fixed number of rectangles to be contained within it. I want the rectangles to cover the maximum amount of space within the square. The size of the rectangles is determined by a weighting. The higher the value of an individual weight of a rectangle, the bigger its surface area.

Assuming I have a predetermined weighting for all 9 rectangles, how do I derive at the coordinates (for their position in the square) and their dimensions (width and length).

this has had me puzzled, hope someone can help me out...thanks!!

share|cite|improve this question
Could you make your question a bit more specific? – Thierry Zell Aug 15 '10 at 2:55

With no more constraints than this, a simple tiling arises by making all the lengths the same as the side of the square, and the widths proportional to the weights.

In other cases, there are existing algorithms (for example, cUtting board out of logs) that employ such heuristics. Care to tell us more?

Gerhard "Ask Me About System Design" Paseman, 2010.08.14

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.