User talk:CRGreathouse: Difference between revisions

From Rosetta Code
Content added Content deleted
 
Line 3: Line 3:


The problem I saw with your code was that all the output printed were not of the maximal value. It printed the best values so far as it converged to the maximal. I would expect, (and you could check by looking at a few of the other examples outputs), that the only printout should be of one or more (probably one ''or'' all four), of the maximal values. It would be good to carry on the conversation on the relevant talk page [[Talk:Knapsack problem/Unbounded#The problem with the PARI/GP solution|here]]. --[[User:Paddy3118|Paddy3118]] 05:25, 31 October 2010 (UTC)
The problem I saw with your code was that all the output printed were not of the maximal value. It printed the best values so far as it converged to the maximal. I would expect, (and you could check by looking at a few of the other examples outputs), that the only printout should be of one or more (probably one ''or'' all four), of the maximal values. It would be good to carry on the conversation on the relevant talk page [[Talk:Knapsack problem/Unbounded#The problem with the PARI/GP solution|here]]. --[[User:Paddy3118|Paddy3118]] 05:25, 31 October 2010 (UTC)

: Frankly -- and don't take this poorly -- but it did offend me.
: The code functioned as intended and as documented. That way is sensible -- if you scale these instances up they could run for hours or days, and getting feedback in that time is useful.
: Further, the "fix" is obvious -- don't output, save the appropriate line(s), then output at the end. But this wouldn't add anything to the program, adds clutter, and removes the nice scaling property I mentioned.
: If you want to keep it, feel free to "fix" it. I won't, because I think the fixed version is worse.
: [[User:CRGreathouse|CRGreathouse]] 05:29, 31 October 2010 (UTC)

Revision as of 05:29, 31 October 2010

Knapsack problem/Unbounded answer in PARI/GP

Hi, I flagged your answer as incorrect, and I will apologise if the name of the flag "incorrect" might have caused offence, but its the name of the flag used on RC when someone thinks that the example given strays too far from the task description and unfortunately might have an impolite handle to the uninitiated.

The problem I saw with your code was that all the output printed were not of the maximal value. It printed the best values so far as it converged to the maximal. I would expect, (and you could check by looking at a few of the other examples outputs), that the only printout should be of one or more (probably one or all four), of the maximal values. It would be good to carry on the conversation on the relevant talk page here. --Paddy3118 05:25, 31 October 2010 (UTC)

Frankly -- and don't take this poorly -- but it did offend me.
The code functioned as intended and as documented. That way is sensible -- if you scale these instances up they could run for hours or days, and getting feedback in that time is useful.
Further, the "fix" is obvious -- don't output, save the appropriate line(s), then output at the end. But this wouldn't add anything to the program, adds clutter, and removes the nice scaling property I mentioned.
If you want to keep it, feel free to "fix" it. I won't, because I think the fixed version is worse.
CRGreathouse 05:29, 31 October 2010 (UTC)