On Mon, Jul 6, 2009 at 10:34 PM, David Joyner<wdjo...@gmail.com> wrote:
<SNIP>
> I'm not an expert but did find this ((essentially vacuous) page:
> http://www.coin-or.org/SYMPHONY/branchandcut/MCKP/
> and the knapsack problem is listed among the applications of Symphony:
> http://www.coin-or.org/SYMPHONY/branchandcut/applications.htm
> I could find no examples.
Thank you for the pointer.
<SNIP>
>> So my question is: Do folks agree or disagree with me Cythonizing
>>
>> sage/numerical/knapsack.py
>>
>> and implement further algorithms in Cython?
>
>
> Well, I can't see an argument against making it faster:-)
> However, it would be nice if you could add some brute force code to
> actually solve an instance of the knapsack problem, for example
> the burgler problem at
> http://webspace.ship.edu/thbrig/DynamicProgramming/Knapsack%20Program/index.html
At the moment, my priority is to implement as many algorithms as I
can/understand. On that list are certainly a greedy algorithm and a
dynamic programming algorithm. Somewhere down the list are more
efficient algorithms for other types of knapsack problems. My main
references are
[1] S. Martello and P. Toth. Knapsack Problems.
http://www.or.deis.unibo.it/knapsack.html
[2] H. Kellerer, U. Pferschy and D. Pisinger. Knapsack problems.
On Mon, Jul 6, 2009 at 11:44 PM, William Stein<wst...@gmail.com> wrote:
<SNIP>
> You might also want to implement a LLL-based knapsack solving
> algorithm, since Sage includes fplll which is an extremely fast LLL
> implementation.
>
> I don't know if this page is any good but it is about LLL knapsack algorithms:
>
> http://www.math.ucsd.edu/~crypto/Projects/JenniferBakker/Math187/index.html
Thank you for the link.
> I bet COIN-OR doesn't have anything like that, so it could be a unique
> advantage of Sage in one case, maybe.
--
Regards
Minh Van Nguyen
<SNIP>
> So my question is: Do folks agree or disagree with me Cythonizing
>
> sage/numerical/knapsack.py
>
> and implement further algorithms in Cython?
Cythonizing the module
sage/numerical/knapsack.py
is now ticket #6513:
http://trac.sagemath.org/sage_trac/ticket/6513