An automorphism of a graph GVE is any permutation f of V suc

An automorphism of a graph G=(V,E) is any permutation f of V such that if (x , y) is an edge of G, then (f(x) , f(y)) is an edge in G. Write a backtracking algorithm that generates all automorphisms of a given input graph G.

Solution

Backtracking algorithm that generates all automorphisms of a given input graph G-

(demo graph automorphism 120)=


void gw.,gmph.automorphism(
GmphWin& w)

{
GRAPH<string.string>& G = gw.get.graph();
node.array<node> M(G,nil);
list<node_array<node>> L;
graph_isoomorphism(G.G,M,L);

panel P;
If( L.lenglh() > 1 ) {

Make_proof.panel(P.
string(\"The automorphism group has order i.Length()).true);
in gw.open.panel(P) ) ( // proof button pressed
node.array<point> pos1(G):
nodearray<point> posZ(G):
node v;
gw.save_all_nttributes();
forall(M.L) {
gw.get_position(posl);

forall_nodes(v.G)
Pos2[M[v]] =Pos1[v]:
gw.s¢t.position(pos2);
gw.set.layout(pos2);
panel Q:
make_yes_no_panel(Q. “Continue” .true);
if ( gw.open_panel(Q) ) // no button pressed

THANKYOU

An automorphism of a graph G=(V,E) is any permutation f of V such that if (x , y) is an edge of G, then (f(x) , f(y)) is an edge in G. Write a backtracking algo

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site