GraphTheory
GraphPower
construct graph power of a graph
Calling Sequence
Parameters
Description
Examples
GraphPower(G, k)
G
-
unweighted graph
k
positive integer
GraphPower returns the kth graph power of a given graph. This is a graph in which two vertices are connected if there exists a path of length at most k in the original graph.
The input graph G may be directed or undirected.
The algorithm adds powers of the adjacency matrix of G and removes any multiple edges.
See Also
AdjacencyMatrix
Diameter
ShortestPath
Download Help Document