[GAP Forum] GAP code regarding power graph of a finite group

Leonard Soicher l.h.soicher at qmul.ac.uk
Wed Mar 9 18:24:23 GMT 2022


Dear Raja Rawat, Dear GAP-Forum,

Assuming you don't want to join a vertex to itself in the power
graph, the appended function uses the GRAPE package for GAP
to construct the power graph of a given finite group and to return this
graph in GRAPE format. Of course, you first need to load the
GRAPE package via the LoadPackage command.

Best,
Leonard

PowerGraph := function(G)
#
# Given a finite group G, this function returns the power graph of G.
#
return Graph(G, AsSet(G), OnPoints,
   function(x,y) return x<>y and (x in Group(y) or y in Group(x)); end,
true);
end;

________________________________________
From: Raja Rawat <rawatraja1989 at gmail.com>
Sent: 01 March 2022 05:42
To: forum at gap-system.org
Subject: [GAP Forum] GAP code regarding power graph of a finite group

The power graph of a finite group is the graph whose vertex set is the
group, two elements being adjacent if one is a power of the other.
Any help regarding the GAP code of a finite group power graph would be
appreciated.

Thank you and best regards,
Raja Rawat

_______________________________________________
Forum mailing list
Forum at gap-system.org
https://mail.gap-system.org/mailman/listinfo/forum



More information about the Forum mailing list