GraphPower
GraphPower[g, n] gives the graph n-th power of the graph g.
GraphPower[{v -> w, …}, …]uses rulesv -> wto specify the graphg.
Examples
GraphPower[CycleGraph[10], 2]GraphPower[PathGraph[Range[6]], 3]Please visit the official Wolfram Language Reference for more details.