#19123: LatticePoset: add is_vertically_decomposable
-------------------------------------+-------------------------------------
Reporter: jmantysalo | Owner:
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-6.9
Component: combinatorics | Resolution:
Keywords: | Merged in:
Authors: Jori Mäntysalo | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/jmantysalo/vertically_decomposable|
667173c9117e910378f3bc959821a7922a1f9c39
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Old description:
> This patch adds a function `is_vertically_decomposable` to finite
> lattices.
>
> For testing see https://oeis.org/A058800 ; for example
>
> {{{
> sum([1 for L in Posets(6) if L.is_lattice() and
> not LatticePoset(L).is_vertically_decomposable()])
> }}}
>
> returns 7 as it should.
New description:
This patch adds a function `is_vertically_decomposable` to finite
lattices.
For testing see https://oeis.org/A058800 ; for example
{{{
sum([1 for L in Posets(6) if L.is_lattice() and
not LatticePoset(L).is_vertically_decomposable()])
}}}
returns 7 as it should.
There is a place for possible optimization: If there is, say, covering
relations `bottom -> 5`, `3 -> 8` and `7 -> top`, is suffices to show that
the lattice is not vertically decomposable. This might be faster on
average. Now the complexity is linear to number of covering relations.
--
Comment (by jmantysalo):
This code should now work.
I still don't know how to make the user interface... For posets we have
boolean-valued `is_connected()` and subposets-valued
`connected_components()`. But what should then be the function returning
only "decomposing elements". I will ask in sage-devel.
Comments on documentation are welcome.
--
Ticket URL: <http://trac.sagemath.org/ticket/19123#comment:17>
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.