GraphTheory - Maple Programming Help

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

GraphTheory

 SequenceGraph

 Calling Sequence SequenceGraph(L)

Parameters

 L - list

Description

 • The SequenceGraph command returns a graph with the specified degree sequence given as input, if such a graph exists. It raises an exception otherwise. To check if a graph with given degree sequence exists, use IsGraphicSequence.

Examples

 > $\mathrm{with}\left(\mathrm{GraphTheory}\right):$
 > $L≔\left[3,2,4,2,3,4,5,7\right]$
 ${L}{≔}\left[{3}{,}{2}{,}{4}{,}{2}{,}{3}{,}{4}{,}{5}{,}{7}\right]$ (1)
 > $\mathrm{IsGraphicSequence}\left(L\right)$
 ${\mathrm{true}}$ (2)
 > $G≔\mathrm{SequenceGraph}\left(L\right)$
 ${G}{≔}{\mathrm{Graph 1: an undirected unweighted graph with 8 vertices and 15 edge\left(s\right)}}$ (3)
 > $\mathrm{sort}\left(\mathrm{DegreeSequence}\left(G\right)\right)$
 $\left[{2}{,}{2}{,}{3}{,}{3}{,}{4}{,}{4}{,}{5}{,}{7}\right]$ (4)