[sage-devel] Re: exact cover problem

2008-02-25 Thread boothby
On Mon, 25 Feb 2008, Carlo Hamalainen wrote: On Mon, Feb 25, 2008 at 6:20 AM, [EMAIL PROTECTED] wrote: Dirty, William. I can't believe you blame this on me -- that was all Robert's fault. Anyway. I've co-opted Ajanki's framework, and have rewritten the core of the search algorithm to

[sage-devel] Re: exact cover problem

2008-02-25 Thread mabshoff
On Feb 25, 11:07 am, [EMAIL PROTECTED] wrote: On Mon, 25 Feb 2008, Carlo Hamalainen wrote: On Mon, Feb 25, 2008 at 6:20 AM, [EMAIL PROTECTED] wrote: Dirty, William. I can't believe you blame this on me -- that was all Robert's fault. Anyway. I've co-opted Ajanki's framework, and

[sage-devel] Re: exact cover problem

2008-02-25 Thread Nick Alexander
I would also suggest to go that way since we can then merge the ticket dependent on it. Once we have the correctly, but not blazingly fast version in Sage we can always switch to the C++ version as it is convenient for the integrators. +1 -- all those lovely doctests will not go to waste :)

[sage-devel] Re: exact cover problem

2008-02-24 Thread boothby
On Sat, 23 Feb 2008, William Stein wrote: On Sat, Feb 23, 2008 at 12:46 PM, [EMAIL PROTECTED] wrote: On Sat, 23 Feb 2008, Carlo Hamalainen wrote: On Fri, Feb 22, 2008 at 8:55 PM, [EMAIL PROTECTED] wrote: Arguments for including Ajanki's code: 1) It's the only Python

[sage-devel] Re: exact cover problem

2008-02-23 Thread bard
; Subjectnbsp;nbsp; Re: [sage-devel] Re: exact cover problem William Stein [EMAIL PROTECTED] 02/22/2008 12:49 PM PST font size=-1/font On Fri, Feb 22, 2008 at 12:04 PM, Jason Grout [EMAIL PROTECTED] wrote

[sage-devel] Re: exact cover problem

2008-02-23 Thread Carlo Hamalainen
On Fri, Feb 22, 2008 at 8:55 PM, [EMAIL PROTECTED] wrote: Arguments for including Ajanki's code: 1) It's the only Python implementation of DLX I've seen. 2) I emailed the author, who happily added the or later bit after the GPL2 3) With my Sage Matrix - DLXMatrix code (plus

[sage-devel] Re: exact cover problem

2008-02-23 Thread boothby
On Sat, 23 Feb 2008, Carlo Hamalainen wrote: On Fri, Feb 22, 2008 at 8:55 PM, [EMAIL PROTECTED] wrote: Arguments for including Ajanki's code: 1) It's the only Python implementation of DLX I've seen. 2) I emailed the author, who happily added the or later bit after the GPL2

[sage-devel] Re: exact cover problem

2008-02-23 Thread William Stein
On Sat, Feb 23, 2008 at 12:46 PM, [EMAIL PROTECTED] wrote: On Sat, 23 Feb 2008, Carlo Hamalainen wrote: On Fri, Feb 22, 2008 at 8:55 PM, [EMAIL PROTECTED] wrote: Arguments for including Ajanki's code: 1) It's the only Python implementation of DLX I've seen. 2) I

[sage-devel] Re: exact cover problem

2008-02-22 Thread David Harvey
On Feb 22, 2008, at 3:49 PM, William Stein wrote: On Fri, Feb 22, 2008 at 12:04 PM, Jason Grout [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: I've found a nice implementation of the DLX algorithm, which quickly solves the NP-Complete exact cover problem. For those who aren't

[sage-devel] Re: exact cover problem

2008-02-22 Thread David Roe
In this context I think that binary means all the entries are 1s and zeros. But when you look for a set of rows that add up to [1,1,1,...], you don't consider 1+1=0. This makes sense when you want only one 1 to appear in each column, which is a natural requirement, and makes the problem much

[sage-devel] Re: exact cover problem

2008-02-22 Thread William Stein
On Fri, Feb 22, 2008 at 12:50 PM, David Harvey [EMAIL PROTECTED] wrote: On Feb 22, 2008, at 3:49 PM, William Stein wrote: On Fri, Feb 22, 2008 at 12:04 PM, Jason Grout [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: I've found a nice implementation of the DLX algorithm,

[sage-devel] Re: exact cover problem

2008-02-22 Thread Robert Miller
Just a technical note: Mod 2 matrices are not the natural way to think about adjacency matrices (I learned this the hard way) - the entry is actually better thought of as the number of paths of length one from one vertex to another. That way taking nth powers of the matrices counts the number of

[sage-devel] Re: exact cover problem

2008-02-22 Thread Bill Hart
If it is an NP-complete problem, presumably it asks whether such a set of rows exists, not that you find one. Bill. On 22 Feb, 21:32, Robert Miller [EMAIL PROTECTED] wrote: Just a technical note: Mod 2 matrices are not the natural way to think about adjacency matrices (I learned this the hard