home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.compression
- From: fred@genesis.demon.co.uk (Lawrence Kirby)
- Path: sparky!uunet!spool.mu.edu!agate!doc.ic.ac.uk!pipex!ibmpcug!demon!genesis.demon.co.uk!fred
- Subject: Re: Unix release? (Was etc.
- Distribution: world
- References: <C1EArp.KL@unix.amherst.edu>
- Organization: BT
- X-Mailer: Simple NEWS 1.90 (ka9q DIS 1.19)
- Lines: 29
- Date: Thu, 28 Jan 1993 18:40:51 +0000
- Message-ID: <728246451snz@genesis.demon.co.uk>
- Sender: usenet@demon.co.uk
-
- In article <C1EArp.KL@unix.amherst.edu> djweisbe@unix.amherst.edu writes:
-
- >Lawrence Kirby (fred@genesis.demon.co.uk) wrote:
- >:
- >: The knapsack problem deals with a single knapsack (i.e. disk) and is NOT
- >: NP-complete. It's a common example of dynamic programming where the optimal
- >
- >The Knapsack problem sure is NP complete. I believe the following
- >explanation is correct, if simple (check in comp.theory, though):
- >
- >There is an algorithm which is linear in N, the number of items, but
- >the specification of N is of length proportional to log N, so the
- >running time is actually exponential in the length of the input.
-
- The input data to the problem isn't the number of items, it is in general a list
- of the items. The size of this input data will be proportional to N, not log N.
- The problem isn't even be exponential on the size of the knapsack since the
- size is constrained by the total size of the items available.
-
- >Just a humble undergrad,
- > David
- >
-
- Happy days!
-
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-