GraphTheory - Maple Programming Help

Home : Support : Online Help : Mathematics : Discrete Mathematics : Graph Theory : GraphTheory Package : GraphTheory/GraphRank

GraphTheory

 GraphRank

 Calling Sequence GraphRank(G) GraphRank(G, E)

Parameters

 G - graph E - (optional) set of edges or arcs of the (di)graph

Description

 • GraphRank returns rank of a graph G which is the number of vertices minus the number of connected components of G. If a set of edges (arcs) E of the (di)graph is specified, then the rank is number of vertices minus the number of connected components of the spanning subgraph of G with edge set E.

Examples

 > $\mathrm{with}\left(\mathrm{GraphTheory}\right):$
 > $G≔\mathrm{Graph}\left(\left\{\left\{1,2\right\},\left\{3,4\right\},\left\{4,5\right\}\right\}\right):$
 > $\mathrm{GraphRank}\left(G\right)$
 ${3}$ (1)
 > $\mathrm{GraphRank}\left(G,\left\{\left\{1,2\right\},\left\{3,4\right\}\right\}\right)$
 ${2}$ (2)