GraphTheory[GraphPower]
|
Calling Sequence
|
|
GraphPower(G, k)
|
|
Parameters
|
|
G
|
-
|
unweighted graph
|
k
|
-
|
positive integer
|
|
|
|
|
Description
|
|
•
|
GraphPower returns the k-th power graph of a given graph which may be directed or undirected. In the k-th power graph, two vertices are connected if there exists a path of length at most k in the original graph.
|
•
|
The algorithm adds powers the adjacency matrix of G and removes any multiple edges.
|
|
|
Examples
|
|
>
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
>
|
|
| (3) |
>
|
|
| (4) |
>
|
|
>
|
|
| (5) |
>
|
|
| (6) |
>
|
|
|
|
Download Help Document
Was this information helpful?