Sage: Ticket #7365: Petersen's 2-factor theorem
https://trac.sagemath.org/ticket/7365
<p>
As the docstring says :
</p>
<p>
Petersen's 2-factor decomposition theorem asserts that any
<code>2r</code>-regular graph <code>G</code> can be decomposed into 2-factors.
Equivalently, it means that the edges of any <code>2r</code>-regular
graphs can be partitionned in <code>r</code> sets <code>C_1,\dots,C_r</code> such
that for all <code>i</code>, the set <code>C_i</code> is a disjoint union of cycles
( a 2-regular graph ).
</p>
<p>
As any graph of maximal degree <code>\Delta</code> can be completed into
a regular graph of degree <code>2\lceil\frac\Delta 2\rceil</code>, this
result also means that the edges of any graph of degree <code>\Delta</code>
can be partitionned in <code>r=2\lceil\frac\Delta 2\rceil</code> sets
<code>C_1,\dots,C_r</code> such that for all <code>i</code>, the set <code>C_i</code> is a
graph of maximal degree 2 ( a disjoint union of paths
and cycles ).
</p>
<p>
Nathann
</p>
en-usSagehttps://trac.sagemath.org/chrome/site/logo_sagemath_trac.png
https://trac.sagemath.org/ticket/7365
Trac 1.1.6ncohenWed, 18 Nov 2009 18:09:22 GMTstatus, description changed; milestone set
https://trac.sagemath.org/ticket/7365#comment:1
https://trac.sagemath.org/ticket/7365#comment:1
<ul>
<li><strong>status</strong>
changed from <em>new</em> to <em>needs_review</em>
</li>
<li><strong>description</strong>
modified (<a href="/ticket/7365?action=diff&version=1">diff</a>)
</li>
<li><strong>milestone</strong>
set to <em>sage-4.3</em>
</li>
</ul>
TicketrlmTue, 15 Dec 2009 17:27:17 GMTstatus changed; upstream set
https://trac.sagemath.org/ticket/7365#comment:2
https://trac.sagemath.org/ticket/7365#comment:2
<ul>
<li><strong>status</strong>
changed from <em>needs_review</em> to <em>needs_work</em>
</li>
<li><strong>upstream</strong>
set to <em>N/A</em>
</li>
</ul>
<p>
If you're introducing a new module in sage.graphs, the header of the file should be much more descriptive of what the module is for, etc... Take a look at some of the other files for examples.
</p>
<p>
I'm (personally) very curious about what else you plan on including in <code>graph_decompositions</code>...
</p>
<p>
The patch applies cleanly, and the code looks good. Once again, I'd like to see a little more examples in the documentation.
</p>
TicketncohenFri, 18 Dec 2009 08:51:02 GMTstatus, description changed
https://trac.sagemath.org/ticket/7365#comment:3
https://trac.sagemath.org/ticket/7365#comment:3
<ul>
<li><strong>status</strong>
changed from <em>needs_work</em> to <em>needs_review</em>
</li>
<li><strong>description</strong>
modified (<a href="/ticket/7365?action=diff&version=3">diff</a>)
</li>
</ul>
<p>
Hello !!!
</p>
<p>
As mentionned, I moved this function toward graph.py, and will patiently wait for the splitting of graph.py to begin creating new files.. :-)
</p>
<p>
(please do not forget to install GLPK or CBC before testing it because of <a class="closed ticket" href="https://trac.sagemath.org/ticket/7734" title="defect: edge_coloring loops forever when GLPK is not installed (closed: fixed)">#7734</a>)
</p>
<p>
Nathann
</p>
TicketncohenFri, 18 Dec 2009 08:51:45 GMTattachment set
https://trac.sagemath.org/ticket/7365
https://trac.sagemath.org/ticket/7365
<ul>
<li><strong>attachment</strong>
set to <em>trac_7365.patch</em>
</li>
</ul>
TicketncohenFri, 18 Dec 2009 08:54:06 GMT
https://trac.sagemath.org/ticket/7365#comment:4
https://trac.sagemath.org/ticket/7365#comment:4
<p>
I tried to find another example, but could not find any interesting/funny one (the theorem and its proof by themselves are enough to make me laugh :-) ). If you can think of a good one, just tell me and I'll add it :-)
</p>
<p>
Nathann
</p>
TicketrlmFri, 18 Dec 2009 19:19:04 GMTattachment set
https://trac.sagemath.org/ticket/7365
https://trac.sagemath.org/ticket/7365
<ul>
<li><strong>attachment</strong>
set to <em>tmp_4.png</em>
</li>
</ul>
TicketrlmFri, 18 Dec 2009 19:21:29 GMTattachment set
https://trac.sagemath.org/ticket/7365
https://trac.sagemath.org/ticket/7365
<ul>
<li><strong>attachment</strong>
set to <em>trac_7365-doctest.patch</em>
</li>
</ul>
TicketrlmFri, 18 Dec 2009 19:22:58 GMTstatus changed; reviewer, author set
https://trac.sagemath.org/ticket/7365#comment:5
https://trac.sagemath.org/ticket/7365#comment:5
<ul>
<li><strong>status</strong>
changed from <em>needs_review</em> to <em>positive_review</em>
</li>
<li><strong>reviewer</strong>
set to <em>Robert Miller</em>
</li>
<li><strong>author</strong>
set to <em>Nathann Cohen</em>
</li>
</ul>
TicketmhansenSat, 19 Dec 2009 22:59:07 GMTstatus, milestone changed; resolution, merged set
https://trac.sagemath.org/ticket/7365#comment:6
https://trac.sagemath.org/ticket/7365#comment:6
<ul>
<li><strong>status</strong>
changed from <em>positive_review</em> to <em>closed</em>
</li>
<li><strong>resolution</strong>
set to <em>fixed</em>
</li>
<li><strong>merged</strong>
set to <em>sage-4.3.rc1</em>
</li>
<li><strong>milestone</strong>
changed from <em>sage-4.3.1</em> to <em>sage-4.3</em>
</li>
</ul>
Ticket