#14126: Count Number of Linear Extensions of a Poset
-----------------------------------------------+----------------------------
Reporter: csar | Owner: sage-combinat
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-5.8
Component: combinatorics | Resolution:
Keywords: days45 | Work issues:
Report Upstream: N/A | Reviewers:
Authors: aschilling, nthiery, hivert | Merged in:
Dependencies: | Stopgaps:
-----------------------------------------------+----------------------------
Comment (by csar):
Replying to [comment:4 ncohen]:
> (this code should probably be stored in `from
sage.combinat.posets.linear_extensions`. Besides, your code may be faster
for small cases but can also require an exponential memory, which can be a
problem too).
I've moved the code to `sage.categories.finite_poset`, which I realise is
not what you've said, and added a note in the docstring saying one may
prefer to count linear extensions of `P` by using
`P.linear_extensions().cardinality()`, which uses the iterator belonging
to `LinearExtensionsOfPoset` and avoids all the cacheing.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14126#comment:5>
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.