| 1514 | def HallJankoGraph(self): |
| 1515 | r""" |
| 1516 | Returns the Hall-Janko Graph. |
| 1517 | |
| 1518 | More information on the Hall-Janko on its :wikipedia:`Wikipedia page |
| 1519 | <Hall-Janko_graph>`. |
| 1520 | |
| 1521 | EXAMPLES:: |
| 1522 | |
| 1523 | sage: g = graphs.HallJankoGraph() |
| 1524 | sage: g.is_regular(36) |
| 1525 | True |
| 1526 | sage: g.is_vertex_transitive() |
| 1527 | True |
| 1528 | |
| 1529 | Is it really strongly regular with parameters 14,12 ? :: |
| 1530 | |
| 1531 | sage: nu = set(g.neighbors(0)) |
| 1532 | sage: for v in range(1, 100): |
| 1533 | ... if v in nu: |
| 1534 | ... expected = 14 |
| 1535 | ... else: |
| 1536 | ... expected = 12 |
| 1537 | ... nv = set(g.neighbors(v)) |
| 1538 | ... nv.discard(0) |
| 1539 | ... if len(nu & nv) != expected: |
| 1540 | ... print "Something is wrong here !!!" |
| 1541 | ... break |
| 1542 | |
| 1543 | Some other properties that we know how to check:: |
| 1544 | |
| 1545 | sage: g.diameter() |
| 1546 | 2 |
| 1547 | sage: g.girth() |
| 1548 | 3 |
| 1549 | sage: factor(g.characteristic_polynomial()) |
| 1550 | (x - 36) * (x - 6)^36 * (x + 4)^63 |
| 1551 | """ |
| 1552 | # Below are the lines generating the graph's sparse6 string. As it takes |
| 1553 | # some time to run them, this method actually builds the graph from its |
| 1554 | # sparse6 string. |
| 1555 | |
| 1556 | # from sage.interfaces.gap import gap |
| 1557 | # gap.eval("g1 := (1,84)(2,20)(3,48)(4,56)(5,82)(6,67)(7,55)(8,41)(9,35)"+ |
| 1558 | # "(10,40)(11,78)(12,100)(13,49)(14,37)(15,94)(16,76)(17,19)"+ |
| 1559 | # "(18,44)(21,34)(22,85)(23,92)(24,57)(25,75)(26,28)(27,64)"+ |
| 1560 | # "(29,90)(30,97)(31,38)(32,68)(33,69)(36,53)(39,61)(42,73)"+ |
| 1561 | # "(43,91)(45,86)(46,81)(47,89)(50,93)(51,96)(52,72)(54,74)"+ |
| 1562 | # "(58,99)(59,95)(60,63)(62,83)(65,70)(66,88)(71,87)(77,98)"+ |
| 1563 | # "(79,80);") |
| 1564 | |
| 1565 | # gap.eval("g2 := (1,80,22)(2,9,11)(3,53,87)(4,23,78)(5,51,18)(6,37,24)"+ |
| 1566 | # "(8,27,60)(10,62,47)(12,65,31)(13,64,19)(14,61,52)(15,98,25)"+ |
| 1567 | # "(16,73,32)(17,39,33)(20,97,58)(21,96,67)(26,93,99)(28,57,35)"+ |
| 1568 | # "(29,71,55)(30,69,45)(34,86,82)(38,59,94)(40,43,91)(42,68,44)"+ |
| 1569 | # "(46,85,89)(48,76,90)(49,92,77)(50,66,88)(54,95,56)(63,74,72)"+ |
| 1570 | # "(70,81,75)(79,100,83);") |
| 1571 | |
| 1572 | # gap.eval("G := Group([g1,g2]);") |
| 1573 | # edges=gap('Orbit(G,[1,5],OnSets)') |
| 1574 | |
| 1575 | # edge_list = [] |
| 1576 | # for u,v in edges: |
| 1577 | # edge_list.append((int(u),int(v))) |
| 1578 | |
| 1579 | # g = graph.Graph(edge_list, pos = {}) |
| 1580 | # return g.sparse6_string() |
| 1581 | |
| 1582 | string = (":~?@c__E@?g?A?w?A@GCA_?CA`OWF`W?EAW?@?_OD@_[GAgcIaGGB@OcIA"+ |
| 1583 | "wCE@o_K_?GB@?WGAouC@OsN_?GB@O[GB`A@@_e?@OgLB_{Q_?GC@O[GAOs"+ |
| 1584 | "OCWGBA?kKBPA@?_[KB_{OCPKT`o_RD`]A?o[HBOwODW?DA?cIB?wRDP[X`"+ |
| 1585 | "ogKB_{QD@]B@o_KBPWXE`mC@o_JB?{PDPq@?oWGA_{OCPKTDp_YEwCA@_c"+ |
| 1586 | "IBOwOC`OX_OGB@?WPDPcYFg?C@_gKBp?SE@cYF`{_`?SGAOoOC`_\\FwCE"+ |
| 1587 | "A?gKBO{QD@k[FqI??_OFA_oQE@k\\Fq?`GgCB@pGRD@_XFP{a_?SE@ocIA"+ |
| 1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mJrKsLb[yMro|OcXI"+ |
| 1618 | "RdPTTddZaOgJB@?UEPk[FQCfIaolJrSvMBczNR|AOsXFQCtOTtaB@?WGAP"+ |
| 1619 | "?TEPo\\GAGdHqgmKBCqLR[xMb|?PC`HQs|TTt`XUtu@?o[HB?sNCPGXF@{"+ |
| 1620 | "_GQKcIqolJb_yNCLDPs`MRtDRTTdYUwSEA?kLB`CWF@s]FqGgIqooLRgzN"+ |
| 1621 | "RxFQSlMSDDQTDXVUTi@?_KDAOoLBpKUEQOfIa{oLB_xMrt?Os\\HQcpMST"+ |
| 1622 | "HSTtl[VT}A@ocJBOwSD`_XEpo_Ha_mJrKtLbgzNSTGQspLRtDUUDp\\WG["+ |
| 1623 | "HB`CQCp[WFQGgIQgkJQ{rLbc{Nc@APsdLRt@PSt\\WUtt_Wn") |
| 1624 | |
| 1625 | g = graph.Graph(string, pos = {}, loops = False, multiedges = False) |
| 1626 | |
| 1627 | _circle_embedding(g, range(100)) |
| 1628 | g.name("Hall-Janko Graph") |
| 1629 | return g |
| 1630 | |