-
Notifications
You must be signed in to change notification settings - Fork 1
/
topo5.py
73 lines (72 loc) · 3.36 KB
/
topo5.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# a Star topology centered on Z
# D G J
# \ | /
# \ | /
# E H K
# \ | /
# \ | /
# F I L
# \ | /
# \ | /
# A --- B --- C --------- Z -------- M --- N --- O
# / | \
# / | \
# P S V
# / | \
# / | \
# Q T W
# / | \
# / | \
# R U X
#
topo = { 'A' : ['B'],
'B' : ['A', 'C'],
'C' : ['B', 'Z'],
'D' : ['E'],
'E' : ['D', 'F'],
'F' : ['E', 'Z'],
'G' : ['H'],
'H' : ['G', 'I'],
'I' : ['H', 'Z'],
'J' : ['K'],
'K' : ['J', 'L'],
'L' : ['K', 'Z'],
'M' : ['Z', 'N'],
'N' : ['M', 'O'],
'O' : ['N'],
'P' : ['Z', 'Q'],
'Q' : ['P', 'R'],
'R' : ['Q'],
'S' : ['Z', 'T'],
'T' : ['S', 'U'],
'U' : ['T'],
'V' : ['Z', 'W'],
'W' : ['V', 'X'],
'X' : ['W'],
'Z' : ['C', 'F', 'I', 'L', 'M', 'P', 'S', 'V']}
ans = \
'A:A0,B1,C2,D6,E5,F4,G6,H5,I4,J6,K5,L4,M4,N5,O6,P4,Q5,R6,S4,T5,U6,V4,W5,X6,Z3' + \
'B:A1,B0,C1,D5,E4,F3,G5,H4,I3,J5,K4,L3,M3,N4,O5,P3,Q4,R5,S3,T4,U5,V3,W4,X5,Z2' + \
'C:A2,B1,C0,D4,E3,F2,G4,H3,I2,J4,K3,L2,M2,N3,O4,P2,Q3,R4,S2,T3,U4,V2,W3,X4,Z1' + \
'D:A6,B5,C4,D0,E1,F2,G6,H5,I4,J6,K5,L4,M4,N5,O6,P4,Q5,R6,S4,T5,U6,V4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