WOLFRAM

GraphPower[g,n]

gives the graph-n^(th) power of the graph g.

GraphPower[{vw,},]

uses rules vw to specify the graph g.

Details and Options

  • The graph-n^(th) power has the same vertices, and vertex vi is adjacent to vertex vj only if there is a path of at most length n from vi to vj.
  • GraphPower works with undirected graphs, directed graphs, multigraphs, and mixed graphs.

Examples

open allclose all

Basic Examples  (1)Summary of the most common use cases

Graph power of cycle graphs:

Out[1]=1
Out[2]=2

Scope  (5)Survey of the scope of standard use cases

GraphPower works with undirected graphs:

Out[1]=1

Directed graphs:

Out[1]=1

Multigraphs:

Out[1]=1

Mixed graphs:

Out[1]=1

Use rules to specify the graph:

Out[1]=1

Properties & Relations  (2)Properties of the function, and connections to other functions

Raising a connected graph to the power of its graph diameter gives a complete graph:

Out[1]=1
Out[2]=2
Out[3]=3

Graph-^(th) powers can be obtained by the sum of the first powers of the adjacency matrix:

Out[1]=1
Out[3]=3
Wolfram Research (2010), GraphPower, Wolfram Language function, https://reference.wolfram.com/language/ref/GraphPower.html (updated 2015).
Wolfram Research (2010), GraphPower, Wolfram Language function, https://reference.wolfram.com/language/ref/GraphPower.html (updated 2015).

Text

Wolfram Research (2010), GraphPower, Wolfram Language function, https://reference.wolfram.com/language/ref/GraphPower.html (updated 2015).

Wolfram Research (2010), GraphPower, Wolfram Language function, https://reference.wolfram.com/language/ref/GraphPower.html (updated 2015).

CMS

Wolfram Language. 2010. "GraphPower." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/GraphPower.html.

Wolfram Language. 2010. "GraphPower." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/GraphPower.html.

APA

Wolfram Language. (2010). GraphPower. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GraphPower.html

Wolfram Language. (2010). GraphPower. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GraphPower.html

BibTeX

@misc{reference.wolfram_2025_graphpower, author="Wolfram Research", title="{GraphPower}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/GraphPower.html}", note=[Accessed: 06-May-2025 ]}

@misc{reference.wolfram_2025_graphpower, author="Wolfram Research", title="{GraphPower}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/GraphPower.html}", note=[Accessed: 06-May-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_graphpower, organization={Wolfram Research}, title={GraphPower}, year={2015}, url={https://reference.wolfram.com/language/ref/GraphPower.html}, note=[Accessed: 06-May-2025 ]}

@online{reference.wolfram_2025_graphpower, organization={Wolfram Research}, title={GraphPower}, year={2015}, url={https://reference.wolfram.com/language/ref/GraphPower.html}, note=[Accessed: 06-May-2025 ]}