This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

GraphPower

GraphPower
gives the graph-n^(th) power of the graph g.
  • The graph-n^(th) power has the same vertices and vertex is adjacent to vertex only if there is a path of at most length n from to .
Graph power of cycle graphs:
Graph power of cycle graphs:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
GraphPower works with undirected graphs:
Directed graphs:
Raising a connected graph to the power of its graph diameter gives a complete graph:
Graph-^(th) powers can be obtained by the sum of the first powers of the adjacency matrix:
New in 8