# Ticket #10790: trac_10790-reviewer.patch

File trac_10790-reviewer.patch, 2.7 KB (added by ncohen, 11 years ago)
• ## sage/graphs/graph_generators.py

```# HG changeset patch
# User Nathann Cohen <nathann.cohen@gmail.com>
# Date 1299590262 -3600
# Node ID 92426efbabeff550feb56e872e55a1f8810cb028
# Parent  be06513f4722fd27c3f34798441d3bd35791eea3
#10790 -  Dyck graph to the common graphs database (reviewer patch)

diff -r be06513f4722 -r 92426efbabef sage/graphs/graph_generators.py```
 a """ Returns the Dyck graph. For more information, see `this MathWorld article on the Dyck graph `_ or `this Wikipedia article `_. For more information, see `this MathWorld article on the Dyck graph `_ or `this Wikipedia article `_. EXAMPLES: The Dyck graph was defined by Walther von Dyck in 1881. It has 32 vertices and 48 edges, and is a cubic graph (regular of degree 3):: The Dyck graph was defined by Walther von Dyck in 1881. It has `32` vertices and `48` edges, and is a cubic graph (regular of degree `3`):: sage: G = graphs.DyckGraph(); G Dyck graph: Graph on 32 vertices sage: G.is_regular(3) True It is non-planar and Hamiltonian, as well as bipartite (making it a bicubic graph):: It is non-planar and Hamiltonian, as well as bipartite (making it a bicubic graph):: sage: G.is_planar() False sage: G.is_bipartite() True It has radius 5, diameter 5, and girth 6:: It has radius `5`, diameter `5`, and girth `6`:: sage: G.radius() 5 sage: G.girth() 6 Its chromatic number is 2 and its automorphism group is of order 192:: Its chromatic number is `2` and its automorphism group is of order `192`:: sage: G.chromatic_number() 2 (x - 3) * (x + 3) * (x - 1)^9 * (x + 1)^9 * (x^2 - 5)^6 It is a toroidal graph, and its embedding on a torus is dual to an embedding of the Shrikhande graph (:meth:`ShrikhandeGraph `). embedding of the Shrikhande graph (:meth:`ShrikhandeGraph `). """ pos_dict = {} for i in range(8):