Talk:Knapsack problem

message: There is a major mis-leading and incorrect sentence in the FPTAS section, in the FPTAS algorithm they refer to the dynamic programming mentioned above.
The dynamic programming is correct but assumes that the weights are integer,
however,the FPTAS rounds the VALUES ergo one can not use this dynamic programming after the rounding
instead one should use a dynamic programming on the values see  http://math.mit.edu/~goemans/18434S06/knapsack-katherine.pdf
for more details. (Note that, in the paper the base condition should be A(0,0) = 0 instead of their base condition).
I can rewrite it by myself but unfortunately my English level is not strong enough.  — Preceding unsigned comment added by Ilanrcohen (talk • contribs) 08:17, 24 August 2015 (UTC)
thread_title:  There is a major problem 

message: In the section on the greedy 2-approximation for the unbounded knapsack problem, there is a reference to 'Discrete-Variable Extremum Problems' by George B. Tantzig, cited as providing the algorithm. As far as I can see, Dantzig is proposing the algorithm for the 0-1-problem (which he defines on page 273). His Figure 3, which illustrates the procedure, also includes only one instance of each object (or object type), and he constraints the membership count to 0 or 1 (Equation 10). At no point does he give any formal guarantee about the accuracy (that is, the approximation bound) for this algorithm. The section should therefore probably be reworded, so as not to indicate that (1) the application to unbounded knapsack comes from this paper, and (2) the paper gives the 2-approximation bound, as it does neither (as far as I can see). Also, either a reference or a brief proof (or perhaps both) for the 2-bound should be included, as this would now be a baseless claim, as it stands, without the Dantzig reference for support.
Mlhetland (talk) 13:59, 5 September 2010 (UTC)
thread_title: Reference to Dantzig paper on the greedy approximation algorithm

message: What happens if C, the total sum, isn't an integer? Then, there is no way one can reach A(C). We can approximate C either by floor or ceil but we can't be sure that the solution will be the best one, since one of the values can be smaller then the difference between C and it's approximated value. Bravemuta 16:57, 14 July 2007 (UTC)
thread_title: Question regarding the given solution

message: The last paragraph uses the word "essentials" which is seems totally wrong - it doesn't make any sense to me (English first language, still amateur [but reasonably knowledgeable] computer scientist). Also, the main thing, is it just me or is the dynamic programming algorithm only for the 0-1 problem (neither this article nor Levitin03 say so explicitly, but as far as I can see...) --대조 | Talk 20:24, 15 December 2005 (UTC)
replies: text: The DP algorithm will work for the unbounded variant of the knapsack problem just fine. In fact, the algorithm as stated on the page would need to be modified to determine a solution for the 0/1 problem. "Essentials" is defined in the opening lines of this article. It's an unusual word, but I assume there's some tradition of using it here. --Dantheox 06:29, 16 December 2005 (UTC)
thread_title:  DP for 0-1 only? 

message: It would be great to get the main graphic changed so that the dollar signs are in the right places.  (They should precede the numbers: "$1" is correct, "1$" is incorrect.) —The preceding unsigned comment was added by Pkirlin (talk • contribs).
:Done. Isn't SVG great? —Keenan Pepper 07:43, 9 July 2007 (UTC)
replies: text: Additionally $1/1kg and $2/2kg $4/12kg should be changed to something else, as they are obviously worse than $2/1kg.--Ancient Anomaly (talk) 13:08, 19 August 2010 (UTC)
thread_title:  Need graphic change 

message: Continuous knapsack problem redirects here but is not mentioned (presumably, it was removed). If I recall correctly this is the variant that allows fractional parts of items to be placed in the knapsack, and has a trivial polynomial-time solution. This is an important variant if only to demonstrate how changes in the problem description can alter the solution's complexity. Dcoetzee 03:40, 5 February 2008 (UTC)
thread_title:  Continuous knapsack problem 

message: Hi everybody.
Over the past few days, I made a number of minor changes
to the page. These changes cleaned up some inconsistency
in terminology and notation. They also made the "integers"
restriction explicit.
I hope I did not annoy the other users of this page by being
so rash.
As you can guess, I am a newcomer to the Wikipedia.
Fairfield (talk) 20:59, 15 October 2008 (UTC)
thread_title:  I made a number of changes in notation 

message: Couldn't you simply use Djkstra's path-finding algorithm for the 0-1 Knapsack problem? You would have to calculate cost as a ratio of value to weight and then add the items until you reach a full knapsack.  —Preceding unsigned comment added by ThomHehl (talk • contribs) 11:41, 8 May 2009 (UTC)
thread_title:  Djkstra??? 

message: I decided to try to improve this article a while back, though I'm no longer interested. here is what I came up with (permalink). I've merged some new sections in the article. If anyone else wants to try their hand at improving the article, feel free to steal bits from my sandbox version. --Cryptic C62 · Talk 01:14, 1 November 2010 (UTC)
thread_title:  Sandbox version 

message: Can someone clearify the following sentence from the text: 
"In the field of Photography, the term knapsack problem is often used to refer specifically to the subset sum problem and is commonly known as one of Karp's 21 NP-complete problems.".
Should it really say "Photography"? What does Photography have to do with this? Avl (talk) 17:55, 8 August 2012 (UTC)
thread_title:  Photography? 

message: After the pseudo-code for the Dynamic Programming Solution to Unbounded Knapsack Problem, the author says the answer will be found by tabulating the values in m[].  However, the pseudo-code never assigns any values to m[].  A reference to where the author found the algorithm would also help.  — Preceding unsigned comment added by 173.59.73.254 (talk) 19:23, 26 September 2012 (UTC)
thread_title:  Dynamic Programming Solution to Unbounded Knapsack Problem does not make sense to me 

message: Although there are about π / 3  ≈  1.047 examples presented (in the Applications section) — and none anywhere else — these are extremely thin and totally inadequate to really illustrate what is going on.
How about at least one or two fully explained examples, of at least the simplest type of knapsack problem — not too trivial and not too complicated.  Maybe one example that is fully solved, along with its solution, and one more that is perhaps just a little too difficult to be solved in any plausible amount of time on today's computers.
It is totally ridiculous that people forget entirely that this is not a journal article, it is an encyclopedia, for beginners to learn. Imagine you were teaching a course on the knapsack problems to beginners. If you don't include a few fully worked-through examples, you probably have some important things to learn about good teaching.Daqu (talk) 23:29, 14 April 2016 (UTC)
thread_title:  Examples are sorely lacking 

message: As stated in the article, this version is ill-posed, because it does not rigorously define an optimal solution. Optimality is defined with respect to a single objective function; if there are multiple objective functions then there is no single way to determine optimality. A solution that is maximal for all the objectives is good, but what if we have to choose between solutions that maximize different objectives?--Jasper Deng (talk) 17:40, 15 August 2016 (UTC)
replies: text: Multi-objective optimization problems may be ill-posed or well-posed according to the particular statement of the problem and how the multiple criteria are handled. See Multi-objective optimization for a general discussion. --Mark viking (talk) 00:50, 16 August 2016 (UTC)
thread_title:  Multi-objective version 

message: Problem 10.1 of the Scottish Book appears to be an example of the Knapsack problem. http://kielich.amu.edu.pl/Stefan_Banach/pdf/ks-szkocka/ks-szkocka3ang.pdf
Itullis (talk) 09:11, 5 April 2018 (UTC)
thread_title:  History of Knapsack Problem 

message: The ratio of the solution (2033/67 = 30.34) is higher than the ratio of any of the items.  — Preceding unsigned comment added by 72.162.48.250 (talk) 11:47, 18 October 2018 (UTC)
thread_title:  The example is wrong 

message: "The problem often arises in resource allocation where there are financial constraints and is studied in fields such as combinatorics, computer science, complexity theory, cryptography, applied mathematics, and daily fantasy sports."
How is daily fantasy sports a field comparable to combinatorics, computer science, etc.? Jwood (leave me a message) See what I'm up to 17:51, 20 May 2019 (UTC)
thread_title:  Daily fantasy sports? 

message: It's really hard to fit  the most relevant information into this article without making it too long and unreadable. <wink>
Thanks for your hard work, everyone. --ESP (talk) 02:18, 1 August 2020 (UTC)
thread_title:  An editorial observation