home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!haven.umd.edu!ni.umd.edu!zben-mac-ii.umd.edu!user
- From: zben@ni.umd.edu (Charles B. Cranston)
- Subject: Re: Packing Rects into the smallest possible container
- Message-ID: <zben-120892162027@zben-mac-ii.umd.edu>
- Followup-To: comp.sys.mac.programmer,comp.sources.wanted
- Sender: usenet@ni.umd.edu (USENET News System)
- Nntp-Posting-Host: zben-mac-ii.umd.edu
- Organization: UM Home for the Terminally Analytical
- References: <1992Aug12.013521.28314@cs.ucla.edu>
- Date: Wed, 12 Aug 1992 20:26:24 GMT
- Lines: 25
-
- In article <1992Aug12.013521.28314@cs.ucla.edu>,
- tj@kona.cs.ucla.edu (Tom Johnson) wrote:
-
- > I have a bunch of rectangular objects, and I would like to pack them into
- > the smallest possible rectangular container (we're only dealing with 2
- > dimensions here, I'm not concerned with 3d boxes). How do I do this?
- > The objects may all have different sizes.
- > Any suggestions for algorithms? Ideas?
-
- This sounds a lot like a two-dimensional version of what has come to be
- called "the knapsack problem" in computer science literature. You might
- be able to find some work being done if you use this buzzword.
-
- Actually, the knapsack problem is usually explained in terms of fitting
- the maximum amount of stuff in a knapsack of known size, i.e., given a
- set of integers {I} and a number N find the maximal subset {i} such
- that sum({i}) <= N or something like that. In your case it is more
- like finding the minimal N which for the one-dimensional case is simply
- sum({I}).
-
- The knapsack problem is thought to be NP-complete. In fact, it was one
- of the other schemes besides the factoring problem (RSA) considered for
- use in public-key encryption algorithms...
-
- zben@ni.umd.edu -KA3ZDF
-