#12587: simplicial complexes lack hash function
------------------------------------+---------------------------------------
       Reporter:  vpilaud           |         Owner:  sage-combinat
           Type:  defect            |        Status:  needs_review 
       Priority:  major             |     Milestone:  sage-5.4     
      Component:  combinatorics     |    Resolution:               
       Keywords:                    |   Work issues:               
Report Upstream:  N/A               |     Reviewers:               
        Authors:  Travis Scrimshaw  |     Merged in:               
   Dependencies:                    |      Stopgaps:               
------------------------------------+---------------------------------------

Comment (by tscrim):

 Replying to [comment:20 stumpc5]:
 > Since you propose to make the hash only dependent on the facets:
 > {{{
 > sage: S = SimplicialComplex([1,2,3],[[1,2]])
 > sage: S
 > Simplicial complex with vertex set (1, 2, 3) and facets {(1, 2)}
 > }}}
 > ({{{[1,2,3]}}} is actually not the vertex set, but the *ground set*,
 while the vertex set is {{{[1,2]}}}.) The proposed implementation only
 takes the facets into account for hashing, thus we get the same hash for
 > {{{
 > sage: S = SimplicialComplex([1,2],[[1,2]])
 > sage: S
 > Simplicial complex with vertex set (1, 2) and facets {(1, 2)}
 > }}}
 >
 > Is this the desired behaviour - or should the ground set be used as well
 for hashing?
 >
 > (I don't have a strong opinion on this question, but I thought I bring
 it up anyway. If you don't want to take care of the vertex set vs. ground
 set issue in this ticket here, I will open another and ask for other
 peoples opinion there.)

 There are a few possibilities:

 1. This is a bug, in that `(3,)` should also be listed as a facet.
 2. We handle this more like a matroid (I believe this is what you're
 suggesting) and add methods like `ground_set()`.
 3. Split the difference and make an optional argument.
 4. We just do a stopgap here and make the hash depend upon the
 vertex/ground set and push this to another ticket.

 My thought is we handle this as a bug, but I'm happy to implement
 whichever is decided upon. I have no strong opinions either.

 Best,[[BR]]
 Travis

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12587#comment:21>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to