Click to See Complete Forum and Search --> : Algorithm to problem!!!


kcakir
March 1st, 2009, 12:27 PM
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

dglienna
March 1st, 2009, 11:32 PM
Homework? Don't you know? The answer is ALWAYS: B

kcakir
March 2nd, 2009, 03:17 AM
It is not homework. if you have any idea about the topic write your idea dont search why i ask

Zachm
March 2nd, 2009, 07:16 AM
and they want the minimum area includes all rectangles

By "minimum area" do you mean "minimum rectangular area" ?
If the required area is not bound to some geometric 2D shape, then the "minimum area" is exactly the area sum of all the rectangles.

Regards,
Zachm

kcakir
March 2nd, 2009, 04:20 PM
I forgot to say it will be a 2d shape it will be a rectangle!

Zachm
March 3rd, 2009, 12:40 AM
Even simpler versions of the problem you described are known as NP-Complete. You can try using an approximation algorithm. See this (http://www.csc.liv.ac.uk/~epa/) link for example.

Regards,
Zachm

kcakir
March 4th, 2009, 03:31 PM
Thanks for your help but it looks i must search a lot