# Ticket #12945: trac_12945-balaban-11-cage.patch

File trac_12945-balaban-11-cage.patch, 4.6 KB (added by kini, 8 years ago)

apply to \$SAGE_ROOT/devel/sage

• ## sage/graphs/graph_generators.py

```# HG changeset patch
# User Keshav Kini <keshav.kini@gmail.com>
# Date 1312012652 -28800
# Node ID d5e4edfc82c9c705e26d1d33b009f2c79c38eb01
# Parent 89f810bff83285de564f8d626fbe4c464b3c6749
trac #9136: Balaban 11-cage

diff --git a/sage/graphs/graph_generators.py b/sage/graphs/graph_generators.py```
 a Named Graphs ------------ - :meth:`Balaban11Cage ` - :meth:`BidiakisCube ` - :meth:`BrinkmannGraph ` - :meth:`ChvatalGraph ` #   Named Graphs ####################################################################### def Balaban11Cage(self): r""" Returns the Balaban 11-cage. For more information, see this `Wikipedia article on the Balaban 11-cage `_. """ pos_dict = {} for j in range(8): for i in range(8): pos_dict[str(j) + str(i)]= [ 0.8 * float(cos(2*((8*j + i)*pi/64 + pi/128))), 0.8 * float(sin(2*((8*j + i)*pi/64 + pi/128))) ] for i in range(4): pos_dict['1' + str(j) + str(i)] = [ 1.1 * float(cos(2*((4*j + i)*pi/32 + pi/64))), 1.1 * float(sin(2*((4*j + i)*pi/32 + pi/64))) ] for i in range(2): pos_dict['1' + str(j) + str(i + 4)] = [ 1.4 * float(cos(2*((2*j + i)*pi/16 + pi/32))), 1.4 * float(sin(2*((2*j + i)*pi/16 + pi/32))) ] edge_dict = { "00": ["11"], "01": ["10"],   "02": ["53"], "03": ["52"], "11": ["20"], "10": ["21"],   "53": ["22"], "52": ["23"], "20": ["31"], "21": ["30"],   "22": ["33"], "23": ["32"], "31": ["40"], "30": ["41"],   "33": ["43"], "32": ["42"], "40": ["50"], "41": ["51"],   "43": ["12"], "42": ["13"], "50": ["61"], "51": ["60"],   "12": ["63"], "13": ["62"], "61": ["70"], "60": ["71"],   "63": ["72"], "62": ["73"], "70": ["01"], "71": ["00"],   "72": ["03"], "73": ["02"], "04": ["35"], "05": ["34"],   "06": ["37"], "07": ["36"], "35": ["64"], "34": ["65"],   "37": ["66"], "36": ["67"], "64": ["55"], "65": ["54"],   "66": ["17"], "67": ["16"], "55": ["45"], "54": ["44"],   "17": ["46"], "16": ["47"], "45": ["74"], "44": ["75"],   "46": ["76"], "47": ["77"], "74": ["25"], "75": ["24"],   "76": ["27"], "77": ["26"], "25": ["14"], "24": ["15"],   "27": ["56"], "26": ["57"], "14": ["05"], "15": ["04"],   "56": ["07"], "57": ["06"], "100": ["03", "04"],   "110": ["10", "12"], "101": ["01", "06"],   "111": ["11", "13"], "102": ["00", "07"],   "112": ["14", "16"], "103": ["02", "05"],   "113": ["15", "17"], "120": ["22", "24"],   "130": ["33", "36"], "121": ["20", "26"],   "131": ["32", "37"], "122": ["21", "27"],   "132": ["31", "34"], "123": ["23", "25"],   "133": ["30", "35"], "140": ["43", "45"],   "150": ["50", "52"], "141": ["40", "46"],   "151": ["51", "53"], "142": ["41", "47"],   "152": ["54", "56"], "143": ["42", "44"],   "153": ["55", "57"], "160": ["60", "66"],   "170": ["73", "76"], "161": ["63", "65"],   "171": ["72", "77"], "162": ["62", "64"],   "172": ["71", "74"], "163": ["61", "67"],   "173": ["70", "75"], "104": ["100", "102", "105"],   "114": ["110", "111", "115"], "105": ["101", "103", "104"],   "115": ["112", "113", "114"], "124": ["120", "121", "125"],   "134": ["130", "131", "135"], "125": ["122", "123", "124"],   "135": ["132", "133", "134"], "144": ["140", "141", "145"],   "154": ["150", "151", "155"], "145": ["142", "143", "144"],   "155": ["152", "153", "154"], "164": ["160", "161", "165"],   "174": ["170", "171", "175"], "165": ["162", "163", "164"],   "175": ["172", "173", "174"] } return graph.Graph(edge_dict, pos=pos_dict, name="Balaban 11-cage") def BidiakisCube(self): r""" Returns the Bidiakis cube.