#12874: Recognition of Comparability graphs and Permutation graphs
---------------------------------+------------------------------------------
Reporter: ncohen | Owner: tbd
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-5.1
Component: graph theory | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Nathann Cohen | Merged in:
Dependencies: 12872 | Stopgaps:
---------------------------------+------------------------------------------
Changes (by {'newvalue': u'Nathann Cohen', 'oldvalue': ''}):
* status: new => needs_review
* dependencies: => 12872
* component: PLEASE CHANGE => graph theory
* author: => Nathann Cohen
Old description:
New description:
This ticket is a bit large, but everything inside is related. Here is what
it does :
* Creates a module graph/comparability.pyx whose purpose is to contain
everything related to comparability graphs, and to permutation graphs
(which are comparability graphs).
* Implements two recognition algorithms for comparability graphs, the
first one being a greedy algorithm and the second an integer linear
program, made to check the results from the first one
* Adds a ``is_transivite`` function to DiGraph objects
* Updated Graph.is_bipartite so that it can return negative
certificates (odd cycles)
* Add a PermutationGraph constructor, that lets one build a
Permutation graph from a permutation
* A crazy amount of documentation
A few notes :
* This patch may be long, but I tried to make it very clean. In
particular, results are checked many, many times before being returned,
and there are two versions of the main algorithm (is_comparability) so
that we can easily track wrong results that may (in some magical way) get
through the cracks.
* This ticket depends on #12872, which I wrote while working on this
patch.
* My first intent was to write a *real implementation* for this
recognition algorithm, and use the greedy one to check the results. As
writing this greedy algorithm was already not that straightforward (and I
also had to learn how it worked from a few papers) I did not write a "more
efficient version", and this implementation is pretty "lose" with
ressources. I think this can be done in a later patch, considering that
the results from the greedy algorithms can already be checked by the
Linear Program, and that the present patch is already large enough `:-)`
Heeeeeeeeeeeeeere it is !!!!!!!!!
Oh, and funnily enough the OEIS does not contain the "number of
comparability graphs on n vertices" or the "number of permutation graphs
on n vertices". And there does not seem to be any code on internet to do
that kind of work.
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12874#comment:1>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.