#19520: implement random triangulations in a bijective way
-------------------------+-------------------------------------------------
Reporter: | Owner:
chapoton | Status: needs_review
Type: | Milestone: sage-6.10
enhancement | Resolution:
Priority: major | Merged in:
Component: graph | Reviewers: Nathann Cohen
theory | Work issues:
Keywords: | Commit:
random graph | 85e609108945c191046f46af12019128f57b9104
Authors: | Stopgaps:
Frédéric Chapoton |
Report Upstream: N/A |
Branch: |
public/19520 |
Dependencies: |
-------------------------+-------------------------------------------------
Comment (by chapoton):
lo
> 1) It seems that you consider the word as a circular word, but I am not
convinced that your code would notice the pattern 'in,in,in,lf' if it
appeared 'wrapped around' in this way: 'lf,in,in,in,in,in,in'. Is that
correct? My previous code was written to handle this situation.
This is taken care near the end of the 'while' loop, which bring all final
'in' to the beginning on the word, and start again.
> 2) I do not understand the purpose of the second condition in `if not
stack_in or (x != stack_in[-1]):`. I thought you were only looking for the
pattern 'in,in,in,lf' but it seems that some additional constraint has to
be added?
This is because, when we meet in,in,in,lf, the next letter is always
another in, that we must not add twice to the stack of in. Maybe one could
add it there, instead, if you feel it is simpler.
> Also, could you add a check at the end of your function that the graph
you return has the expected number of edges (as it is a planar
triangulation)?
done
Thanks to you!
--
Ticket URL: <http://trac.sagemath.org/ticket/19520#comment:42>
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.