Illustrating isomorphism of graphs
Illustrating isomorphism of graphs
This notebook provides code to generate the animation shown in this math.stackexchange post. The basic question is to show that the following two graphs are isomorphic:
Out[]=
Once you know, as pointed out in the post, that
is an isomorphism, you can illustrate the isomorphism with an animation that morphs one graph into the other:
f(A)=7,f(B)=4,f(C)=3,f(D)=6,f(E)=5,f(F)=2,f(G)=1
is an isomorphism, you can illustrate the isomorphism with an animation that morphs one graph into the other:
In[]:=
vc1=#-{1,1}&/@{{0,2},{1,2},{2,2},{1,1},{0,0},{1,0},{2,0}};vc2={{1/2,-Sqrt[3]/2},{-1/2,-Sqrt[3]/2},{-1,0},{1/2,Sqrt[3]/2},{1,0},{0,0},{-1/2,Sqrt[3]/2}};vc[t_]:=t*vc2+(1-t)vc1;Animate[Graph[{1,2,3,4,5,6,7},UndirectedEdge@@@{{1,2},{2,3},{3,7},{7,6},{6,5},{5,1},{1,6},{4,5},{4,7}},PlotRange1.1,VertexCoordinatesvc[t]],{t,0,1},AnimationDirectionForwardBackward,SaveDefinitionsTrue]
Out[]=