Need your intelligence and knowledge!! - Programmers Heaven

Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Need your intelligence and knowledge!!

kcakirkcakir Posts: 3Member
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

Comments

  • schmiley397schmiley397 Posts: 3Member
    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 ...)?
  • kcakirkcakir Posts: 3Member
    There isnt any relation between dimensions.but there is a limit for dimensions. they can be 1000000 maximum.
  • kcakirkcakir Posts: 3Member
    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.