Nathan Carter <[email protected]> writes:
>>
>> sage: foo.edges()
>> [(0, 1, 2), (0, 2, 1), (2, 3, 3)]
>> sage: bar.edges()
>> [(0, 1, 1), (0, 2, 2), (2, 3, 3)]
>> sage: bar.is_isomorphic(foo, edge_labels = True)
>> True
>
> I think there is a label-preserving isomorphism here, isn't there?
>
> 0->0 1->2 2->1 3->3
>
No, this is not an isomorphism. The output of foo.edges() gives the
edges as triples, the first two slots are the vertices the edge is
incident to and the third slot is the label of the edge. So,foo looks
like this: ( I hope the formating is preserved)
2 1 3
1 ----- 0 ----- 2 ----- 3
OTOH bar looks like this:
1 2 3
1 ----- 0 ----- 2 ----- 3
Clearly there is no isomorphism sending vertex 1 to vertex 2.
Actually there is only one non-trivial automorphism of this
graph 0 <--> 2 , 1 <--> 3. sage knows this:
sage: foo.automorphism_group()
Permutation Group with generators [(1,3)(2,4)]
BTW, shouldn't the generator of the automorphism group be presented
as "(0,2)(1,3)"?
Best,
Nikos
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---