Need your intelligence and knowledge!!

Hi to all!
I search an algorithm to that problem:
You have N rectangles N is may be between 0 and 1000. You must arrange them with the least area. You are given the dimensions of all rectangles (may be square you know from math all squares are rectangle ).
and they want the minimum area includes all rectangles and coordinates of left corner of each rectangle assuming (0,0) the upper left corner.
Thans for your help


  • I believe that is a famous NP-complete problem. NP-complete roughly means that if you want the best solution (the one that gives the smallest area) you'll have to try every combination possible, which is probably unthinkable with 1000 rectangles.
    However there might be good suboptimal algorithms. They would depend on your rectangles. Can they be of any size? Or just multiples of a smallest unit (1x2, 2x3 ...)?
  • There isnt any relation between dimensions.but there is a limit for dimensions. they can be 1000000 maximum.
  • And i forgot to say the last area will be a rectangle also. Briefly we will make the smallest rectangle with rectangles.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!