Talk:Coin problem

message: I happened upon this article via the McNugget problem hook at the |DYK page and I was pleased to learn something interesting and new from this page. I am about as far from a mathematician as you can get and would normally not bother with something so.....well (please don't take offense!) boring. But there was something approachable and quirky about the McNugget problem and once I grasp the basic premise of it, I was able to look at the rest of the article in a more inquisitive light. To that extent I think its a worthwhile inclusion in the article. As for the rename/merge question, I'll just leave that to the folks who know what they are talking about. :) AgneCheese/Wine 14:54, 4 November 2007 (UTC)
replies: text: I totally agree, and I am (or will probably be) a mathematican. Paxinum 16:43, 7 November 2007 (UTC)

text: But that could be said for this page - in fact, coins are a far more appropriate context than McNuggets, in terms of worldview. --Cheeser1 16:48, 7 November 2007 (UTC)
thread_title: Outside layperson's 2 McNugget's worth

message: What about Postage stamp problem? Probably that page should be merged into this one too. Sean Eberhard (talk) 06:27, 9 January 2019 (UTC)
thread_title: Postage stamp problem

message: You've got to be kidding.  The proof sketch might appear under the "n = 2" tab, but it's NOT EVER known as the McNugget Theorem. — Arthur Rubin  (talk) 02:34, 14 June 2008 (UTC)
replies: text: I've removed the McSubsection. Michael Slone (talk) 23:33, 9 March 2009 (UTC)
replies: text: And I have restored that section. McNugget numbers feature in both MathWorld and in OEIS, which are cited in the section. Certainly this example is better known and better sourced than the two sports examples which follow it. I believe what Arthur Rubin was objecting to above was the use of the term "McNugget Theorem", which no longer appears in the article. If anyone still thinks this section should be removed, let's discuss and find consensus.Gandalf61 (talk) 07:23, 10 March 2009 (UTC)
thread_title:  "McNugget Theorem"? 

message: The first formula fails to match the correct value where it's equivalent to n=2 above, and the second formula is not apparently symmetric in m and n.  — Arthur Rubin  (talk) 14:16, 15 August 2008 (UTC)
replies: text: Good call- I copied the wrong formula for the first one. It works out now. As for the geometric sequence formula, believe it or not, it IS symmetric. The source is in an online (peer-reviewed) journal, so you can check it yourself. Borisblue (talk) 18:55, 15 August 2008 (UTC)
thread_title:  Frobenius numbers for special sets 

message: For those of you who are impartial in your judgement of article material, I make the case that my edit should stand as follows:
* the change-making problem is widely cited
* what I have written about it is concise
* each part of what I have written is supported by links to other articles
* it contains useful information which will enable many people to resolve a wide range of change-making problems more quickly than they otherwise would
* if there is any part of what I have written that you don't like, then editing it would be a more appropriate action than summarily deleting it
* regarding Arthur's rationalisation of "notability", please compare the notability of the change-making section with the notability of other parts of the article
This is an encyclopaedia article - not a mathematical paper - and edits to it should be judged on a different basis to a peer-review of a mathematical paper prior to publication. The change-making section should stand. New Thought (talk) 11:58, 31 December 2008 (UTC)
replies: text: The change-making problem is not normally considered related to the coin problem, although there is some relationship.  If an article on the change-making problem could be created, it might be OK, but solution methods to the change-making problem should not be in this article, but only in a separate article.  (Integer) linear programming and dynamic programing are not relevant here, unless you wish to assert (and can demonstrate) they're used for the coin problem.  — Arthur Rubin  (talk) 16:49, 31 December 2008 (UTC)

text: I agree, I think the change-making problem is both substantial enough to merit its own article, and not closely related enough to the coin problem to be a subsection here. Borisblue (talk) 03:48, 1 January 2009 (UTC)
thread_title: Change making problem

message: The section coin problem#Frobenius numbers for small n states that "A closed-form solution exists for the coin problem only where n = 1, 2 or 3."  However, the subsection for "n = 3" says only that "Fast algorithms are known for three numbers, though the calculations can be very tedious if done by hand."  And then goes on to give approximate bounds.  I would not consider "a fast algorithm" to be the same thing as "a closed-form solution".  That is why I had excluded n = 3 in the lead paragraph.  Whether the "fast algorithm" is a closed-form formula or not, the article is inconsistent and needs to be fixed.  All the best, --Jorge Stolfi (talk) 18:15, 31 December 2009 (UTC)
thread_title:  Is there a closed formula for the case n = 3? 

message: The lead now states that "If the number of coin types is between three and ten, no explicit formula is known, but there are algorithms that will compute the Frobenius number in polynomial time."  Is that the right way to put it?  When I skimmed through the references, I came back with the impression that there is a polynomial algorithm for all fixed n, but that it "probably" had never been implemented beyond n = 10. Also that "fairly fast" algorithms existed for small n, where "fast" of course does not mean "polynomial".  And, to my tastes, fast algorithms are at least as interesting as polynomial ones.  All the best, --Jorge Stolfi (talk) 18:25, 31 December 2009 (UTC)
replies: text: MathWorld article says "Fast algorithms are also known for three numbers, but the more general problem for an arbitrary number of numbers is known to be NP-hard if n is fixed (Kannan 1992) or n is variable (Ramírez-Alfonsín 1996)". If a polynomial-time algorithm were known for any fixed n then the general problem would not be NP-hard. Gandalf61 (talk) 08:17, 1 January 2010 (UTC)
replies: text: Er, I am rusty on complexity theory, but why not?  For example, the obvious brute-force algorithm for finding an n-clique in a graph is polynominal for any fixed n, but eponential if n is part of the data.  As for the mathworld quote, what does it mean "for an arbitrary number of numbers ... if n is fixed"?  All the best, --Jorge Stolfi (talk) 22:30, 1 January 2010 (UTC)
replies: text: If there is a polynomial-time algorithm for any NP-hard problem, then there are polynomial-time algorithms for all problems in NP, and hence P = NP - see NP-hard. It is not known whether P=NP, therefore a polynomial-time algorithm  is not known for any NP-hard problem, and in particular a polynomial-time algorithm is not known for the coin problem for an arbitrary value of n. Gandalf61 (talk) 23:17, 1 January 2010 (UTC)
replies: text: Well, it seems that there is a misunderstanding here. That much I still remember. But, as, I said, a problem *can* be polynomial for any fixed value of a parameter, but NP-had if the parameter is part of the data.  All the best, --Jorge Stolfi (talk) 02:31, 2 January 2010 (UTC)

text:  You can look up some details on associated algorithmic problems and conjectures at Google Books. Maxal (talk) 23:35, 1 January 2010 (UTC)
replies: text: *I could not get Kannan's paper, but Beihofer et al. say "Kannan [Kan89] used similar methods to establish, for every �fixed n, the existence of a polynomial-time algorithm to compute the exact Frobenius number. However, Kannan's algorithm has apparently never been implemented. Moreover, the Kannan algorithm does not solve instances of equation (1)."  If this is correct, the Mathworld article is simply wrong (even if one ignores the self-contradiction) and the coin proble is in P for any fixed n.  The last sentence of the quote merely says that Kannan's algorithm can compute the largest un-representable number, but does not tell how to obtain a representable one with the given coins.  By the way, the Mathworld article also says that the n=2 case is "folklore" whereas Beihofer et al. attribue it to Sylvester.All the best, --Jorge Stolfi (talk) 22:02, 2 January 2010 (UTC)
replies: text: Yes, there does seem to be an inconsistency between MathWorld and the Beihofer paper. I think we can only resolve this by getting access to the Kannan paper to see what it actually says. Gandalf61 (talk) 10:02, 3 January 2010 (UTC)
replies: text: Kannan's paber is not available, but its abstract is, and it clearly states the claim.  Since it has been reviewed, I can't see what other confirmation we may ask for. All the best, --Jorge Stolfi (talk) 13:50, 3 January 2010 (UTC)
replies: text: The abstract also agrees that the problem is NP-hard. On the face of it, Kannan is claiming to have shown the existence of a polynomial-time algorithm for an NP-hard problem. So why doesn't that lead to the conclusion that P=NP ? Gandalf61 (talk) 15:18, 3 January 2010 (UTC)
replies: text: There is no inconsistency, see above.  There are quite a few problems that have polynomial algorithms for each fixed value of some parameter, but are NP-hard if the parameter is free.  For example, consider deciding whether a graph has a clique of size k.  The obvious algorithm -- list all subsets of k vertices and check whether each is a clique -- has complexity Θ(vk+2), where v is the number of vertices; which is polynomial for any fixed k but exponential if k is part of the data. All the best, --Jorge Stolfi (talk) 16:41, 3 January 2010 (UTC)
replies: text: So you seem to be suggesting, by analogy, that Kannan's algorithm is not polynomial-time in n, the number of coin types, but is instead polynomial time in some other parameter, when n is fixed. What is this other parameter ? Gandalf61 (talk) 17:18, 3 January 2010 (UTC)
replies: text:  The set of coin denominations a_1, a_2, \dots, a_n — they form an input for any algorithm that computes Frobenius number g(a_1,a_2,\dots,a_n). Maxal (talk) 20:15, 3 January 2010 (UTC)
replies: text: Right. "Polynomial time" (and "NP", etc.) almost alway always means "polynomial in the length of the input data", not "polynominal in the parameter called n".  In this case, the length would be a little bit more than the sum of log2(ak), plus log2(n). All the best, --Jorge Stolfi (talk) 20:33, 3 January 2010 (UTC)

text: I disagree. If you prefer log to magnitude, then let's say log, but just saying "polynomial time" without further qualification is potentially misleading. Cheers mate, Gandalf61 (talk) 09:32, 4 January 2010 (UTC)
replies: text: It is not a matter of what I prefer, but what we know for sure.  Anyway, since the article now coincide with my guess, I will not dispute it.  All the best, --Jorge Stolfi (talk) 12:44, 4 January 2010 (UTC)
thread_title:  Isn't there a polynomial algorithm for all fixed n? 

message: I have a few suggestions.
1, Several citations occur twice, I don't know how to fix it.
2, The paper proving NP-hardness is not cited: Jorge L Ramirez Alfonsin. Complexity of the Frobenius problem. Combinatorica, 16(1):143–147, 1996.
3, I don't understand what the person had in mind who wrote "No known algorithm is polynomial time in the number of coin denominations" - how could an algorithm run without taking into account the denominations' sizes? I think that this only confuses the reader and should be removed.
4, A claimed proof of Sigma2-completeness has appeared recently: https://arxiv.org/abs/1602.05657
Domotorp 12:21, 14 February 2017 (UTC)
thread_title:  Update needed for computational complexity part

message: I flagged the current section on the case n=3, since there is no citation given and googling the author's name only produces a YouTube video by the editor. However, it appears that there is an actual recent paper on the general formula. The section should be updated to reflect this, preferably by someone with more maths expertise.
Petrilaarne (talk) 16:09, 1 October 2017 (UTC)
replies: text: Someone has added citations since 2017. Maybe the update template can be removed? IvicaInsomniac (talk) 17:37, 15 December 2023 (UTC)
thread_title:  Updating case n=3