# HG changeset patch
# User Nathann Cohen <nathann.cohen@gmail.com>
# Date 1361729470 -3600
# Node ID 4275ccc067ec713233e3b8ba8e3ae93e9da05da6
# Parent 36125c7114724a6bf93066dd58b2f54560be29af
Stopgap warning in Graph.modular_decomposition
diff --git a/sage/graphs/graph.py b/sage/graphs/graph.py
a
|
b
|
|
5399 | 5399 | Returns the modular decomposition of the current graph. |
5400 | 5400 | |
5401 | 5401 | Crash course on modular decomposition: |
5402 | | |
| 5402 | |
5403 | 5403 | A module `M` of a graph `G` is a proper subset of its vertices |
5404 | 5404 | such that for all `u \in V(G)-M, v,w\in M` the relation `u |
5405 | 5405 | \sim v \Leftrightarrow u \sim w` holds, where `\sim` denotes |
… |
… |
|
5443 | 5443 | You may also be interested in the survey from Michel Habib and |
5444 | 5444 | Christophe Paul entitled "A survey on Algorithmic aspects of |
5445 | 5445 | modular decomposition" [HabPau10]_. |
5446 | | |
| 5446 | |
5447 | 5447 | OUTPUT: |
5448 | | |
| 5448 | |
5449 | 5449 | A pair of two values (recursively encoding the decomposition) : |
5450 | | |
| 5450 | |
5451 | 5451 | * The type of the current module : |
5452 | | |
| 5452 | |
5453 | 5453 | * ``"Parallel"`` |
5454 | 5454 | * ``"Prime"`` |
5455 | 5455 | * ``"Serie"`` |
5456 | | |
| 5456 | |
5457 | 5457 | * The list of submodules (as list of pairs ``(type, list)``, |
5458 | 5458 | recursively...) or the vertex's name if the module is a |
5459 | 5459 | singleton. |
5460 | | |
| 5460 | |
5461 | 5461 | EXAMPLES: |
5462 | | |
| 5462 | |
5463 | 5463 | The Bull Graph is prime:: |
5464 | | |
| 5464 | |
5465 | 5465 | sage: graphs.BullGraph().modular_decomposition() |
5466 | 5466 | ('Prime', [3, 4, 0, 1, 2]) |
5467 | | |
| 5467 | |
5468 | 5468 | The Petersen Graph too:: |
5469 | | |
| 5469 | |
5470 | 5470 | sage: graphs.PetersenGraph().modular_decomposition() |
5471 | 5471 | ('Prime', [2, 6, 3, 9, 7, 8, 0, 1, 5, 4]) |
5472 | | |
| 5472 | |
5473 | 5473 | This a clique on 5 vertices with 2 pendant edges, though, has a more |
5474 | 5474 | interesting decomposition :: |
5475 | | |
| 5475 | |
5476 | 5476 | sage: g = graphs.CompleteGraph(5) |
5477 | 5477 | sage: g.add_edge(0,5) |
5478 | 5478 | sage: g.add_edge(0,6) |
… |
… |
|
5481 | 5481 | |
5482 | 5482 | ALGORITHM: |
5483 | 5483 | |
5484 | | This function uses a C implementation of a 2-step algorithm |
| 5484 | This function uses a C implementation of a 2-step algorithm |
5485 | 5485 | implemented by Fabien de Montgolfier [FMDec]_ : |
5486 | 5486 | |
5487 | 5487 | * Computation of a factorizing permutation [HabibViennot1999]_. |
… |
… |
|
5512 | 5512 | vol 4, number 1, pages 41--59, 2010 |
5513 | 5513 | http://www.lirmm.fr/~paul/md-survey.pdf |
5514 | 5514 | """ |
| 5515 | from sage.misc.stopgap import stopgap |
| 5516 | stopgap("Graph.modular_decomposition is known to return wrong results",13744) |
5515 | 5517 | |
5516 | 5518 | from sage.graphs.modular_decomposition.modular_decomposition import modular_decomposition |
5517 | 5519 | |