#17408: Faster transitive_reduction (=> faster Poset creation)
-------------------------+-------------------------------------------------
       Reporter:         |        Owner:
  ncohen                 |       Status:  needs_review
           Type:         |    Milestone:  sage-6.5
  enhancement            |   Resolution:
       Priority:  major  |    Merged in:
      Component:  graph  |    Reviewers:
  theory                 |  Work issues:
       Keywords:  poset  |       Commit:
        Authors:         |  ce577a909e3ac2835f975cc9515b54459174e8ca
  Nathann Cohen          |     Stopgaps:
Report Upstream:  N/A    |
         Branch:         |
  u/ncohen/17408         |
   Dependencies:         |
-------------------------+-------------------------------------------------

Comment (by jmantysalo):

 Replying to [comment:16 nbruin]:

 > > What is the rationale behind current implementation? I mean, there
 must be some example where `UniqueRepresentation` makes things faster.

 > However, there's something to say for it: The two posets `A={1,2,3}` and
 `B={1,2,3}` with trivial relation (ie. x<=y iff x==y) are isomorphic, but
 not uniquely so. So unless we're explicitly saying by what isomorphism
 `A,B` are to be identified, perhaps we should treat them as not equal.
 After all, `C={a,b,c}` (with empty relation) is also isomorphic to `A` and
 `B` and there no-one would be tempted to say C is equal to A and B.

 Thank you for very good explanation!

 Generating all posets of size 7 up to isomorphism takes 18,5 second ---
 this is not a bottle neck then. But with #14110 the time drops to 2,5
 seconds. And when generating just Hasse diagrams instead of posets it took
 0,3 second. In the code I was asked to write this is the turning point:
 now slowest part is doing something with posets, not generating them.

 Maybe this is so specialized case that we should let posets to be like
 they are now. A user might then optimize by directly playing with Hasse
 diagrams.

 This optimization does not mean that you can do things with posets of size
 `2n` --- it means that that you can use posets of size `n+2`.

--
Ticket URL: <http://trac.sagemath.org/ticket/17408#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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to