in reply to help with nesting

Isn't this known, and described, as the Knapsack Problem?

Replies are listed 'Best First'.
Re: Re: help with nesting
by dragonchild (Archbishop) on Oct 01, 2003 at 17:01 UTC
    It would be if the problem was worded as so:

    I have a piece of 8.5 x 11 paper and a set of rectangles to cut. Tell me either one:

    • How many rectangles can I fit on the paper?
    • What is the fewest number of cuts for the largest number of rectangles?

    The problem, as stated, is different. "Given a set of rectangles, what is the smallest piece of paper that will encompass all the rectangles with the smallest amount of waste?" The reason this isn't a Knapsack is because the overall paper-size isn't constricted. (At least, the OP didn't restrict it in the statement.)

    ------
    We are the carpenters and bricklayers of the Information Age.

    The idea is a little like C++ templates, except not quite so brain-meltingly complicated. -- TheDamian, Exegesis 6

    Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.