#14267: alternative algorithm for the lattice of order ideals of a poset
---------------------------------+------------------------------------------
Reporter: chapoton | Owner: sage-combinat
Type: enhancement | Status: needs_review
Priority: minor | Milestone: sage-5.9
Component: combinatorics | Resolution:
Keywords: poset | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
---------------------------------+------------------------------------------
Changes (by chapoton):
* status: new => needs_review
Old description:
> I propose to implement another algorithm, which seems to be slightly
> faster than the existing implementation, at the cost of being defined on
> antichains instead of order ideals.
> {{{
> sage: P = Posets.ChainPoset(5)
> sage: Q = P.product(P)
> sage: Q.order_ideals_lattice()
> Finite lattice containing 252 elements
> sage: new_J(Q)
> Finite lattice containing 252 elements
> sage: new_J(Q).is_isomorphic(Q.order_ideals_lattice())
> True
> sage: timeit('Q.order_ideals_lattice()')
> 5 loops, best of 3: 5.25 s per loop
> sage: timeit('new_J(Q)')
> 5 loops, best of 3: 3.45 s per loop
> }}}
New description:
I propose to implement another algorithm, which seems to be slightly
faster than the existing implementation, at the cost of being defined on
antichains instead of order ideals.
{{{
sage: P = Posets.ChainPoset(5)
sage: Q = P.product(P)
sage: R1 = Q.order_ideals_lattice();R1
Finite lattice containing 252 elements
sage: R2 = Q.order_ideals_lattice(as_ideals=False);R2
Finite lattice containing 252 elements
sage: R1.is_isomorphic(R2)
True
sage: timeit('Q.order_ideals_lattice()')
5 loops, best of 3: 5.25 s per loop
sage: timeit('Q.order_ideals_lattice(as_ideals=False)')
5 loops, best of 3: 3.45 s per loop
}}}
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14267#comment:2>
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.