| 2225 | def Balaban11Cage(self): |
| 2226 | r""" |
| 2227 | Returns the Balaban 11-cage. |
| 2228 | |
| 2229 | For more information, see this `Wikipedia article on the Balaban |
| 2230 | 11-cage <http://en.wikipedia.org/wiki/Balaban_11-cage>`_. |
| 2231 | """ |
| 2232 | pos_dict = {} |
| 2233 | for j in range(8): |
| 2234 | for i in range(8): |
| 2235 | pos_dict[str(j) + str(i)]= [ |
| 2236 | 0.8 * float(cos(2*((8*j + i)*pi/64 + pi/128))), |
| 2237 | 0.8 * float(sin(2*((8*j + i)*pi/64 + pi/128))) |
| 2238 | ] |
| 2239 | for i in range(4): |
| 2240 | pos_dict['1' + str(j) + str(i)] = [ |
| 2241 | 1.1 * float(cos(2*((4*j + i)*pi/32 + pi/64))), |
| 2242 | 1.1 * float(sin(2*((4*j + i)*pi/32 + pi/64))) |
| 2243 | ] |
| 2244 | for i in range(2): |
| 2245 | pos_dict['1' + str(j) + str(i + 4)] = [ |
| 2246 | 1.4 * float(cos(2*((2*j + i)*pi/16 + pi/32))), |
| 2247 | 1.4 * float(sin(2*((2*j + i)*pi/16 + pi/32))) |
| 2248 | ] |
| 2249 | |
| 2250 | edge_dict = { |
| 2251 | "00": ["11"], "01": ["10"], "02": ["53"], "03": ["52"], |
| 2252 | "11": ["20"], "10": ["21"], "53": ["22"], "52": ["23"], |
| 2253 | "20": ["31"], "21": ["30"], "22": ["33"], "23": ["32"], |
| 2254 | "31": ["40"], "30": ["41"], "33": ["43"], "32": ["42"], |
| 2255 | "40": ["50"], "41": ["51"], "43": ["12"], "42": ["13"], |
| 2256 | "50": ["61"], "51": ["60"], "12": ["63"], "13": ["62"], |
| 2257 | "61": ["70"], "60": ["71"], "63": ["72"], "62": ["73"], |
| 2258 | "70": ["01"], "71": ["00"], "72": ["03"], "73": ["02"], |
| 2259 | |
| 2260 | "04": ["35"], "05": ["34"], "06": ["37"], "07": ["36"], |
| 2261 | "35": ["64"], "34": ["65"], "37": ["66"], "36": ["67"], |
| 2262 | "64": ["55"], "65": ["54"], "66": ["17"], "67": ["16"], |
| 2263 | "55": ["45"], "54": ["44"], "17": ["46"], "16": ["47"], |
| 2264 | "45": ["74"], "44": ["75"], "46": ["76"], "47": ["77"], |
| 2265 | "74": ["25"], "75": ["24"], "76": ["27"], "77": ["26"], |
| 2266 | "25": ["14"], "24": ["15"], "27": ["56"], "26": ["57"], |
| 2267 | "14": ["05"], "15": ["04"], "56": ["07"], "57": ["06"], |
| 2268 | |
| 2269 | |
| 2270 | |
| 2271 | "100": ["03", "04"], "110": ["10", "12"], |
| 2272 | "101": ["01", "06"], "111": ["11", "13"], |
| 2273 | "102": ["00", "07"], "112": ["14", "16"], |
| 2274 | "103": ["02", "05"], "113": ["15", "17"], |
| 2275 | |
| 2276 | "120": ["22", "24"], "130": ["33", "36"], |
| 2277 | "121": ["20", "26"], "131": ["32", "37"], |
| 2278 | "122": ["21", "27"], "132": ["31", "34"], |
| 2279 | "123": ["23", "25"], "133": ["30", "35"], |
| 2280 | |
| 2281 | "140": ["43", "45"], "150": ["50", "52"], |
| 2282 | "141": ["40", "46"], "151": ["51", "53"], |
| 2283 | "142": ["41", "47"], "152": ["54", "56"], |
| 2284 | "143": ["42", "44"], "153": ["55", "57"], |
| 2285 | |
| 2286 | "160": ["60", "66"], "170": ["73", "76"], |
| 2287 | "161": ["63", "65"], "171": ["72", "77"], |
| 2288 | "162": ["62", "64"], "172": ["71", "74"], |
| 2289 | "163": ["61", "67"], "173": ["70", "75"], |
| 2290 | |
| 2291 | |
| 2292 | |
| 2293 | "104": ["100", "102", "105"], "114": ["110", "111", "115"], |
| 2294 | "105": ["101", "103", "104"], "115": ["112", "113", "114"], |
| 2295 | |
| 2296 | "124": ["120", "121", "125"], "134": ["130", "131", "135"], |
| 2297 | "125": ["122", "123", "124"], "135": ["132", "133", "134"], |
| 2298 | |
| 2299 | "144": ["140", "141", "145"], "154": ["150", "151", "155"], |
| 2300 | "145": ["142", "143", "144"], "155": ["152", "153", "154"], |
| 2301 | |
| 2302 | "164": ["160", "161", "165"], "174": ["170", "171", "175"], |
| 2303 | "165": ["162", "163", "164"], "175": ["172", "173", "174"] |
| 2304 | } |
| 2305 | |
| 2306 | return graph.Graph(edge_dict, pos=pos_dict, name="Balaban 11-cage") |
| 2307 | |