| 2956 | def SylvesterGraph(): |
| 2957 | """ |
| 2958 | Returns the Sylvester Graph. |
| 2959 | |
| 2960 | This graph is obtained from the Hoffman Singleton graph by considering the |
| 2961 | graph induced by the vertices at distance two from the vertices of an (any) |
| 2962 | edge. |
| 2963 | |
| 2964 | For more information on the Sylvester graph, see |
| 2965 | `<http://www.win.tue.nl/~aeb/graphs/Sylvester.html>`_. |
| 2966 | |
| 2967 | .. SEEALSO:: |
| 2968 | |
| 2969 | * :meth:`~sage.graphs.graph_generators.GraphGenerators.HoffmanSingletonGraph`. |
| 2970 | |
| 2971 | EXAMPLE:: |
| 2972 | |
| 2973 | sage: g = graphs.SylvesterGraph(); g |
| 2974 | Sylvester Graph: Graph on 36 vertices |
| 2975 | sage: g.order() |
| 2976 | 36 |
| 2977 | sage: g.size() |
| 2978 | 90 |
| 2979 | sage: g.is_regular(k=5) |
| 2980 | True |
| 2981 | """ |
| 2982 | g = HoffmanSingletonGraph() |
| 2983 | e = g.edge_iterator(labels = False).next() |
| 2984 | g.delete_vertices(g.neighbors(e[0]) + g.neighbors(e[1])) |
| 2985 | g.relabel() |
| 2986 | g.name("Sylvester Graph") |
| 2987 | g.set_pos({}) |
| 2988 | return g |
| 2989 | |
| 2990 | def SimsGewirtzGraph(): |
| 2991 | """ |
| 2992 | Returns the Sims-Gewirtz Graph. |
| 2993 | |
| 2994 | This graph is obtained from the Higman Sims graph by considering the graph |
| 2995 | induced by the vertices at distance two from the vertices of an (any) |
| 2996 | edge. It is the only strongly regular graph with parameters `v = 56, k = 10, |
| 2997 | \lambda = 0, \mu = 2` |
| 2998 | |
| 2999 | For more information on the Sylvester graph, see |
| 3000 | `<http://www.win.tue.nl/~aeb/graphs/Sims-Gewirtz.html>`_ or its |
| 3001 | :wikipedia:`Wikipedia page <Gewirtz graph>`. |
| 3002 | |
| 3003 | .. SEEALSO:: |
| 3004 | |
| 3005 | * :meth:`~sage.graphs.graph_generators.GraphGenerators.HigmanSimsGraph`. |
| 3006 | |
| 3007 | EXAMPLE:: |
| 3008 | |
| 3009 | sage: g = graphs.SimsGewirtzGraph(); g |
| 3010 | Sims-Gewirtz Graph: Graph on 56 vertices |
| 3011 | sage: g.order() |
| 3012 | 56 |
| 3013 | sage: g.size() |
| 3014 | 280 |
| 3015 | sage: g.is_strongly_regular(parameters = True) |
| 3016 | (56, 10, 0, 2) |
| 3017 | |
| 3018 | """ |
| 3019 | g = HigmanSimsGraph() |
| 3020 | e = g.edge_iterator(labels = False).next() |
| 3021 | g.delete_vertices(g.neighbors(e[0]) + g.neighbors(e[1])) |
| 3022 | g.relabel() |
| 3023 | g.name("Sims-Gewirtz Graph") |
| 3024 | g.set_pos({}) |
| 3025 | return g |
| 3026 | |