Graph colouring: Difference between revisions

(Fix Ex2)
Line 188:
for name, connections in [
('Ex1', "0-1 1-2 2-0 3"),
('Ex2', "1-6 1-7 1-8 2-5 2-7 2-8 3-5 3-6 3-8 4-5 4-6 4-87"),
('Ex3', "1-4 1-6 1-8 3-2 3-6 3-8 5-2 5-4 5-8 7-2 7-4 7-6"),
]:
Line 216:
4-5: Colour: 0, 1
4-6: Colour: 0, 1
4-87: Colour: 0, 1
#Nodes: 8
#Edges: 12
Line 237:
#Edges: 12
#Colours: 2</pre>
 
Python dicts preserve insertion order and Ex2/Ex3 edges are traced in a similar way which could be the cause of exactly the same colours used for Ex2 and Ex3. The wp article must use an earlier version of Python/different ordering of edge definitions.
Anonymous user