in reply to Re: Golf: Buying with exact change
in thread Golf: Buying with exact change
I guess we disagree on what trivializing the problem means ;) I didn't mean to imply that all instances of the problem in fact do have solutions which are so small -- that is clearly not true. My intent is that, if it helps you, your solution can solve a restricted but "reasonable" subset of instances (and to make things clear, define what restricted subset your solution is correct for, if you can). What is "reasonable?"
I basically want to rule out smart-ass solutions like this:
It works for largest(6,9,20), but one instance is a trivial subset of the problem space. Unreasonable.sub largest { 43 }
The set of instances whose solutions are less than 1000.. 10000.. is that a "reasonable" subset? The idea is to find a concise algorithm to solve this particular problem, and to solve all these instances correctly, (a) you must actually carry out some sort of computation, and (b) your algorithm must probably be correct. To me, that's reasonable enough.
blokhead
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Golf: Buying with exact change
by fergal (Chaplain) on Feb 22, 2005 at 09:16 UTC | |
Re^3: Golf: Buying with exact change
by fergal (Chaplain) on Feb 22, 2005 at 07:15 UTC | |
by Anonymous Monk on Feb 22, 2005 at 09:12 UTC |
In Section
Meditations