#20078: Minimal non faces of simplicial complexes: Improve speed
-------------------------------------+-------------------------------------
Reporter: jipilab | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-7.1
Component: algebraic | Resolution:
topology | Merged in:
Keywords: simplicial | Reviewers:
complex, minimal nonface | Work issues:
Authors: Jean-Philippe | Commit:
Labbé | caefde03d218787281acc8de19202342fa15aebb
Report Upstream: N/A | Stopgaps:
Branch: |
u/jipilab/minnonface |
Dependencies: |
-------------------------------------+-------------------------------------
Changes (by jipilab):
* status: needs_work => needs_review
Old description:
> The current implementation to compute minimal non-faces of simplicial
> complexes is really slow:
>
> {{{
> sage: SC = SimplicialComplex([(0,1,2),
> (0,2,3),
> (2,3,4),
> (1,2,4),
> (1,4,5),
> (0,3,6),
> (3,6,7),
> (4,5,7)])
> sage: %time SC.minimal_nonfaces()
> CPU times: user 11 s, sys: 140 ms, total: 11.2 s
> Wall time: 11.2 s
> {(3, 4, 7), (5, 6), (0, 4), (0, 5), (3, 5), (4, 6), (2, 5), (0, 7), (1,
> 3), (1, 7), (1, 6), (2, 6), (2, 7)}
> }}}
>
> This is a difficult problem in general, but it seems that the algorithm
> could be improved with not too much efforts. I made a first try here:
>
> {{{
> sage: %time SC.minimal_nonfaces()
> CPU times: user 14 ms, sys: 12.4 ms, total: 26.4 ms
> Wall time: 30.5 ms
> {(3, 4, 7), (0, 7), (0, 4), (0, 5), (3, 5), (1, 7), (2, 5), (5, 6), (1,
> 3), (4, 6), (1, 6), (2, 6), (2, 7)}
> }}}
New description:
The current implementation to compute minimal non-faces of simplicial
complexes is really slow:
{{{
sage: SC = SimplicialComplex([(0,1,2),
(0,2,3),
(2,3,4),
(1,2,4),
(1,4,5),
(0,3,6),
(3,6,7),
(4,5,7)])
sage: %time SC.minimal_nonfaces()
CPU times: user 11 s, sys: 140 ms, total: 11.2 s
Wall time: 11.2 s
{(3, 4, 7), (5, 6), (0, 4), (0, 5), (3, 5), (4, 6), (2, 5), (0, 7), (1,
3), (1, 7), (1, 6), (2, 6), (2, 7)}
}}}
This is a difficult problem in general, but it seems that the algorithm
could be improved with not too much efforts. I made a first try here:
{{{
sage: %time SC.minimal_nonfaces()
CPU times: user 881 µs, sys: 326 µs, total: 1.21 ms
Wall time: 1.21 ms
{(3, 4, 7), (0, 7), (0, 4), (0, 5), (3, 5), (1, 7), (2, 5), (5, 6), (1,
3), (4, 6), (2, 7), (2, 6), (1, 6)}
}}}
--
Comment:
New commits:
||[http://git.sagemath.org/sage.git/commit/?id=caefde03d218787281acc8de19202342fa15aebb
caefde0]||{{{Changed Sets to frozensets and used itertools}}}||
----
New commits:
||[http://git.sagemath.org/sage.git/commit/?id=caefde03d218787281acc8de19202342fa15aebb
caefde0]||{{{Changed Sets to frozensets and used itertools}}}||
--
Ticket URL: <http://trac.sagemath.org/ticket/20078#comment:18>
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.