[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-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 framewo

[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 algor

[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: >> >>

[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

[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 th

[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

[sage-devel] Re: exact cover problem

2008-02-23 Thread bard
matics * Fordham University * Bronx, NY, USA * * Office: John Mulcahey Hall, Room 421 * Phone: +1-718-817-3222 * Fax: +1-240-363-0240 (an e-fax) * E-mail: [EMAIL PROTECTED] * To  "sage-devel@googlegroups.com" , "Gregory Bard" <[EMAIL PROTECTED]>

[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 h

[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 n

[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 harde

[sage-devel] Re: exact cover problem

2008-02-22 Thread John Cremona
The original problem said "binary matrix" so surely that means mod 2? And I would expect mod 2 matrices to come up in the graph theory applications. Not that I know about that... John On 22/02/2008, William Stein <[EMAIL PROTECTED]> wrote: > > On Fri, Feb 22, 2008 at 12:50 PM, David Harvey >

[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

[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

[sage-devel] Re: exact cover problem

2008-02-22 Thread William Stein
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 in Seattle > and haven't heard me blathering on a

[sage-devel] Re: exact cover problem

2008-02-22 Thread Jason Grout
[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 in Seattle and > haven't heard me blathering on and on and on and on about how awesome DLX > is... > > Let M be a binary matrix.