Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. 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 have a rectangle with 200 width and 100 height. I have a mix pool of 50 rectangles and boxes. The rectangles comes in shapes like 20x40, and 40x20. The boxes will come in shapes of 20x20 and 40x40. So lets say If I want to fit the highest number of boxes and rectangles in this bigger rectangle in order to leave no space. How I can achieve it other that bin packing algorithm or rectangle packing algorithm. And if I should pick one of those algorithms, is there a good implementation out there for this scenario ?

share|cite|improve this question

Even the simpler one-dimensional version, where you have a line segment of a certain length, and you want to pack shorter line segments into there, is a very hard problem called bin-packing. Sorry, there's no easy answer to your question.

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.