1
$\begingroup$

Given the dimensions of two rectangles, i need to know how many smaller rectangles can fit the bigger one. It should account for mixed orientations meaning that the smaller rectangle can both be landscape and portrait when fit inside the bigger rectangle.

Example image

Is there a math equation for this?

Thanks!

  • 0
    Going by how you've packed the rectangles in your image, it should say $2\times 5$ rectangles, not $3\times 5$. Also, you can fit *eight* of them in the $7\times 12$ rectangle by packing six along the length $12$ edge, and two more in the leftover space.2012-01-17
  • 0
    thanks for the correction, will correct it soon. So how do i go about finding the optimal solution for this?2012-01-17
  • 0
    If I knew, I would have posted an answer. But someone else has...2012-01-17

1 Answers 1