From: staym@accessdata.com
To: “Bernardo B. Terrado” <bbt@mudspring.uplb.edu.ph>
Message Hash: 3cf482b93fdb0738219dd93190c278ff27b82e9366f469506830733a60c990a8
Message ID: <3651B9D4.6061@accessdata.com>
Reply To: <Pine.GSO.3.96.981116124934.27971A-100000@mudspring.uplb.edu.ph>
UTC Datetime: 1998-11-17 19:08:52 UTC
Raw Date: Wed, 18 Nov 1998 03:08:52 +0800
From: staym@accessdata.com
Date: Wed, 18 Nov 1998 03:08:52 +0800
To: "Bernardo B. Terrado" <bbt@mudspring.uplb.edu.ph>
Subject: Re: 0/1 knapsack
In-Reply-To: <Pine.GSO.3.96.981116124934.27971A-100000@mudspring.uplb.edu.ph>
Message-ID: <3651B9D4.6061@accessdata.com>
MIME-Version: 1.0
Content-Type: text/plain
A knapsack is a container that can only hold so much of something. You
have a collection of objects with a weight and/or volume and a value.
You want to maximize the value. Fractional knapsack problems concern
things like flour and sugar, that you can measure out a fractional unit
of. In 0/1 knapsack problems, you have a collection of objects: either
you put in the TV or you don't; no half-TV's.
Quoting from _Introduction to Algorithms_ (Cormen, Leiserson, & Rivest),
'Dynamic programming, like the divide-and-conquer method, solves
problems by combining the solutions to subproblems. ("Programming" in
this context refers to a tabular method, not to writing computer code.)
... Divide-and-conquer algorithms partition the problem into independant
subproblems, solve the problems recursively, and then combine their
solutions to solve the original problem. In contrast, dynamic
programming is applicable when the subproblems are not independent..."
--
Mike Stay
Cryptographer / Programmer
AccessData Corp.
mailto:staym@accessdata.com
Return to November 1998
Return to “staym@accessdata.com”