home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!zaphod.mps.ohio-state.edu!cs.utexas.edu!ut-emx!tivoli!foraker!taylor
- From: taylor@tivoli.com (Eric Taylor)
- Newsgroups: comp.theory
- Subject: Is this an Np-Complete Problem
- Message-ID: <6097@tivoli.UUCP>
- Date: 14 Nov 92 03:29:57 GMT
- Sender: news@tivoli.UUCP
- Lines: 19
-
- This is a fairly practical problem but is probably
- a good exercise:
-
- Suppose I have "n" rectangles of varying width.
- I want to fit them into another rectangle of constant
- width called "W" and infinite height.
- I want to lay these rectangles into a matrix in
- Row-Major order where the difference between the
- total width of the columns and "W" is at a non-positive minimum.
- The rectangles will form columns (you can't just pack
- rectangles in until they don't fit).
-
- Is there a polynomial solution to this problem?
- If you pick a number "c" for the
- number of columns, it is concievable that a larger
- value of "c" could result in a smaller width.
- Am I wrong in this assumption? If I am wrong
- then a simple binary search for the optimal "c" will
- work. (n log n for the total problem).
-