| 3217 | def ClebschGraph(self): |
| 3218 | r""" |
| 3219 | Return the Clebsch graph. |
| 3220 | |
| 3221 | EXAMPLES:: |
| 3222 | |
| 3223 | sage: g = graphs.ClebschGraph() |
| 3224 | sage: g.automorphism_group().cardinality() |
| 3225 | 1920 |
| 3226 | sage: g.girth() |
| 3227 | 4 |
| 3228 | sage: g.chromatic_number() |
| 3229 | 4 |
| 3230 | sage: g.diameter() |
| 3231 | 2 |
| 3232 | sage: g.show(figsize = [10,10]) # long time |
| 3233 | """ |
| 3234 | g = graph.Graph(pos={}) |
| 3235 | n = 16 |
| 3236 | x = 0 |
| 3237 | for i in range(8): |
| 3238 | g.add_edge(x%n,(x+1)%n) |
| 3239 | g.add_edge(x%n,(x+6)%n) |
| 3240 | g.add_edge(x%n,(x+8)%n) |
| 3241 | x += 1 |
| 3242 | g.add_edge(x%n,(x+3)%n) |
| 3243 | g.add_edge(x%n,(x+2)%n) |
| 3244 | g.add_edge(x%n,(x+8)%n) |
| 3245 | x += 1 |
| 3246 | |
| 3247 | _circle_embedding(g, range(16), shift = .5) |
| 3248 | g.name("Clebsch graph") |
| 3249 | |
| 3250 | return g |
| 3251 | |
| 3252 | def CoxeterGraph(self): |
| 3253 | r""" |
| 3254 | Return the Coxeter graph. |
| 3255 | |
| 3256 | See the :wikipedia:`Wikipedia page on the Coxeter graph |
| 3257 | <Coxeter_graph>`. |
| 3258 | |
| 3259 | EXAMPLES:: |
| 3260 | |
| 3261 | sage: g = graphs.CoxeterGraph() |
| 3262 | sage: g.automorphism_group().cardinality() |
| 3263 | 336 |
| 3264 | sage: g.girth() |
| 3265 | 7 |
| 3266 | sage: g.chromatic_number() |
| 3267 | 3 |
| 3268 | sage: g.diameter() |
| 3269 | 4 |
| 3270 | sage: g.show(figsize = [10,10]) # long time |
| 3271 | """ |
| 3272 | g = graph.Graph({ |
| 3273 | 27: [6, 22, 14], |
| 3274 | 24: [0, 7, 18], |
| 3275 | 25: [8, 15, 2], |
| 3276 | 26: [10, 16, 23], |
| 3277 | },pos={}) |
| 3278 | |
| 3279 | g.add_cycle(range(24)) |
| 3280 | g.add_edges([(5,11),(9,20),(12,1),(13,19),(17,4),(3,21)]) |
| 3281 | |
| 3282 | _circle_embedding(g, range(24)) |
| 3283 | _circle_embedding(g, [24,25,26], radius = .5) |
| 3284 | g.get_pos()[27] = (0,0) |
| 3285 | |
| 3286 | g.name("Coxeter Graph") |
| 3287 | |
| 3288 | return g |
| 3289 | |
| 4445 | def HoffmanGraph(self): |
| 4446 | r""" |
| 4447 | Returns the Hoffman Graph. |
| 4448 | |
| 4449 | See the :wikipedia:`Wikipedia page on the Hoffman graph |
| 4450 | <Hoffman_graph>`. |
| 4451 | |
| 4452 | EXAMPLES:: |
| 4453 | |
| 4454 | sage: g = graphs.HoffmanGraph() |
| 4455 | sage: g.is_bipartite() |
| 4456 | True |
| 4457 | sage: g.is_hamiltonian() # long time |
| 4458 | True |
| 4459 | sage: g.radius() |
| 4460 | 3 |
| 4461 | sage: g.diameter() |
| 4462 | 4 |
| 4463 | sage: g.automorphism_group().cardinality() |
| 4464 | 48 |
| 4465 | """ |
| 4466 | g = graph.Graph({ |
| 4467 | 0: [1, 7, 8, 13], |
| 4468 | 1: [2, 9, 14], |
| 4469 | 2: [3, 8, 10], |
| 4470 | 3: [4, 9, 15], |
| 4471 | 4: [5, 10, 11], |
| 4472 | 5: [6, 12, 14], |
| 4473 | 6: [7, 11, 13], |
| 4474 | 7: [12, 15], |
| 4475 | 8: [12, 14], |
| 4476 | 9: [11, 13], |
| 4477 | 10: [12, 15], |
| 4478 | 11: [14], |
| 4479 | 13: [15]}) |
| 4480 | g.set_pos({}) |
| 4481 | _circle_embedding(g, range(8)) |
| 4482 | _circle_embedding(g, range(8, 14), radius = .7, shift = .5) |
| 4483 | _circle_embedding(g, [14,15], radius = .1) |
| 4484 | |
| 4485 | g.name("Hoffman Graph") |
| 4486 | |
| 4487 | return g |
| 4488 | |
| 4489 | def HoltGraph(self): |
| 4490 | r""" |
| 4491 | Returns the Holt Graph. |
| 4492 | |
| 4493 | See the :wikipedia:`Wikipedia page on the Holt graph |
| 4494 | <Holt_graph>`. |
| 4495 | |
| 4496 | EXAMPLES:: |
| 4497 | |
| 4498 | sage: g = graphs.HoltGraph() |
| 4499 | sage: g.chromatic_number() |
| 4500 | 3 |
| 4501 | sage: g.is_hamiltonian() # long time |
| 4502 | True |
| 4503 | sage: g.radius() |
| 4504 | 3 |
| 4505 | sage: g.diameter() |
| 4506 | 4 |
| 4507 | sage: g.girth() |
| 4508 | 5 |
| 4509 | sage: g.automorphism_group().cardinality() |
| 4510 | 18 |
| 4511 | """ |
| 4512 | g = graph.Graph({ |
| 4513 | 0: [9, 12], |
| 4514 | 1: [11, 14], |
| 4515 | 2: [13, 16], |
| 4516 | 3: [15, 18], |
| 4517 | 4: [17, 20], |
| 4518 | 5: [19, 22], |
| 4519 | 6: [21, 24], |
| 4520 | 7: [23, 26], |
| 4521 | 8: [10, 25] |
| 4522 | },pos={}) |
| 4523 | |
| 4524 | g.add_vertices(range(27)) |
| 4525 | g.add_cycle(range(9)) |
| 4526 | |
| 4527 | g.add_cycle([13,21,11,19,9,17,25,15,23]) |
| 4528 | g.add_cycle([12,16,20, 24, 10, 14, 18, 22, 26]) |
| 4529 | |
| 4530 | _circle_embedding(g, range(9), shift = .75) |
| 4531 | _circle_embedding(g, range(9, 27), radius = .7, shift = 0) |
| 4532 | |
| 4533 | g.name("Holt graph") |
| 4534 | |
| 4535 | return g |
| 4536 | |