  The isomorphism problem for graphs (GI) and the isomorphism problem for
groups (GrISO) have been studied extensively by researchers. The current best
algorithms for both these problems run in quasipolynomial time. In this paper,
we study the isomorphism problem of graphs that are defined in terms of groups,
namely power graphs, directed power graphs, and enhanced power graphs. It is
not enough to check the isomorphism of the underlying groups to solve the
isomorphism problem of such graphs as the power graphs (or the directed power
graphs or the enhanced power graphs) of two nonisomorphic groups can be
isomorphic. Nevertheless, it is interesting to ask if the underlying group
structure can be exploited to design better isomorphism algorithms for these
graphs. We design polynomial time algorithms for the isomorphism problems for
the power graphs, the directed power graphs and the enhanced power graphs
arising from finite nilpotent groups. In contrast, no polynomial time algorithm
is known for the group isomorphism problem, even for nilpotent groups of class
2.
  We note that our algorithm does not require the underlying groups of the
input graphs to be given. The isomorphism problems of power graphs and enhanced
power graphs are solved by first computing the directed power graphs from the
input graphs. The problem of efficiently computing the directed power graph
from the power graph or the enhanced power graph is due to Cameron [IJGT'22].
Therefore, we give a solution to Cameron's question.
