# HG changeset patch
# User Minh Van Nguyen <nguyenminh2@gmail.com>
# Date 1290706209 28800
# Node ID c8e2da57206307549bd8b2eb4b2978ab376e3767
# Parent e975f3c1e10421ca653434343f7cf71b9d823edb
#10329: add GoldnerHarary graph to common graphs database
diff git a/sage/graphs/graph_generators.py b/sage/graphs/graph_generators.py
a

b


104  104   :meth:`FlowerSnark <GraphGenerators.FlowerSnark>` 
105  105   :meth:`FranklinGraph <GraphGenerators.FranklinGraph>` 
106  106   :meth:`FruchtGraph <GraphGenerators.FruchtGraph>` 
 107   :meth:`GoldnerHararyGraph <GraphGenerators.GoldnerHararyGraph>` 
107  108   :meth:`GrotzschGraph <GraphGenerators.GrotzschGraph>` 
108  109   :meth:`HeawoodGraph <GraphGenerators.HeawoodGraph>` 
109  110   :meth:`HigmanSimsGraph <GraphGenerators.HigmanSimsGraph>` 
… 
… 

2647  2648  G = networkx.frucht_graph() 
2648  2649  return graph.Graph(G, pos=pos_dict, name="Frucht graph") 
2649  2650  
 2651  def GoldnerHararyGraph(self): 
 2652  r""" 
 2653  Return the GoldnerHarary graph. 
 2654  
 2655  For more information, see this 
 2656  `Wikipedia article on the GoldnerHarary graph <http://en.wikipedia.org/wiki/Goldner%E2%80%93Harary_graph>`_. 
 2657  
 2658  EXAMPLES: 
 2659  
 2660  The GoldnerHarary graph is named after A. Goldner and Frank Harary. 
 2661  It is a planar graph having 11 vertices and 27 edges. :: 
 2662  
 2663  sage: G = graphs.GoldnerHararyGraph(); G 
 2664  GoldnerHarary graph: Graph on 11 vertices 
 2665  sage: G.is_planar() 
 2666  True 
 2667  sage: G.order() 
 2668  11 
 2669  sage: G.size() 
 2670  27 
 2671  
 2672  The GoldnerHarary graph is chordal with radius 2, diameter 2, and 
 2673  girth 3. :: 
 2674  
 2675  sage: G.is_chordal() 
 2676  True 
 2677  sage: G.radius() 
 2678  2 
 2679  sage: G.diameter() 
 2680  2 
 2681  sage: G.girth() 
 2682  3 
 2683  
 2684  Its chromatic number is 4 and its automorphism group is isomorphic to 
 2685  the dihedral group `D_6`. :: 
 2686  
 2687  sage: G.chromatic_number() 
 2688  4 
 2689  sage: ag = G.automorphism_group() 
 2690  sage: ag.is_isomorphic(DihedralGroup(6)) 
 2691  True 
 2692  """ 
 2693  edge_dict = { 
 2694  0: [1,3,4], 
 2695  1: [2,3,4,5,6,7,10], 
 2696  2: [3,7], 
 2697  3: [7,8,9,10], 
 2698  4: [3,5,9,10], 
 2699  5: [10], 
 2700  6: [7,10], 
 2701  7: [8,10], 
 2702  8: [10], 
 2703  9: [10]} 
 2704  return graph.Graph(edge_dict, name="GoldnerHarary graph") 
 2705  
2650  2706  def GrotzschGraph(self): 
2651  2707  r""" 
2652  2708  Creates the Grotzsch graph. 