[sage-devel] Re: matrix hashs

2008-08-28 Thread Robert Bradshaw
On Aug 27, 2008, at 1:19 PM, Robert Bradshaw wrote: On Wed, 27 Aug 2008, Craig Citro wrote: Thoughts? I vote for fast. I also vote for fast -- but couldn't there be a flag for the slow option? Maybe consistent=True or something, in case someone really wants it? I could at least

[sage-devel] Re: matrix hashs

2008-08-27 Thread William Stein
On Wed, Aug 27, 2008 at 10:04 AM, Martin Albrecht [EMAIL PROTECTED] wrote: Hi there, Robert wrote at http://trac.sagemath.org/sage_trac/ticket/3956#comment:7 Matrix hashes are specifically designed to be compatible with each other: {{{ sage: M = random_matrix(GF(2), 10, 10)

[sage-devel] Re: matrix hashs

2008-08-27 Thread Simon King
On Aug 27, 9:05 pm, Craig Citro [EMAIL PROTECTED] wrote: I also vote for fast -- but couldn't there be a flag for the slow option? Maybe consistent=True or something, in case someone really wants it? AFAIK, the key requirement for a hash function is that equivalent (in the sense of ==)

[sage-devel] Re: matrix hashs

2008-08-27 Thread William Stein
On Wed, Aug 27, 2008 at 12:21 PM, Simon King [EMAIL PROTECTED] wrote: On Aug 27, 9:05 pm, Craig Citro [EMAIL PROTECTED] wrote: I also vote for fast -- but couldn't there be a flag for the slow option? Maybe consistent=True or something, in case someone really wants it? AFAIK, the key

[sage-devel] Re: matrix hashs

2008-08-27 Thread Martin Albrecht
And how should one pass the argument consistent=True in that situation? What was malb's original definition of inconsistent? Did he *really* have pairs of GF(2) matrices that are equal, but have different hashes? Dense matrices over GF(2) have the same hash if they are equal. However, a

[sage-devel] Re: matrix hashs

2008-08-27 Thread Carl Witty
On Aug 27, 12:21 pm, Simon King [EMAIL PROTECTED] wrote: On Aug 27, 9:05 pm, Craig Citro [EMAIL PROTECTED] wrote: I also vote for fast -- but couldn't there be a flag for the slow option? Maybe consistent=True or something, in case someone really wants it? AFAIK, the key requirement for

[sage-devel] Re: matrix hashs

2008-08-27 Thread Simon King
On Aug 27, 9:41 pm, William Stein [EMAIL PROTECTED] wrote: AFAIK, the key requirement for a hash function is that equivalent (in the sense of ==) objects must have the same hash. Just for the record, we break that all over the place. However, we do try to keep it if possible over a given

[sage-devel] Re: matrix hashs

2008-08-27 Thread Martin Albrecht
His hash function depends on the characteristic of the base ring, the matrix entries, the matrix dimension, I'll revise it so that it is more similar to the current model (while preserving speed) and so that sparse=True and sparse=False still hash to the same value. and also on the size

[sage-devel] Re: matrix hashs

2008-08-27 Thread Simon King
On Aug 27, 9:52 pm, Simon King [EMAIL PROTECTED] wrote: I understood he only has pairs of matrices over *different* rings that are equivalent but have different hashes. ... i forgot the dense vs. sparse issue, sorry. Do we agree that if a dense and a sparse matrix defined over the same ring

[sage-devel] Re: matrix hashs

2008-08-27 Thread Robert Bradshaw
On Wed, 27 Aug 2008, Craig Citro wrote: Thoughts? I vote for fast. I also vote for fast -- but couldn't there be a flag for the slow option? Maybe consistent=True or something, in case someone really wants it? I could at least imagine a case where someone might care, in which case we