Sorting and calculating center of gravity
No.12503501 ViewReplyOriginalReport
Quoted By: >>12503636 >>12503749 >>12503756
How would you guys approach this problem?
>Lets say we have x objects which vary in weight from 1 to 100 kg.
> we have a 10x10 grid, that does not have a weight and if empty is perfectly balanced in its center
We must now sort the objects on this grid, so it is as close to perfectly balanced as possible. No space can have more than 1 object on it.
I have been stumped on this one for a couple of days. Tried running a random sorting program but that takes way too long.
Was thinking of trying a loop that would fill 4 space at a time from heaviest to lightest and then within those 4 spaces set them so they are as perfectly balanced as possible.
Any ideas are welcome
>Lets say we have x objects which vary in weight from 1 to 100 kg.
> we have a 10x10 grid, that does not have a weight and if empty is perfectly balanced in its center
We must now sort the objects on this grid, so it is as close to perfectly balanced as possible. No space can have more than 1 object on it.
I have been stumped on this one for a couple of days. Tried running a random sorting program but that takes way too long.
Was thinking of trying a loop that would fill 4 space at a time from heaviest to lightest and then within those 4 spaces set them so they are as perfectly balanced as possible.
Any ideas are welcome
