#14126: Count Number of Linear Extensions of a Poset
-------------------------------------+-------------------------------------
       Reporter:  csar               |        Owner:  sage-combinat
           Type:  enhancement        |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.4
      Component:  combinatorics      |   Resolution:
       Keywords:  days45             |    Merged in:
        Authors:  Jori Mäntysalo     |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:  u/jmantysalo       |       Commit:
  /count-lin-ext                     |  f908696aa7c63cefbc382af326cfe085e0dfa522
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by jmantysalo):

 This got more speed with even very basic implementation of maximal chains
 counting:

 {{{
 def countmax(P):
     L = P.level_sets()
     c = {}
     for l in L[0]:
         c[l] = 1
     for lev in L[1:]:
         for l in lev:
             c[l] = sum(c[i] for i in P.lower_covers(l))
     return sum(c[i] for i in P.maximal_elements())
 }}}

 If we have better way to make a order ideals lattice, it is a place for
 new ticket. It would be nice feature in itself.

 Hmm... Assuming we have `n`-element poset `P` and corresponding `L=J(P)`,
 how we modify `L` when we add element `n+1` as a minimal element to `P`? I
 guess the algorithm should be done by thinking this.

--
Ticket URL: <https://trac.sagemath.org/ticket/14126#comment:35>
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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to