# HG changeset patch
# User Frederic Chapoton <chapoton at math.univ-lyon1.fr>
# Date 1374064940 -7200
# Node ID 2af146179a7d884e4ea847bdf2b81b08b3fbff3d
# Parent fc122a1cc540947c3a6dbfe0a22db3f7d5175812
trac 14904 the Folkman graph
diff --git a/sage/graphs/generators/smallgraphs.py b/sage/graphs/generators/smallgraphs.py
a
|
b
|
def FlowerSnark(): |
1779 | 1779 | 12:[13,19],13:[14],15:[19],16:[15,17],18:[17,19]}, \ |
1780 | 1780 | pos=pos_dict, name="Flower Snark") |
1781 | 1781 | |
| 1782 | |
| 1783 | def FolkmanGraph(): |
| 1784 | """ |
| 1785 | Returns the Folkman graph. |
| 1786 | |
| 1787 | See the :wikipedia:`Wikipedia page on the Folkman Graph |
| 1788 | <Folkman_graph>`. |
| 1789 | |
| 1790 | EXAMPLE:: |
| 1791 | |
| 1792 | sage: g = graphs.FolkmanGraph() |
| 1793 | sage: g.order() |
| 1794 | 20 |
| 1795 | sage: g.size() |
| 1796 | 40 |
| 1797 | sage: g.diameter() |
| 1798 | 4 |
| 1799 | sage: g.girth() |
| 1800 | 4 |
| 1801 | sage: g.charpoly().factor() |
| 1802 | (x - 4) * (x + 4) * x^10 * (x^2 - 6)^4 |
| 1803 | sage: g.chromatic_number() |
| 1804 | 2 |
| 1805 | sage: g.is_eulerian() |
| 1806 | True |
| 1807 | sage: g.is_hamiltonian() |
| 1808 | True |
| 1809 | sage: g.is_vertex_transitive() |
| 1810 | False |
| 1811 | sage: g.is_bipartite() |
| 1812 | True |
| 1813 | """ |
| 1814 | from sage.graphs.generators.families import LCFGraph |
| 1815 | g= LCFGraph(20, [5, -7, -7, 5], 5) |
| 1816 | g.name("Folkman Graph") |
| 1817 | return g |
| 1818 | |
| 1819 | |
1782 | 1820 | def FosterGraph(): |
1783 | 1821 | """ |
1784 | 1822 | Returns the Foster graph. |
diff --git a/sage/graphs/graph_generators.py b/sage/graphs/graph_generators.py
a
|
b
|
def __append_to_doc(methods): |
108 | 108 | "EllinghamHorton78Graph", |
109 | 109 | "ErreraGraph", |
110 | 110 | "FlowerSnark", |
| 111 | "FolkmanGraph", |
111 | 112 | "FosterGraph", |
112 | 113 | "FranklinGraph", |
113 | 114 | "FruchtGraph", |
… |
… |
class GraphGenerators(): |
974 | 975 | EllinghamHorton78Graph = staticmethod(sage.graphs.generators.smallgraphs.EllinghamHorton78Graph) |
975 | 976 | ErreraGraph = staticmethod(sage.graphs.generators.smallgraphs.ErreraGraph) |
976 | 977 | FlowerSnark = staticmethod(sage.graphs.generators.smallgraphs.FlowerSnark) |
| 978 | FolkmanGraph = staticmethod(sage.graphs.generators.smallgraphs.FolkmanGraph) |
977 | 979 | FosterGraph = staticmethod(sage.graphs.generators.smallgraphs.FosterGraph) |
978 | 980 | FranklinGraph = staticmethod(sage.graphs.generators.smallgraphs.FranklinGraph) |
979 | 981 | FruchtGraph = staticmethod(sage.graphs.generators.smallgraphs.FruchtGraph) |